diff --git a/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.format.ps1xml b/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.format.ps1xml index 3e2340ad3169..c912cca96067 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.format.ps1xml +++ b/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.format.ps1xml @@ -41,28 +41,6 @@ - - Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.SavingsPlanUpdateAcceptedResponseHeaders - - Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.SavingsPlanUpdateAcceptedResponseHeaders - - - - - - - - - - - - Location - - - - - - Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.ErrorDetail diff --git a/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.psd1 b/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.psd1 index f23c5a86af76..af234d3c71b0 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.psd1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.psd1 @@ -1,142 +1,24 @@ -# -# Module manifest for module 'Az.BillingBenefits' -# -# Generated by: Microsoft Corporation -# -# Generated on: 1/19/2023 -# - @{ - -# Script module or binary module file associated with this manifest. -RootModule = './Az.BillingBenefits.psm1' - -# Version number of this module. -ModuleVersion = '0.1.0' - -# Supported PSEditions -CompatiblePSEditions = 'Core', 'Desktop' - -# ID used to uniquely identify this module -GUID = '7c220d70-27ec-4403-aedd-429aa925a6a6' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = 'Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Microsoft Azure PowerShell: BillingBenefits cmdlets' - -# Minimum version of the PowerShell engine required by this module -PowerShellVersion = '5.1' - -# Name of the PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -DotNetFrameworkVersion = '4.7.2' - -# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# ClrVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.11.0'; }) - -# Assemblies that must be loaded prior to importing this module -RequiredAssemblies = './bin/Az.BillingBenefits.private.dll' - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = './Az.BillingBenefits.format.ps1xml' - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions 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 functions to export. -FunctionsToExport = 'Get-AzBillingBenefitsReservationOrderAlias', - 'Get-AzBillingBenefitsSavingsPlan', - 'Get-AzBillingBenefitsSavingsPlanList', - 'Get-AzBillingBenefitsSavingsPlanOrder', - 'Get-AzBillingBenefitsSavingsPlanOrderAlias', - 'Invoke-AzBillingBenefitsElevateSavingPlanOrder', - 'Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation', - 'Invoke-AzBillingBenefitsSavingsPlanUpdateValidation', - 'New-AzBillingBenefitsReservationOrderAlias', - 'New-AzBillingBenefitsSavingsPlanOrderAlias', - 'Update-AzBillingBenefitsSavingsPlan' - -# Cmdlets 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 cmdlets to export. -CmdletsToExport = @() - -# Variables to export from this module -# 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 = '*' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - + GUID = '7c220d70-27ec-4403-aedd-429aa925a6a6' + RootModule = './Az.BillingBenefits.psm1' + ModuleVersion = '0.1.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: BillingBenefits cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.BillingBenefits.private.dll' + FormatsToProcess = './Az.BillingBenefits.format.ps1xml' + FunctionsToExport = 'Get-AzBillingBenefitsReservationOrderAlias', 'Get-AzBillingBenefitsSavingsPlan', 'Get-AzBillingBenefitsSavingsPlanList', 'Get-AzBillingBenefitsSavingsPlanOrder', 'Get-AzBillingBenefitsSavingsPlanOrderAlias', 'Invoke-AzBillingBenefitsElevateSavingPlanOrder', 'Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation', 'Invoke-AzBillingBenefitsSavingsPlanUpdateValidation', 'New-AzBillingBenefitsReservationOrderAlias', 'New-AzBillingBenefitsSavingsPlanOrderAlias', 'Update-AzBillingBenefitsSavingsPlan', '*' + AliasesToExport = '*' + PrivateData = @{ PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','BillingBenefits' - - # A URL to the license for this module. - LicenseUri = 'https://aka.ms/azps-license' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/Azure/azure-powershell' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* First preview release for module Az.BillingBenefits' - - # Prerelease string of this module - # Prerelease = '' - - # Flag to indicate whether the module requires explicit user acceptance for install/update/save - # RequireLicenseAcceptance = $false - - # External dependent modules of this module - # ExternalModuleDependencies = @() - - } # End of PSData hashtable - - } # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'BillingBenefits' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } } - diff --git a/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.psm1 b/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.psm1 index 90962c16830e..19497f11feaf 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.psm1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/Az.BillingBenefits.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.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/README.md b/src/BillingBenefits/BillingBenefits.Autorest/README.md index 0967efb22dc0..beec44fb8afb 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/README.md +++ b/src/BillingBenefits/BillingBenefits.Autorest/README.md @@ -3,7 +3,6 @@ This directory contains the PowerShell module for the BillingBenefits service. --- - ## Info - Modifiable: yes - Generated: all @@ -45,9 +44,9 @@ In this directory, run AutoRest: > see https://aka.ms/autorest ``` yaml -branch: bab95d5636c7d47cc5584ea8dadb21199d229ca7 +commit: bab95d5636c7d47cc5584ea8dadb21199d229ca7 require: - - $(this-folder)/../readme.azure.noprofile.md + - $(this-folder)/../../readme.azure.noprofile.md input-file: - $(repo)/specification/billingbenefits/resource-manager/Microsoft.BillingBenefits/stable/2022-11-01/billingbenefits.json module-version: 0.1.0 @@ -57,6 +56,10 @@ subject-prefix: $(service-name) resourcegroup-append: true nested-object-to-string: true +# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option +use-extension: + "@autorest/powershell": "3.x" + directive: ### No inline - no-inline: diff --git a/src/BillingBenefits/BillingBenefits.Autorest/build-module.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/build-module.ps1 index 4b08b7180af3..c6ca54963130 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/build-module.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/build-module.ps1 @@ -123,6 +123,10 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' $modelCmdlets = @() +$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets' +if (Test-Path $modelCmdletFolder) { + $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder +} if ($modelCmdlets.Count -gt 0) { . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') CreateModelCmdlet($modelCmdlets) @@ -139,7 +143,8 @@ if($NoDocs) { $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue } $null = New-Item -ItemType Directory -Force -Path $docsFolder - Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo } Write-Host -ForegroundColor Green 'Creating format.ps1xml...' @@ -158,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol Write-Host -ForegroundColor Green 'Creating example stubs...' Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder +if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) +{ + Write-Host -ForegroundColor Green 'Creating ux metadata...' + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') +} + Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/BillingBenefits/BillingBenefits.Autorest/create-model-cmdlets.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/create-model-cmdlets.ps1 index d4acfbc52e55..96b5544d7950 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/create-model-cmdlets.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/create-model-cmdlets.ps1 @@ -23,9 +23,13 @@ function CreateModelCmdlet { } $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' - $ModuleName = 'BillingBenefits' $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' $null = New-Item -ItemType Directory -Force -Path $OutputDir + if (''.length -gt 0) { + $ModuleName = '' + } else { + $ModuleName = 'Az.BillingBenefits' + } $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs $Content = '' @@ -64,10 +68,10 @@ function CreateModelCmdlet { $ObjectType = $Model $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" # remove duplicated module name - if ($ObjectType.StartsWith($ModuleName)) { + if ($ObjectType.StartsWith('BillingBenefits')) { $ModulePrefix = '' } else { - $ModulePrefix = $ModuleName + $ModulePrefix = 'BillingBenefits' } $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir @@ -158,7 +162,7 @@ Create an in-memory object for ${ObjectType}. .Outputs ${ObjectTypeWithNamespace} .Link -https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object +https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object #> function New-Az${ModulePrefix}${ObjectType}Object { [OutputType('${ObjectTypeWithNamespace}')] diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsReservationOrderAlias.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsReservationOrderAlias.ps1 index 75c71dbe3196..78d3544d18de 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsReservationOrderAlias.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsReservationOrderAlias.ps1 @@ -69,7 +69,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -121,7 +122,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -143,6 +144,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlan.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlan.ps1 index 5d9fe83d5238..67577e116851 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlan.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlan.ps1 @@ -80,7 +80,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -132,7 +133,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -155,6 +156,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanList.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanList.ps1 index 62697a571a46..c8d1aa63ce00 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanList.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanList.ps1 @@ -77,7 +77,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -129,7 +130,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -150,6 +151,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanOrder.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanOrder.ps1 index 9117e5689c9c..0a2d94999986 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanOrder.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanOrder.ps1 @@ -72,7 +72,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -124,7 +125,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -147,6 +148,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanOrderAlias.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanOrderAlias.ps1 index 27b276b0d522..50182e4316d6 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanOrderAlias.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/Get-AzBillingBenefitsSavingsPlanOrderAlias.ps1 @@ -69,7 +69,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -121,7 +122,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -143,6 +144,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsElevateSavingPlanOrder.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsElevateSavingPlanOrder.ps1 index 611cb462795c..0ddbbe576da2 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsElevateSavingPlanOrder.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsElevateSavingPlanOrder.ps1 @@ -68,7 +68,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -120,7 +121,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -142,6 +143,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.ps1 index 13830a778cc4..63057a7563d8 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.ps1 @@ -59,7 +59,6 @@ BENEFIT : . [AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription. [AppliedScopePropertyTenantId ]: Tenant ID where the benefit is applied. [AppliedScopeType ]: Type of the Applied Scope. - [AzureAsyncOperation ]: [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. [BillingScopeId ]: Subscription that will be charged for purchasing the benefit [CommitmentAmount ]: @@ -67,7 +66,6 @@ BENEFIT : . [CommitmentGrain ]: Commitment grain. [DisplayName ]: Display name [Kind ]: Resource provider kind - [RetryAfter ]: [SkuName ]: Name of the SKU to be applied [Term ]: Represent benefit term in ISO 8601 format. @@ -85,7 +83,6 @@ BODY : . [AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription. [AppliedScopePropertyTenantId ]: Tenant ID where the benefit is applied. [AppliedScopeType ]: Type of the Applied Scope. - [AzureAsyncOperation ]: [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. [BillingScopeId ]: Subscription that will be charged for purchasing the benefit [CommitmentAmount ]: @@ -93,7 +90,6 @@ BODY : . [CommitmentGrain ]: Commitment grain. [DisplayName ]: Display name [Kind ]: Resource provider kind - [RetryAfter ]: [SkuName ]: Name of the SKU to be applied [Term ]: Represent benefit term in ISO 8601 format. .Link @@ -123,7 +119,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -175,7 +172,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -197,6 +194,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.ps1 index 915b1d6f41b6..eb2dfa7f88a6 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.ps1 @@ -152,7 +152,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -204,7 +205,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -228,6 +229,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/New-AzBillingBenefitsReservationOrderAlias.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/New-AzBillingBenefitsReservationOrderAlias.ps1 index f8eeaaafaa95..b3f40a82b4e2 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/New-AzBillingBenefitsReservationOrderAlias.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/New-AzBillingBenefitsReservationOrderAlias.ps1 @@ -225,7 +225,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -289,7 +290,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -313,6 +314,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/New-AzBillingBenefitsSavingsPlanOrderAlias.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/New-AzBillingBenefitsSavingsPlanOrderAlias.ps1 index eda287babec0..6937ef34606b 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/New-AzBillingBenefitsSavingsPlanOrderAlias.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/New-AzBillingBenefitsSavingsPlanOrderAlias.ps1 @@ -49,7 +49,6 @@ BODY : Savings plan order alias [AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription. [AppliedScopePropertyTenantId ]: Tenant ID where the benefit is applied. [AppliedScopeType ]: Type of the Applied Scope. - [AzureAsyncOperation ]: [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. [BillingScopeId ]: Subscription that will be charged for purchasing the benefit [CommitmentAmount ]: @@ -57,7 +56,6 @@ BODY : Savings plan order alias [CommitmentGrain ]: Commitment grain. [DisplayName ]: Display name [Kind ]: Resource provider kind - [RetryAfter ]: [SkuName ]: Name of the SKU to be applied [Term ]: Represent benefit term in ISO 8601 format. @@ -213,7 +211,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -277,7 +276,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -301,6 +300,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/ProxyCmdletDefinitions.ps1 index 52b1e671e5fd..1b3178749045 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -69,7 +69,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -121,7 +122,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -143,6 +144,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -250,7 +255,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -302,7 +308,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -323,6 +329,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -422,7 +432,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -474,7 +485,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -496,6 +507,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -598,7 +613,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -650,7 +666,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -673,6 +689,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -783,7 +803,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -835,7 +856,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -858,6 +879,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -956,7 +981,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -1008,7 +1034,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -1030,6 +1056,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1119,7 +1149,6 @@ BENEFIT : . [AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription. [AppliedScopePropertyTenantId ]: Tenant ID where the benefit is applied. [AppliedScopeType ]: Type of the Applied Scope. - [AzureAsyncOperation ]: [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. [BillingScopeId ]: Subscription that will be charged for purchasing the benefit [CommitmentAmount ]: @@ -1127,7 +1156,6 @@ BENEFIT : . [CommitmentGrain ]: Commitment grain. [DisplayName ]: Display name [Kind ]: Resource provider kind - [RetryAfter ]: [SkuName ]: Name of the SKU to be applied [Term ]: Represent benefit term in ISO 8601 format. @@ -1145,7 +1173,6 @@ BODY : . [AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription. [AppliedScopePropertyTenantId ]: Tenant ID where the benefit is applied. [AppliedScopeType ]: Type of the Applied Scope. - [AzureAsyncOperation ]: [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. [BillingScopeId ]: Subscription that will be charged for purchasing the benefit [CommitmentAmount ]: @@ -1153,7 +1180,6 @@ BODY : . [CommitmentGrain ]: Commitment grain. [DisplayName ]: Display name [Kind ]: Resource provider kind - [RetryAfter ]: [SkuName ]: Name of the SKU to be applied [Term ]: Represent benefit term in ISO 8601 format. .Link @@ -1183,7 +1209,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -1235,7 +1262,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -1257,6 +1284,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1439,7 +1470,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -1491,7 +1523,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -1515,6 +1547,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1770,7 +1806,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -1834,7 +1871,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -1858,6 +1895,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1937,7 +1978,6 @@ BODY : Savings plan order alias [AppliedScopePropertySubscriptionId ]: Fully-qualified identifier of the subscription. [AppliedScopePropertyTenantId ]: Tenant ID where the benefit is applied. [AppliedScopeType ]: Type of the Applied Scope. - [AzureAsyncOperation ]: [BillingPlan ]: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. [BillingScopeId ]: Subscription that will be charged for purchasing the benefit [CommitmentAmount ]: @@ -1945,7 +1985,6 @@ BODY : Savings plan order alias [CommitmentGrain ]: Commitment grain. [DisplayName ]: Display name [Kind ]: Resource provider kind - [RetryAfter ]: [SkuName ]: Name of the SKU to be applied [Term ]: Represent benefit term in ISO 8601 format. @@ -2101,7 +2140,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -2165,7 +2205,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -2189,6 +2229,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -2412,7 +2456,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -2470,7 +2515,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -2494,6 +2539,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/exports/Update-AzBillingBenefitsSavingsPlan.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/exports/Update-AzBillingBenefitsSavingsPlan.ps1 index c17cd7454da7..5da6f120d443 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/exports/Update-AzBillingBenefitsSavingsPlan.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/exports/Update-AzBillingBenefitsSavingsPlan.ps1 @@ -193,7 +193,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -251,7 +252,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -275,6 +276,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generate-help.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/generate-help.ps1 index e57cc3be413a..178abe0ea98c 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generate-help.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/generate-help.ps1 @@ -66,8 +66,8 @@ foreach($directory in $directories) $docsPath = Join-Path $docsFolder $directory.Name $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue $examplesPath = Join-Path $examplesFolder $directory.Name - - Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo Write-Host -ForegroundColor Green "Created documentation in '$docsPath'" } diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generate-portal-ux.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/generate-portal-ux.ps1 new file mode 100644 index 000000000000..fda6eefcaff2 --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/generate-portal-ux.ps1 @@ -0,0 +1,375 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# +# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. +# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$moduleName = 'Az.BillingBenefits' +$rootModuleName = '' +if ($rootModuleName -eq "") +{ + $rootModuleName = $moduleName +} +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1") +$modulePath = $modulePsd1.FullName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll") +$instance = [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName +$parameterSetsInfo = Get-Module -Name "$moduleName.private" + +$buildinFunctions = @("Export-CmdletSurface", "Export-ExampleStub", "Export-FormatPs1xml", "Export-HelpMarkdown", "Export-ModelSurface", "Export-ProxyCmdlet", "Export-Psd1", "Export-TestStub", "Get-CommonParameter", "Get-ModuleGuid", "Get-ScriptCmdlet") + +function Test-FunctionSupported() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + If ($buildinfunctions.Contains($FunctionName)) { + return $false + } + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity")) { + return $false + } + If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { + return $false + } + + $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName] + foreach ($parameterInfo in $parameterSetInfo.Parameters.Values) + { + $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories + $invalideCategory = @('Query', 'Body') + if ($invalideCategory -contains $category) + { + return $false + } + } + + $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" + if ($customFiles.Length -ne 0) + { + return $false + } + + return $true +} + +function Get-MappedCmdletFromFunctionName() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + + return $cmdletName +} + +function Get-ParameterAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo, + [Parameter()] + [String] + $AttributeName + ) + return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $CmdletInfo, + [Parameter()] + [String] + $AttributeName + ) + + return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletDescription() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [String] + $CmdletName + ) + $helpInfo = Get-Help $CmdletName -Full + + $description = $helpInfo.Description.Text + if ($null -eq $description) + { + return "" + } + return $description +} + +# Test whether the parameter is from swagger http path +function Test-ParameterFromSwagger() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo + ) + $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories + $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute" + if ($null -ne $doNotExport) + { + return $false + } + + $valideCategory = @('Path') + if ($valideCategory -contains $category) + { + return $true + } + return $false +} + +function New-ExampleForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories + $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName + $name = $parameter.Name + $result += [ordered]@{ + name = "-$Name" + value = "[$category.$sourceName]" + } + } + + return $result +} + +function New-ParameterArrayInParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory + $parameterName = $parameter.Name + $parameterType = $parameter.ParameterType.ToString().Split('.')[1] + if ($parameter.SwitchParameter) + { + $parameterSignature = "-$parameterName" + } + else + { + $parameterSignature = "-$parameterName <$parameterType>" + } + if ($parameterName -eq "SubscriptionId") + { + $isMandatory = $false + } + if (-not $isMandatory) + { + $parameterSignature = "[$parameterSignature]" + } + $result += $parameterSignature + } + + return $result +} + +function New-MetadataForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute" + $httpPath = $httpAttribute.Path + $apiVersion = $httpAttribute.ApiVersion + $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value + $resourcePath = "/" + $httpPath.Split("$provider/")[1] + $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/" + $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name + $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description + [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo + [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo + + return @{ + Path = $httpPath + Provider = $provider + ResourceType = $resourceType + ApiVersion = $apiVersion + CmdletName = $cmdletName + Description = $description + Example = $example + Signature = @{ + parameters = $signature + } + } +} + +function Merge-WithExistCmdletMetadata() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Collections.Specialized.OrderedDictionary] + $ExistedCmdletInfo, + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature + $ExistedCmdletInfo.examples += [ordered]@{ + description = $ParameterSetMetadata.Description + parameters = $ParameterSetMetadata.Example + } + + return $ExistedCmdletInfo +} + +function New-MetadataForCmdlet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $cmdletName = $ParameterSetMetadata.CmdletName + $description = Get-CmdletDescription $cmdletName + $result = [ordered]@{ + name = $cmdletName + description = $description + path = $ParameterSetMetadata.Path + help = [ordered]@{ + learnMore = [ordered]@{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower() + } + parameterSets = @() + } + examples = @() + } + $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata + return $result +} + +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-functionSupported($_) } +$resourceTypes = @{} +foreach ($parameterSetName in $parameterSets) +{ + $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName] + $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo + $cmdletName = $parameterSetMetadata.CmdletName + if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName))) + { + continue + } + if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType)) + { + $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName } + if ($ExistedCmdletInfo) + { + $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo + } + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{ + resourceType = $parameterSetMetadata.ResourceType + apiVersion = $parameterSetMetadata.ApiVersion + learnMore = @{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower() + } + commands = @($cmdletInfo) + provider = $parameterSetMetadata.Provider + } + } +} + +$UXFolder = 'UX' +if (Test-Path $UXFolder) +{ + Remove-Item -Path $UXFolder -Recurse +} +$null = New-Item -ItemType Directory -Path $UXFolder + +foreach ($resourceType in $resourceTypes.Keys) +{ + $resourceTypeFileName = $resourceType -replace "/", "-" + if ($resourceTypeFileName -eq "") + { + continue + } + $resourceTypeInfo = $resourceTypes[$resourceType] + $provider = $resourceTypeInfo.provider + $providerFolder = "$UXFolder/$provider" + if (-not (Test-Path $providerFolder)) + { + $null = New-Item -ItemType Directory -Path $providerFolder + } + $resourceTypeInfo.Remove("provider") + $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" +} \ No newline at end of file diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/Module.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/Module.cs index 7fbb8f1ce872..8ab37b499b89 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/Module.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/Module.cs @@ -17,6 +17,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits 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 @@ -51,6 +53,9 @@ public partial class Module /// The delegate to get the telemetry Id. public GetTelemetryIdDelegate GetTelemetryId { get; set; } + /// The delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } + /// Backing field for property. private static Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module _instance; @@ -72,6 +77,9 @@ public partial class Module /// The ResourceID for this module (azure arm). public string ResourceId => @"Az.BillingBenefits"; + /// 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; } diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/BillingBenefits.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/BillingBenefits.cs index 9b836feea7dd..d89432484dac 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/BillingBenefits.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/BillingBenefits.cs @@ -377,7 +377,7 @@ public partial class BillingBenefits case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -531,7 +531,7 @@ public partial class BillingBenefits case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ReservationOrderAliasResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1312,7 +1312,7 @@ public partial class BillingBenefits case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderAliasModel.FromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderAliasModel.FromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1466,7 +1466,7 @@ public partial class BillingBenefits case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderAliasModel.FromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.SavingsPlanOrderAliasModel.FromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -1974,7 +1974,7 @@ public partial class BillingBenefits /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SavingsPlanUpdate(string savingsPlanOrderId, string savingsPlanId, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SavingsPlanUpdate(string savingsPlanOrderId, string savingsPlanId, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -2020,7 +2020,7 @@ public partial class BillingBenefits /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task SavingsPlanUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task SavingsPlanUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.ISendAsync sender) { var apiVersion = @"2022-11-01"; // Constant Parameters @@ -2076,7 +2076,7 @@ public partial class BillingBenefits /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task SavingsPlanUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onAccepted, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task SavingsPlanUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onAccepted, global::System.Func onNotFound, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2100,7 +2100,7 @@ public partial class BillingBenefits case global::System.Net.HttpStatusCode.Accepted: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onAccepted(_response,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@3.0.498\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + await onAccepted(_response); break; } case global::System.Net.HttpStatusCode.NotFound: diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/ReservationOrderAliasResponse.PowerShell.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/ReservationOrderAliasResponse.PowerShell.cs index 078af3183ce3..fd702592d99b 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/ReservationOrderAliasResponse.PowerShell.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/ReservationOrderAliasResponse.PowerShell.cs @@ -123,14 +123,6 @@ internal ReservationOrderAliasResponse(global::System.Collections.IDictionary co { ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).Location, global::System.Convert.ToString); } - if (content.Contains("AzureAsyncOperation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).AzureAsyncOperation, global::System.Convert.ToString); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } if (content.Contains("SystemDataCreatedBy")) { ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); @@ -280,14 +272,6 @@ internal ReservationOrderAliasResponse(global::System.Management.Automation.PSOb { ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).Location, global::System.Convert.ToString); } - if (content.Contains("AzureAsyncOperation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).AzureAsyncOperation, global::System.Convert.ToString); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } if (content.Contains("SystemDataCreatedBy")) { ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/ReservationOrderAliasResponse.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/ReservationOrderAliasResponse.cs index 907d7806d51f..f4a168a14f20 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/ReservationOrderAliasResponse.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/ReservationOrderAliasResponse.cs @@ -11,8 +11,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101 public partial class ReservationOrderAliasResponse : Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal, - Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IValidates, - Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IHeaderSerializable + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IValidates { /// /// Backing field for Inherited model ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponsePropertiesInternal)Property).AppliedScopeType; set => ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponsePropertiesInternal)Property).AppliedScopeType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType)""); } - /// Backing field for property. - private string _azureAsyncOperation; - - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Origin(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.PropertyOrigin.Owned)] - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.DoNotFormat] - public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } - /// /// Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. /// @@ -173,13 +165,6 @@ public partial class ReservationOrderAliasResponse : [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.DoNotFormat] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } - /// Backing field for property. - private int? _retryAfter; - - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Origin(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.PropertyOrigin.Owned)] - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.DoNotFormat] - public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } - /// This is the date-time when the Reservation needs to be reviewed. [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Origin(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.DoNotFormat] @@ -247,19 +232,6 @@ public partial class ReservationOrderAliasResponse : [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.FormatTable(Index = 3)] public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IResourceInternal)__resource).Type; } - /// - void Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; - } - if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponseInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); - } - } - /// Creates an new instance. public ReservationOrderAliasResponse() { @@ -333,14 +305,6 @@ public partial interface IReservationOrderAliasResponse : SerializedName = @"appliedScopeType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType) })] Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType? AppliedScopeType { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Azure-AsyncOperation", - PossibleTypes = new [] { typeof(string) })] - string AzureAsyncOperation { get; set; } /// /// Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. /// @@ -427,14 +391,6 @@ public partial interface IReservationOrderAliasResponse : SerializedName = @"reservedResourceType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.ReservedResourceType) })] Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.ReservedResourceType? ReservedResourceType { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Retry-After", - PossibleTypes = new [] { typeof(int) })] - int? RetryAfter { get; set; } /// This is the date-time when the Reservation needs to be reviewed. [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Info( Required = false, @@ -481,8 +437,6 @@ internal partial interface IReservationOrderAliasResponseInternal : string AppliedScopePropertyTenantId { get; set; } /// Type of the Applied Scope. Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType? AppliedScopeType { get; set; } - - string AzureAsyncOperation { get; set; } /// /// Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. /// @@ -515,8 +469,6 @@ internal partial interface IReservationOrderAliasResponseInternal : Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.InstanceFlexibility? ReservedResourcePropertyInstanceFlexibility { get; set; } /// The type of the resource that is being reserved. Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.ReservedResourceType? ReservedResourceType { get; set; } - - int? RetryAfter { get; set; } /// This is the date-time when the Reservation needs to be reviewed. global::System.DateTime? ReviewDateTime { get; set; } /// Reservation order SKU diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/SavingsPlanOrderAliasModel.PowerShell.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/SavingsPlanOrderAliasModel.PowerShell.cs index 131343c88501..e20a4a0f41ec 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/SavingsPlanOrderAliasModel.PowerShell.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/SavingsPlanOrderAliasModel.PowerShell.cs @@ -123,14 +123,6 @@ internal SavingsPlanOrderAliasModel(global::System.Collections.IDictionary conte { ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).Kind, global::System.Convert.ToString); } - if (content.Contains("AzureAsyncOperation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).AzureAsyncOperation, global::System.Convert.ToString); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } if (content.Contains("SystemDataCreatedBy")) { ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); @@ -272,14 +264,6 @@ internal SavingsPlanOrderAliasModel(global::System.Management.Automation.PSObjec { ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).Kind, global::System.Convert.ToString); } - if (content.Contains("AzureAsyncOperation")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).AzureAsyncOperation, global::System.Convert.ToString); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } if (content.Contains("SystemDataCreatedBy")) { ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/SavingsPlanOrderAliasModel.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/SavingsPlanOrderAliasModel.cs index 3f09dfea806e..112b7abf32e6 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/SavingsPlanOrderAliasModel.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/Api20221101/SavingsPlanOrderAliasModel.cs @@ -11,8 +11,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101 public partial class SavingsPlanOrderAliasModel : Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal, - Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IValidates, - Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IHeaderSerializable + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IValidates { /// /// Backing field for Inherited model ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasPropertiesInternal)Property).AppliedScopeType; set => ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasPropertiesInternal)Property).AppliedScopeType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType)""); } - /// Backing field for property. - private string _azureAsyncOperation; - - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Origin(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.PropertyOrigin.Owned)] - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.DoNotFormat] - public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } - /// /// Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. /// @@ -160,13 +152,6 @@ public partial class SavingsPlanOrderAliasModel : [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.DoNotFormat] public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); } - /// Backing field for property. - private int? _retryAfter; - - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Origin(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.PropertyOrigin.Owned)] - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.DoNotFormat] - public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } - /// Identifier of the savings plan created [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Origin(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.PropertyOrigin.Inlined)] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.FormatTable(Index = 8)] @@ -234,19 +219,6 @@ public partial class SavingsPlanOrderAliasModel : [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.FormatTable(Index = 3)] public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IResourceInternal)__resource).Type; } - /// - void Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; - } - if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModelInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); - } - } - /// Creates an new instance. public SavingsPlanOrderAliasModel() { @@ -320,14 +292,6 @@ public partial interface ISavingsPlanOrderAliasModel : SerializedName = @"appliedScopeType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType) })] Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType? AppliedScopeType { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Azure-AsyncOperation", - PossibleTypes = new [] { typeof(string) })] - string AzureAsyncOperation { get; set; } /// /// Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. /// @@ -396,14 +360,6 @@ public partial interface ISavingsPlanOrderAliasModel : SerializedName = @"provisioningState", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.ProvisioningState) })] Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.ProvisioningState? ProvisioningState { get; } - - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Retry-After", - PossibleTypes = new [] { typeof(int) })] - int? RetryAfter { get; set; } /// Identifier of the savings plan created [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Info( Required = false, @@ -450,8 +406,6 @@ internal partial interface ISavingsPlanOrderAliasModelInternal : string AppliedScopePropertyTenantId { get; set; } /// Type of the Applied Scope. Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType? AppliedScopeType { get; set; } - - string AzureAsyncOperation { get; set; } /// /// Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. /// @@ -476,8 +430,6 @@ internal partial interface ISavingsPlanOrderAliasModelInternal : Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasProperties Property { get; set; } /// Provisioning state Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.ProvisioningState? ProvisioningState { get; set; } - - int? RetryAfter { get; set; } /// Identifier of the savings plan created string SavingsPlanOrderId { get; set; } /// Savings plan SKU diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.PowerShell.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.PowerShell.cs deleted file mode 100644 index 1775a577922e..000000000000 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.PowerShell.cs +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.PowerShell; - - [System.ComponentModel.TypeConverter(typeof(SavingsPlanUpdateAcceptedResponseHeadersTypeConverter))] - public partial class SavingsPlanUpdateAcceptedResponseHeaders - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior - /// - /// /// instance serialized to a string, normally it is a Json - /// /// set returnNow to true if you provide a customized OverrideToString function - - partial void OverrideToString(ref string stringResult, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new SavingsPlanUpdateAcceptedResponseHeaders(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new SavingsPlanUpdateAcceptedResponseHeaders(content); - } - - /// - /// Creates a new instance of , deserializing the content from a json - /// string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal SavingsPlanUpdateAcceptedResponseHeaders(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal SavingsPlanUpdateAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SerializationMode.IncludeAll)?.ToString(); - - public override string ToString() - { - var returnNow = false; - var result = global::System.String.Empty; - OverrideToString(ref result, ref returnNow); - if (returnNow) - { - return result; - } - return ToJsonString(); - } - } - [System.ComponentModel.TypeConverter(typeof(SavingsPlanUpdateAcceptedResponseHeadersTypeConverter))] - public partial interface ISavingsPlanUpdateAcceptedResponseHeaders - - { - - } -} \ No newline at end of file diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.TypeConverter.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.TypeConverter.cs deleted file mode 100644 index 098fd3e7db0e..000000000000 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.TypeConverter.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class SavingsPlanUpdateAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise - /// false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeaders).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return SavingsPlanUpdateAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return SavingsPlanUpdateAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return SavingsPlanUpdateAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.cs deleted file mode 100644 index e3b6b959edb0..000000000000 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Extensions; - - public partial class SavingsPlanUpdateAcceptedResponseHeaders : - Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeaders, - Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeadersInternal, - Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IHeaderSerializable - { - - /// Backing field for property. - private string _location; - - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Origin(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.PropertyOrigin.Owned)] - public string Location { get => this._location; set => this._location = value; } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("Location", out var __locationHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; - } - } - - /// - /// Creates an new instance. - /// - public SavingsPlanUpdateAcceptedResponseHeaders() - { - - } - } - public partial interface ISavingsPlanUpdateAcceptedResponseHeaders - - { - [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - - } - internal partial interface ISavingsPlanUpdateAcceptedResponseHeadersInternal - - { - string Location { get; set; } - - } -} \ No newline at end of file diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.json.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.json.cs deleted file mode 100644 index 9d9537856f8b..000000000000 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/api/Models/SavingsPlanUpdateAcceptedResponseHeaders.json.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Extensions; - - public partial class SavingsPlanUpdateAcceptedResponseHeaders - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeaders. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeaders. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.ISavingsPlanUpdateAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonObject json ? new SavingsPlanUpdateAcceptedResponseHeaders(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonObject instance to deserialize from. - internal SavingsPlanUpdateAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsOperation_List.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsOperation_List.cs index 0b9b41cf9dca..99e42d22c058 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsOperation_List.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsOperation_List.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api30.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"List all the operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/operations", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -49,9 +50,10 @@ public partial class GetAzBillingBenefitsOperation_List : global::System.Managem public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -146,7 +148,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -292,6 +311,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsReservationOrderAlias_Get.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsReservationOrderAlias_Get.cs index 7dba6949057e..19e2ce747180 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsReservationOrderAlias_Get.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsReservationOrderAlias_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Get a reservation order alias.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/reservationOrderAliases/{reservationOrderAliasName}", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsReservationOrderAlias_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzBillingBenefitsReservationOrderAlias_Get : global::Sys public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -154,7 +156,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -300,6 +319,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsReservationOrderAlias_GetViaIdentity.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsReservationOrderAlias_GetViaIdentity.cs index 7762c6a5c214..10514b7bb04a 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsReservationOrderAlias_GetViaIdentity.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsReservationOrderAlias_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Get a reservation order alias.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/reservationOrderAliases/{reservationOrderAliasName}", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsReservationOrderAlias_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzBillingBenefitsReservationOrderAlias_GetViaIdentity : public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -147,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -305,6 +324,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanList_List.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanList_List.cs index 7474b784e81b..00cd80b61224 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanList_List.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanList_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"List savings plans.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlans", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsSavingsPlanList_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzBillingBenefitsSavingsPlanList_List : global::System.M public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -236,7 +238,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -382,6 +401,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrderAlias_Get.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrderAlias_Get.cs index 1482d5bf1b2c..a06f71cfb1a0 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrderAlias_Get.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrderAlias_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Get a savings plan.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrderAliases/{savingsPlanOrderAliasName}", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsSavingsPlanOrderAlias_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzBillingBenefitsSavingsPlanOrderAlias_Get : global::Sys public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -154,7 +156,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -300,6 +319,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrderAlias_GetViaIdentity.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrderAlias_GetViaIdentity.cs index 789cd4b6cb01..a49445f0045a 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrderAlias_GetViaIdentity.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrderAlias_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Get a savings plan.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrderAliases/{savingsPlanOrderAliasName}", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsSavingsPlanOrderAlias_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzBillingBenefitsSavingsPlanOrderAlias_GetViaIdentity : public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -147,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -305,6 +324,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_Get.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_Get.cs index 2a2b2d045847..021d59f9c6a3 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_Get.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Get a savings plan order.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsSavingsPlanOrder_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzBillingBenefitsSavingsPlanOrder_Get : global::System.M public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -168,7 +170,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -314,6 +333,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_GetViaIdentity.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_GetViaIdentity.cs index de15628a87a9..922e7a10c291 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_GetViaIdentity.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Get a savings plan order.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsSavingsPlanOrder_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzBillingBenefitsSavingsPlanOrder_GetViaIdentity : globa public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -161,7 +163,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -319,6 +338,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_List.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_List.cs index dd029b806220..f8619149f982 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_List.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlanOrder_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"List all Savings plan orders.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsSavingsPlanOrder_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzBillingBenefitsSavingsPlanOrder_List : global::System. public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -145,7 +147,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -291,6 +310,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_Get.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_Get.cs index 28bb2dddde99..e8593011b9d5 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_Get.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Get savings plan.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsSavingsPlan_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzBillingBenefitsSavingsPlan_Get : global::System.Manage public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -183,7 +185,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -329,6 +348,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_GetViaIdentity.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_GetViaIdentity.cs index 9bc38f02612f..fac2cd6b1cc8 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_GetViaIdentity.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Get savings plan.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsSavingsPlan_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzBillingBenefitsSavingsPlan_GetViaIdentity : global::Sy public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -161,7 +163,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -323,6 +342,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_List.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_List.cs index a6e5ab4cbe36..d71f033f482f 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_List.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/GetAzBillingBenefitsSavingsPlan_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"List savings plans in an order.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans", ApiVersion = "2022-11-01")] public partial class GetAzBillingBenefitsSavingsPlan_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzBillingBenefitsSavingsPlan_List : global::System.Manag public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -160,7 +162,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -306,6 +325,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsElevateSavingPlanOrder_Elevate.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsElevateSavingPlanOrder_Elevate.cs index 4627e852d671..bff6a28b8f48 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsElevateSavingPlanOrder_Elevate.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsElevateSavingPlanOrder_Elevate.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IRoleAssignmentEntity))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Elevate as owner on savings plan order based on billing permissions.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/elevate", ApiVersion = "2022-11-01")] public partial class InvokeAzBillingBenefitsElevateSavingPlanOrder_Elevate : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class InvokeAzBillingBenefitsElevateSavingPlanOrder_Elevate : glo public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -153,7 +155,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -302,6 +321,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsElevateSavingPlanOrder_ElevateViaIdentity.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsElevateSavingPlanOrder_ElevateViaIdentity.cs index 7a2c92bda1a2..055e6d5145d2 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsElevateSavingPlanOrder_ElevateViaIdentity.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsElevateSavingPlanOrder_ElevateViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IRoleAssignmentEntity))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Elevate as owner on savings plan order based on billing permissions.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/elevate", ApiVersion = "2022-11-01")] public partial class InvokeAzBillingBenefitsElevateSavingPlanOrder_ElevateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class InvokeAzBillingBenefitsElevateSavingPlanOrder_ElevateViaIde public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -147,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -309,6 +328,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_Validate.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_Validate.cs index e23fa30378a4..613bd1e828e0 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_Validate.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_Validate.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Validate savings plan purchase.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/validate", ApiVersion = "2022-11-01")] public partial class InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_Validate : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -60,9 +61,10 @@ public partial class InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_Valida public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -157,7 +159,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -306,6 +325,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_ValidateExpanded.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_ValidateExpanded.cs index 6f638b3ddc82..b545b9479927 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_ValidateExpanded.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_ValidateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Validate savings plan purchase.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/validate", ApiVersion = "2022-11-01")] public partial class InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_ValidateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -62,9 +63,10 @@ public partial class InvokeAzBillingBenefitsSavingsPlanPurchaseValidation_Valida public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -159,7 +161,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -309,6 +328,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_Validate.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_Validate.cs index 894f80300f18..22e38fccb789 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_Validate.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_Validate.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Validate savings plan patch.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/validate", ApiVersion = "2022-11-01")] public partial class InvokeAzBillingBenefitsSavingsPlanUpdateValidation_Validate : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -60,9 +61,10 @@ public partial class InvokeAzBillingBenefitsSavingsPlanUpdateValidation_Validate public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -185,7 +187,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -334,6 +353,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateExpanded.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateExpanded.cs index a00d98cef335..3263062ef4ce 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateExpanded.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Validate savings plan patch.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/validate", ApiVersion = "2022-11-01")] public partial class InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -62,9 +63,10 @@ public partial class InvokeAzBillingBenefitsSavingsPlanUpdateValidation_Validate public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -187,7 +189,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -337,6 +356,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentity.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentity.cs index 08937cc2a747..176b8b7cc819 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentity.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Validate savings plan patch.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/validate", ApiVersion = "2022-11-01")] public partial class InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -60,9 +61,10 @@ public partial class InvokeAzBillingBenefitsSavingsPlanUpdateValidation_Validate public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -165,7 +167,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -331,6 +350,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentityExpanded.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentityExpanded.cs index cf0da59d1b99..0d9c162c3d03 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentityExpanded.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Validate savings plan patch.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}/validate", ApiVersion = "2022-11-01")] public partial class InvokeAzBillingBenefitsSavingsPlanUpdateValidation_ValidateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -62,9 +63,10 @@ public partial class InvokeAzBillingBenefitsSavingsPlanUpdateValidation_Validate public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -167,7 +169,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -333,6 +352,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_Create.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_Create.cs index 68cb7053b658..ca00cd21e606 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_Create.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_Create.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Create a reservation order alias.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/reservationOrderAliases/{reservationOrderAliasName}", ApiVersion = "2022-11-01")] public partial class NewAzBillingBenefitsReservationOrderAlias_Create : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -60,9 +61,10 @@ public partial class NewAzBillingBenefitsReservationOrderAlias_Create : global:: public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -202,7 +204,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets.NewAzBillingBe /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -381,6 +400,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateExpanded.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateExpanded.cs index 55733469d3c7..6d7557665d1f 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateExpanded.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Create a reservation order alias.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/reservationOrderAliases/{reservationOrderAliasName}", ApiVersion = "2022-11-01")] public partial class NewAzBillingBenefitsReservationOrderAlias_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -144,9 +145,10 @@ public partial class NewAzBillingBenefitsReservationOrderAlias_CreateExpanded : public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -394,7 +396,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets.NewAzBillingBe /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -573,6 +592,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentity.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentity.cs index 213bc6cfd3ba..dd29bebece1f 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentity.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Create a reservation order alias.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/reservationOrderAliases/{reservationOrderAliasName}", ApiVersion = "2022-11-01")] public partial class NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -60,9 +61,10 @@ public partial class NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentity public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -196,7 +198,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets.NewAzBillingBe /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -387,6 +406,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentityExpanded.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentityExpanded.cs index 1a09c61129ac..36c2864fa228 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentityExpanded.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Create a reservation order alias.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/reservationOrderAliases/{reservationOrderAliasName}", ApiVersion = "2022-11-01")] public partial class NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -144,9 +145,10 @@ public partial class NewAzBillingBenefitsReservationOrderAlias_CreateViaIdentity public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -386,7 +388,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets.NewAzBillingBe /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -578,6 +597,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_Create.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_Create.cs index 8f6358883268..abcfe4e46781 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_Create.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_Create.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Create a savings plan. Learn more about permissions needed at https://go.microsoft.com/fwlink/?linkid=2215851")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrderAliases/{savingsPlanOrderAliasName}", ApiVersion = "2022-11-01")] public partial class NewAzBillingBenefitsSavingsPlanOrderAlias_Create : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -62,9 +63,10 @@ public partial class NewAzBillingBenefitsSavingsPlanOrderAlias_Create : global:: public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -204,7 +206,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets.NewAzBillingBe /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -383,6 +402,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateExpanded.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateExpanded.cs index 38405dd7c5b9..33418ebb3d8a 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateExpanded.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Create a savings plan. Learn more about permissions needed at https://go.microsoft.com/fwlink/?linkid=2215851")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrderAliases/{savingsPlanOrderAliasName}", ApiVersion = "2022-11-01")] public partial class NewAzBillingBenefitsSavingsPlanOrderAlias_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -182,9 +183,10 @@ public partial class NewAzBillingBenefitsSavingsPlanOrderAlias_CreateExpanded : public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.CommitmentGrain CommitmentGrain { get => _body.CommitmentGrain ?? ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.CommitmentGrain)""); set => _body.CommitmentGrain = value; } /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -371,7 +373,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets.NewAzBillingBe /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -550,6 +569,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentity.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentity.cs index c1bd12aa3ac7..f648ce46433c 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentity.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentity.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Create a savings plan. Learn more about permissions needed at https://go.microsoft.com/fwlink/?linkid=2215851")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrderAliases/{savingsPlanOrderAliasName}", ApiVersion = "2022-11-01")] public partial class NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -62,9 +63,10 @@ public partial class NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentity public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -198,7 +200,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets.NewAzBillingBe /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -389,6 +408,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentityExpanded.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentityExpanded.cs index 4c13265bce31..dab50a66e24b 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentityExpanded.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentityExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Create a savings plan. Learn more about permissions needed at https://go.microsoft.com/fwlink/?linkid=2215851")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrderAliases/{savingsPlanOrderAliasName}", ApiVersion = "2022-11-01")] public partial class NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -182,9 +183,10 @@ public partial class NewAzBillingBenefitsSavingsPlanOrderAlias_CreateViaIdentity public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.CommitmentGrain CommitmentGrain { get => _body.CommitmentGrain ?? ((Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.CommitmentGrain)""); set => _body.CommitmentGrain = value; } /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -363,7 +365,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets.NewAzBillingBe /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -555,6 +574,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_Update.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_Update.cs index 6785cd05463b..d306acd72108 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_Update.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_Update.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Update savings plan.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}", ApiVersion = "2022-11-01")] public partial class UpdateAzBillingBenefitsSavingsPlan_Update : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -55,9 +56,10 @@ public partial class UpdateAzBillingBenefitsSavingsPlan_Update : global::System. public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -149,12 +151,10 @@ public partial class UpdateAzBillingBenefitsSavingsPlan_Update : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the header result as a from the remote call /// /// Determines if the rest of the onAccepted method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -211,7 +211,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -360,19 +377,32 @@ public UpdateAzBillingBenefitsSavingsPlan_Update() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// a delegate that is called when the remote service returns 202 (Accepted). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the header result as a from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers) + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage) { using( NoSynchronizationContext ) { var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnAccepted(responseMessage, headers, ref _returnNow); + overrideOnAccepted(responseMessage, ref _returnNow); // if overrideOnAccepted has returned true, then return right away. if ((null != _returnNow && await _returnNow)) { diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateExpanded.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateExpanded.cs index 9c01ee3668d0..104348270b86 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateExpanded.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Update savings plan.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}", ApiVersion = "2022-11-01")] public partial class UpdateAzBillingBenefitsSavingsPlan_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -114,9 +115,10 @@ public partial class UpdateAzBillingBenefitsSavingsPlan_UpdateExpanded : global: public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -243,12 +245,10 @@ public partial class UpdateAzBillingBenefitsSavingsPlan_UpdateExpanded : global: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the header result as a from the remote call /// /// Determines if the rest of the onAccepted method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -305,7 +305,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -454,19 +471,32 @@ public UpdateAzBillingBenefitsSavingsPlan_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// a delegate that is called when the remote service returns 202 (Accepted). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the header result as a from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers) + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage) { using( NoSynchronizationContext ) { var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnAccepted(responseMessage, headers, ref _returnNow); + overrideOnAccepted(responseMessage, ref _returnNow); // if overrideOnAccepted has returned true, then return right away. if ((null != _returnNow && await _returnNow)) { diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentity.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentity.cs index 2524b8c2651d..52dc85d47e04 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentity.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Update savings plan.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}", ApiVersion = "2022-11-01")] public partial class UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -55,9 +56,10 @@ public partial class UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentity : glob public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -127,12 +129,10 @@ public partial class UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentity : glob /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the header result as a from the remote call /// /// Determines if the rest of the onAccepted method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -189,7 +189,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -354,19 +371,32 @@ public UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentity() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// a delegate that is called when the remote service returns 202 (Accepted). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the header result as a from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers) + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage) { using( NoSynchronizationContext ) { var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnAccepted(responseMessage, headers, ref _returnNow); + overrideOnAccepted(responseMessage, ref _returnNow); // if overrideOnAccepted has returned true, then return right away. if ((null != _returnNow && await _returnNow)) { diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentityExpanded.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentityExpanded.cs index 3f271efdf4be..c832b45eddff 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentityExpanded.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/cmdlets/UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel))] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Description(@"Update savings plan.")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.HttpPath(Path = "/providers/Microsoft.BillingBenefits/savingsPlanOrders/{savingsPlanOrderId}/savingsPlans/{savingsPlanId}", ApiVersion = "2022-11-01")] public partial class UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.IEventListener { @@ -114,9 +115,10 @@ public partial class UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentityExpande public Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.BillingBenefits Client => Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category(global::Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.ParameterCategory.Azure)] @@ -221,12 +223,10 @@ public partial class UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentityExpande /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the header result as a from the remote call /// /// Determines if the rest of the onAccepted method should be processed, or if the method should /// return immediately (set to true to skip further processing ) - partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers, ref global::System.Threading.Tasks.Task returnNow); + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what @@ -283,7 +283,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -448,19 +465,32 @@ public UpdateAzBillingBenefitsSavingsPlan_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// a delegate that is called when the remote service returns 202 (Accepted). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the header result as a from the remote call /// /// A that will be complete when handling of the method is completed. /// - private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers) + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage) { using( NoSynchronizationContext ) { var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnAccepted(responseMessage, headers, ref _returnNow); + overrideOnAccepted(responseMessage, ref _returnNow); // if overrideOnAccepted has returned true, then return right away. if ((null != _returnNow && await _returnNow)) { diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs index 9bc878bbdf50..cf433249d8bf 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs @@ -33,6 +33,9 @@ public class ExportHelpMarkdown : PSCmdlet [ValidateNotNullOrEmpty] public string ExamplesFolder { get; set; } + [Parameter()] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -41,7 +44,7 @@ protected override void ProcessRecord() var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast() .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi)) .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty)); - WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder); + WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder, AddComplexInterfaceInfo.IsPresent); } catch (Exception ee) { diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index ea176171b18e..ade13e414b33 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -52,6 +52,9 @@ public class ExportProxyCmdlet : PSCmdlet [Parameter(Mandatory = true, ParameterSetName = "NoDocs")] public SwitchParameter ExcludeDocs { get; set; } + [Parameter(ParameterSetName = "Docs")] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -163,7 +166,7 @@ protected override void ProcessRecord() var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles; var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder; var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder; - WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder); + WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder, AddComplexInterfaceInfo.IsPresent); } } } diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index 59d80c887b5b..c531fbff3508 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.PowerShell { internal static class MarkdownRenderer { - public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder) + public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder, bool AddComplexInterfaceInfo = true) { Directory.CreateDirectory(docsFolder); var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray(); @@ -69,18 +69,26 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod } sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}"); - sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); - foreach (var alias in markdownInfo.Aliases) + if (markdownInfo.Aliases.Any()) { - sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); } - if (markdownInfo.ComplexInterfaceInfos.Any()) + foreach (var alias in markdownInfo.Aliases) { - sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); } - foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + + if (AddComplexInterfaceInfo) { - sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + if (markdownInfo.ComplexInterfaceInfos.Any()) + { + sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + } + foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + { + sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + } + } sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 9a7d8c4c20c0..4d0ed486810d 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -191,15 +191,22 @@ public BeginOutput(VariantGroup variantGroup) : base(variantGroup) public string GetProcessCustomAttributesAtRuntime() { - return VariantGroup.IsInternal ? "" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; + return VariantGroup.IsInternal ? "" : IsAzure ? $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) +{Indent}{Indent}}}" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } + private string GetTelemetry() { if (!VariantGroup.IsInternal && IsAzure) { return $@" {Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{ -{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() {Indent}{Indent}}} {Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId {Indent}{Indent}if ($preTelemetryId -eq '') {{ @@ -262,9 +269,26 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); - 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}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.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}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } } return sb.ToString(); } diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/PsAttributes.cs index 6341bfe86921..9a4257b55f86 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -48,6 +48,13 @@ public ProfileAttribute(params string[] profiles) } } + [AttributeUsage(AttributeTargets.Class)] + public class HttpPathAttribute : Attribute + { + public string Path { get; set; } + public string ApiVersion { get; set; } + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/MessageAttribute.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/MessageAttribute.cs index 901deeb30e42..e86201460d52 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/MessageAttribute.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/MessageAttribute.cs @@ -21,7 +21,7 @@ public class GenericBreakingChangeAttribute : Attribute //The version the change is effective from, non mandatory public string DeprecateByVersion { get; } - public bool DeprecateByVersionSet { get; } = false; + public string DeprecateByAzVersion { get; } //The date on which the change comes in effect public DateTime ChangeInEfectByDate { get; } @@ -32,23 +32,18 @@ public class GenericBreakingChangeAttribute : Attribute //New way fo calling the cmdlet public string NewWay { get; set; } - public GenericBreakingChangeAttribute(string message) - { - _message = message; - } - - public GenericBreakingChangeAttribute(string message, string deprecateByVersion) + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion) { _message = message; + this.DeprecateByAzVersion = deprecateByAzVersion; this.DeprecateByVersion = deprecateByVersion; - this.DeprecateByVersionSet = true; } - public GenericBreakingChangeAttribute(string message, string deprecateByVersion, string changeInEfectByDate) + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) { _message = message; this.DeprecateByVersion = deprecateByVersion; - this.DeprecateByVersionSet = true; + this.DeprecateByAzVersion = deprecateByAzVersion; if (DateTime.TryParse(changeInEfectByDate, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) { @@ -86,10 +81,8 @@ public void PrintCustomAttributeInfo(Action writeOutput) writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByDateMessage, this.ChangeInEfectByDate.ToString("d"))); } - if (DeprecateByVersionSet) - { - writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); - } + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); if (OldWay != null && NewWay != null) { @@ -114,18 +107,13 @@ public class CmdletBreakingChangeAttribute : GenericBreakingChangeAttribute public string ReplacementCmdletName { get; set; } - public CmdletBreakingChangeAttribute() : - base(string.Empty) + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { } - public CmdletBreakingChangeAttribute(string deprecateByVersione) : - base(string.Empty, deprecateByVersione) - { - } - - public CmdletBreakingChangeAttribute(string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { } @@ -146,20 +134,15 @@ protected override string GetAttributeSpecificMessage() public class ParameterSetBreakingChangeAttribute : GenericBreakingChangeAttribute { public string[] ChangedParameterSet { set; get; } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet) : - base(string.Empty) - { - ChangedParameterSet = changedParameterSet; - } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersione) : - base(string.Empty, deprecateByVersione) + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { ChangedParameterSet = changedParameterSet; } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { ChangedParameterSet = changedParameterSet; } @@ -185,6 +168,11 @@ public class PreviewMessageAttribute : Attribute { public string _message; + public DateTime EstimatedGaDate { get; } + + public bool IsEstimatedGaDateSet { get; } = false; + + public PreviewMessageAttribute() { this._message = Resources.PreviewCmdletMessage; @@ -192,12 +180,26 @@ public PreviewMessageAttribute() public PreviewMessageAttribute(string message) { - this._message = message; + this._message = string.IsNullOrEmpty(message) ? Resources.PreviewCmdletMessage : message; } - public void PrintCustomAttributeInfo(System.Management.Automation.PSCmdlet psCmdlet) + public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(message) { - psCmdlet.WriteWarning(this._message); + if (DateTime.TryParse(estimatedDateOfGa, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.EstimatedGaDate = result; + this.IsEstimatedGaDateSet = true; + } + } + + public void PrintCustomAttributeInfo(Action writeOutput) + { + writeOutput(this._message); + + if (IsEstimatedGaDateSet) + { + writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); + } } public virtual bool IsApplicableToInvocation(InvocationInfo invocation) @@ -219,20 +221,14 @@ public class ParameterBreakingChangeAttribute : GenericBreakingChangeAttribute public String NewParameterType { get; set; } - public ParameterBreakingChangeAttribute(string nameOfParameterChanging) : - base(string.Empty) + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { this.NameOfParameterChanging = nameOfParameterChanging; } - public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion) : - base(string.Empty, deprecateByVersion) - { - this.NameOfParameterChanging = nameOfParameterChanging; - } - - public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { this.NameOfParameterChanging = nameOfParameterChanging; } @@ -298,20 +294,14 @@ public class OutputBreakingChangeAttribute : GenericBreakingChangeAttribute public string[] NewOutputProperties { get; set; } - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType) : - base(string.Empty) - { - this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; - } - - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion) : - base(string.Empty, deprecateByVersion) + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; } - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; } diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/MessageAttributeHelper.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/MessageAttributeHelper.cs index c7ca57a997ca..d781be132f8c 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/MessageAttributeHelper.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/MessageAttributeHelper.cs @@ -23,6 +23,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Runtime using System.Threading.Tasks; public class MessageAttributeHelper { + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); public const string BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK = "https://aka.ms/azps-changewarnings"; public const string SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME = "SuppressAzurePowerShellBreakingChangeWarnings"; @@ -34,7 +35,7 @@ public class MessageAttributeHelper * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, * We only process the Parameter beaking change attributes attached only params listed in this list (if present) * */ - public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet, bool showPreviewMessage = true) { bool supressWarningOrError = false; @@ -52,37 +53,53 @@ public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, Inv //Do not process the attributes at runtime... The env variable to override the warning messages is set return; } + if (IsAzure && invocationInfo.BoundParameters.ContainsKey("DefaultProfile")) + { + psCmdlet.WriteWarning("The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription."); + } + + ProcessBreakingChangeAttributesAtRuntime(commandInfo, invocationInfo, parameterSet, psCmdlet); + + } + private static void ProcessBreakingChangeAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { List attributes = new List(GetAllBreakingChangeAttributesInType(commandInfo, invocationInfo, parameterSet)); StringBuilder sb = new StringBuilder(); - Action appendBreakingChangeInfo = (string s) => sb.Append(s); + Action appendAttributeMessage = (string s) => sb.Append(s); if (attributes != null && attributes.Count > 0) { - appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); foreach (GenericBreakingChangeAttribute attribute in attributes) { - attribute.PrintCustomAttributeInfo(appendBreakingChangeInfo); + attribute.PrintCustomAttributeInfo(appendAttributeMessage); } - appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); psCmdlet.WriteWarning(sb.ToString()); } + } + + public static void ProcessPreviewMessageAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { List previewAttributes = new List(GetAllPreviewAttributesInType(commandInfo, invocationInfo)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); if (previewAttributes != null && previewAttributes.Count > 0) { foreach (PreviewMessageAttribute attribute in previewAttributes) { - attribute.PrintCustomAttributeInfo(psCmdlet); + attribute.PrintCustomAttributeInfo(appendAttributeMessage); } + psCmdlet.WriteWarning(sb.ToString()); } } - /** * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) * And returns all the deprecation attributes attached to it @@ -124,6 +141,12 @@ private static IEnumerable GetAllBreakingChangeA } return invocationInfo == null ? attributeList : attributeList.Where(e => e.GetType() == typeof(ParameterSetBreakingChangeAttribute) ? ((ParameterSetBreakingChangeAttribute)e).IsApplicableToInvocation(invocationInfo, parameterSet) : e.IsApplicableToInvocation(invocationInfo)); } + + public static bool ContainsPreviewAttribute(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + return GetAllPreviewAttributesInType(commandInfo, invocationInfo)?.Count() > 0; + } + private static IEnumerable GetAllPreviewAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo) { List attributeList = new List(); diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/Properties/Resources.Designer.cs b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/Properties/Resources.Designer.cs index 310f891a9c8c..3dd363126dce 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/Properties/Resources.Designer.cs +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/Properties/Resources.Designer.cs @@ -734,7 +734,7 @@ public static string BreakingChangesAttributesInEffectByDateMessage } /// - /// Looks up a localized string similar to Note :The change is expected to take effect from the version : '{0}' + /// Looks up a localized string similar to Note :The change is expected to take effect from version : '{0}' /// ///. /// @@ -746,6 +746,19 @@ public static string BreakingChangesAttributesInEffectByVersion } } + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from az version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByAzVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByAzVersion", resourceCulture); + } + } + /// /// Looks up a localized string similar to ```powershell ///# Old @@ -3122,7 +3135,16 @@ public static string PortalInstructionsGit } /// - /// Looks up a localized string similar to This cmdlet is in preview. The functionality may not be available in the selected subscription. + /// Looks up a localized string similar to The estimated generally available date is '{0}'.. + /// + public static string PreviewCmdletETAMessage { + get { + return ResourceManager.GetString("PreviewCmdletETAMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet is in preview. Its behavior is subject to change based on customer feedback.. /// public static string PreviewCmdletMessage { @@ -5630,4 +5652,4 @@ public static string YesHint } } } -} +} \ No newline at end of file diff --git a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/Properties/Resources.resx b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/Properties/Resources.resx index 598cd53e958a..a08a2e50172b 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/Properties/Resources.resx +++ b/src/BillingBenefits/BillingBenefits.Autorest/generated/runtime/Properties/Resources.resx @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can -- The change is expected to take effect from the version : '{0}' +- The change is expected to take effect from version : '{0}' ```powershell @@ -1736,6 +1736,12 @@ The type of the parameter is changing from '{0}' to '{1}'. Note : Go to {0} for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell. - This cmdlet is in preview. The functionality may not be available in the selected subscription. + This cmdlet is in preview. Its behavior is subject to change based on customer feedback. + + + The estimated generally available date is '{0}'. + + + - The change is expected to take effect from Az version : '{0}' \ No newline at end of file diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/Az.BillingBenefits.md b/src/BillingBenefits/BillingBenefits.Autorest/help/Az.BillingBenefits.md new file mode 100644 index 000000000000..43bf74d8d34a --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/Az.BillingBenefits.md @@ -0,0 +1,47 @@ +--- +Module Name: Az.BillingBenefits +Module Guid: 7c220d70-27ec-4403-aedd-429aa925a6a6 +Download Help Link: https://learn.microsoft.com/powershell/module/az.billingbenefits +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.BillingBenefits Module +## Description +Microsoft Azure PowerShell: BillingBenefits cmdlets + +## Az.BillingBenefits Cmdlets +### [Get-AzBillingBenefitsReservationOrderAlias](Get-AzBillingBenefitsReservationOrderAlias.md) +Get a reservation order alias. + +### [Get-AzBillingBenefitsSavingsPlan](Get-AzBillingBenefitsSavingsPlan.md) +Get savings plan. + +### [Get-AzBillingBenefitsSavingsPlanList](Get-AzBillingBenefitsSavingsPlanList.md) +List savings plans. + +### [Get-AzBillingBenefitsSavingsPlanOrder](Get-AzBillingBenefitsSavingsPlanOrder.md) +Get a savings plan order. + +### [Get-AzBillingBenefitsSavingsPlanOrderAlias](Get-AzBillingBenefitsSavingsPlanOrderAlias.md) +Get a savings plan. + +### [Invoke-AzBillingBenefitsElevateSavingPlanOrder](Invoke-AzBillingBenefitsElevateSavingPlanOrder.md) +Elevate as owner on savings plan order based on billing permissions. + +### [Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation](Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.md) +Validate savings plan purchase. + +### [Invoke-AzBillingBenefitsSavingsPlanUpdateValidation](Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.md) +Validate savings plan patch. + +### [New-AzBillingBenefitsReservationOrderAlias](New-AzBillingBenefitsReservationOrderAlias.md) +Create a reservation order alias. + +### [New-AzBillingBenefitsSavingsPlanOrderAlias](New-AzBillingBenefitsSavingsPlanOrderAlias.md) +Create a savings plan. +Learn more about permissions needed at https://go.microsoft.com/fwlink/?linkid=2215851 + +### [Update-AzBillingBenefitsSavingsPlan](Update-AzBillingBenefitsSavingsPlan.md) +Update savings plan. + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsReservationOrderAlias.md b/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsReservationOrderAlias.md new file mode 100644 index 000000000000..c5238eb29190 --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsReservationOrderAlias.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.BillingBenefits +online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitsreservationorderalias +schema: 2.0.0 +--- + +# Get-AzBillingBenefitsReservationOrderAlias + +## SYNOPSIS +Get a reservation order alias. + +## SYNTAX + +### Get (Default) +``` +Get-AzBillingBenefitsReservationOrderAlias -Name [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzBillingBenefitsReservationOrderAlias -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a reservation order alias. + +## EXAMPLES + +### Example 1: Get a reservation order alias. +```powershell +Get-AzBillingBenefitsReservationOrderAlias -Name "PSRITest2" +``` + +```output +Name DisplayName SkuName Location Term BillingPlan ReservedResourceType ReservationOrderId +---- ----------- ------- -------- ---- ----------- -------------------- ------------------ +PSRITest2 PSRITest2 Standard_B1ls westus P1Y P1M VirtualMachines /providers/Microsoft.Capacity/reservationOrders/8d5aacd0-f098-4202-8d4d-1e7cb8a3ac… +``` + +Get a reservation order alias. + +### Example 2: Get a reservation order alias via identity. +```powershell +$identity = @{ + ReservationOrderAliasName = "PSRITest2" +} + +$response = Get-AzBillingBenefitsReservationOrderAlias -InputObject $identity +``` + +```output +Name DisplayName SkuName Location Term BillingPlan ReservedResourceType ReservationOrderId +---- ----------- ------- -------- ---- ----------- -------------------- ------------------ +PSRITest2 PSRITest2 Standard_B1ls westus P1Y P1M VirtualMachines /providers/Microsoft.Capacity/reservationOrders/8d5aacd0-f098-4202-8d4d-1e7cb8a3ac… +``` + +Get a reservation order alias via identity. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the reservation order alias + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ReservationOrderAliasName + +Required: True +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlan.md b/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlan.md new file mode 100644 index 000000000000..bed766ed986f --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlan.md @@ -0,0 +1,156 @@ +--- +external help file: +Module Name: Az.BillingBenefits +online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplan +schema: 2.0.0 +--- + +# Get-AzBillingBenefitsSavingsPlan + +## SYNOPSIS +Get savings plan. + +## SYNTAX + +### List (Default) +``` +Get-AzBillingBenefitsSavingsPlan -OrderId [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzBillingBenefitsSavingsPlan -Id -OrderId [-Expand ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzBillingBenefitsSavingsPlan -InputObject [-Expand ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get savings plan. + +## EXAMPLES + +### Example 1: List savings plan under a savings plan order +```powershell +Get-AzBillingBenefitsSavingsPlan -OrderId d7ea1620-2bba-46e2-8434-11f31bfb984d +``` + +```output +Name Status ExpiryDate PurchaseDate Term Scope AppliedScopeDisplayName ProductName CommitmentAmount CommitmentCurrencyCode +---- ------ ---------- ------------ ---- ----- ----------------------- ----------- ---------------- ------------------ +PSTest7 Succeeded 11/29/2025 2:23:51 AM 11/29/2022 2:20:38 AM P3Y Shared Compute_Savings_Plan 0.001 USD +``` + +List savings plan under a savings plan order + +### Example 2: Get a single savings plan +```powershell +Get-AzBillingBenefitsSavingsPlan -OrderId d7ea1620-2bba-46e2-8434-11f31bfb984d -Id 9fde2a72-776b-49fc-869c-dca8859d7d62 +``` + +```output +Name Status ExpiryDate PurchaseDate Term Scope AppliedScopeDisplayName ProductName CommitmentAmount CommitmentCurrencyCode +---- ------ ---------- ------------ ---- ----- ----------------------- ----------- ---------------- ------------------ +PSTest7 Succeeded 11/29/2025 2:23:51 AM 11/29/2022 2:20:38 AM P3Y Shared Compute_Savings_Plan 0.001 USD +``` + +Get a single savings plan + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Expand +May be used to expand the detail information of some properties. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentity +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id +ID of the savings plan + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: SavingsPlanId + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -OrderId +Order ID of the savings plan + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: SavingsPlanOrderId + +Required: True +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel + +## NOTES + +## RELATED LINKS + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlanList.md b/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlanList.md new file mode 100644 index 000000000000..3cd0076b756b --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlanList.md @@ -0,0 +1,184 @@ +--- +external help file: +Module Name: Az.BillingBenefits +online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanlist +schema: 2.0.0 +--- + +# Get-AzBillingBenefitsSavingsPlanList + +## SYNOPSIS +List savings plans. + +## SYNTAX + +``` +Get-AzBillingBenefitsSavingsPlanList [-Filter ] [-Orderby ] [-RefreshSummary ] + [-SelectedState ] [-Skiptoken ] [-Take ] [-DefaultProfile ] + [] +``` + +## DESCRIPTION +List savings plans. + +## EXAMPLES + +### Example 1: List savings plans. +```powershell +Get-AzBillingBenefitsSavingsPlanList +``` + +```output +Name Status ExpiryDate PurchaseDate Term Scope AppliedScopeDisplayName ProductName CommitmentAmount CommitmentCurrencyCode +---- ------ ---------- ------------ ---- ----- ----------------------- ----------- ---------------- ------------------ +Compute_SavingsPlan_11-30-2022_15-19 Succeeded 11/30/2023 11:22:53 PM 11/30/2022 11:19:31 PM P1Y Shared Compute_Savings_Plan 0.001 USD +PSTesth1234 Succeeded 11/30/2025 12:36:25 AM 11/30/2022 12:34:31 AM P3Y Shared Compute_Savings_Plan 0.001 USD +PSTesth123 Succeeded 11/29/2025 2:51:18 AM 11/29/2022 2:49:24 AM P3Y Shared Compute_Savings_Plan 0.001 USD +PSTesth12 Succeeded 11/29/2025 2:48:30 AM 11/29/2022 2:46:45 AM P3Y Shared Compute_Savings_Plan 0.001 USD +PSTesth1 Succeeded 11/29/2025 2:45:28 AM 11/29/2022 2:43:36 AM P3Y Shared Compute_Savings_Plan 0.001 USD +PSTesth Succeeded 11/29/2025 2:42:49 AM 11/29/2022 2:41:03 AM P3Y Shared Compute_Savings_Plan 0.001 USD +``` + +List savings plans. + +### Example 2: List savings plans with filtering condition. +```powershell +Get-AzBillingBenefitsSavingsPlanList -Filter "properties/userFriendlyAppliedScopeType eq 'Shared'" +``` + +```output +Name Status ExpiryDate PurchaseDate Term Scope AppliedScopeDisplayName ProductName CommitmentAmount CommitmentCurrencyCode +---- ------ ---------- ------------ ---- ----- ----------------------- ----------- ---------------- ------------------ +Compute_SavingsPlan_11-30-2022_15-19 Succeeded 11/30/2023 11:22:53 PM 11/30/2022 11:19:31 PM P1Y Shared Compute_Savings_Plan 0.001 USD +PSTesth1234 Succeeded 11/30/2025 12:36:25 AM 11/30/2022 12:34:31 AM P3Y Shared Compute_Savings_Plan 0.001 USD +PSTesth123 Succeeded 11/29/2025 2:51:18 AM 11/29/2022 2:49:24 AM P3Y Shared Compute_Savings_Plan 0.001 USD +PSTesth12 Succeeded 11/29/2025 2:48:30 AM 11/29/2022 2:46:45 AM P3Y Shared Compute_Savings_Plan 0.001 USD +PSTesth1 Succeeded 11/29/2025 2:45:28 AM 11/29/2022 2:43:36 AM P3Y Shared Compute_Savings_Plan 0.001 USD +``` + +List savings plans with filtering condition. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +May be used to filter by reservation properties. +The filter supports 'eq', 'or', and 'and'. +It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'. +Reservation properties include sku/name, properties/{appliedScopeType, archived, displayName, displayProvisioningState, effectiveDateTime, expiryDate, provisioningState, quantity, renew, reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState} + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Orderby +May be used to sort order by reservation properties. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RefreshSummary +To indicate whether to refresh the roll up counts of the savings plans group by provisioning states + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SelectedState +The selected provisioning state + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Skiptoken +The number of savings plans to skip from the list before returning results + +```yaml +Type: System.Single +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Take +To number of savings plans to return + +```yaml +Type: System.Single +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel + +## NOTES + +## RELATED LINKS + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlanOrder.md b/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlanOrder.md new file mode 100644 index 000000000000..18fc12602678 --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlanOrder.md @@ -0,0 +1,144 @@ +--- +external help file: +Module Name: Az.BillingBenefits +online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanorder +schema: 2.0.0 +--- + +# Get-AzBillingBenefitsSavingsPlanOrder + +## SYNOPSIS +Get a savings plan order. + +## SYNTAX + +### List (Default) +``` +Get-AzBillingBenefitsSavingsPlanOrder [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzBillingBenefitsSavingsPlanOrder -Id [-Expand ] [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzBillingBenefitsSavingsPlanOrder -InputObject [-Expand ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a savings plan order. + +## EXAMPLES + +### Example 1: List savings plan orders +```powershell +Get-AzBillingBenefitsSavingsPlanOrder +``` + +```output +OrderId SkuName Status ExpiryDate Term BillingPlan +------- ------- ------ ---------- ---- ----------- +23420e73-752b-47e8-96d9-6f9ac2bcee27 Compute_Savings_Plan Succeeded 11/30/2023 11:22:53 PM P1Y P1M +953fc18d-04d6-4f8a-9f51-6b784cbc4d2a Compute_Savings_Plan Succeeded 11/30/2025 12:36:25 AM P3Y P1M +a05e9e28-0adf-4e73-8e24-87bf51ab6cdc Compute_Savings_Plan Succeeded 11/29/2025 2:51:18 AM P3Y P1M +1a06f5fc-2152-40ec-9675-f890ab680df9 Compute_Savings_Plan Succeeded 11/29/2025 2:48:30 AM P3Y P1M +``` + +List savings plan orders + +### Example 2: Get a single savings plan order +```powershell +Get-AzBillingBenefitsSavingsPlanOrder -Id 23420e73-752b-47e8-96d9-6f9ac2bcee27 +``` + +```output +OrderId SkuName Status ExpiryDate Term BillingPlan +------- ------- ------ ---------- ---- ----------- +23420e73-752b-47e8-96d9-6f9ac2bcee27 Compute_Savings_Plan Succeeded 11/30/2023 11:22:53 PM P1Y P1M +``` + +Get a single savings plan order + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Expand +May be used to expand the detail information of some properties. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentity +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id +Order ID of the savings plan + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: SavingsPlanOrderId + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderModel + +## NOTES + +## RELATED LINKS + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlanOrderAlias.md b/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlanOrderAlias.md new file mode 100644 index 000000000000..ed1b76f1d75a --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/Get-AzBillingBenefitsSavingsPlanOrderAlias.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.BillingBenefits +online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanorderalias +schema: 2.0.0 +--- + +# Get-AzBillingBenefitsSavingsPlanOrderAlias + +## SYNOPSIS +Get a savings plan. + +## SYNTAX + +### Get (Default) +``` +Get-AzBillingBenefitsSavingsPlanOrderAlias -Name [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzBillingBenefitsSavingsPlanOrderAlias -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a savings plan. + +## EXAMPLES + +### Example 1: Get a savings plan order alias. +```powershell +Get-AzBillingBenefitsSavingsPlanOrderAlias -Name "PSTest2" +``` + +```output +Name DisplayName SkuName CommitmentAmount CommitmentCurrencyCode CommitmentGrain SavingsPlanOrderId +---- ----------- ------- ---------------- ---------------------- --------------- ------------------ +PSTest2 PSTest2 Compute_Savings_Plan 0.001 USD Hourly /providers/Microsoft.BillingBenefits/savingsPlanOrders/ae177258-5b5c-4027-b46a-2d79d1… +``` + +Get a savings plan order alias. + +### Example 2: Get a savings plan order alias via identity. +```powershell +$identity = @{ + SavingsPlanOrderAliasName = "PSTest2" +} + +$response = Get-AzBillingBenefitsSavingsPlanOrderAlias -InputObject $identity +``` + +```output +Name DisplayName SkuName CommitmentAmount CommitmentCurrencyCode CommitmentGrain SavingsPlanOrderId +---- ----------- ------- ---------------- ---------------------- --------------- ------------------ +PSTest2 PSTest2 Compute_Savings_Plan 0.001 USD Hourly /providers/Microsoft.BillingBenefits/savingsPlanOrders/ae177258-5b5c-4027-b46a-2d79d1… +``` + +Get a savings plan order alias via identity. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the savings plan order alias + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: SavingsPlanOrderAliasName + +Required: True +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel + +## NOTES + +## RELATED LINKS + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/Invoke-AzBillingBenefitsElevateSavingPlanOrder.md b/src/BillingBenefits/BillingBenefits.Autorest/help/Invoke-AzBillingBenefitsElevateSavingPlanOrder.md new file mode 100644 index 000000000000..2c38b39199aa --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/Invoke-AzBillingBenefitsElevateSavingPlanOrder.md @@ -0,0 +1,156 @@ +--- +external help file: +Module Name: Az.BillingBenefits +online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/invoke-azbillingbenefitselevatesavingplanorder +schema: 2.0.0 +--- + +# Invoke-AzBillingBenefitsElevateSavingPlanOrder + +## SYNOPSIS +Elevate as owner on savings plan order based on billing permissions. + +## SYNTAX + +### Elevate (Default) +``` +Invoke-AzBillingBenefitsElevateSavingPlanOrder -SavingsPlanOrderId [-DefaultProfile ] + [-Confirm] [-WhatIf] [] +``` + +### ElevateViaIdentity +``` +Invoke-AzBillingBenefitsElevateSavingPlanOrder -InputObject + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Elevate as owner on savings plan order based on billing permissions. + +## EXAMPLES + +### Example 1: Elevate savings plan order +```powershell +Invoke-AzBillingBenefitsElevateSavingPlanOrder -SavingsPlanOrderId "e0b1f446-5684-4fa6-a0c8-d394368eda11" +``` + +```output +Name PrincipalId RoleDefinitionId Scope +---- ----------- ---------------- ----- +5c545baf-2ef5-4016-9c31-6e0e23c397a0 067e7443-3a55-40b6-a2d8-0a7a12a9da2d /providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635 /providers/Microsoft.BillingBenefits/savingsplanorders/e45905d2-9207-4f24-8549-f615c203b49b +``` + +Elevate savings plan order + +### Example 2: Elevate savings plan order via identiy +```powershell +$identity = @{ + SavingsPlanOrderId = "e45905d2-9207-4f24-8549-f615c203b49b" +} + +$response = Invoke-AzBillingBenefitsElevateSavingPlanOrder -InputObject $identity +``` + +```output +Name PrincipalId RoleDefinitionId Scope +---- ----------- ---------------- ----- +5c545baf-2ef5-4016-9c31-6e0e23c397a0 067e7443-3a55-40b6-a2d8-0a7a12a9da2d /providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635 /providers/Microsoft.BillingBenefits/savingsplanorders/e45905d2-9207-4f24-8549-f615c203b49b +``` + +Elevate savings plan order + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity +Parameter Sets: ElevateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SavingsPlanOrderId +Order ID of the savings plan + +```yaml +Type: System.String +Parameter Sets: Elevate +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IRoleAssignmentEntity + +## NOTES + +## RELATED LINKS + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.md b/src/BillingBenefits/BillingBenefits.Autorest/help/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.md new file mode 100644 index 000000000000..97c923edbe18 --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.md @@ -0,0 +1,166 @@ +--- +external help file: +Module Name: Az.BillingBenefits +online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/invoke-azbillingbenefitssavingsplanpurchasevalidation +schema: 2.0.0 +--- + +# Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation + +## SYNOPSIS +Validate savings plan purchase. + +## SYNTAX + +### ValidateExpanded (Default) +``` +Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation [-Benefit ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### Validate +``` +Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation -Body + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Validate savings plan purchase. + +## EXAMPLES + +### Example 1: Validate savings plan purchase(expended). +```powershell +$model = @{ + SkuName = "Compute_Savings_Plan" + DisplayName = "MockName" + Term = "P1Y" + AppliedScopeType = "Shared" + BillingScopeId = "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47" + CommitmentGrain = "Hourly" + CommitmentAmount = 0.01 + CommitmentCurrencyCode = "USD" +} + +$models = @($model) + +Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation -Benefit $models +``` + +```output +Valid ReasonCode Reason +----- ---------- ------ +True +``` + +Validate savings plan purchase(expended). + +### Example 2: Validate savings plan purchase. +```powershell +Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation -Body $body +``` + +```output +Valid ReasonCode Reason +----- ---------- ------ +True +``` + +Validate savings plan purchase. + +## PARAMETERS + +### -Benefit +. +To construct, see NOTES section for BENEFIT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel[] +Parameter Sets: ValidateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +. +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanPurchaseValidateRequest +Parameter Sets: Validate +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanPurchaseValidateRequest + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.md b/src/BillingBenefits/BillingBenefits.Autorest/help/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.md new file mode 100644 index 000000000000..aca59dbad0d7 --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.md @@ -0,0 +1,211 @@ +--- +external help file: +Module Name: Az.BillingBenefits +online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/invoke-azbillingbenefitssavingsplanupdatevalidation +schema: 2.0.0 +--- + +# Invoke-AzBillingBenefitsSavingsPlanUpdateValidation + +## SYNOPSIS +Validate savings plan patch. + +## SYNTAX + +### ValidateExpanded (Default) +``` +Invoke-AzBillingBenefitsSavingsPlanUpdateValidation -SavingsPlanId -SavingsPlanOrderId + [-Benefit ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### Validate +``` +Invoke-AzBillingBenefitsSavingsPlanUpdateValidation -SavingsPlanId -SavingsPlanOrderId + -Body [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### ValidateViaIdentity +``` +Invoke-AzBillingBenefitsSavingsPlanUpdateValidation -InputObject + -Body [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### ValidateViaIdentityExpanded +``` +Invoke-AzBillingBenefitsSavingsPlanUpdateValidation -InputObject + [-Benefit ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Validate savings plan patch. + +## EXAMPLES + +### Example 1: Validate savings plan patch +```powershell +$model = @{ + AppliedScopeType = "Single" + AppliedScopePropertiesSubscriptionId = "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47" +} + +$models = @($model) + +$response = Invoke-AzBillingBenefitsSavingsPlanUpdateValidation -SavingsPlanId "9fde2a72-776b-49fc-869c-dca8859d7d62" -SavingsPlanOrderId "d7ea1620-2bba-46e2-8434-11f31bfb984d" -Benefit $models +``` + +```output +Valid ReasonCode Reason +----- ---------- ------ +True +``` + +Validate savings plan patch + +## PARAMETERS + +### -Benefit +. +To construct, see NOTES section for BENEFIT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateRequestProperties[] +Parameter Sets: ValidateExpanded, ValidateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +. +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateValidateRequest +Parameter Sets: Validate, ValidateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity +Parameter Sets: ValidateViaIdentity, ValidateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SavingsPlanId +ID of the savings plan + +```yaml +Type: System.String +Parameter Sets: Validate, ValidateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SavingsPlanOrderId +Order ID of the savings plan + +```yaml +Type: System.String +Parameter Sets: Validate, ValidateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateValidateRequest + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanValidateResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/New-AzBillingBenefitsReservationOrderAlias.md b/src/BillingBenefits/BillingBenefits.Autorest/help/New-AzBillingBenefitsReservationOrderAlias.md new file mode 100644 index 000000000000..b4e855fc42de --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/New-AzBillingBenefitsReservationOrderAlias.md @@ -0,0 +1,468 @@ +--- +external help file: +Module Name: Az.BillingBenefits +online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/new-azbillingbenefitsreservationorderalias +schema: 2.0.0 +--- + +# New-AzBillingBenefitsReservationOrderAlias + +## SYNOPSIS +Create a reservation order alias. + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzBillingBenefitsReservationOrderAlias -Name [-AppliedScopePropertyDisplayName ] + [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] + [-AppliedScopePropertySubscriptionId ] [-AppliedScopePropertyTenantId ] + [-AppliedScopeType ] [-BillingPlan ] [-BillingScopeId ] + [-DisplayName ] [-Location ] [-Quantity ] [-Renew] + [-ReservedResourcePropertyInstanceFlexibility ] + [-ReservedResourceType ] [-ReviewDateTime ] [-SkuName ] + [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### Create +``` +New-AzBillingBenefitsReservationOrderAlias -Name -Body + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentity +``` +New-AzBillingBenefitsReservationOrderAlias -InputObject + -Body [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaIdentityExpanded +``` +New-AzBillingBenefitsReservationOrderAlias -InputObject + [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] + [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] + [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-BillingPlan ] + [-BillingScopeId ] [-DisplayName ] [-Location ] [-Quantity ] [-Renew] + [-ReservedResourcePropertyInstanceFlexibility ] + [-ReservedResourceType ] [-ReviewDateTime ] [-SkuName ] + [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a reservation order alias. + +## EXAMPLES + +### Example 1: Create a reservation order alias. +```powershell +New-AzBillingBenefitsReservationOrderAlias -Name "PSRITest1" -AppliedScopeType "Shared" -BillingPlan "P1M" -BillingScopeId "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47" -SkuName "Standard_B1ls" -Location "westus" -Quantity 1 -ReservedResourceType 'VirtualMachines' -Term "P1Y" -DisplayName "PSRITest1" +``` + +```output +Name DisplayName SkuName Location Term BillingPlan ReservedResourceType ReservationOrderId ProvisioningState BillingScopeId AppliedScopeType +---- ----------- ------- -------- ---- ----------- -------------------- ------------------ ----------------- -------------- -------- +PSRITest1 PSRITest1 Standard_B1ls westus P1Y P1M VirtualMachines /providers/Micro... Created /subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47 Shared +``` + +Create a reservation order alias. + +## PARAMETERS + +### -AppliedScopePropertyDisplayName +Display name + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertyManagementGroupId +Fully-qualified identifier of the management group where the benefit must be applied. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertyResourceGroupId +Fully-qualified identifier of the resource group. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertySubscriptionId +Fully-qualified identifier of the subscription. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertyTenantId +Tenant ID where the benefit is applied. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopeType +Type of the Applied Scope. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BillingPlan +Represents the billing plan in ISO 8601 format. +Required only for monthly billing plans. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.BillingPlan +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BillingScopeId +Subscription that will be charged for purchasing the benefit + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Reservation order alias +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasRequest +Parameter Sets: Create, CreateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +Display name + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity +Parameter Sets: CreateViaIdentity, CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The Azure Region where the reservation benefits are applied to. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the reservation order alias + +```yaml +Type: System.String +Parameter Sets: Create, CreateExpanded +Aliases: ReservationOrderAliasName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Quantity +Total Quantity of the SKUs purchased in the Reservation. + +```yaml +Type: System.Int32 +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Renew +Setting this to true will automatically purchase a new benefit on the expiration date time. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReservedResourcePropertyInstanceFlexibility +Turning this on will apply the reservation discount to other VMs in the same VM size group. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.InstanceFlexibility +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReservedResourceType +The type of the resource that is being reserved. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.ReservedResourceType +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ReviewDateTime +This is the date-time when the Azure Hybrid Benefit needs to be reviewed. + +```yaml +Type: System.DateTime +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuName +Name of the SKU to be applied + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Term +Represent benefit term in ISO 8601 format. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.Term +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasRequest + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IReservationOrderAliasResponse + +## NOTES + +## RELATED LINKS + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/New-AzBillingBenefitsSavingsPlanOrderAlias.md b/src/BillingBenefits/BillingBenefits.Autorest/help/New-AzBillingBenefitsSavingsPlanOrderAlias.md new file mode 100644 index 000000000000..542593550dbb --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/New-AzBillingBenefitsSavingsPlanOrderAlias.md @@ -0,0 +1,439 @@ +--- +external help file: +Module Name: Az.BillingBenefits +online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/new-azbillingbenefitssavingsplanorderalias +schema: 2.0.0 +--- + +# New-AzBillingBenefitsSavingsPlanOrderAlias + +## SYNOPSIS +Create a savings plan. +Learn more about permissions needed at https://go.microsoft.com/fwlink/?linkid=2215851 + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzBillingBenefitsSavingsPlanOrderAlias -Name [-AppliedScopePropertyDisplayName ] + [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] + [-AppliedScopePropertySubscriptionId ] [-AppliedScopePropertyTenantId ] + [-AppliedScopeType ] [-BillingPlan ] [-BillingScopeId ] + [-CommitmentAmount ] [-CommitmentCurrencyCode ] [-CommitmentGrain ] + [-DisplayName ] [-Kind ] [-SkuName ] [-Term ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### Create +``` +New-AzBillingBenefitsSavingsPlanOrderAlias -Name -Body + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### CreateViaIdentity +``` +New-AzBillingBenefitsSavingsPlanOrderAlias -InputObject + -Body [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### CreateViaIdentityExpanded +``` +New-AzBillingBenefitsSavingsPlanOrderAlias -InputObject + [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] + [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] + [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-BillingPlan ] + [-BillingScopeId ] [-CommitmentAmount ] [-CommitmentCurrencyCode ] + [-CommitmentGrain ] [-DisplayName ] [-Kind ] [-SkuName ] + [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a savings plan. +Learn more about permissions needed at https://go.microsoft.com/fwlink/?linkid=2215851 + +## EXAMPLES + +### Example 1: Create a savings plan +```powershell +New-AzBillingBenefitsSavingsPlanOrderAlias -Name "PSTest1" -AppliedScopeType "Shared" -BillingPlan "P1M" ` +-BillingScopeId "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47" -CommitmentAmount 0.001 -CommitmentCurrencyCode "USD" -CommitmentGrain "Hourly" -SkuName "Compute_Savings_Plan" -DisplayName "PSTest199" -Term "P3Y" +``` + +```output +Name DisplayName SkuName CommitmentAmount CommitmentCurrencyCode CommitmentGrain SavingsPlanOrderId ProvisioningState BillingScopeId +---- ----------- ------- ---------------- ---------------------- --------------- ------------------ ----------------- -------------- +PSTest1 PSTest1 Compute_Savings_Plan 0.001 USD Hourly /providers/Microsoft.BillingBenefits/savingsPlanOrders/955e24a7-6672-4038-9961-619a75c2acf4 Created /subscriptions/eef82110-c91b-4395-9420… +``` + +Create a savings plan + +## PARAMETERS + +### -AppliedScopePropertyDisplayName +Display name + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertyManagementGroupId +Fully-qualified identifier of the management group where the benefit must be applied. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertyResourceGroupId +Fully-qualified identifier of the resource group. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertySubscriptionId +Fully-qualified identifier of the subscription. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertyTenantId +Tenant ID where the benefit is applied. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopeType +Type of the Applied Scope. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BillingPlan +Represents the billing plan in ISO 8601 format. +Required only for monthly billing plans. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.BillingPlan +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BillingScopeId +Subscription that will be charged for purchasing the benefit + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Savings plan order alias +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel +Parameter Sets: Create, CreateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -CommitmentAmount +. + +```yaml +Type: System.Double +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CommitmentCurrencyCode +The ISO 4217 3-letter currency code for the currency used by this purchase record. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CommitmentGrain +Commitment grain. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.CommitmentGrain +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +Display name + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity +Parameter Sets: CreateViaIdentity, CreateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Kind +Resource provider kind + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the savings plan order alias + +```yaml +Type: System.String +Parameter Sets: Create, CreateExpanded +Aliases: SavingsPlanOrderAliasName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuName +Name of the SKU to be applied + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Term +Represent benefit term in ISO 8601 format. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.Term +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded +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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanOrderAliasModel + +## NOTES + +## RELATED LINKS + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/README.md b/src/BillingBenefits/BillingBenefits.Autorest/help/README.md new file mode 100644 index 000000000000..4cd7d8ddb02f --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.BillingBenefits` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.BillingBenefits` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/BillingBenefits/BillingBenefits.Autorest/help/Update-AzBillingBenefitsSavingsPlan.md b/src/BillingBenefits/BillingBenefits.Autorest/help/Update-AzBillingBenefitsSavingsPlan.md new file mode 100644 index 000000000000..e6ec4359b34e --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.Autorest/help/Update-AzBillingBenefitsSavingsPlan.md @@ -0,0 +1,342 @@ +--- +external help file: +Module Name: Az.BillingBenefits +online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/update-azbillingbenefitssavingsplan +schema: 2.0.0 +--- + +# Update-AzBillingBenefitsSavingsPlan + +## SYNOPSIS +Update savings plan. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzBillingBenefitsSavingsPlan -Id -OrderId [-AppliedScopePropertyDisplayName ] + [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] + [-AppliedScopePropertySubscriptionId ] [-AppliedScopePropertyTenantId ] + [-AppliedScopeType ] [-DisplayName ] [-Renew] [-RenewProperty ] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### Update +``` +Update-AzBillingBenefitsSavingsPlan -Id -OrderId -Body + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentity +``` +Update-AzBillingBenefitsSavingsPlan -InputObject -Body + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzBillingBenefitsSavingsPlan -InputObject + [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] + [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] + [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-DisplayName ] + [-Renew] [-RenewProperty ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Update savings plan. + +## EXAMPLES + +### Example 1: Update savings plan property value +```powershell +Update-AzBillingBenefitsSavingsPlan -Id "f82fd820-f829-4022-8ba5-e3bf4ffc329b" -OrderId "e0b1f446-5684-4fa6-a0c8-d394368eda11" -DisplayName "NewName" +``` + +```output +Name Status ExpiryDate PurchaseDate Term Scope AppliedScopeDisplayName ProductName CommitmentAmount CommitmentCurrency +---- ------ ---------- ------------ ---- ----- ----------------------- ----------- ---------------- ------------------ +NewName Succeeded 10/25/2025 7:01:05 PM 10/25/2022 6:59:06 PM P3Y Shared Compute_Savings_Plan 0.001 USD +``` + +Update savings plan property value + +## PARAMETERS + +### -AppliedScopePropertyDisplayName +Display name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertyManagementGroupId +Fully-qualified identifier of the management group where the benefit must be applied. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertyResourceGroupId +Fully-qualified identifier of the resource group. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertySubscriptionId +Fully-qualified identifier of the subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopePropertyTenantId +Tenant ID where the benefit is applied. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AppliedScopeType +Type of the Applied Scope. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Support.AppliedScopeType +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Savings plan patch request +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateRequest +Parameter Sets: Update, UpdateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +Display name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id +ID of the savings plan + +```yaml +Type: System.String +Parameter Sets: Update, UpdateExpanded +Aliases: SavingsPlanId + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity +Parameter Sets: UpdateViaIdentity, UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -OrderId +Order ID of the savings plan + +```yaml +Type: System.String +Parameter Sets: Update, UpdateExpanded +Aliases: SavingsPlanOrderId + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Renew +Setting this to true will automatically purchase a new benefit on the expiration date time. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RenewProperty +. +To construct, see NOTES section for RENEWPROPERTY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.IRenewProperties +Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded +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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanUpdateRequest + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.Api20221101.ISavingsPlanModel + +## NOTES + +## RELATED LINKS + diff --git a/src/BillingBenefits/BillingBenefits.Autorest/internal/Az.BillingBenefits.internal.psm1 b/src/BillingBenefits/BillingBenefits.Autorest/internal/Az.BillingBenefits.internal.psm1 index 6aa66352e261..e50f1c30b91a 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/internal/Az.BillingBenefits.internal.psm1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/internal/Az.BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/internal/Get-AzBillingBenefitsOperation.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/internal/Get-AzBillingBenefitsOperation.ps1 index ae7cd3ca32f4..1e9581929f05 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/internal/Get-AzBillingBenefitsOperation.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/internal/Get-AzBillingBenefitsOperation.ps1 @@ -38,7 +38,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] diff --git a/src/BillingBenefits/BillingBenefits.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/internal/ProxyCmdletDefinitions.ps1 index ae7cd3ca32f4..1e9581929f05 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/BillingBenefits/BillingBenefits.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -38,7 +38,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] diff --git a/src/BillingBenefits/BillingBenefits.Autorest/test-module.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/test-module.ps1 index 0fed27113464..d066cc65bc41 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/test-module.ps1 +++ b/src/BillingBenefits/BillingBenefits.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-------------' \ No newline at end of file diff --git a/src/BillingBenefits/BillingBenefits.Autorest/test/loadEnv.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/test/loadEnv.ps1 index 5f079e89615e..6a7c385c6b7d 100644 --- a/src/BillingBenefits/BillingBenefits.Autorest/test/loadEnv.ps1 +++ b/src/BillingBenefits/BillingBenefits.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/BillingBenefits/BillingBenefits.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 b/src/BillingBenefits/BillingBenefits.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/src/BillingBenefits/BillingBenefits.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/BillingBenefits/BillingBenefits/Az.BillingBenefits.psd1 b/src/BillingBenefits/BillingBenefits/Az.BillingBenefits.psd1 index 93e047afacd1..8c150384e12d 100644 --- a/src/BillingBenefits/BillingBenefits/Az.BillingBenefits.psd1 +++ b/src/BillingBenefits/BillingBenefits/Az.BillingBenefits.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 12/5/2023 +# Generated on: 4/23/2024 # @{ @@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.11.0'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.17.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'BillingBenefits.Autorest/bin/Az.BillingBenefits.private.dll' @@ -63,7 +63,7 @@ ScriptsToProcess = @() TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = 'BillingBenefits.Autorest/Az.BillingBenefits.format.ps1xml' +FormatsToProcess = 'BillingBenefits.Autorest\Az.BillingBenefits.format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @('BillingBenefits.Autorest/Az.BillingBenefits.psm1') diff --git a/src/BillingBenefits/BillingBenefits/ChangeLog.md b/src/BillingBenefits/BillingBenefits/ChangeLog.md index 50e78256961a..eb78368202fc 100644 --- a/src/BillingBenefits/BillingBenefits/ChangeLog.md +++ b/src/BillingBenefits/BillingBenefits/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.BillingBenefits diff --git a/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsReservationOrderAlias.md b/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsReservationOrderAlias.md index b39a90662ee2..5ecfe18e99a5 100644 --- a/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsReservationOrderAlias.md +++ b/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsReservationOrderAlias.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.BillingBenefits-help.xml Module Name: Az.BillingBenefits online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitsreservationorderalias schema: 2.0.0 @@ -14,13 +14,14 @@ Get a reservation order alias. ### Get (Default) ``` -Get-AzBillingBenefitsReservationOrderAlias -Name [-DefaultProfile ] [] +Get-AzBillingBenefitsReservationOrderAlias -Name [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` -Get-AzBillingBenefitsReservationOrderAlias -InputObject - [-DefaultProfile ] [] +Get-AzBillingBenefitsReservationOrderAlias -InputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -61,7 +62,8 @@ Get a reservation order alias via identity. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -106,6 +108,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). @@ -119,19 +136,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[Id ]`: Resource identity path - - `[ReservationOrderAliasName ]`: Name of the reservation order alias - - `[SavingsPlanId ]`: ID of the savings plan - - `[SavingsPlanOrderAliasName ]`: Name of the savings plan order alias - - `[SavingsPlanOrderId ]`: Order ID of the savings plan - ## RELATED LINKS - diff --git a/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlan.md b/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlan.md index 102b01088c49..74f3649a93cb 100644 --- a/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlan.md +++ b/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlan.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.BillingBenefits-help.xml Module Name: Az.BillingBenefits online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplan schema: 2.0.0 @@ -14,19 +14,20 @@ Get savings plan. ### List (Default) ``` -Get-AzBillingBenefitsSavingsPlan -OrderId [-DefaultProfile ] [] +Get-AzBillingBenefitsSavingsPlan -OrderId [-DefaultProfile ] + [-ProgressAction ] [] ``` ### Get ``` -Get-AzBillingBenefitsSavingsPlan -Id -OrderId [-Expand ] - [-DefaultProfile ] [] +Get-AzBillingBenefitsSavingsPlan -Id -OrderId [-Expand ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzBillingBenefitsSavingsPlan -InputObject [-Expand ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -63,7 +64,8 @@ Get a single savings plan ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -128,7 +130,7 @@ Order ID of the savings plan ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: SavingsPlanOrderId Required: True @@ -138,6 +140,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). @@ -151,19 +168,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[Id ]`: Resource identity path - - `[ReservationOrderAliasName ]`: Name of the reservation order alias - - `[SavingsPlanId ]`: ID of the savings plan - - `[SavingsPlanOrderAliasName ]`: Name of the savings plan order alias - - `[SavingsPlanOrderId ]`: Order ID of the savings plan - ## RELATED LINKS - diff --git a/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanList.md b/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanList.md index f64c83e3b2ad..a8f3f9ae7e78 100644 --- a/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanList.md +++ b/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanList.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.BillingBenefits-help.xml Module Name: Az.BillingBenefits online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanlist schema: 2.0.0 @@ -15,7 +15,7 @@ List savings plans. ``` Get-AzBillingBenefitsSavingsPlanList [-Filter ] [-Orderby ] [-RefreshSummary ] [-SelectedState ] [-Skiptoken ] [-Take ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -61,7 +61,8 @@ List savings plans with filtering condition. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -108,6 +109,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 +``` + ### -RefreshSummary To indicate whether to refresh the roll up counts of the savings plans group by provisioning states @@ -179,7 +195,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanOrder.md b/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanOrder.md index cc58bf2bda47..7c72cf044f85 100644 --- a/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanOrder.md +++ b/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanOrder.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.BillingBenefits-help.xml Module Name: Az.BillingBenefits online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanorder schema: 2.0.0 @@ -14,19 +14,20 @@ Get a savings plan order. ### List (Default) ``` -Get-AzBillingBenefitsSavingsPlanOrder [-DefaultProfile ] [] +Get-AzBillingBenefitsSavingsPlanOrder [-DefaultProfile ] [-ProgressAction ] + [] ``` ### Get ``` Get-AzBillingBenefitsSavingsPlanOrder -Id [-Expand ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzBillingBenefitsSavingsPlanOrder -InputObject [-Expand ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -45,7 +46,7 @@ OrderId SkuName Status ExpiryDate 23420e73-752b-47e8-96d9-6f9ac2bcee27 Compute_Savings_Plan Succeeded 11/30/2023 11:22:53 PM P1Y P1M 953fc18d-04d6-4f8a-9f51-6b784cbc4d2a Compute_Savings_Plan Succeeded 11/30/2025 12:36:25 AM P3Y P1M a05e9e28-0adf-4e73-8e24-87bf51ab6cdc Compute_Savings_Plan Succeeded 11/29/2025 2:51:18 AM P3Y P1M -1a06f5fc-2152-40ec-9675-f890ab680df9 Compute_Savings_Plan Succeeded 11/29/2025 2:48:30 AM P3Y P1M +1a06f5fc-2152-40ec-9675-f890ab680df9 Compute_Savings_Plan Succeeded 11/29/2025 2:48:30 AM P3Y P1M ``` List savings plan orders @@ -66,7 +67,8 @@ Get a single savings plan order ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -126,6 +128,21 @@ Accept pipeline input: True (ByValue) 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). @@ -139,19 +156,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[Id ]`: Resource identity path - - `[ReservationOrderAliasName ]`: Name of the reservation order alias - - `[SavingsPlanId ]`: ID of the savings plan - - `[SavingsPlanOrderAliasName ]`: Name of the savings plan order alias - - `[SavingsPlanOrderId ]`: Order ID of the savings plan - ## RELATED LINKS - diff --git a/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanOrderAlias.md b/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanOrderAlias.md index 148288a3d8af..a091cba9d84d 100644 --- a/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanOrderAlias.md +++ b/src/BillingBenefits/BillingBenefits/help/Get-AzBillingBenefitsSavingsPlanOrderAlias.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.BillingBenefits-help.xml Module Name: Az.BillingBenefits online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/get-azbillingbenefitssavingsplanorderalias schema: 2.0.0 @@ -14,13 +14,14 @@ Get a savings plan. ### Get (Default) ``` -Get-AzBillingBenefitsSavingsPlanOrderAlias -Name [-DefaultProfile ] [] +Get-AzBillingBenefitsSavingsPlanOrderAlias -Name [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` -Get-AzBillingBenefitsSavingsPlanOrderAlias -InputObject - [-DefaultProfile ] [] +Get-AzBillingBenefitsSavingsPlanOrderAlias -InputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -36,7 +37,7 @@ Get-AzBillingBenefitsSavingsPlanOrderAlias -Name "PSTest2" ```output Name DisplayName SkuName CommitmentAmount CommitmentCurrencyCode CommitmentGrain SavingsPlanOrderId ---- ----------- ------- ---------------- ---------------------- --------------- ------------------ -PSTest2 PSTest2 Compute_Savings_Plan 0.001 USD Hourly /providers/Microsoft.BillingBenefits/savingsPlanOrders/ae177258-5b5c-4027-b46a-2d79d1… +PSTest2 PSTest2 Compute_Savings_Plan 0.001 USD Hourly /providers/Microsoft.BillingBenefits/savingsPlanOrders/ae177258-5b5c-4027-b46a-2d79d1… ``` Get a savings plan order alias. @@ -53,7 +54,7 @@ $response = Get-AzBillingBenefitsSavingsPlanOrderAlias -InputObject $identity ```output Name DisplayName SkuName CommitmentAmount CommitmentCurrencyCode CommitmentGrain SavingsPlanOrderId ---- ----------- ------- ---------------- ---------------------- --------------- ------------------ -PSTest2 PSTest2 Compute_Savings_Plan 0.001 USD Hourly /providers/Microsoft.BillingBenefits/savingsPlanOrders/ae177258-5b5c-4027-b46a-2d79d1… +PSTest2 PSTest2 Compute_Savings_Plan 0.001 USD Hourly /providers/Microsoft.BillingBenefits/savingsPlanOrders/ae177258-5b5c-4027-b46a-2d79d1… ``` Get a savings plan order alias via identity. @@ -61,7 +62,8 @@ Get a savings plan order alias via identity. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -106,6 +108,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). @@ -119,19 +136,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[Id ]`: Resource identity path - - `[ReservationOrderAliasName ]`: Name of the reservation order alias - - `[SavingsPlanId ]`: ID of the savings plan - - `[SavingsPlanOrderAliasName ]`: Name of the savings plan order alias - - `[SavingsPlanOrderId ]`: Order ID of the savings plan - ## RELATED LINKS - diff --git a/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsElevateSavingPlanOrder.md b/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsElevateSavingPlanOrder.md index 1799884a02bb..1be9d94c13e4 100644 --- a/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsElevateSavingPlanOrder.md +++ b/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsElevateSavingPlanOrder.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.BillingBenefits-help.xml Module Name: Az.BillingBenefits online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/invoke-azbillingbenefitselevatesavingplanorder schema: 2.0.0 @@ -15,13 +15,13 @@ Elevate as owner on savings plan order based on billing permissions. ### Elevate (Default) ``` Invoke-AzBillingBenefitsElevateSavingPlanOrder -SavingsPlanOrderId [-DefaultProfile ] - [-Confirm] [-WhatIf] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ElevateViaIdentity ``` Invoke-AzBillingBenefitsElevateSavingPlanOrder -InputObject - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -62,7 +62,8 @@ Elevate savings plan order ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -92,6 +93,21 @@ Accept pipeline input: True (ByValue) 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 +``` + ### -SavingsPlanOrderId Order ID of the savings plan @@ -151,19 +167,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[Id ]`: Resource identity path - - `[ReservationOrderAliasName ]`: Name of the reservation order alias - - `[SavingsPlanId ]`: ID of the savings plan - - `[SavingsPlanOrderAliasName ]`: Name of the savings plan order alias - - `[SavingsPlanOrderId ]`: Order ID of the savings plan - ## RELATED LINKS - diff --git a/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.md b/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.md index 666a5e0edbbb..00bd2ab91855 100644 --- a/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.md +++ b/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.BillingBenefits-help.xml Module Name: Az.BillingBenefits online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/invoke-azbillingbenefitssavingsplanpurchasevalidation schema: 2.0.0 @@ -15,13 +15,13 @@ Validate savings plan purchase. ### ValidateExpanded (Default) ``` Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation [-Benefit ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Validate ``` Invoke-AzBillingBenefitsSavingsPlanPurchaseValidation -Body - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -103,7 +103,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -117,6 +118,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 +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. @@ -161,63 +177,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`BENEFIT `: . - - `[SystemDataCreatedAt ]`: The timestamp of resource creation (UTC). - - `[SystemDataCreatedBy ]`: The identity that created the resource. - - `[SystemDataCreatedByType ]`: The type of identity that created the resource. - - `[SystemDataLastModifiedAt ]`: The timestamp of resource last modification (UTC) - - `[SystemDataLastModifiedBy ]`: The identity that last modified the resource. - - `[SystemDataLastModifiedByType ]`: The type of identity that last modified the resource. - - `[AppliedScopePropertyDisplayName ]`: Display name - - `[AppliedScopePropertyManagementGroupId ]`: Fully-qualified identifier of the management group where the benefit must be applied. - - `[AppliedScopePropertyResourceGroupId ]`: Fully-qualified identifier of the resource group. - - `[AppliedScopePropertySubscriptionId ]`: Fully-qualified identifier of the subscription. - - `[AppliedScopePropertyTenantId ]`: Tenant ID where the benefit is applied. - - `[AppliedScopeType ]`: Type of the Applied Scope. - - `[AzureAsyncOperation ]`: - - `[BillingPlan ]`: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. - - `[BillingScopeId ]`: Subscription that will be charged for purchasing the benefit - - `[CommitmentAmount ]`: - - `[CommitmentCurrencyCode ]`: The ISO 4217 3-letter currency code for the currency used by this purchase record. - - `[CommitmentGrain ]`: Commitment grain. - - `[DisplayName ]`: Display name - - `[Kind ]`: Resource provider kind - - `[RetryAfter ]`: - - `[SkuName ]`: Name of the SKU to be applied - - `[Term ]`: Represent benefit term in ISO 8601 format. - -`BODY `: . - - `[Benefit ]`: - - `[SystemDataCreatedAt ]`: The timestamp of resource creation (UTC). - - `[SystemDataCreatedBy ]`: The identity that created the resource. - - `[SystemDataCreatedByType ]`: The type of identity that created the resource. - - `[SystemDataLastModifiedAt ]`: The timestamp of resource last modification (UTC) - - `[SystemDataLastModifiedBy ]`: The identity that last modified the resource. - - `[SystemDataLastModifiedByType ]`: The type of identity that last modified the resource. - - `[AppliedScopePropertyDisplayName ]`: Display name - - `[AppliedScopePropertyManagementGroupId ]`: Fully-qualified identifier of the management group where the benefit must be applied. - - `[AppliedScopePropertyResourceGroupId ]`: Fully-qualified identifier of the resource group. - - `[AppliedScopePropertySubscriptionId ]`: Fully-qualified identifier of the subscription. - - `[AppliedScopePropertyTenantId ]`: Tenant ID where the benefit is applied. - - `[AppliedScopeType ]`: Type of the Applied Scope. - - `[AzureAsyncOperation ]`: - - `[BillingPlan ]`: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. - - `[BillingScopeId ]`: Subscription that will be charged for purchasing the benefit - - `[CommitmentAmount ]`: - - `[CommitmentCurrencyCode ]`: The ISO 4217 3-letter currency code for the currency used by this purchase record. - - `[CommitmentGrain ]`: Commitment grain. - - `[DisplayName ]`: Display name - - `[Kind ]`: Resource provider kind - - `[RetryAfter ]`: - - `[SkuName ]`: Name of the SKU to be applied - - `[Term ]`: Represent benefit term in ISO 8601 format. - ## RELATED LINKS - diff --git a/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.md b/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.md index 2746f46b78ab..e9eabcff8c53 100644 --- a/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.md +++ b/src/BillingBenefits/BillingBenefits/help/Invoke-AzBillingBenefitsSavingsPlanUpdateValidation.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.BillingBenefits-help.xml Module Name: Az.BillingBenefits online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/invoke-azbillingbenefitssavingsplanupdatevalidation schema: 2.0.0 @@ -15,29 +15,29 @@ Validate savings plan patch. ### ValidateExpanded (Default) ``` Invoke-AzBillingBenefitsSavingsPlanUpdateValidation -SavingsPlanId -SavingsPlanOrderId - [-Benefit ] [-DefaultProfile ] [-Confirm] [-WhatIf] - [] + [-Benefit ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Validate ``` Invoke-AzBillingBenefitsSavingsPlanUpdateValidation -SavingsPlanId -SavingsPlanOrderId - -Body [-DefaultProfile ] [-Confirm] [-WhatIf] - [] + -Body [-DefaultProfile ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` -### ValidateViaIdentity +### ValidateViaIdentityExpanded ``` Invoke-AzBillingBenefitsSavingsPlanUpdateValidation -InputObject - -Body [-DefaultProfile ] [-Confirm] [-WhatIf] - [] + [-Benefit ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` -### ValidateViaIdentityExpanded +### ValidateViaIdentity ``` Invoke-AzBillingBenefitsSavingsPlanUpdateValidation -InputObject - [-Benefit ] [-DefaultProfile ] [-Confirm] [-WhatIf] - [] + -Body [-DefaultProfile ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -100,7 +100,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -120,7 +121,7 @@ To construct, see NOTES section for INPUTOBJECT properties and create a hash tab ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity -Parameter Sets: ValidateViaIdentity, ValidateViaIdentityExpanded +Parameter Sets: ValidateViaIdentityExpanded, ValidateViaIdentity Aliases: Required: True @@ -130,12 +131,27 @@ Accept pipeline input: True (ByValue) 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 +``` + ### -SavingsPlanId ID of the savings plan ```yaml Type: System.String -Parameter Sets: Validate, ValidateExpanded +Parameter Sets: ValidateExpanded, Validate Aliases: Required: True @@ -150,7 +166,7 @@ Order ID of the savings plan ```yaml Type: System.String -Parameter Sets: Validate, ValidateExpanded +Parameter Sets: ValidateExpanded, Validate Aliases: Required: True @@ -206,74 +222,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`BENEFIT `: . - - `[AppliedScopePropertyDisplayName ]`: Display name - - `[AppliedScopePropertyManagementGroupId ]`: Fully-qualified identifier of the management group where the benefit must be applied. - - `[AppliedScopePropertyResourceGroupId ]`: Fully-qualified identifier of the resource group. - - `[AppliedScopePropertySubscriptionId ]`: Fully-qualified identifier of the subscription. - - `[AppliedScopePropertyTenantId ]`: Tenant ID where the benefit is applied. - - `[AppliedScopeType ]`: Type of the Applied Scope. - - `[DisplayName ]`: Display name - - `[Renew ]`: Setting this to true will automatically purchase a new benefit on the expiration date time. - - `[RenewProperty ]`: - - `[PurchaseProperty ]`: - - `[AppliedScopePropertyDisplayName ]`: Display name - - `[AppliedScopePropertyManagementGroupId ]`: Fully-qualified identifier of the management group where the benefit must be applied. - - `[AppliedScopePropertyResourceGroupId ]`: Fully-qualified identifier of the resource group. - - `[AppliedScopePropertySubscriptionId ]`: Fully-qualified identifier of the subscription. - - `[AppliedScopePropertyTenantId ]`: Tenant ID where the benefit is applied. - - `[AppliedScopeType ]`: Type of the Applied Scope. - - `[BillingPlan ]`: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. - - `[BillingScopeId ]`: Subscription that will be charged for purchasing the benefit - - `[CommitmentAmount ]`: - - `[CommitmentCurrencyCode ]`: The ISO 4217 3-letter currency code for the currency used by this purchase record. - - `[CommitmentGrain ]`: Commitment grain. - - `[DisplayName ]`: Friendly name of the savings plan - - `[Renew ]`: Setting this to true will automatically purchase a new benefit on the expiration date time. - - `[SkuName ]`: Name of the SKU to be applied - - `[Term ]`: Represent benefit term in ISO 8601 format. - -`BODY `: . - - `[Benefit ]`: - - `[AppliedScopePropertyDisplayName ]`: Display name - - `[AppliedScopePropertyManagementGroupId ]`: Fully-qualified identifier of the management group where the benefit must be applied. - - `[AppliedScopePropertyResourceGroupId ]`: Fully-qualified identifier of the resource group. - - `[AppliedScopePropertySubscriptionId ]`: Fully-qualified identifier of the subscription. - - `[AppliedScopePropertyTenantId ]`: Tenant ID where the benefit is applied. - - `[AppliedScopeType ]`: Type of the Applied Scope. - - `[DisplayName ]`: Display name - - `[Renew ]`: Setting this to true will automatically purchase a new benefit on the expiration date time. - - `[RenewProperty ]`: - - `[PurchaseProperty ]`: - - `[AppliedScopePropertyDisplayName ]`: Display name - - `[AppliedScopePropertyManagementGroupId ]`: Fully-qualified identifier of the management group where the benefit must be applied. - - `[AppliedScopePropertyResourceGroupId ]`: Fully-qualified identifier of the resource group. - - `[AppliedScopePropertySubscriptionId ]`: Fully-qualified identifier of the subscription. - - `[AppliedScopePropertyTenantId ]`: Tenant ID where the benefit is applied. - - `[AppliedScopeType ]`: Type of the Applied Scope. - - `[BillingPlan ]`: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. - - `[BillingScopeId ]`: Subscription that will be charged for purchasing the benefit - - `[CommitmentAmount ]`: - - `[CommitmentCurrencyCode ]`: The ISO 4217 3-letter currency code for the currency used by this purchase record. - - `[CommitmentGrain ]`: Commitment grain. - - `[DisplayName ]`: Friendly name of the savings plan - - `[Renew ]`: Setting this to true will automatically purchase a new benefit on the expiration date time. - - `[SkuName ]`: Name of the SKU to be applied - - `[Term ]`: Represent benefit term in ISO 8601 format. - -`INPUTOBJECT `: Identity Parameter - - `[Id ]`: Resource identity path - - `[ReservationOrderAliasName ]`: Name of the reservation order alias - - `[SavingsPlanId ]`: ID of the savings plan - - `[SavingsPlanOrderAliasName ]`: Name of the savings plan order alias - - `[SavingsPlanOrderId ]`: Order ID of the savings plan - ## RELATED LINKS - diff --git a/src/BillingBenefits/BillingBenefits/help/New-AzBillingBenefitsReservationOrderAlias.md b/src/BillingBenefits/BillingBenefits/help/New-AzBillingBenefitsReservationOrderAlias.md index 871134b065ef..39399d0e10fa 100644 --- a/src/BillingBenefits/BillingBenefits/help/New-AzBillingBenefitsReservationOrderAlias.md +++ b/src/BillingBenefits/BillingBenefits/help/New-AzBillingBenefitsReservationOrderAlias.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.BillingBenefits-help.xml Module Name: Az.BillingBenefits online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/new-azbillingbenefitsreservationorderalias schema: 2.0.0 @@ -20,20 +20,15 @@ New-AzBillingBenefitsReservationOrderAlias -Name [-AppliedScopeProperty [-AppliedScopeType ] [-BillingPlan ] [-BillingScopeId ] [-DisplayName ] [-Location ] [-Quantity ] [-Renew] [-ReservedResourcePropertyInstanceFlexibility ] - [-ReservedResourceType ] [-ReviewDateTime ] [-SkuName ] - [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-ReservedResourceType ] [-ReviewDateTime ] [-SkuName ] [-Term ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### Create ``` New-AzBillingBenefitsReservationOrderAlias -Name -Body - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -### CreateViaIdentity -``` -New-AzBillingBenefitsReservationOrderAlias -InputObject - -Body [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -45,8 +40,16 @@ New-AzBillingBenefitsReservationOrderAlias -InputObject ] [-AppliedScopeType ] [-BillingPlan ] [-BillingScopeId ] [-DisplayName ] [-Location ] [-Quantity ] [-Renew] [-ReservedResourcePropertyInstanceFlexibility ] - [-ReservedResourceType ] [-ReviewDateTime ] [-SkuName ] - [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-ReservedResourceType ] [-ReviewDateTime ] [-SkuName ] [-Term ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] +``` + +### CreateViaIdentity +``` +New-AzBillingBenefitsReservationOrderAlias -InputObject + -Body [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -62,7 +65,7 @@ New-AzBillingBenefitsReservationOrderAlias -Name "PSRITest1" -AppliedScopeType " ```output Name DisplayName SkuName Location Term BillingPlan ReservedResourceType ReservationOrderId ProvisioningState BillingScopeId AppliedScopeType ---- ----------- ------- -------- ---- ----------- -------------------- ------------------ ----------------- -------------- -------- -PSRITest1 PSRITest1 Standard_B1ls westus P1Y P1M VirtualMachines /providers/Micro... Created /subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47 Shared +PSRITest1 PSRITest1 Standard_B1ls westus P1Y P1M VirtualMachines /providers/Micro... Created /subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47 Shared ``` Create a reservation order alias. @@ -222,7 +225,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -257,7 +261,7 @@ To construct, see NOTES section for INPUTOBJECT properties and create a hash tab ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity -Parameter Sets: CreateViaIdentity, CreateViaIdentityExpanded +Parameter Sets: CreateViaIdentityExpanded, CreateViaIdentity Aliases: Required: True @@ -287,7 +291,7 @@ Name of the reservation order alias ```yaml Type: System.String -Parameter Sets: Create, CreateExpanded +Parameter Sets: CreateExpanded, Create Aliases: ReservationOrderAliasName Required: True @@ -312,6 +316,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 +``` + ### -Quantity Total Quantity of the SKUs purchased in the Reservation. @@ -463,44 +482,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`BODY `: Reservation order alias - - `[SystemDataCreatedAt ]`: The timestamp of resource creation (UTC). - - `[SystemDataCreatedBy ]`: The identity that created the resource. - - `[SystemDataCreatedByType ]`: The type of identity that created the resource. - - `[SystemDataLastModifiedAt ]`: The timestamp of resource last modification (UTC) - - `[SystemDataLastModifiedBy ]`: The identity that last modified the resource. - - `[SystemDataLastModifiedByType ]`: The type of identity that last modified the resource. - - `[AppliedScopePropertyDisplayName ]`: Display name - - `[AppliedScopePropertyManagementGroupId ]`: Fully-qualified identifier of the management group where the benefit must be applied. - - `[AppliedScopePropertyResourceGroupId ]`: Fully-qualified identifier of the resource group. - - `[AppliedScopePropertySubscriptionId ]`: Fully-qualified identifier of the subscription. - - `[AppliedScopePropertyTenantId ]`: Tenant ID where the benefit is applied. - - `[AppliedScopeType ]`: Type of the Applied Scope. - - `[BillingPlan ]`: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. - - `[BillingScopeId ]`: Subscription that will be charged for purchasing the benefit - - `[DisplayName ]`: Display name - - `[Location ]`: The Azure Region where the reservation benefits are applied to. - - `[Quantity ]`: Total Quantity of the SKUs purchased in the Reservation. - - `[Renew ]`: Setting this to true will automatically purchase a new benefit on the expiration date time. - - `[ReservedResourcePropertyInstanceFlexibility ]`: Turning this on will apply the reservation discount to other VMs in the same VM size group. - - `[ReservedResourceType ]`: The type of the resource that is being reserved. - - `[ReviewDateTime ]`: This is the date-time when the Azure Hybrid Benefit needs to be reviewed. - - `[SkuName ]`: Name of the SKU to be applied - - `[Term ]`: Represent benefit term in ISO 8601 format. - -`INPUTOBJECT `: Identity Parameter - - `[Id ]`: Resource identity path - - `[ReservationOrderAliasName ]`: Name of the reservation order alias - - `[SavingsPlanId ]`: ID of the savings plan - - `[SavingsPlanOrderAliasName ]`: Name of the savings plan order alias - - `[SavingsPlanOrderId ]`: Order ID of the savings plan - ## RELATED LINKS - diff --git a/src/BillingBenefits/BillingBenefits/help/New-AzBillingBenefitsSavingsPlanOrderAlias.md b/src/BillingBenefits/BillingBenefits/help/New-AzBillingBenefitsSavingsPlanOrderAlias.md index c99a2a09fdae..ed5d3b8580ab 100644 --- a/src/BillingBenefits/BillingBenefits/help/New-AzBillingBenefitsSavingsPlanOrderAlias.md +++ b/src/BillingBenefits/BillingBenefits/help/New-AzBillingBenefitsSavingsPlanOrderAlias.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.BillingBenefits-help.xml Module Name: Az.BillingBenefits online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/new-azbillingbenefitssavingsplanorderalias schema: 2.0.0 @@ -21,19 +21,13 @@ New-AzBillingBenefitsSavingsPlanOrderAlias -Name [-AppliedScopeProperty [-AppliedScopeType ] [-BillingPlan ] [-BillingScopeId ] [-CommitmentAmount ] [-CommitmentCurrencyCode ] [-CommitmentGrain ] [-DisplayName ] [-Kind ] [-SkuName ] [-Term ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Create ``` New-AzBillingBenefitsSavingsPlanOrderAlias -Name -Body - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] -``` - -### CreateViaIdentity -``` -New-AzBillingBenefitsSavingsPlanOrderAlias -InputObject - -Body [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -45,7 +39,15 @@ New-AzBillingBenefitsSavingsPlanOrderAlias -InputObject ] [-AppliedScopeType ] [-BillingPlan ] [-BillingScopeId ] [-CommitmentAmount ] [-CommitmentCurrencyCode ] [-CommitmentGrain ] [-DisplayName ] [-Kind ] [-SkuName ] - [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-Term ] [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] + [-Confirm] [] +``` + +### CreateViaIdentity +``` +New-AzBillingBenefitsSavingsPlanOrderAlias -InputObject + -Body [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -268,7 +270,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -303,7 +306,7 @@ To construct, see NOTES section for INPUTOBJECT properties and create a hash tab ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity -Parameter Sets: CreateViaIdentity, CreateViaIdentityExpanded +Parameter Sets: CreateViaIdentityExpanded, CreateViaIdentity Aliases: Required: True @@ -333,7 +336,7 @@ Name of the savings plan order alias ```yaml Type: System.String -Parameter Sets: Create, CreateExpanded +Parameter Sets: CreateExpanded, Create Aliases: SavingsPlanOrderAliasName Required: True @@ -358,6 +361,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 +``` + ### -SkuName Name of the SKU to be applied @@ -434,44 +452,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`BODY `: Savings plan order alias - - `[SystemDataCreatedAt ]`: The timestamp of resource creation (UTC). - - `[SystemDataCreatedBy ]`: The identity that created the resource. - - `[SystemDataCreatedByType ]`: The type of identity that created the resource. - - `[SystemDataLastModifiedAt ]`: The timestamp of resource last modification (UTC) - - `[SystemDataLastModifiedBy ]`: The identity that last modified the resource. - - `[SystemDataLastModifiedByType ]`: The type of identity that last modified the resource. - - `[AppliedScopePropertyDisplayName ]`: Display name - - `[AppliedScopePropertyManagementGroupId ]`: Fully-qualified identifier of the management group where the benefit must be applied. - - `[AppliedScopePropertyResourceGroupId ]`: Fully-qualified identifier of the resource group. - - `[AppliedScopePropertySubscriptionId ]`: Fully-qualified identifier of the subscription. - - `[AppliedScopePropertyTenantId ]`: Tenant ID where the benefit is applied. - - `[AppliedScopeType ]`: Type of the Applied Scope. - - `[AzureAsyncOperation ]`: - - `[BillingPlan ]`: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. - - `[BillingScopeId ]`: Subscription that will be charged for purchasing the benefit - - `[CommitmentAmount ]`: - - `[CommitmentCurrencyCode ]`: The ISO 4217 3-letter currency code for the currency used by this purchase record. - - `[CommitmentGrain ]`: Commitment grain. - - `[DisplayName ]`: Display name - - `[Kind ]`: Resource provider kind - - `[RetryAfter ]`: - - `[SkuName ]`: Name of the SKU to be applied - - `[Term ]`: Represent benefit term in ISO 8601 format. - -`INPUTOBJECT `: Identity Parameter - - `[Id ]`: Resource identity path - - `[ReservationOrderAliasName ]`: Name of the reservation order alias - - `[SavingsPlanId ]`: ID of the savings plan - - `[SavingsPlanOrderAliasName ]`: Name of the savings plan order alias - - `[SavingsPlanOrderId ]`: Order ID of the savings plan - ## RELATED LINKS - diff --git a/src/BillingBenefits/BillingBenefits/help/Update-AzBillingBenefitsSavingsPlan.md b/src/BillingBenefits/BillingBenefits/help/Update-AzBillingBenefitsSavingsPlan.md index 741ad0211d59..cf8efa369301 100644 --- a/src/BillingBenefits/BillingBenefits/help/Update-AzBillingBenefitsSavingsPlan.md +++ b/src/BillingBenefits/BillingBenefits/help/Update-AzBillingBenefitsSavingsPlan.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.BillingBenefits-help.xml Module Name: Az.BillingBenefits online version: https://learn.microsoft.com/powershell/module/az.billingbenefits/update-azbillingbenefitssavingsplan schema: 2.0.0 @@ -18,19 +18,15 @@ Update-AzBillingBenefitsSavingsPlan -Id -OrderId [-AppliedScop [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-DisplayName ] [-Renew] [-RenewProperty ] - [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### Update ``` Update-AzBillingBenefitsSavingsPlan -Id -OrderId -Body - [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaIdentity -``` -Update-AzBillingBenefitsSavingsPlan -InputObject -Body - [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### UpdateViaIdentityExpanded @@ -39,7 +35,14 @@ Update-AzBillingBenefitsSavingsPlan -InputObject [-AppliedScopePropertyDisplayName ] [-AppliedScopePropertyManagementGroupId ] [-AppliedScopePropertyResourceGroupId ] [-AppliedScopePropertySubscriptionId ] [-AppliedScopePropertyTenantId ] [-AppliedScopeType ] [-DisplayName ] - [-Renew] [-RenewProperty ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] + [-Renew] [-RenewProperty ] [-DefaultProfile ] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### UpdateViaIdentity +``` +Update-AzBillingBenefitsSavingsPlan -InputObject -Body + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` @@ -170,7 +173,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -204,7 +208,7 @@ ID of the savings plan ```yaml Type: System.String -Parameter Sets: Update, UpdateExpanded +Parameter Sets: UpdateExpanded, Update Aliases: SavingsPlanId Required: True @@ -220,7 +224,7 @@ To construct, see NOTES section for INPUTOBJECT properties and create a hash tab ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.BillingBenefits.Models.IBillingBenefitsIdentity -Parameter Sets: UpdateViaIdentity, UpdateViaIdentityExpanded +Parameter Sets: UpdateViaIdentityExpanded, UpdateViaIdentity Aliases: Required: True @@ -235,7 +239,7 @@ Order ID of the savings plan ```yaml Type: System.String -Parameter Sets: Update, UpdateExpanded +Parameter Sets: UpdateExpanded, Update Aliases: SavingsPlanOrderId Required: True @@ -260,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 +``` + ### -Renew Setting this to true will automatically purchase a new benefit on the expiration date time. @@ -337,64 +356,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`BODY `: Savings plan patch request - - `[AppliedScopePropertyDisplayName ]`: Display name - - `[AppliedScopePropertyManagementGroupId ]`: Fully-qualified identifier of the management group where the benefit must be applied. - - `[AppliedScopePropertyResourceGroupId ]`: Fully-qualified identifier of the resource group. - - `[AppliedScopePropertySubscriptionId ]`: Fully-qualified identifier of the subscription. - - `[AppliedScopePropertyTenantId ]`: Tenant ID where the benefit is applied. - - `[AppliedScopeType ]`: Type of the Applied Scope. - - `[DisplayName ]`: Display name - - `[Renew ]`: Setting this to true will automatically purchase a new benefit on the expiration date time. - - `[RenewProperty ]`: - - `[PurchaseProperty ]`: - - `[AppliedScopePropertyDisplayName ]`: Display name - - `[AppliedScopePropertyManagementGroupId ]`: Fully-qualified identifier of the management group where the benefit must be applied. - - `[AppliedScopePropertyResourceGroupId ]`: Fully-qualified identifier of the resource group. - - `[AppliedScopePropertySubscriptionId ]`: Fully-qualified identifier of the subscription. - - `[AppliedScopePropertyTenantId ]`: Tenant ID where the benefit is applied. - - `[AppliedScopeType ]`: Type of the Applied Scope. - - `[BillingPlan ]`: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. - - `[BillingScopeId ]`: Subscription that will be charged for purchasing the benefit - - `[CommitmentAmount ]`: - - `[CommitmentCurrencyCode ]`: The ISO 4217 3-letter currency code for the currency used by this purchase record. - - `[CommitmentGrain ]`: Commitment grain. - - `[DisplayName ]`: Friendly name of the savings plan - - `[Renew ]`: Setting this to true will automatically purchase a new benefit on the expiration date time. - - `[SkuName ]`: Name of the SKU to be applied - - `[Term ]`: Represent benefit term in ISO 8601 format. - -`INPUTOBJECT `: Identity Parameter - - `[Id ]`: Resource identity path - - `[ReservationOrderAliasName ]`: Name of the reservation order alias - - `[SavingsPlanId ]`: ID of the savings plan - - `[SavingsPlanOrderAliasName ]`: Name of the savings plan order alias - - `[SavingsPlanOrderId ]`: Order ID of the savings plan - -`RENEWPROPERTY `: . - - `[PurchaseProperty ]`: - - `[AppliedScopePropertyDisplayName ]`: Display name - - `[AppliedScopePropertyManagementGroupId ]`: Fully-qualified identifier of the management group where the benefit must be applied. - - `[AppliedScopePropertyResourceGroupId ]`: Fully-qualified identifier of the resource group. - - `[AppliedScopePropertySubscriptionId ]`: Fully-qualified identifier of the subscription. - - `[AppliedScopePropertyTenantId ]`: Tenant ID where the benefit is applied. - - `[AppliedScopeType ]`: Type of the Applied Scope. - - `[BillingPlan ]`: Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. - - `[BillingScopeId ]`: Subscription that will be charged for purchasing the benefit - - `[CommitmentAmount ]`: - - `[CommitmentCurrencyCode ]`: The ISO 4217 3-letter currency code for the currency used by this purchase record. - - `[CommitmentGrain ]`: Commitment grain. - - `[DisplayName ]`: Friendly name of the savings plan - - `[Renew ]`: Setting this to true will automatically purchase a new benefit on the expiration date time. - - `[SkuName ]`: Name of the SKU to be applied - - `[Term ]`: Represent benefit term in ISO 8601 format. - ## RELATED LINKS - diff --git a/src/Cdn/Cdn.Autorest/Az.Cdn.psm1 b/src/Cdn/Cdn.Autorest/Az.Cdn.psm1 index 6dd7db89df65..c1cf393c6cb9 100644 --- a/src/Cdn/Cdn.Autorest/Az.Cdn.psm1 +++ b/src/Cdn/Cdn.Autorest/Az.Cdn.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.Cdn.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/Cdn/Cdn.Autorest/generated/Module.cs b/src/Cdn/Cdn.Autorest/generated/Module.cs index 298838d2a477..210c9a1e9535 100644 --- a/src/Cdn/Cdn.Autorest/generated/Module.cs +++ b/src/Cdn/Cdn.Autorest/generated/Module.cs @@ -17,6 +17,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Cdn 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 @@ -51,6 +53,9 @@ public partial class Module /// The delegate to get the telemetry Id. public GetTelemetryIdDelegate GetTelemetryId { get; set; } + /// The delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } + /// Backing field for property. private static Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module _instance; @@ -72,6 +77,9 @@ public partial class Module /// The ResourceID for this module (azure arm). public string ResourceId => @"Az.Cdn"; + /// 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; } diff --git a/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_Purge1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_Purge1.cs index 35e46a981e8a..7f4cde53e66b 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_Purge1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_Purge1.cs @@ -265,7 +265,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzCdnEndpointContent_ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -436,6 +453,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeExpanded1.cs index 09f19d12128b..6f0b866f98b1 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeExpanded1.cs @@ -269,7 +269,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzCdnEndpointContent_ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -440,6 +457,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentity1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentity1.cs index b9764f63ba94..1f2bfd1faec2 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentity1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentity1.cs @@ -209,7 +209,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzCdnEndpointContent_ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1.cs index dd85652182f5..c88630c1f637 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzCdnEndpointContent_PurgeViaIdentityExpanded1.cs @@ -213,7 +213,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzCdnEndpointContent_ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -408,6 +425,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_Purge.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_Purge.cs index 09467a5d2fac..71f655953306 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_Purge.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_Purge.cs @@ -267,7 +267,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzFrontDoorCdnEndpoin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -438,6 +455,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeExpanded.cs index c455f0ad4516..636d6cb898b6 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeExpanded.cs @@ -283,7 +283,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzFrontDoorCdnEndpoin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -454,6 +471,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity.cs index c2b10d911cc2..bfac1430cde6 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentity.cs @@ -209,7 +209,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzFrontDoorCdnEndpoin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded.cs index 80286ebf11c9..a21afcc2398d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ClearAzFrontDoorCdnEndpointContent_PurgeViaIdentityExpanded.cs @@ -227,7 +227,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ClearAzFrontDoorCdnEndpoin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -422,6 +439,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_Disable.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_Disable.cs index 6bcf862a0e58..64e65f1a009a 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_Disable.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_Disable.cs @@ -261,7 +261,24 @@ public DisableAzCdnCustomDomainCustomHttps_Disable() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -432,6 +449,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_DisableViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_DisableViaIdentity.cs index d8376caf5b20..aba5d7f77c7d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_DisableViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/DisableAzCdnCustomDomainCustomHttps_DisableViaIdentity.cs @@ -190,7 +190,24 @@ public DisableAzCdnCustomDomainCustomHttps_DisableViaIdentity() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -389,6 +406,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_Enable.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_Enable.cs index 4161194043e8..2d25548994d8 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_Enable.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_Enable.cs @@ -275,7 +275,24 @@ public EnableAzCdnCustomDomainCustomHttps_Enable() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -446,6 +463,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_EnableViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_EnableViaIdentity.cs index cb024489c90b..da6bd17d544d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_EnableViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/EnableAzCdnCustomDomainCustomHttps_EnableViaIdentity.cs @@ -204,7 +204,24 @@ public EnableAzCdnCustomDomainCustomHttps_EnableViaIdentity() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -403,6 +420,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_Get1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_Get1.cs index 17760ea4d195..5db68bbe44e7 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_Get1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_Get1.cs @@ -216,7 +216,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -365,6 +382,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_GetViaIdentity1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_GetViaIdentity1.cs index b48b74867eab..c0b69df2704a 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_GetViaIdentity1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_GetViaIdentity1.cs @@ -149,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -323,6 +340,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_List1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_List1.cs index 924e25ece71a..2a874b092ff1 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_List1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnCustomDomain_List1.cs @@ -207,7 +207,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -356,6 +373,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEdgeNode_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEdgeNode_List.cs index 54a0e3e456f4..e9039b7ade7f 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEdgeNode_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEdgeNode_List.cs @@ -149,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -295,6 +312,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpointResourceUsage_List1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpointResourceUsage_List1.cs index f56513c8d572..49d4d7d64f76 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpointResourceUsage_List1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpointResourceUsage_List1.cs @@ -209,7 +209,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -361,6 +378,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_Get1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_Get1.cs index ca6709e92607..b0f5383bea4c 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_Get1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_Get1.cs @@ -204,7 +204,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -353,6 +370,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_GetViaIdentity1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_GetViaIdentity1.cs index 470ec0a1a294..9a75e4d75462 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_GetViaIdentity1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_GetViaIdentity1.cs @@ -151,7 +151,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -321,6 +338,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_List1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_List1.cs index 446f2c19fbc0..d2ff658adf03 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_List1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnEndpoint_List1.cs @@ -193,7 +193,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -342,6 +359,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticLocation_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticLocation_Get.cs index 5b16dc6c8a31..012ea829f6fd 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticLocation_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticLocation_Get.cs @@ -191,7 +191,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -340,6 +357,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticLocation_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticLocation_GetViaIdentity.cs index 6279d9d3cfe7..974b796b84b7 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticLocation_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticLocation_GetViaIdentity.cs @@ -150,7 +150,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -316,6 +333,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticMetric_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticMetric_Get.cs index 995bebf72451..77b7a140be18 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticMetric_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticMetric_Get.cs @@ -317,7 +317,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -466,6 +483,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticMetric_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticMetric_GetViaIdentity.cs index 36fdc2784250..c2d8cfcad3d4 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticMetric_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticMetric_GetViaIdentity.cs @@ -276,7 +276,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -442,6 +459,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticRanking_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticRanking_Get.cs index 893b819958c4..7baa69c08fb2 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticRanking_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticRanking_Get.cs @@ -274,7 +274,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -423,6 +440,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticRanking_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticRanking_GetViaIdentity.cs index 1d5ec9f133ed..69fc7eb0ffd9 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticRanking_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticRanking_GetViaIdentity.cs @@ -233,7 +233,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -399,6 +416,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticResource_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticResource_Get.cs index 435a0e36f24d..e3a702b85f48 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticResource_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticResource_Get.cs @@ -191,7 +191,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -340,6 +357,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticResource_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticResource_GetViaIdentity.cs index 4cb80c61d8dd..9690fa7a2fd2 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticResource_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticResource_GetViaIdentity.cs @@ -150,7 +150,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -316,6 +333,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_Get.cs index 94eba143852e..7443c91bd56b 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_Get.cs @@ -291,7 +291,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -440,6 +457,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity.cs index 6516c9593257..ed34c3cd095a 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticMetric_GetViaIdentity.cs @@ -250,7 +250,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -416,6 +433,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_Get.cs index adae61dbea6f..2fb4d12ae292 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_Get.cs @@ -290,7 +290,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -439,6 +456,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity.cs index 6e962c5c9352..cc857e61c275 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnLogAnalyticWafLogAnalyticRanking_GetViaIdentity.cs @@ -249,7 +249,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -415,6 +432,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOperation_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOperation_List.cs index 10c2313b30c8..2b852e726250 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOperation_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOperation_List.cs @@ -148,7 +148,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -294,6 +311,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_Get1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_Get1.cs index 2eb50a8aa75c..318fae5d8745 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_Get1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_Get1.cs @@ -216,7 +216,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -365,6 +382,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_GetViaIdentity1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_GetViaIdentity1.cs index 71d2e7183dae..f56a47061460 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_GetViaIdentity1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_GetViaIdentity1.cs @@ -149,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -323,6 +340,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_List1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_List1.cs index 492152e0fafd..f6d185e03941 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_List1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOriginGroup_List1.cs @@ -207,7 +207,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -356,6 +373,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_Get1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_Get1.cs index d6de592ed045..e314f8e38c9b 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_Get1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_Get1.cs @@ -216,7 +216,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -365,6 +382,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_GetViaIdentity1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_GetViaIdentity1.cs index a87a6b2a5b59..060ebe05c2e7 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_GetViaIdentity1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_GetViaIdentity1.cs @@ -149,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -323,6 +340,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_List1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_List1.cs index dff39ddee8f2..4233cc38b9fb 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_List1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnOrigin_List1.cs @@ -207,7 +207,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -356,6 +373,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfileResourceUsage_List1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfileResourceUsage_List1.cs index cd4bcd2de0aa..e8cdec7f3ae8 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfileResourceUsage_List1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfileResourceUsage_List1.cs @@ -198,7 +198,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -350,6 +367,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfileSupportedOptimizationType_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfileSupportedOptimizationType_List.cs index 14e4ffe7e878..f29e1bd5ea87 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfileSupportedOptimizationType_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfileSupportedOptimizationType_List.cs @@ -192,7 +192,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -344,6 +361,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_Get.cs index aa306086f495..7f32cced3623 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_Get.cs @@ -194,7 +194,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -343,6 +360,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_GetViaIdentity.cs index 15c655c91356..b78026737e8e 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_GetViaIdentity.cs @@ -153,7 +153,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -319,6 +336,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_List.cs index 3d90553d2acf..b9dc92151f72 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_List.cs @@ -168,7 +168,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -317,6 +334,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_List1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_List1.cs index a0535d228406..a095c8de444a 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_List1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnProfile_List1.cs @@ -182,7 +182,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -331,6 +348,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnSubscriptionResourceUsage_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnSubscriptionResourceUsage_List.cs index e494f2c7c941..afc98dca8803 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnSubscriptionResourceUsage_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzCdnSubscriptionResourceUsage_List.cs @@ -167,7 +167,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -319,6 +336,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_Get.cs index 293e80fe8f0a..e39a69090340 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_Get.cs @@ -206,7 +206,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -355,6 +372,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_GetViaIdentity.cs index 8ee4b2d6981f..71f907018d2a 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_GetViaIdentity.cs @@ -152,7 +152,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -322,6 +339,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_List.cs index cadd240c43c9..8ae519b028ca 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnCustomDomain_List.cs @@ -195,7 +195,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -344,6 +361,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpointResourceUsage_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpointResourceUsage_List.cs index 9f6c915e888d..1194e97556b8 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpointResourceUsage_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpointResourceUsage_List.cs @@ -211,7 +211,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -363,6 +380,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_Get.cs index bed2d5f8e982..21b2c35c15f2 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_Get.cs @@ -206,7 +206,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -355,6 +372,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_GetViaIdentity.cs index 9696ae9b0ee3..49947bb38589 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_GetViaIdentity.cs @@ -152,7 +152,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -322,6 +339,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_List.cs index daa5aa055b40..b5974478b061 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnEndpoint_List.cs @@ -195,7 +195,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -344,6 +361,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroupResourceUsage_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroupResourceUsage_List.cs index c295cfb9316f..4ad3425396dd 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroupResourceUsage_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroupResourceUsage_List.cs @@ -211,7 +211,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -363,6 +380,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_Get.cs index 2766ec60c0b6..ce04455d9e3b 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_Get.cs @@ -203,7 +203,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -352,6 +369,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_GetViaIdentity.cs index 3a82deaf1cc7..d3aec45d1b35 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_GetViaIdentity.cs @@ -149,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -319,6 +336,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_List.cs index 2c5e55d9d868..e620f09b739a 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOriginGroup_List.cs @@ -195,7 +195,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -344,6 +361,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_Get.cs index 72a0b82a10af..e60d86db9e03 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_Get.cs @@ -217,7 +217,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -366,6 +383,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_GetViaIdentity.cs index 72e6759eb50d..7173e234be36 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_GetViaIdentity.cs @@ -149,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -323,6 +340,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_List.cs index 65d5155464c7..c660808faa48 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnOrigin_List.cs @@ -209,7 +209,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -358,6 +375,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnProfileResourceUsage_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnProfileResourceUsage_List.cs index 7a73d4f1d05f..b447f6293188 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnProfileResourceUsage_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnProfileResourceUsage_List.cs @@ -197,7 +197,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -349,6 +366,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_Get.cs index 9bec4172daa2..7e854c366b1b 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_Get.cs @@ -221,7 +221,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -370,6 +387,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_GetViaIdentity.cs index a6450989d834..9b2758d44d6d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_GetViaIdentity.cs @@ -152,7 +152,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -326,6 +343,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_List.cs index 970e38868f15..5b5540c37a70 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRoute_List.cs @@ -209,7 +209,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -358,6 +375,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSetResourceUsage_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSetResourceUsage_List.cs index 601d2c0c5494..dbf32eb9aa3b 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSetResourceUsage_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSetResourceUsage_List.cs @@ -211,7 +211,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -363,6 +380,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_Get.cs index fd6b55efd72e..aaa9b074e692 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_Get.cs @@ -207,7 +207,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -356,6 +373,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_GetViaIdentity.cs index f9848975c485..f0aa5c9fdc5b 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_GetViaIdentity.cs @@ -152,7 +152,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -322,6 +339,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_List.cs index e294dc1b234c..9ead6e63cc1e 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRuleSet_List.cs @@ -195,7 +195,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -344,6 +361,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_Get.cs index a58e782d25c5..5dc2d11108d3 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_Get.cs @@ -219,7 +219,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -368,6 +385,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_GetViaIdentity.cs index f4283d9da964..880cd5c1c231 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_GetViaIdentity.cs @@ -149,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -323,6 +340,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_List.cs index 42a23e3eb362..911145720a56 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnRule_List.cs @@ -210,7 +210,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -359,6 +376,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_Get.cs index 95615768cff2..cfee9ddd945d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_Get.cs @@ -204,7 +204,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -353,6 +370,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_GetViaIdentity.cs index 46c9d420b2e3..1e4507362cfc 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_GetViaIdentity.cs @@ -149,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -319,6 +336,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_List.cs index 07c94c3281a2..5f6ffbf38844 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecret_List.cs @@ -195,7 +195,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -344,6 +361,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_Get.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_Get.cs index 209e9dc03566..4cf8b3e2eca3 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_Get.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_Get.cs @@ -204,7 +204,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -353,6 +370,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_GetViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_GetViaIdentity.cs index 3c1d961c80b6..0bf5f035e6a8 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_GetViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_GetViaIdentity.cs @@ -149,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -319,6 +336,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_List.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_List.cs index f8824217d966..b69efcc135a4 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_List.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/GetAzFrontDoorCdnSecurityPolicy_List.cs @@ -195,7 +195,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -344,6 +361,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_Load.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_Load.cs index ab752b6d7afa..ddb751acef4c 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_Load.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_Load.cs @@ -257,7 +257,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ImportAzCdnEndpointContent /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -436,6 +453,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadExpanded.cs index c7bb10441cb3..2d9440bec77d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadExpanded.cs @@ -261,7 +261,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ImportAzCdnEndpointContent /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -440,6 +457,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentity.cs index 85f3c843b10a..f20a2c47152d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentity.cs @@ -201,7 +201,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ImportAzCdnEndpointContent /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentityExpanded.cs index ce101092beac..afbc59c36d2f 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/ImportAzCdnEndpointContent_LoadViaIdentityExpanded.cs @@ -205,7 +205,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.ImportAzCdnEndpointContent /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -408,6 +425,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_Can.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_Can.cs index f3e42924b6d2..0b04e3067c01 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_Can.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_Can.cs @@ -225,7 +225,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.InvokeAzCdnCanProfileMigra /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanExpanded.cs index 443c91342ff7..769615b477a7 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanExpanded.cs @@ -226,7 +226,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.InvokeAzCdnCanProfileMigra /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -405,6 +422,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanViaIdentity.cs index 6151ff8c5036..7e254ff6eea4 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanViaIdentity.cs @@ -199,7 +199,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.InvokeAzCdnCanProfileMigra /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -394,6 +411,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanViaIdentityExpanded.cs index a8693b6aff31..96ded3149710 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCanProfileMigrate_CanViaIdentityExpanded.cs @@ -200,7 +200,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.InvokeAzCdnCanProfileMigra /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -395,6 +412,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCommitProfileMigration_Commit.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCommitProfileMigration_Commit.cs index 1837da2c1f91..a044da1327d8 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCommitProfileMigration_Commit.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCommitProfileMigration_Commit.cs @@ -229,7 +229,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.InvokeAzCdnCommitProfileMi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -408,6 +425,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCommitProfileMigration_CommitViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCommitProfileMigration_CommitViaIdentity.cs index 5a5e89823630..baf871c35c33 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCommitProfileMigration_CommitViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/InvokeAzCdnCommitProfileMigration_CommitViaIdentity.cs @@ -188,7 +188,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.InvokeAzCdnCommitProfileMi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -387,6 +404,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_Migrate.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_Migrate.cs index bc6bdcef0ea0..3f4bbbdbf2f3 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_Migrate.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_Migrate.cs @@ -225,7 +225,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.MoveAzCdnProfile_Migrate C /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateExpanded.cs index bce1948001b9..f0ae5ea00617 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateExpanded.cs @@ -261,7 +261,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.MoveAzCdnProfile_MigrateEx /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -440,6 +457,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateViaIdentity.cs index 0eaab25b6923..877cb469b469 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateViaIdentity.cs @@ -199,7 +199,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.MoveAzCdnProfile_MigrateVi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -394,6 +411,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateViaIdentityExpanded.cs index e0da52d881dc..190b2902dda1 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/MoveAzCdnProfile_MigrateViaIdentityExpanded.cs @@ -235,7 +235,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.MoveAzCdnProfile_MigrateVi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -430,6 +447,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnCustomDomain_CreateExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnCustomDomain_CreateExpanded1.cs index 6683db0c9277..c1be4843aa78 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnCustomDomain_CreateExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnCustomDomain_CreateExpanded1.cs @@ -269,7 +269,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzCdnCustomDomain_Creat /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -448,6 +465,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnEndpoint_CreateExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnEndpoint_CreateExpanded1.cs index 941d5593f0c9..1def7e0ca913 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnEndpoint_CreateExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnEndpoint_CreateExpanded1.cs @@ -499,7 +499,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzCdnEndpoint_CreateExp /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -678,6 +695,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnOriginGroup_CreateExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnOriginGroup_CreateExpanded1.cs index 7e849198a3a0..59da9d346a35 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnOriginGroup_CreateExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnOriginGroup_CreateExpanded1.cs @@ -313,7 +313,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzCdnOriginGroup_Create /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -492,6 +509,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnOrigin_CreateExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnOrigin_CreateExpanded1.cs index fca2caaef850..b302379e4744 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnOrigin_CreateExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnOrigin_CreateExpanded1.cs @@ -402,7 +402,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzCdnOrigin_CreateExpan /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -581,6 +598,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfileSsoUri_Generate.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfileSsoUri_Generate.cs index c291a431f07f..2babdfc9531b 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfileSsoUri_Generate.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfileSsoUri_Generate.cs @@ -193,7 +193,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -342,6 +359,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfileSsoUri_GenerateViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfileSsoUri_GenerateViaIdentity.cs index 9cb8185a1a96..0515e5709dc7 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfileSsoUri_GenerateViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfileSsoUri_GenerateViaIdentity.cs @@ -155,7 +155,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -324,6 +341,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfile_CreateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfile_CreateExpanded.cs index 99b967180e1b..0cfa819495bd 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfile_CreateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzCdnProfile_CreateExpanded.cs @@ -336,7 +336,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzCdnProfile_CreateExpa /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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 +532,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnCustomDomain_CreateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnCustomDomain_CreateExpanded.cs index 5855dadcef7c..077f92ca6ecf 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnCustomDomain_CreateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnCustomDomain_CreateExpanded.cs @@ -305,7 +305,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnCustomDom /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -484,6 +501,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnEndpoint_CreateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnEndpoint_CreateExpanded.cs index 81cf3b3cfe84..4fd54f64e63f 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnEndpoint_CreateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnEndpoint_CreateExpanded.cs @@ -299,7 +299,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnEndpoint_ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -478,6 +495,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnOriginGroup_CreateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnOriginGroup_CreateExpanded.cs index 794b3183de07..e5356b36de81 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnOriginGroup_CreateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnOriginGroup_CreateExpanded.cs @@ -299,7 +299,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnOriginGro /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -478,6 +495,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnOrigin_CreateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnOrigin_CreateExpanded.cs index 2ba57364dee7..e3e8df49001c 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnOrigin_CreateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnOrigin_CreateExpanded.cs @@ -439,7 +439,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnOrigin_Cr /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -618,6 +635,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRoute_CreateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRoute_CreateExpanded.cs index bfdbd31b2f07..6d4375efb9d6 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRoute_CreateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRoute_CreateExpanded.cs @@ -444,7 +444,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnRoute_Cre /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -623,6 +640,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRuleSet_Create.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRuleSet_Create.cs index 7a19c55f0b94..f74bb1bef802 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRuleSet_Create.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRuleSet_Create.cs @@ -216,7 +216,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -365,6 +382,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Cdn.Models.Api20240201.IRuleSet diff --git a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRule_CreateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRule_CreateExpanded.cs index 5fada0d1ed46..d0a46ae90c48 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRule_CreateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnRule_CreateExpanded.cs @@ -317,7 +317,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnRule_Crea /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -496,6 +513,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnSecret_CreateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnSecret_CreateExpanded.cs index b1a732a5f85f..92cf32670f29 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnSecret_CreateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnSecret_CreateExpanded.cs @@ -256,7 +256,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnSecret_Cr /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -435,6 +452,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnSecurityPolicy_CreateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnSecurityPolicy_CreateExpanded.cs index 3a652f64078f..290d50210447 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnSecurityPolicy_CreateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/NewAzFrontDoorCdnSecurityPolicy_CreateExpanded.cs @@ -256,7 +256,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.NewAzFrontDoorCdnSecurityP /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -435,6 +452,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnCustomDomain_Delete1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnCustomDomain_Delete1.cs index f9c95d2212a5..8a7f34ca25d7 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnCustomDomain_Delete1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnCustomDomain_Delete1.cs @@ -269,7 +269,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnCustomDomain_De /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -448,6 +465,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnCustomDomain_DeleteViaIdentity1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnCustomDomain_DeleteViaIdentity1.cs index 42319facb794..3cae5ebb10d6 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnCustomDomain_DeleteViaIdentity1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnCustomDomain_DeleteViaIdentity1.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnCustomDomain_De /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnEndpoint_Delete1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnEndpoint_Delete1.cs index fd3e05d31fa0..e64f68eecb76 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnEndpoint_Delete1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnEndpoint_Delete1.cs @@ -257,7 +257,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnEndpoint_Delete /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -436,6 +453,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnEndpoint_DeleteViaIdentity1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnEndpoint_DeleteViaIdentity1.cs index 83d05df3aff9..9c88ffdcb2a7 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnEndpoint_DeleteViaIdentity1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnEndpoint_DeleteViaIdentity1.cs @@ -200,7 +200,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnEndpoint_Delete /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -403,6 +420,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOriginGroup_Delete1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOriginGroup_Delete1.cs index af2305bf2e2b..c6923f402643 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOriginGroup_Delete1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOriginGroup_Delete1.cs @@ -269,7 +269,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnOriginGroup_Del /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -448,6 +465,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOriginGroup_DeleteViaIdentity1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOriginGroup_DeleteViaIdentity1.cs index 4e6c5b98134a..5d96ca0c8458 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOriginGroup_DeleteViaIdentity1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOriginGroup_DeleteViaIdentity1.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnOriginGroup_Del /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOrigin_Delete1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOrigin_Delete1.cs index 25991e8d9b9e..389072520311 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOrigin_Delete1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOrigin_Delete1.cs @@ -269,7 +269,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnOrigin_Delete1 /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -448,6 +465,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOrigin_DeleteViaIdentity1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOrigin_DeleteViaIdentity1.cs index fa9ebdee5c52..f6fc85ca3d02 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOrigin_DeleteViaIdentity1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnOrigin_DeleteViaIdentity1.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnOrigin_DeleteVi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnProfile_Delete.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnProfile_Delete.cs index d9bcfdb06e4f..c468e33684f5 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnProfile_Delete.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnProfile_Delete.cs @@ -245,7 +245,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnProfile_Delete /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -424,6 +441,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnProfile_DeleteViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnProfile_DeleteViaIdentity.cs index b196a341fca7..40572c168b1d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnProfile_DeleteViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzCdnProfile_DeleteViaIdentity.cs @@ -201,7 +201,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzCdnProfile_DeleteV /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -400,6 +417,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_Delete.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_Delete.cs index f019907fa989..5de88f696a5f 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_Delete.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_Delete.cs @@ -258,7 +258,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnCustom /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -437,6 +454,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity.cs index df701e98f2ee..1da338fdb5cc 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnCustomDomain_DeleteViaIdentity.cs @@ -200,7 +200,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnCustom /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -403,6 +420,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_Delete.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_Delete.cs index c35820b91d38..2a1d1e7f4f1c 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_Delete.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_Delete.cs @@ -258,7 +258,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnEndpoi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -437,6 +454,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity.cs index 0b5d34ea6f77..838248251f01 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnEndpoint_DeleteViaIdentity.cs @@ -200,7 +200,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnEndpoi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -403,6 +420,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_Delete.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_Delete.cs index 7f8dbd9eec92..c1b51aa42cbf 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_Delete.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_Delete.cs @@ -255,7 +255,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnOrigin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -434,6 +451,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity.cs index 06f9e2da5193..6f24f06b6803 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOriginGroup_DeleteViaIdentity.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnOrigin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -400,6 +417,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_Delete.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_Delete.cs index e1ebca500287..d2ac32f49c12 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_Delete.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_Delete.cs @@ -270,7 +270,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnOrigin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -449,6 +466,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity.cs index 1553e27039c3..804e0bd65e2e 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnOrigin_DeleteViaIdentity.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnOrigin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRoute_Delete.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRoute_Delete.cs index eca410f9453d..21b0f6186e26 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRoute_Delete.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRoute_Delete.cs @@ -274,7 +274,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRoute_ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -453,6 +470,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRoute_DeleteViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRoute_DeleteViaIdentity.cs index 7f048977f6c8..66ca645d7ee7 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRoute_DeleteViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRoute_DeleteViaIdentity.cs @@ -200,7 +200,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRoute_ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -407,6 +424,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_Delete.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_Delete.cs index f98de94639e1..6b82bd64e7e2 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_Delete.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_Delete.cs @@ -259,7 +259,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRuleSe /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -438,6 +455,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity.cs index 5bf7d7903165..f5bccd7eefb6 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRuleSet_DeleteViaIdentity.cs @@ -200,7 +200,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRuleSe /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -403,6 +420,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRule_Delete.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRule_Delete.cs index 738577a2839f..0d54716656fb 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRule_Delete.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRule_Delete.cs @@ -272,7 +272,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRule_D /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -451,6 +468,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRule_DeleteViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRule_DeleteViaIdentity.cs index 0dccc0af49c6..451b3e3042e8 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRule_DeleteViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnRule_DeleteViaIdentity.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnRule_D /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -404,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecret_Delete.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecret_Delete.cs index 5212419459da..37b6f4cf4b9a 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecret_Delete.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecret_Delete.cs @@ -256,7 +256,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnSecret /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -435,6 +452,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecret_DeleteViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecret_DeleteViaIdentity.cs index 81a45da4058f..d466176f4ab9 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecret_DeleteViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecret_DeleteViaIdentity.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnSecret /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -400,6 +417,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_Delete.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_Delete.cs index e01379957105..3ded7eebcaea 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_Delete.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_Delete.cs @@ -256,7 +256,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnSecuri /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -435,6 +452,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity.cs index 6b2f6a762da7..af721cf8e657 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/RemoveAzFrontDoorCdnSecurityPolicy_DeleteViaIdentity.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.RemoveAzFrontDoorCdnSecuri /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -400,6 +417,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/StartAzCdnEndpoint_Start.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/StartAzCdnEndpoint_Start.cs index e8e2fb8a0992..a093d86d8b60 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/StartAzCdnEndpoint_Start.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/StartAzCdnEndpoint_Start.cs @@ -239,7 +239,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.StartAzCdnEndpoint_Start C /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -418,6 +435,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/StartAzCdnEndpoint_StartViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/StartAzCdnEndpoint_StartViaIdentity.cs index 6ae8e1fd8928..aa5c7cf1b709 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/StartAzCdnEndpoint_StartViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/StartAzCdnEndpoint_StartViaIdentity.cs @@ -182,7 +182,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.StartAzCdnEndpoint_StartVi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -385,6 +402,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/StopAzCdnEndpoint_Stop.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/StopAzCdnEndpoint_Stop.cs index 71689ea94fa6..ca1c4d682c02 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/StopAzCdnEndpoint_Stop.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/StopAzCdnEndpoint_Stop.cs @@ -239,7 +239,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.StopAzCdnEndpoint_Stop Clo /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -418,6 +435,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/StopAzCdnEndpoint_StopViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/StopAzCdnEndpoint_StopViaIdentity.cs index e17e1c0d2484..ab83b0a99ac9 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/StopAzCdnEndpoint_StopViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/StopAzCdnEndpoint_StopViaIdentity.cs @@ -182,7 +182,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.StopAzCdnEndpoint_StopViaI /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -385,6 +402,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateExpanded1.cs index fed3541ab5d5..b41f6e78eaa6 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateExpanded1.cs @@ -217,7 +217,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -366,6 +383,21 @@ public TestAzCdnEndpointCustomDomain_ValidateExpanded1() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1.cs index 128487568aaa..fbe829528803 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1.cs @@ -165,7 +165,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -338,6 +355,21 @@ public TestAzCdnEndpointCustomDomain_ValidateViaIdentityExpanded1() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded.cs index da779256809e..680b1ae2db01 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded.cs @@ -169,7 +169,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -318,6 +335,21 @@ public TestAzCdnNameAvailability_CheckExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded1.cs index a16ce916ea63..4365fb04765a 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnNameAvailability_CheckExpanded1.cs @@ -187,7 +187,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -336,6 +353,21 @@ public TestAzCdnNameAvailability_CheckExpanded1() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnProbe_ValidateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnProbe_ValidateExpanded.cs index 8d036d69de5a..168bab6f9fe4 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnProbe_ValidateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzCdnProbe_ValidateExpanded.cs @@ -177,7 +177,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -326,6 +343,21 @@ public TestAzCdnProbe_ValidateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateExpanded.cs index 9974e6800527..0498ec708dc4 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateExpanded.cs @@ -219,7 +219,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -368,6 +385,21 @@ public TestAzFrontDoorCdnEndpointCustomDomain_ValidateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded.cs index e8fd3b480066..e22f61d933ed 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded.cs @@ -165,7 +165,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -339,6 +356,21 @@ public TestAzFrontDoorCdnEndpointCustomDomain_ValidateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointNameAvailability_CheckExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointNameAvailability_CheckExpanded.cs index 50efb8c417c2..7e4c34dc684d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointNameAvailability_CheckExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnEndpointNameAvailability_CheckExpanded.cs @@ -214,7 +214,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -363,6 +380,21 @@ public TestAzFrontDoorCdnEndpointNameAvailability_CheckExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileEndpointNameAvailability_CheckExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileEndpointNameAvailability_CheckExpanded.cs index cdb4fef3d752..f21ed68c4627 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileEndpointNameAvailability_CheckExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileEndpointNameAvailability_CheckExpanded.cs @@ -230,7 +230,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -380,6 +397,21 @@ public TestAzFrontDoorCdnProfileEndpointNameAvailability_CheckExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileEndpointNameAvailability_CheckViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileEndpointNameAvailability_CheckViaIdentityExpanded.cs index 0e14bbd85b5a..2ebbee9ed7af 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileEndpointNameAvailability_CheckViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileEndpointNameAvailability_CheckViaIdentityExpanded.cs @@ -190,7 +190,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -360,6 +377,21 @@ public TestAzFrontDoorCdnProfileEndpointNameAvailability_CheckViaIdentityExpande } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckExpanded.cs index 7f54f9ecd431..61f76b1207c6 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckExpanded.cs @@ -205,7 +205,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -354,6 +371,21 @@ public TestAzFrontDoorCdnProfileHostNameAvailability_CheckExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded.cs index 17ca7db6ea73..3362861ee1b9 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded.cs @@ -165,7 +165,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -335,6 +352,21 @@ public TestAzFrontDoorCdnProfileHostNameAvailability_CheckViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileSecret_ValidateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileSecret_ValidateExpanded.cs index 3db03e712602..3a355739a105 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileSecret_ValidateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileSecret_ValidateExpanded.cs @@ -227,7 +227,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -376,6 +393,21 @@ public TestAzFrontDoorCdnProfileSecret_ValidateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileSecret_ValidateViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileSecret_ValidateViaIdentityExpanded.cs index 877bce3f69a5..b3417a83856d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileSecret_ValidateViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/TestAzFrontDoorCdnProfileSecret_ValidateViaIdentityExpanded.cs @@ -187,7 +187,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -356,6 +373,21 @@ public TestAzFrontDoorCdnProfileSecret_ValidateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnEndpoint_UpdateExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnEndpoint_UpdateExpanded1.cs index 358a47bcec58..a23eb8a78e47 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnEndpoint_UpdateExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnEndpoint_UpdateExpanded1.cs @@ -461,7 +461,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnEndpoint_Update /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -640,6 +657,21 @@ public UpdateAzCdnEndpoint_UpdateExpanded1() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1.cs index 7e4eef25f6ee..40953d46197f 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1.cs @@ -404,7 +404,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnEndpoint_Update /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -607,6 +624,21 @@ public UpdateAzCdnEndpoint_UpdateViaIdentityExpanded1() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateExpanded1.cs index d899257cf6c1..3c6d959f8e0d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateExpanded1.cs @@ -311,7 +311,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnOriginGroup_Upd /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -490,6 +507,21 @@ public UpdateAzCdnOriginGroup_UpdateExpanded1() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1.cs index 01ba28d66b5f..5b4239004051 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1.cs @@ -239,7 +239,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnOriginGroup_Upd /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -446,6 +463,21 @@ public UpdateAzCdnOriginGroup_UpdateViaIdentityExpanded1() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOrigin_UpdateExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOrigin_UpdateExpanded1.cs index 3ae5f279068f..0a442c614f7c 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOrigin_UpdateExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOrigin_UpdateExpanded1.cs @@ -399,7 +399,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnOrigin_UpdateEx /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -578,6 +595,21 @@ public UpdateAzCdnOrigin_UpdateExpanded1() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOrigin_UpdateViaIdentityExpanded1.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOrigin_UpdateViaIdentityExpanded1.cs index 61651d1e7181..dcc9fd66130d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOrigin_UpdateViaIdentityExpanded1.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnOrigin_UpdateViaIdentityExpanded1.cs @@ -327,7 +327,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnOrigin_UpdateVi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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 +551,21 @@ public UpdateAzCdnOrigin_UpdateViaIdentityExpanded1() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnProfile_UpdateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnProfile_UpdateExpanded.cs index f7a7e768afdd..3b61b83bd982 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnProfile_UpdateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnProfile_UpdateExpanded.cs @@ -313,7 +313,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnProfile_UpdateE /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -492,6 +509,21 @@ public UpdateAzCdnProfile_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnProfile_UpdateViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnProfile_UpdateViaIdentityExpanded.cs index cd0d6700dc4c..8d1c9a1abd81 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnProfile_UpdateViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzCdnProfile_UpdateViaIdentityExpanded.cs @@ -269,7 +269,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzCdnProfile_UpdateV /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -468,6 +485,21 @@ public UpdateAzCdnProfile_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh.cs index 075d0a619cb9..824a755b8321 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh.cs @@ -245,7 +245,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnCustom /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -424,6 +441,21 @@ public UpdateAzFrontDoorCdnCustomDomainValidationToken_Refresh() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity.cs index ab56f7acd7e9..f2977de1a41c 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity.cs @@ -189,7 +189,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnCustom /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -393,6 +410,21 @@ public UpdateAzFrontDoorCdnCustomDomainValidationToken_RefreshViaIdentity() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded.cs index 19cd35217c4f..08a7098a1ab3 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded.cs @@ -280,7 +280,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnCustom /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -459,6 +476,21 @@ public UpdateAzFrontDoorCdnCustomDomain_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded.cs index e6ce7debae23..bd3962fd94bf 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded.cs @@ -224,7 +224,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnCustom /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -427,6 +444,21 @@ public UpdateAzFrontDoorCdnCustomDomain_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateExpanded.cs index c4d7c66549d1..b2e4166ae3f6 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateExpanded.cs @@ -274,7 +274,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnEndpoi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -453,6 +470,21 @@ public UpdateAzFrontDoorCdnEndpoint_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded.cs index 7ffbafd9f740..f8f01f3eaeb0 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded.cs @@ -216,7 +216,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnEndpoi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -419,6 +436,21 @@ public UpdateAzFrontDoorCdnEndpoint_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded.cs index d7f12aa9182d..f30dec1e6f88 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded.cs @@ -296,7 +296,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnOrigin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -475,6 +492,21 @@ public UpdateAzFrontDoorCdnOriginGroup_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded.cs index 13ffe4fb4db1..5971eb797828 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded.cs @@ -240,7 +240,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnOrigin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -443,6 +460,21 @@ public UpdateAzFrontDoorCdnOriginGroup_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateExpanded.cs index 231997725d2c..c3c750bd5348 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateExpanded.cs @@ -436,7 +436,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnOrigin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -615,6 +632,21 @@ public UpdateAzFrontDoorCdnOrigin_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded.cs index e52f3e3b33be..38041d080c95 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded.cs @@ -363,7 +363,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnOrigin /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -570,6 +587,21 @@ public UpdateAzFrontDoorCdnOrigin_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_Upgrade.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_Upgrade.cs index 698ea05bc4cd..385ecd520869 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_Upgrade.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_Upgrade.cs @@ -240,7 +240,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnProfil /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -419,6 +436,21 @@ public UpdateAzFrontDoorCdnProfileSku_Upgrade() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_UpgradeViaIdentity.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_UpgradeViaIdentity.cs index e1352f542657..a7157f8ca7d9 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_UpgradeViaIdentity.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_UpgradeViaIdentity.cs @@ -197,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnProfil /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -396,6 +413,21 @@ public UpdateAzFrontDoorCdnProfileSku_UpgradeViaIdentity() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_UpgradeViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_UpgradeViaIdentityExpanded.cs index d0d06c6e683f..8400baf956f2 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_UpgradeViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnProfileSku_UpgradeViaIdentityExpanded.cs @@ -203,7 +203,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnProfil /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -402,6 +419,21 @@ public UpdateAzFrontDoorCdnProfileSku_UpgradeViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateExpanded.cs index 1568b13f9161..54681f8e023d 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateExpanded.cs @@ -444,7 +444,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnRoute_ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -623,6 +640,21 @@ public UpdateAzFrontDoorCdnRoute_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded.cs index 53c34b741ade..2e650c85b026 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded.cs @@ -370,7 +370,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnRoute_ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -577,6 +594,21 @@ public UpdateAzFrontDoorCdnRoute_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateExpanded.cs index 16e02ebf18e2..90317f873e9a 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateExpanded.cs @@ -317,7 +317,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnRule_U /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -496,6 +513,21 @@ public UpdateAzFrontDoorCdnRule_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded.cs index f67eec33d5bc..39c0ad2fc9be 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded.cs @@ -242,7 +242,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnRule_U /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -449,6 +466,21 @@ public UpdateAzFrontDoorCdnRule_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded.cs index dffe58033a10..2b18189466f0 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded.cs @@ -256,7 +256,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnSecuri /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -435,6 +452,21 @@ public UpdateAzFrontDoorCdnSecurityPolicy_PatchExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded.cs b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded.cs index c24c775b4e93..1e1f13d33818 100644 --- a/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded.cs +++ b/src/Cdn/Cdn.Autorest/generated/cmdlets/UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded.cs @@ -199,7 +199,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.Cdn.Cmdlets.UpdateAzFrontDoorCdnSecuri /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -402,6 +419,21 @@ public UpdateAzFrontDoorCdnSecurityPolicy_PatchViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.Cdn.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/Cdn/Cdn.Autorest/internal/Az.Cdn.internal.psm1 b/src/Cdn/Cdn.Autorest/internal/Az.Cdn.internal.psm1 index 534003ce3f83..bc0f5fb8f484 100644 --- a/src/Cdn/Cdn.Autorest/internal/Az.Cdn.internal.psm1 +++ b/src/Cdn/Cdn.Autorest/internal/Az.Cdn.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/Cdn/Cdn/Az.Cdn.psd1 b/src/Cdn/Cdn/Az.Cdn.psd1 index 657960214319..47ca01e73247 100644 --- a/src/Cdn/Cdn/Az.Cdn.psd1 +++ b/src/Cdn/Cdn/Az.Cdn.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 4/10/2024 +# Generated on: 4/23/2024 # @{ @@ -63,7 +63,7 @@ ScriptsToProcess = @() TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = 'Cdn.Autorest/Az.Cdn.format.ps1xml' +FormatsToProcess = 'Cdn.Autorest\Az.Cdn.format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @('Cdn.Autorest/Az.Cdn.psm1') diff --git a/src/Cdn/Cdn/ChangeLog.md b/src/Cdn/Cdn/ChangeLog.md index 52c05468b3ba..65c3978b3e19 100644 --- a/src/Cdn/Cdn/ChangeLog.md +++ b/src/Cdn/Cdn/ChangeLog.md @@ -19,6 +19,7 @@ --> ## Upcoming Release +* Introduced secrets detection feature to safeguard sensitive data. * Upgrade API version to 2024-02-01 * Added support to configure rules to scrub PII values from the AFDx logs when new or update a AFDx resource. diff --git a/src/CloudService/CloudService.Autorest/Az.CloudService.psd1 b/src/CloudService/CloudService.Autorest/Az.CloudService.psd1 index ff37c7edf345..eb4307c1174d 100644 --- a/src/CloudService/CloudService.Autorest/Az.CloudService.psd1 +++ b/src/CloudService/CloudService.Autorest/Az.CloudService.psd1 @@ -1,152 +1,24 @@ -# -# Module manifest for module 'Az.CloudService' -# -# Generated by: Microsoft Corporation -# -# Generated on: 11/10/2023 -# - @{ - -# Script module or binary module file associated with this manifest. -RootModule = './Az.CloudService.psm1' - -# Version number of this module. -ModuleVersion = '2.0.0' - -# Supported PSEditions -CompatiblePSEditions = 'Core', 'Desktop' - -# ID used to uniquely identify this module -GUID = 'a41eb61d-c5a1-4e9b-81a7-b8905fff7f2c' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = 'Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Microsoft Azure PowerShell: CloudService cmdlets' - -# Minimum version of the PowerShell engine required by this module -PowerShellVersion = '5.1' - -# Name of the PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -DotNetFrameworkVersion = '4.7.2' - -# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# ClrVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.2'; }) - -# Assemblies that must be loaded prior to importing this module -RequiredAssemblies = './bin/Az.CloudService.private.dll' - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = './Az.CloudService.format.ps1xml' - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions 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 functions to export. -FunctionsToExport = 'Get-AzCloudService', 'Get-AzCloudServiceInstanceView', - 'Get-AzCloudServiceNetworkInterface', 'Get-AzCloudServiceOSFamily', - 'Get-AzCloudServiceOSVersion', 'Get-AzCloudServicePublicIPAddress', - 'Get-AzCloudServiceRoleInstance', - 'Get-AzCloudServiceRoleInstanceRemoteDesktopFile', - 'Get-AzCloudServiceRoleInstanceView', - 'Invoke-AzCloudServiceRebuild', 'Invoke-AzCloudServiceReimage', - 'Invoke-AzCloudServiceRoleInstanceRebuild', - 'Invoke-AzCloudServiceRoleInstanceReimage', 'New-AzCloudService', - 'New-AzCloudServiceDiagnosticsExtension', - 'New-AzCloudServiceExtensionObject', - 'New-AzCloudServiceLoadBalancerConfigurationObject', - 'New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject', - 'New-AzCloudServiceRemoteDesktopExtensionObject', - 'New-AzCloudServiceRoleProfilePropertiesObject', - 'New-AzCloudServiceVaultSecretGroupObject', 'Remove-AzCloudService', - 'Remove-AzCloudServiceRoleInstance', 'Restart-AzCloudService', - 'Restart-AzCloudServiceRoleInstance', - 'Set-AzCloudServiceUpdateDomain', 'Start-AzCloudService', - 'Stop-AzCloudService', 'Switch-AzCloudService', - 'Update-AzCloudService' - -# Cmdlets 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 cmdlets to export. -CmdletsToExport = @() - -# Variables to export from this module -# 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 = '*' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - + GUID = 'a41eb61d-c5a1-4e9b-81a7-b8905fff7f2c' + RootModule = './Az.CloudService.psm1' + ModuleVersion = '0.1.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: CloudService cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.CloudService.private.dll' + FormatsToProcess = './Az.CloudService.format.ps1xml' + FunctionsToExport = 'Get-AzCloudService', 'Get-AzCloudServiceInstanceView', 'Get-AzCloudServiceNetworkInterface', 'Get-AzCloudServiceOSFamily', 'Get-AzCloudServiceOSVersion', 'Get-AzCloudServicePublicIPAddress', 'Get-AzCloudServiceRoleInstance', 'Get-AzCloudServiceRoleInstanceRemoteDesktopFile', 'Get-AzCloudServiceRoleInstanceView', 'Invoke-AzCloudServiceRebuild', 'Invoke-AzCloudServiceReimage', 'Invoke-AzCloudServiceRoleInstanceRebuild', 'Invoke-AzCloudServiceRoleInstanceReimage', 'New-AzCloudService', 'New-AzCloudServiceDiagnosticsExtension', 'New-AzCloudServiceExtensionObject', 'New-AzCloudServiceLoadBalancerConfigurationObject', 'New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject', 'New-AzCloudServiceRemoteDesktopExtensionObject', 'New-AzCloudServiceRoleProfilePropertiesObject', 'New-AzCloudServiceVaultSecretGroupObject', 'Remove-AzCloudService', 'Remove-AzCloudServiceRoleInstance', 'Restart-AzCloudService', 'Restart-AzCloudServiceRoleInstance', 'Set-AzCloudServiceUpdateDomain', 'Start-AzCloudService', 'Stop-AzCloudService', 'Switch-AzCloudService', 'Update-AzCloudService', '*' + AliasesToExport = '*' + PrivateData = @{ PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','CloudService' - - # A URL to the license for this module. - LicenseUri = 'https://aka.ms/azps-license' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/Azure/azure-powershell' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Downgraded the api version of referenced network to 2021-03-01.' - - # Prerelease string of this module - # Prerelease = '' - - # Flag to indicate whether the module requires explicit user acceptance for install/update/save - # RequireLicenseAcceptance = $false - - # External dependent modules of this module - # ExternalModuleDependencies = @() - - } # End of PSData hashtable - - } # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'CloudService' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } } - diff --git a/src/CloudService/CloudService.Autorest/Az.CloudService.psm1 b/src/CloudService/CloudService.Autorest/Az.CloudService.psm1 index f4a54c20d523..f7e3e5fbbaa3 100644 --- a/src/CloudService/CloudService.Autorest/Az.CloudService.psm1 +++ b/src/CloudService/CloudService.Autorest/Az.CloudService.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.CloudService.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/CloudService/CloudService.Autorest/README.md b/src/CloudService/CloudService.Autorest/README.md index 9d111066b70a..8eb974254517 100644 --- a/src/CloudService/CloudService.Autorest/README.md +++ b/src/CloudService/CloudService.Autorest/README.md @@ -3,7 +3,6 @@ This directory contains the PowerShell module for the CloudService service. --- - ## Info - Modifiable: yes - Generated: all @@ -45,18 +44,23 @@ In this directory, run AutoRest: > see https://aka.ms/autorest ``` yaml +commit: afc91d411dc6f5b8f6c6e6d5abbc46da096729e0 require: - - $(this-folder)/../readme.azure.noprofile.md + - $(this-folder)/../../readme.azure.noprofile.md input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/afc91d411dc6f5b8f6c6e6d5abbc46da096729e0/specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/cloudService.json - - https://github.com/Azure/azure-rest-api-specs/blob/b69b3fa5c26c94aa6efe6dadb76f599c204f297b/specification/network/resource-manager/Microsoft.Network/stable/2021-03-01/cloudServiceNetworkInterface.json - - https://github.com/Azure/azure-rest-api-specs/blob/b69b3fa5c26c94aa6efe6dadb76f599c204f297b/specification/network/resource-manager/Microsoft.Network/stable/2021-03-01/cloudServicePublicIpAddress.json + - $(repo)/specification/compute/resource-manager/Microsoft.Compute/CloudserviceRP/stable/2022-09-04/cloudService.json + - $(repo)/specification/network/resource-manager/Microsoft.Network/stable/2021-03-01/cloudServiceNetworkInterface.json + - $(repo)/specification/network/resource-manager/Microsoft.Network/stable/2021-03-01/cloudServicePublicIpAddress.json title: CloudService module-version: 0.1.0 identity-correction-for-post: true +# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option +use-extension: + "@autorest/powershell": "3.x" + directive: - where: subject: ^CloudServiceOperatingSystemOSFamily$ diff --git a/src/CloudService/CloudService.Autorest/build-module.ps1 b/src/CloudService/CloudService.Autorest/build-module.ps1 index f8f53f185d56..3cd0b9fcc282 100644 --- a/src/CloudService/CloudService.Autorest/build-module.ps1 +++ b/src/CloudService/CloudService.Autorest/build-module.ps1 @@ -143,7 +143,8 @@ if($NoDocs) { $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue } $null = New-Item -ItemType Directory -Force -Path $docsFolder - Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo } Write-Host -ForegroundColor Green 'Creating format.ps1xml...' @@ -162,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol Write-Host -ForegroundColor Green 'Creating example stubs...' Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder +if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) +{ + Write-Host -ForegroundColor Green 'Creating ux metadata...' + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') +} + Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/CloudService/CloudService.Autorest/examples/Stop-AzCloudService.md b/src/CloudService/CloudService.Autorest/examples/Stop-AzCloudService.md index d49f181cc566..def19729afbf 100644 --- a/src/CloudService/CloudService.Autorest/examples/Stop-AzCloudService.md +++ b/src/CloudService/CloudService.Autorest/examples/Stop-AzCloudService.md @@ -4,4 +4,4 @@ Stop-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" ``` -This command stops all the role instances that belong to the cloud service named ContosoCS. +This command stops all the role instances that belong to the the cloud service named ContosoCS. diff --git a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudService.ps1 b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudService.ps1 index d1857b43b981..bc8d1a667556 100644 --- a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudService.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudService.ps1 @@ -167,7 +167,13 @@ begin { List1 = 'Az.CloudService.private\Get-AzCloudService_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceInstanceView.ps1 b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceInstanceView.ps1 index 3e193faf0d95..317f487bc826 100644 --- a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceInstanceView.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceInstanceView.ps1 @@ -132,7 +132,13 @@ begin { Get = 'Az.CloudService.private\Get-AzCloudServiceInstanceView_Get'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceNetworkInterface.ps1 b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceNetworkInterface.ps1 index 23bfe70d8375..ab4437993969 100644 --- a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceNetworkInterface.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceNetworkInterface.ps1 @@ -190,7 +190,13 @@ begin { List1 = 'Az.CloudService.private\Get-AzCloudServiceNetworkInterface_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceOSFamily.ps1 b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceOSFamily.ps1 index f49bc044e9c4..a1711fda507a 100644 --- a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceOSFamily.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceOSFamily.ps1 @@ -163,7 +163,13 @@ begin { List = 'Az.CloudService.private\Get-AzCloudServiceOSFamily_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceOSVersion.ps1 b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceOSVersion.ps1 index af6aa959a2de..9da376cfba02 100644 --- a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceOSVersion.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceOSVersion.ps1 @@ -163,7 +163,13 @@ begin { List = 'Az.CloudService.private\Get-AzCloudServiceOSVersion_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServicePublicIPAddress.ps1 b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServicePublicIPAddress.ps1 index c95cd2bc7013..7fc5228de430 100644 --- a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServicePublicIPAddress.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServicePublicIPAddress.ps1 @@ -204,7 +204,13 @@ begin { List1 = 'Az.CloudService.private\Get-AzCloudServicePublicIPAddress_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstance.ps1 b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstance.ps1 index 7d343aa958f1..932275cf4b99 100644 --- a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstance.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstance.ps1 @@ -178,7 +178,13 @@ begin { List = 'Az.CloudService.private\Get-AzCloudServiceRoleInstance_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstanceRemoteDesktopFile.ps1 b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstanceRemoteDesktopFile.ps1 index 7a8b8ce44741..1dc02d9bd922 100644 --- a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstanceRemoteDesktopFile.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstanceRemoteDesktopFile.ps1 @@ -148,7 +148,13 @@ begin { Get = 'Az.CloudService.private\Get-AzCloudServiceRoleInstanceRemoteDesktopFile_Get'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstanceView.ps1 b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstanceView.ps1 index b96b72640b20..a47fa6245019 100644 --- a/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstanceView.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Get-AzCloudServiceRoleInstanceView.ps1 @@ -135,7 +135,13 @@ begin { Get = 'Az.CloudService.private\Get-AzCloudServiceRoleInstanceView_Get'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRebuild.ps1 b/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRebuild.ps1 index 7b96cf5f0eaa..dba17ce0c3f6 100644 --- a/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRebuild.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRebuild.ps1 @@ -189,7 +189,13 @@ begin { RebuildViaIdentityExpanded = 'Az.CloudService.private\Invoke-AzCloudServiceRebuild_RebuildViaIdentityExpanded'; } if (('RebuildExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceReimage.ps1 b/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceReimage.ps1 index 92ac31adb802..1efd1552bbce 100644 --- a/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceReimage.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceReimage.ps1 @@ -188,7 +188,13 @@ begin { ReimageViaIdentityExpanded = 'Az.CloudService.private\Invoke-AzCloudServiceReimage_ReimageViaIdentityExpanded'; } if (('ReimageExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRoleInstanceRebuild.ps1 b/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRoleInstanceRebuild.ps1 index b5e1d67df484..e0c6bd6eab5c 100644 --- a/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRoleInstanceRebuild.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRoleInstanceRebuild.ps1 @@ -184,7 +184,13 @@ begin { RebuildViaIdentity = 'Az.CloudService.private\Invoke-AzCloudServiceRoleInstanceRebuild_RebuildViaIdentity'; } if (('Rebuild') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRoleInstanceReimage.ps1 b/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRoleInstanceReimage.ps1 index c9bb7e41680f..a71f8300c54a 100644 --- a/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRoleInstanceReimage.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Invoke-AzCloudServiceRoleInstanceReimage.ps1 @@ -182,7 +182,13 @@ begin { ReimageViaIdentity = 'Az.CloudService.private\Invoke-AzCloudServiceRoleInstanceReimage_ReimageViaIdentity'; } if (('Reimage') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/New-AzCloudService.ps1 b/src/CloudService/CloudService.Autorest/exports/New-AzCloudService.ps1 index b2f4cba6fa58..d66cc7f320aa 100644 --- a/src/CloudService/CloudService.Autorest/exports/New-AzCloudService.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/New-AzCloudService.ps1 @@ -488,7 +488,13 @@ begin { quickCreateParameterSetWithoutStorage = 'Az.CloudService.custom\New-AzCloudService'; } if (('CreateExpanded', 'quickCreateParameterSetWithStorage', 'quickCreateParameterSetWithoutStorage') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/CloudService/CloudService.Autorest/exports/ProxyCmdletDefinitions.ps1 index 3842a0ba9764..6c1ae59d28f8 100644 --- a/src/CloudService/CloudService.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -132,7 +132,13 @@ begin { Get = 'Az.CloudService.private\Get-AzCloudServiceInstanceView_Get'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -360,7 +366,13 @@ begin { List1 = 'Az.CloudService.private\Get-AzCloudServiceNetworkInterface_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -561,7 +573,13 @@ begin { List = 'Az.CloudService.private\Get-AzCloudServiceOSFamily_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -762,7 +780,13 @@ begin { List = 'Az.CloudService.private\Get-AzCloudServiceOSVersion_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1004,7 +1028,13 @@ begin { List1 = 'Az.CloudService.private\Get-AzCloudServicePublicIPAddress_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1190,7 +1220,13 @@ begin { Get = 'Az.CloudService.private\Get-AzCloudServiceRoleInstanceRemoteDesktopFile_Get'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1363,7 +1399,13 @@ begin { Get = 'Az.CloudService.private\Get-AzCloudServiceRoleInstanceView_Get'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1579,7 +1621,13 @@ begin { List = 'Az.CloudService.private\Get-AzCloudServiceRoleInstance_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -1784,7 +1832,13 @@ begin { List1 = 'Az.CloudService.private\Get-AzCloudService_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2011,7 +2065,13 @@ begin { RebuildViaIdentityExpanded = 'Az.CloudService.private\Invoke-AzCloudServiceRebuild_RebuildViaIdentityExpanded'; } if (('RebuildExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2237,7 +2297,13 @@ begin { ReimageViaIdentityExpanded = 'Az.CloudService.private\Invoke-AzCloudServiceReimage_ReimageViaIdentityExpanded'; } if (('ReimageExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2459,7 +2525,13 @@ begin { RebuildViaIdentity = 'Az.CloudService.private\Invoke-AzCloudServiceRoleInstanceRebuild_RebuildViaIdentity'; } if (('Rebuild') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -2679,7 +2751,13 @@ begin { ReimageViaIdentity = 'Az.CloudService.private\Invoke-AzCloudServiceRoleInstanceReimage_ReimageViaIdentity'; } if (('Reimage') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -3205,7 +3283,13 @@ begin { quickCreateParameterSetWithoutStorage = 'Az.CloudService.custom\New-AzCloudService'; } if (('CreateExpanded', 'quickCreateParameterSetWithStorage', 'quickCreateParameterSetWithoutStorage') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -3427,7 +3511,13 @@ begin { DeleteViaIdentityExpanded = 'Az.CloudService.private\Remove-AzCloudServiceRoleInstance_DeleteViaIdentityExpanded'; } if (('DeleteExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -3642,7 +3732,13 @@ begin { DeleteViaIdentity = 'Az.CloudService.private\Remove-AzCloudService_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -3862,7 +3958,13 @@ begin { RestartViaIdentity = 'Az.CloudService.private\Restart-AzCloudServiceRoleInstance_RestartViaIdentity'; } if (('Restart') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -4088,7 +4190,13 @@ begin { RestartViaIdentityExpanded = 'Az.CloudService.private\Restart-AzCloudService_RestartViaIdentityExpanded'; } if (('RestartExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -4280,7 +4388,13 @@ begin { WalkExpanded = 'Az.CloudService.private\Set-AzCloudServiceUpdateDomain_WalkExpanded'; } if (('WalkExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -4495,7 +4609,13 @@ begin { StartViaIdentity = 'Az.CloudService.private\Start-AzCloudService_StartViaIdentity'; } if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -4712,7 +4832,13 @@ begin { PowerOffViaIdentity = 'Az.CloudService.private\Stop-AzCloudService_PowerOffViaIdentity'; } if (('PowerOff') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) @@ -6117,7 +6243,13 @@ begin { CloudService = 'Az.CloudService.custom\Switch-AzCloudService'; } if (('CloudServiceName', 'CloudService') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Remove-AzCloudService.ps1 b/src/CloudService/CloudService.Autorest/exports/Remove-AzCloudService.ps1 index 81168fc09880..b381ea01d27f 100644 --- a/src/CloudService/CloudService.Autorest/exports/Remove-AzCloudService.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Remove-AzCloudService.ps1 @@ -177,7 +177,13 @@ begin { DeleteViaIdentity = 'Az.CloudService.private\Remove-AzCloudService_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Remove-AzCloudServiceRoleInstance.ps1 b/src/CloudService/CloudService.Autorest/exports/Remove-AzCloudServiceRoleInstance.ps1 index c581ad3c5a94..dbfa90718be3 100644 --- a/src/CloudService/CloudService.Autorest/exports/Remove-AzCloudServiceRoleInstance.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Remove-AzCloudServiceRoleInstance.ps1 @@ -184,7 +184,13 @@ begin { DeleteViaIdentityExpanded = 'Az.CloudService.private\Remove-AzCloudServiceRoleInstance_DeleteViaIdentityExpanded'; } if (('DeleteExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Restart-AzCloudService.ps1 b/src/CloudService/CloudService.Autorest/exports/Restart-AzCloudService.ps1 index eb4b6b151623..256701ca5189 100644 --- a/src/CloudService/CloudService.Autorest/exports/Restart-AzCloudService.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Restart-AzCloudService.ps1 @@ -188,7 +188,13 @@ begin { RestartViaIdentityExpanded = 'Az.CloudService.private\Restart-AzCloudService_RestartViaIdentityExpanded'; } if (('RestartExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Restart-AzCloudServiceRoleInstance.ps1 b/src/CloudService/CloudService.Autorest/exports/Restart-AzCloudServiceRoleInstance.ps1 index 3bfd8ecf9282..0a3f10e9aeb0 100644 --- a/src/CloudService/CloudService.Autorest/exports/Restart-AzCloudServiceRoleInstance.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Restart-AzCloudServiceRoleInstance.ps1 @@ -182,7 +182,13 @@ begin { RestartViaIdentity = 'Az.CloudService.private\Restart-AzCloudServiceRoleInstance_RestartViaIdentity'; } if (('Restart') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Set-AzCloudServiceUpdateDomain.ps1 b/src/CloudService/CloudService.Autorest/exports/Set-AzCloudServiceUpdateDomain.ps1 index 98c0ac00fac8..21bbf20b5eae 100644 --- a/src/CloudService/CloudService.Autorest/exports/Set-AzCloudServiceUpdateDomain.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Set-AzCloudServiceUpdateDomain.ps1 @@ -154,7 +154,13 @@ begin { WalkExpanded = 'Az.CloudService.private\Set-AzCloudServiceUpdateDomain_WalkExpanded'; } if (('WalkExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Start-AzCloudService.ps1 b/src/CloudService/CloudService.Autorest/exports/Start-AzCloudService.ps1 index 0d14c68594dc..444e5d49b716 100644 --- a/src/CloudService/CloudService.Autorest/exports/Start-AzCloudService.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Start-AzCloudService.ps1 @@ -177,7 +177,13 @@ begin { StartViaIdentity = 'Az.CloudService.private\Start-AzCloudService_StartViaIdentity'; } if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Stop-AzCloudService.ps1 b/src/CloudService/CloudService.Autorest/exports/Stop-AzCloudService.ps1 index f529082d958a..b942d95a8969 100644 --- a/src/CloudService/CloudService.Autorest/exports/Stop-AzCloudService.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Stop-AzCloudService.ps1 @@ -179,7 +179,13 @@ begin { PowerOffViaIdentity = 'Az.CloudService.private\Stop-AzCloudService_PowerOffViaIdentity'; } if (('PowerOff') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/exports/Switch-AzCloudService.ps1 b/src/CloudService/CloudService.Autorest/exports/Switch-AzCloudService.ps1 index f0267109e56d..a2262d7cb27a 100644 --- a/src/CloudService/CloudService.Autorest/exports/Switch-AzCloudService.ps1 +++ b/src/CloudService/CloudService.Autorest/exports/Switch-AzCloudService.ps1 @@ -166,7 +166,13 @@ begin { CloudService = 'Az.CloudService.custom\Switch-AzCloudService'; } if (('CloudServiceName', 'CloudService') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) diff --git a/src/CloudService/CloudService.Autorest/generate-help.ps1 b/src/CloudService/CloudService.Autorest/generate-help.ps1 index eaded568f0f0..8abdbb60d26c 100644 --- a/src/CloudService/CloudService.Autorest/generate-help.ps1 +++ b/src/CloudService/CloudService.Autorest/generate-help.ps1 @@ -66,8 +66,8 @@ foreach($directory in $directories) $docsPath = Join-Path $docsFolder $directory.Name $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue $examplesPath = Join-Path $examplesFolder $directory.Name - - Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo Write-Host -ForegroundColor Green "Created documentation in '$docsPath'" } diff --git a/src/CloudService/CloudService.Autorest/generate-portal-ux.ps1 b/src/CloudService/CloudService.Autorest/generate-portal-ux.ps1 new file mode 100644 index 000000000000..b2aea734f140 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/generate-portal-ux.ps1 @@ -0,0 +1,375 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# +# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. +# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$moduleName = 'Az.CloudService' +$rootModuleName = '' +if ($rootModuleName -eq "") +{ + $rootModuleName = $moduleName +} +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1") +$modulePath = $modulePsd1.FullName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll") +$instance = [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName +$parameterSetsInfo = Get-Module -Name "$moduleName.private" + +$buildinFunctions = @("Export-CmdletSurface", "Export-ExampleStub", "Export-FormatPs1xml", "Export-HelpMarkdown", "Export-ModelSurface", "Export-ProxyCmdlet", "Export-Psd1", "Export-TestStub", "Get-CommonParameter", "Get-ModuleGuid", "Get-ScriptCmdlet") + +function Test-FunctionSupported() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + If ($buildinfunctions.Contains($FunctionName)) { + return $false + } + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity")) { + return $false + } + If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { + return $false + } + + $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName] + foreach ($parameterInfo in $parameterSetInfo.Parameters.Values) + { + $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories + $invalideCategory = @('Query', 'Body') + if ($invalideCategory -contains $category) + { + return $false + } + } + + $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" + if ($customFiles.Length -ne 0) + { + return $false + } + + return $true +} + +function Get-MappedCmdletFromFunctionName() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + + return $cmdletName +} + +function Get-ParameterAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo, + [Parameter()] + [String] + $AttributeName + ) + return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $CmdletInfo, + [Parameter()] + [String] + $AttributeName + ) + + return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletDescription() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [String] + $CmdletName + ) + $helpInfo = Get-Help $CmdletName -Full + + $description = $helpInfo.Description.Text + if ($null -eq $description) + { + return "" + } + return $description +} + +# Test whether the parameter is from swagger http path +function Test-ParameterFromSwagger() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo + ) + $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories + $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute" + if ($null -ne $doNotExport) + { + return $false + } + + $valideCategory = @('Path') + if ($valideCategory -contains $category) + { + return $true + } + return $false +} + +function New-ExampleForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories + $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName + $name = $parameter.Name + $result += [ordered]@{ + name = "-$Name" + value = "[$category.$sourceName]" + } + } + + return $result +} + +function New-ParameterArrayInParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory + $parameterName = $parameter.Name + $parameterType = $parameter.ParameterType.ToString().Split('.')[1] + if ($parameter.SwitchParameter) + { + $parameterSignature = "-$parameterName" + } + else + { + $parameterSignature = "-$parameterName <$parameterType>" + } + if ($parameterName -eq "SubscriptionId") + { + $isMandatory = $false + } + if (-not $isMandatory) + { + $parameterSignature = "[$parameterSignature]" + } + $result += $parameterSignature + } + + return $result +} + +function New-MetadataForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute" + $httpPath = $httpAttribute.Path + $apiVersion = $httpAttribute.ApiVersion + $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value + $resourcePath = "/" + $httpPath.Split("$provider/")[1] + $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/" + $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name + $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description + [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo + [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo + + return @{ + Path = $httpPath + Provider = $provider + ResourceType = $resourceType + ApiVersion = $apiVersion + CmdletName = $cmdletName + Description = $description + Example = $example + Signature = @{ + parameters = $signature + } + } +} + +function Merge-WithExistCmdletMetadata() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Collections.Specialized.OrderedDictionary] + $ExistedCmdletInfo, + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature + $ExistedCmdletInfo.examples += [ordered]@{ + description = $ParameterSetMetadata.Description + parameters = $ParameterSetMetadata.Example + } + + return $ExistedCmdletInfo +} + +function New-MetadataForCmdlet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $cmdletName = $ParameterSetMetadata.CmdletName + $description = Get-CmdletDescription $cmdletName + $result = [ordered]@{ + name = $cmdletName + description = $description + path = $ParameterSetMetadata.Path + help = [ordered]@{ + learnMore = [ordered]@{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower() + } + parameterSets = @() + } + examples = @() + } + $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata + return $result +} + +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-functionSupported($_) } +$resourceTypes = @{} +foreach ($parameterSetName in $parameterSets) +{ + $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName] + $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo + $cmdletName = $parameterSetMetadata.CmdletName + if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName))) + { + continue + } + if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType)) + { + $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName } + if ($ExistedCmdletInfo) + { + $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo + } + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{ + resourceType = $parameterSetMetadata.ResourceType + apiVersion = $parameterSetMetadata.ApiVersion + learnMore = @{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower() + } + commands = @($cmdletInfo) + provider = $parameterSetMetadata.Provider + } + } +} + +$UXFolder = 'UX' +if (Test-Path $UXFolder) +{ + Remove-Item -Path $UXFolder -Recurse +} +$null = New-Item -ItemType Directory -Path $UXFolder + +foreach ($resourceType in $resourceTypes.Keys) +{ + $resourceTypeFileName = $resourceType -replace "/", "-" + if ($resourceTypeFileName -eq "") + { + continue + } + $resourceTypeInfo = $resourceTypes[$resourceType] + $provider = $resourceTypeInfo.provider + $providerFolder = "$UXFolder/$provider" + if (-not (Test-Path $providerFolder)) + { + $null = New-Item -ItemType Directory -Path $providerFolder + } + $resourceTypeInfo.Remove("provider") + $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" +} \ No newline at end of file diff --git a/src/CloudService/CloudService.Autorest/generated/Module.cs b/src/CloudService/CloudService.Autorest/generated/Module.cs index 956bbe52e695..528dfd2e03a6 100644 --- a/src/CloudService/CloudService.Autorest/generated/Module.cs +++ b/src/CloudService/CloudService.Autorest/generated/Module.cs @@ -17,6 +17,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService 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 @@ -51,6 +53,9 @@ public partial class Module /// The delegate to get the telemetry Id. public GetTelemetryIdDelegate GetTelemetryId { get; set; } + /// The delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } + /// Backing field for property. private static Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module _instance; @@ -72,6 +77,9 @@ public partial class Module /// The ResourceID for this module (azure arm). public string ResourceId => @"Az.CloudService"; + /// 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; } diff --git a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceInstanceView_Get.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceInstanceView_Get.cs index 845fc762a5cf..a9ddc611e4a2 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceInstanceView_Get.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceInstanceView_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudServiceInstanceView))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets the status of a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceInstanceView_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -189,7 +190,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -338,6 +356,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_Get.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_Get.cs index 65088b6d30f0..bf86fea0ca46 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_Get.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20210301.INetworkInterface))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Get the specified network interface in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}", ApiVersion = "2021-03-01")] public partial class GetAzCloudServiceNetworkInterface_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -232,7 +233,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -381,6 +399,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_GetViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_GetViaIdentity.cs index 25913c47bff7..4b62f7da4dda 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_GetViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20210301.INetworkInterface))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Get the specified network interface in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}", ApiVersion = "2021-03-01")] public partial class GetAzCloudServiceNetworkInterface_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -162,7 +163,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -336,6 +354,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_List.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_List.cs index 9b7c737262c1..7d4be496711b 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_List.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_List.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20210301.INetworkInterface))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets information about all network interfaces in a role instance in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces", ApiVersion = "2021-03-01")] public partial class GetAzCloudServiceNetworkInterface_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -211,7 +212,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -360,6 +378,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_List1.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_List1.cs index dc2837699306..00cede707fc2 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_List1.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceNetworkInterface_List1.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20210301.INetworkInterface))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets all network interfaces in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces", ApiVersion = "2021-03-01")] public partial class GetAzCloudServiceNetworkInterface_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -195,7 +196,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -344,6 +362,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_Get.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_Get.cs index e1df890abb94..f1bf41eebed0 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_Get.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_Get.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IOSFamily))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies/{osFamilyName}", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceOSFamily_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -192,7 +193,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -341,6 +359,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_GetViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_GetViaIdentity.cs index 5b873c506fa2..ce11486a386a 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_GetViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_GetViaIdentity.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IOSFamily))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies/{osFamilyName}", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceOSFamily_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -151,7 +152,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -317,6 +335,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_List.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_List.cs index 5dc422b4090f..6f4f45ec9ee4 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_List.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSFamily_List.cs @@ -20,6 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IOSFamily))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsFamilies", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceOSFamily_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -185,7 +186,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -334,6 +352,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_Get.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_Get.cs index e9f6d986bda0..aaf100ad9527 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_Get.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_Get.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IOSVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions/{osVersionName}", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceOSVersion_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -192,7 +193,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -341,6 +359,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_GetViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_GetViaIdentity.cs index 73d808b05fa5..bf2b34eeba4f 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_GetViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_GetViaIdentity.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IOSVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions/{osVersionName}", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceOSVersion_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -151,7 +152,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -317,6 +335,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_List.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_List.cs index 8c5ac4da0413..c19163827c28 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_List.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceOSVersion_List.cs @@ -20,6 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IOSVersion))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/cloudServiceOsVersions", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceOSVersion_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -185,7 +186,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -334,6 +352,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_Get.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_Get.cs index b683ea3fe5bf..eadc0ea3b618 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_Get.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20210301.IPublicIPAddress))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Get the specified public IP address in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}", ApiVersion = "2021-03-01")] public partial class GetAzCloudServicePublicIPAddress_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -260,7 +261,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -409,6 +427,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_GetViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_GetViaIdentity.cs index 8279b9473b70..2be9a9b9e4b8 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_GetViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20210301.IPublicIPAddress))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Get the specified public IP address in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}", ApiVersion = "2021-03-01")] public partial class GetAzCloudServicePublicIPAddress_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -162,7 +163,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -344,6 +362,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_List.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_List.cs index f7264daa5a39..d3c385120dad 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_List.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20210301.IPublicIPAddress))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets information about all public IP addresses on a cloud service level.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses", ApiVersion = "2021-03-01")] public partial class GetAzCloudServicePublicIPAddress_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -195,7 +196,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -344,6 +362,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_List1.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_List1.cs index 7d724bffab8d..d6b90b952451 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_List1.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServicePublicIPAddress_List1.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20210301.IPublicIPAddress))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets information about all public IP addresses in a role instance IP configuration in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses", ApiVersion = "2021-03-01")] public partial class GetAzCloudServicePublicIPAddress_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -239,7 +240,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -388,6 +406,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstanceRemoteDesktopFile_Get.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstanceRemoteDesktopFile_Get.cs index 3faade734063..1ccde85d3711 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstanceRemoteDesktopFile_Get.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstanceRemoteDesktopFile_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets a remote desktop file for a role instance in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceRoleInstanceRemoteDesktopFile_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -213,7 +214,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -362,6 +380,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstanceView_Get.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstanceView_Get.cs index d40b86e43d3d..26852a4288ae 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstanceView_Get.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstanceView_Get.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IRoleInstanceView))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Retrieves information about the run-time state of a role instance in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceRoleInstanceView_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -205,7 +206,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -354,6 +372,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_Get.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_Get.cs index 8578ff028056..6092b7def176 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_Get.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IRoleInstance))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets a role instance from a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceRoleInstance_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -220,7 +221,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -369,6 +387,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_GetViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_GetViaIdentity.cs index c0a07f914167..80863e3db40c 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_GetViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IRoleInstance))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets a role instance from a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceRoleInstance_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -165,7 +166,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -335,6 +353,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_List.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_List.cs index 23b9b1487e1a..1882267cb0a5 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_List.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudServiceRoleInstance_List.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IRoleInstance))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets the list of all role instances in a cloud service. Use nextLink property in the response to get the next page of role instances. Do this till nextLink is null to fetch all the role instances.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances", ApiVersion = "2022-09-04")] public partial class GetAzCloudServiceRoleInstance_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -215,7 +216,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -364,6 +382,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_Get.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_Get.cs index 20c69ce98fa3..f2b0ee563233 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_Get.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Display information about a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", ApiVersion = "2022-09-04")] public partial class GetAzCloudService_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -190,7 +191,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -339,6 +357,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_GetViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_GetViaIdentity.cs index 6ea10a8c7341..643bb2f4bfe9 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_GetViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Display information about a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", ApiVersion = "2022-09-04")] public partial class GetAzCloudService_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -148,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -314,6 +332,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_List.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_List.cs index eccec83baa3a..42b48ebe7826 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_List.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_List.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/cloudServices", ApiVersion = "2022-09-04")] public partial class GetAzCloudService_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -170,7 +171,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -319,6 +337,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_List1.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_List1.cs index 8ed06718ba02..b9e53a692516 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_List1.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/GetAzCloudService_List1.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices", ApiVersion = "2022-09-04")] public partial class GetAzCloudService_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -184,7 +185,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -333,6 +351,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRebuild_RebuildExpanded.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRebuild_RebuildExpanded.cs index a8c969d125dc..7163e9a26533 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRebuild_RebuildExpanded.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRebuild_RebuildExpanded.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/rebuild", ApiVersion = "2022-09-04")] public partial class InvokeAzCloudServiceRebuild_RebuildExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -251,7 +252,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.InvokeAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -430,6 +448,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRebuild_RebuildViaIdentityExpanded.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRebuild_RebuildViaIdentityExpanded.cs index 794f8a7fb4c2..b9e8c3b656e2 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRebuild_RebuildViaIdentityExpanded.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRebuild_RebuildViaIdentityExpanded.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instances.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/rebuild", ApiVersion = "2022-09-04")] public partial class InvokeAzCloudServiceRebuild_RebuildViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -207,7 +208,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.InvokeAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -406,6 +424,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceReimage_ReimageExpanded.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceReimage_ReimageExpanded.cs index 0a5ad5da9198..67b9618b4a00 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceReimage_ReimageExpanded.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceReimage_ReimageExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/reimage", ApiVersion = "2022-09-04")] public partial class InvokeAzCloudServiceReimage_ReimageExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -251,7 +252,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.InvokeAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -430,6 +448,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceReimage_ReimageViaIdentityExpanded.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceReimage_ReimageViaIdentityExpanded.cs index f5592beec47c..9c8e0571b5df 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceReimage_ReimageViaIdentityExpanded.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceReimage_ReimageViaIdentityExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/reimage", ApiVersion = "2022-09-04")] public partial class InvokeAzCloudServiceReimage_ReimageViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -206,7 +207,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.InvokeAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -405,6 +423,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceRebuild_Rebuild.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceRebuild_Rebuild.cs index 81c676004740..220340b229e8 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceRebuild_Rebuild.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceRebuild_Rebuild.cs @@ -20,6 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild", ApiVersion = "2022-09-04")] public partial class InvokeAzCloudServiceRoleInstanceRebuild_Rebuild : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -249,7 +250,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.InvokeAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -428,6 +446,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceRebuild_RebuildViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceRebuild_RebuildViaIdentity.cs index 9025269e9aad..1ecbdbeb0bca 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceRebuild_RebuildViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceRebuild_RebuildViaIdentity.cs @@ -20,6 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. If you do not want to initialize storage resources, you can use Reimage Role Instance.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/rebuild", ApiVersion = "2022-09-04")] public partial class InvokeAzCloudServiceRoleInstanceRebuild_RebuildViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -192,7 +193,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.InvokeAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -395,6 +413,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceReimage_Reimage.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceReimage_Reimage.cs index de4dbdcc60a8..6b2f6a89ea36 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceReimage_Reimage.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceReimage_Reimage.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage", ApiVersion = "2022-09-04")] public partial class InvokeAzCloudServiceRoleInstanceReimage_Reimage : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -247,7 +248,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.InvokeAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -426,6 +444,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceReimage_ReimageViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceReimage_ReimageViaIdentity.cs index 50ab3b4c82ed..b86266e3145f 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceReimage_ReimageViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/InvokeAzCloudServiceRoleInstanceReimage_ReimageViaIdentity.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/reimage", ApiVersion = "2022-09-04")] public partial class InvokeAzCloudServiceRoleInstanceReimage_ReimageViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -190,7 +191,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.InvokeAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -393,6 +411,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/NewAzCloudService_CreateExpanded.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/NewAzCloudService_CreateExpanded.cs index f5b710987c1d..fca6b0024fd3 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/NewAzCloudService_CreateExpanded.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/NewAzCloudService_CreateExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Create or update a cloud service. Please note some properties can be set only during cloud service creation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", ApiVersion = "2022-09-04")] public partial class NewAzCloudService_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -401,7 +402,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.NewAzCloudService /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -580,6 +598,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudServiceRoleInstance_DeleteExpanded.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudServiceRoleInstance_DeleteExpanded.cs index 8214c03db3d6..d95ce4e7cc3c 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudServiceRoleInstance_DeleteExpanded.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudServiceRoleInstance_DeleteExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Deletes role instances in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/delete", ApiVersion = "2022-09-04")] public partial class RemoveAzCloudServiceRoleInstance_DeleteExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -248,7 +249,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.RemoveAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -427,6 +445,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudServiceRoleInstance_DeleteViaIdentityExpanded.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudServiceRoleInstance_DeleteViaIdentityExpanded.cs index da0f755253a9..60f5777f5993 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudServiceRoleInstance_DeleteViaIdentityExpanded.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudServiceRoleInstance_DeleteViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Deletes role instances in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/delete", ApiVersion = "2022-09-04")] public partial class RemoveAzCloudServiceRoleInstance_DeleteViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -206,7 +207,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.RemoveAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -405,6 +423,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudService_Delete.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudService_Delete.cs index de26ceec39e5..0c309a12ec32 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudService_Delete.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudService_Delete.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Deletes a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", ApiVersion = "2022-09-04")] public partial class RemoveAzCloudService_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -241,7 +242,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.RemoveAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -420,6 +438,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudService_DeleteViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudService_DeleteViaIdentity.cs index 40cf0dbb9b71..4bb3fb2f8ed9 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudService_DeleteViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/RemoveAzCloudService_DeleteViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Deletes a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", ApiVersion = "2022-09-04")] public partial class RemoveAzCloudService_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -196,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.RemoveAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -395,6 +413,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudServiceRoleInstance_Restart.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudServiceRoleInstance_Restart.cs index 955ab064abad..f6483536af41 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudServiceRoleInstance_Restart.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudServiceRoleInstance_Restart.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/restart", ApiVersion = "2022-09-04")] public partial class RestartAzCloudServiceRoleInstance_Restart : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -247,7 +248,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.RestartAzCloudSer /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -426,6 +444,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudServiceRoleInstance_RestartViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudServiceRoleInstance_RestartViaIdentity.cs index 0a0278726539..b33d3fe93070 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudServiceRoleInstance_RestartViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudServiceRoleInstance_RestartViaIdentity.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/restart", ApiVersion = "2022-09-04")] public partial class RestartAzCloudServiceRoleInstance_RestartViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -188,7 +189,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.RestartAzCloudSer /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -391,6 +409,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudService_RestartExpanded.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudService_RestartExpanded.cs index 21cbf877db11..bc986682c243 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudService_RestartExpanded.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudService_RestartExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Restarts one or more role instances in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/restart", ApiVersion = "2022-09-04")] public partial class RestartAzCloudService_RestartExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -249,7 +250,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.RestartAzCloudSer /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -428,6 +446,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudService_RestartViaIdentityExpanded.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudService_RestartViaIdentityExpanded.cs index 90f97eec5072..6082d68cc0a2 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudService_RestartViaIdentityExpanded.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/RestartAzCloudService_RestartViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Restarts one or more role instances in a cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/restart", ApiVersion = "2022-09-04")] public partial class RestartAzCloudService_RestartViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -204,7 +205,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.RestartAzCloudSer /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -403,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/SetAzCloudServiceUpdateDomain_WalkExpanded.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/SetAzCloudServiceUpdateDomain_WalkExpanded.cs index 93b31557473e..986db12d9295 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/SetAzCloudServiceUpdateDomain_WalkExpanded.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/SetAzCloudServiceUpdateDomain_WalkExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Updates the role instances in the specified update domain.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}", ApiVersion = "2022-09-04")] public partial class SetAzCloudServiceUpdateDomain_WalkExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -252,7 +253,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.SetAzCloudService /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -431,6 +449,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/StartAzCloudService_Start.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/StartAzCloudService_Start.cs index 2d33d4ddd247..a63bbf3d668a 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/StartAzCloudService_Start.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/StartAzCloudService_Start.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Starts the cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/start", ApiVersion = "2022-09-04")] public partial class StartAzCloudService_Start : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -231,7 +232,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.StartAzCloudServi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -410,6 +428,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/StartAzCloudService_StartViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/StartAzCloudService_StartViaIdentity.cs index 7733761b64dc..824165a5832a 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/StartAzCloudService_StartViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/StartAzCloudService_StartViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Starts the cloud service.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/start", ApiVersion = "2022-09-04")] public partial class StartAzCloudService_StartViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -186,7 +187,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.StartAzCloudServi /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -385,6 +403,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/StopAzCloudService_PowerOff.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/StopAzCloudService_PowerOff.cs index 8d809251c8f4..3f7462e5b3b6 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/StopAzCloudService_PowerOff.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/StopAzCloudService_PowerOff.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Power off the cloud service. Note that resources are still attached and you are getting charged for the resources.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/poweroff", ApiVersion = "2022-09-04")] public partial class StopAzCloudService_PowerOff : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -233,7 +234,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.StopAzCloudServic /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -412,6 +430,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/StopAzCloudService_PowerOffViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/StopAzCloudService_PowerOffViaIdentity.cs index b8dc0df6a923..6153558dd832 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/StopAzCloudService_PowerOffViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/StopAzCloudService_PowerOffViaIdentity.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Power off the cloud service. Note that resources are still attached and you are getting charged for the resources.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/poweroff", ApiVersion = "2022-09-04")] public partial class StopAzCloudService_PowerOffViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -188,7 +189,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.StopAzCloudServic /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -387,6 +405,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/cmdlets/UpdateAzCloudService_CreateViaIdentity.cs b/src/CloudService/CloudService.Autorest/generated/cmdlets/UpdateAzCloudService_CreateViaIdentity.cs index 5348e301f00d..06fb0b93ef3e 100644 --- a/src/CloudService/CloudService.Autorest/generated/cmdlets/UpdateAzCloudService_CreateViaIdentity.cs +++ b/src/CloudService/CloudService.Autorest/generated/cmdlets/UpdateAzCloudService_CreateViaIdentity.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService))] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Description(@"Create or update a cloud service. Please note some properties can be set only during cloud service creation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CloudService.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}", ApiVersion = "2022-09-04")] public partial class UpdateAzCloudService_CreateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.IEventListener { @@ -197,7 +198,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CloudService.Cmdlets.UpdateAzCloudServ /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -396,6 +414,21 @@ public UpdateAzCloudService_CreateViaIdentity() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CloudService.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/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs b/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs index 090a8118d7ff..489eeceb229a 100644 --- a/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs +++ b/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs @@ -33,6 +33,9 @@ public class ExportHelpMarkdown : PSCmdlet [ValidateNotNullOrEmpty] public string ExamplesFolder { get; set; } + [Parameter()] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -41,7 +44,7 @@ protected override void ProcessRecord() var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast() .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi)) .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty)); - WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder); + WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder, AddComplexInterfaceInfo.IsPresent); } catch (Exception ee) { diff --git a/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index 0af4ec2784e7..88c82287ac50 100644 --- a/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -52,6 +52,9 @@ public class ExportProxyCmdlet : PSCmdlet [Parameter(Mandatory = true, ParameterSetName = "NoDocs")] public SwitchParameter ExcludeDocs { get; set; } + [Parameter(ParameterSetName = "Docs")] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -163,7 +166,7 @@ protected override void ProcessRecord() var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles; var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder; var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder; - WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder); + WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder, AddComplexInterfaceInfo.IsPresent); } } } diff --git a/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index 9399003fcd92..5fad9b5e1ce5 100644 --- a/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.PowerShell { internal static class MarkdownRenderer { - public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder) + public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder, bool AddComplexInterfaceInfo = true) { Directory.CreateDirectory(docsFolder); var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray(); @@ -69,18 +69,26 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod } sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}"); - sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); - foreach (var alias in markdownInfo.Aliases) + if (markdownInfo.Aliases.Any()) { - sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); } - if (markdownInfo.ComplexInterfaceInfos.Any()) + foreach (var alias in markdownInfo.Aliases) { - sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); } - foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + + if (AddComplexInterfaceInfo) { - sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + if (markdownInfo.ComplexInterfaceInfos.Any()) + { + sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + } + foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + { + sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + } + } sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); diff --git a/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index d10309a1d469..3ffa2ca2116f 100644 --- a/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -191,12 +191,13 @@ public BeginOutput(VariantGroup variantGroup) : base(variantGroup) public string GetProcessCustomAttributesAtRuntime() { - return VariantGroup.IsInternal ? "" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] + return VariantGroup.IsInternal ? "" : IsAzure ? $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] {Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) {Indent}{Indent}if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){{ {Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) {Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) -{Indent}{Indent}}}"; +{Indent}{Indent}}}" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } private string GetTelemetry() @@ -268,9 +269,26 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); - 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}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CloudService.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}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } } return sb.ToString(); } diff --git a/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/PsAttributes.cs index 4fb321103548..fff68742b8aa 100644 --- a/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/src/CloudService/CloudService.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -48,6 +48,13 @@ public ProfileAttribute(params string[] profiles) } } + [AttributeUsage(AttributeTargets.Class)] + public class HttpPathAttribute : Attribute + { + public string Path { get; set; } + public string ApiVersion { get; set; } + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { diff --git a/src/CloudService/CloudService.Autorest/help/Az.CloudService.md b/src/CloudService/CloudService.Autorest/help/Az.CloudService.md new file mode 100644 index 000000000000..830d1deba2af --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Az.CloudService.md @@ -0,0 +1,108 @@ +--- +Module Name: Az.CloudService +Module Guid: a41eb61d-c5a1-4e9b-81a7-b8905fff7f2c +Download Help Link: https://learn.microsoft.com/powershell/module/az.cloudservice +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.CloudService Module +## Description +Microsoft Azure PowerShell: CloudService cmdlets + +## Az.CloudService Cmdlets +### [Get-AzCloudService](Get-AzCloudService.md) +Display information about a cloud service. + +### [Get-AzCloudServiceInstanceView](Get-AzCloudServiceInstanceView.md) +Gets the status of a cloud service. + +### [Get-AzCloudServiceNetworkInterface](Get-AzCloudServiceNetworkInterface.md) +Get the specified network interface in a cloud service. + +### [Get-AzCloudServiceOSFamily](Get-AzCloudServiceOSFamily.md) +Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service. + +### [Get-AzCloudServiceOSVersion](Get-AzCloudServiceOSVersion.md) +Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service. + +### [Get-AzCloudServicePublicIPAddress](Get-AzCloudServicePublicIPAddress.md) +Get the specified public IP address in a cloud service. + +### [Get-AzCloudServiceRoleInstance](Get-AzCloudServiceRoleInstance.md) +Gets a role instance from a cloud service. + +### [Get-AzCloudServiceRoleInstanceRemoteDesktopFile](Get-AzCloudServiceRoleInstanceRemoteDesktopFile.md) +Gets a remote desktop file for a role instance in a cloud service. + +### [Get-AzCloudServiceRoleInstanceView](Get-AzCloudServiceRoleInstanceView.md) +Retrieves information about the run-time state of a role instance in a cloud service. + +### [Invoke-AzCloudServiceRebuild](Invoke-AzCloudServiceRebuild.md) +Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. +If you do not want to initialize storage resources, you can use Reimage Role Instances. + +### [Invoke-AzCloudServiceReimage](Invoke-AzCloudServiceReimage.md) +Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles. + +### [Invoke-AzCloudServiceRoleInstanceRebuild](Invoke-AzCloudServiceRoleInstanceRebuild.md) +The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. +If you do not want to initialize storage resources, you can use Reimage Role Instance. + +### [Invoke-AzCloudServiceRoleInstanceReimage](Invoke-AzCloudServiceRoleInstanceReimage.md) +The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles. + +### [New-AzCloudService](New-AzCloudService.md) +Create or update a cloud service. +Please note some properties can be set only during cloud service creation. + +### [New-AzCloudServiceDiagnosticsExtension](New-AzCloudServiceDiagnosticsExtension.md) +Create a in-memory object for Diagnostics Extension + +### [New-AzCloudServiceExtensionObject](New-AzCloudServiceExtensionObject.md) +Create a in-memory object for Extension + +### [New-AzCloudServiceLoadBalancerConfigurationObject](New-AzCloudServiceLoadBalancerConfigurationObject.md) +Create a in-memory object for LoadBalancerConfiguration + +### [New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject](New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject.md) +Create a in-memory object for LoadBalancerFrontendIPConfiguration + +### [New-AzCloudServiceRemoteDesktopExtensionObject](New-AzCloudServiceRemoteDesktopExtensionObject.md) +Create a in-memory object for Remote Desktop Extension + +### [New-AzCloudServiceRoleProfilePropertiesObject](New-AzCloudServiceRoleProfilePropertiesObject.md) +Create a in-memory object for CloudServiceRoleProfileProperties + +### [New-AzCloudServiceVaultSecretGroupObject](New-AzCloudServiceVaultSecretGroupObject.md) +Create a in-memory object for Vault Secret Group + +### [Remove-AzCloudService](Remove-AzCloudService.md) +Deletes a cloud service. + +### [Remove-AzCloudServiceRoleInstance](Remove-AzCloudServiceRoleInstance.md) +Deletes role instances in a cloud service. + +### [Restart-AzCloudService](Restart-AzCloudService.md) +Restarts one or more role instances in a cloud service. + +### [Restart-AzCloudServiceRoleInstance](Restart-AzCloudServiceRoleInstance.md) +The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service. + +### [Set-AzCloudServiceUpdateDomain](Set-AzCloudServiceUpdateDomain.md) +Updates the role instances in the specified update domain. + +### [Start-AzCloudService](Start-AzCloudService.md) +Starts the cloud service. + +### [Stop-AzCloudService](Stop-AzCloudService.md) +Power off the cloud service. +Note that resources are still attached and you are getting charged for the resources. + +### [Switch-AzCloudService](Switch-AzCloudService.md) +Swaps VIPs between two cloud service (extended support) load balancers. + +### [Update-AzCloudService](Update-AzCloudService.md) +Create or update a cloud service. +Please note some properties can be set only during cloud service creation. + diff --git a/src/CloudService/CloudService.Autorest/help/Get-AzCloudService.md b/src/CloudService/CloudService.Autorest/help/Get-AzCloudService.md new file mode 100644 index 000000000000..92b31c404b8c --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Get-AzCloudService.md @@ -0,0 +1,180 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudservice +schema: 2.0.0 +--- + +# Get-AzCloudService + +## SYNOPSIS +Display information about a cloud service. + +## SYNTAX + +### List (Default) +``` +Get-AzCloudService [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzCloudService -InputObject [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzCloudService -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Display information about a cloud service. + +## EXAMPLES + +### Example 1: Get all cloud service under a resource group +```powershell +Get-AzCloudService -ResourceGroupName "ContosOrg" +``` + +```output +ResourceGroupName Name Location ProvisioningState +----------------- ---- -------- ----------------- +ContosOrg ContosoCS eastus2euap Succeeded +ContosOrg ContosoCSTest eastus2euap Failed +``` + +This command gets all cloud services in resource group named ContosOrg + +### Example 2: Get cloud service +```powershell +$cloudService = Get-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" +$cloudService | Format-List +``` + +```output +ResourceGroupName : ContosOrg +Configuration : xxxxxxxx +ConfigurationUrl : +ExtensionProfile : xxxxxxxx +Id : xxxxxxxx +Location : East US +Name : ContosoCS +NetworkProfile : xxxxxxxx +OSProfile : xxxxxxxx +PackageUrl : xxxxxxxx +ProvisioningState : Succeeded +RoleProfile : xxxxxxxx +StartCloudService : +Tag : { + "Owner": "Contos" + } +Type : Microsoft.Compute/cloudServices +UniqueId : xxxxxxxx +UpgradeMode : Auto +``` + +This command gets cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: CloudServiceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceInstanceView.md b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceInstanceView.md new file mode 100644 index 000000000000..965b094510d8 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceInstanceView.md @@ -0,0 +1,156 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceinstanceview +schema: 2.0.0 +--- + +# Get-AzCloudServiceInstanceView + +## SYNOPSIS +Gets the status of a cloud service. + +## SYNTAX + +``` +Get-AzCloudServiceInstanceView -CloudServiceName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets the status of a cloud service. + +## EXAMPLES + +### Example 1: Get cloud service instance view +```powershell +$cloudServiceInstanceView = Get-AzCloudServiceInstanceView -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" + +$cloudServiceInstanceView +$cloudServiceInstanceView.ToJsonString() +``` + +```output +RoleInstanceStatusesSummary Statuses +--------------------------- -------- + +{{ProvisioningState/succeeded : 4}, {PowerState/started : 4}} {Provisioning succeeded, Started, Current Upgrade Domain of cloud service is -1., Max Upgrade Domain of cloud service is 1.} +{ + "roleInstance": { + "statusesSummary": [ + { + "code": "ProvisioningState/succeeded", + "count": 4 + }, + { + "code": "PowerState/started", + "count": 4 + } + ] + }, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2020-10-28T13:26:48.8109686Z" + }, + { + "code": "PowerState/started", + "displayStatus": "Started", + "level": "Info", + "time": "2020-10-28T13:26:48.8109686Z" + }, + { + "code": "CurrentUpgradeDomain/-1", + "displayStatus": "Current Upgrade Domain of cloud service is -1.", + "level": "Info" + }, + { + "code": "MaxUpgradeDomain/1", + "displayStatus": "Max Upgrade Domain of cloud service is 1.", + "level": "Info" + } + ] +} +``` + +This cmdlet gets the instance view of the cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -CloudServiceName +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudServiceInstanceView + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceNetworkInterface.md b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceNetworkInterface.md new file mode 100644 index 000000000000..4983379c15ce --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceNetworkInterface.md @@ -0,0 +1,199 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudservicenetworkinterface +schema: 2.0.0 +--- + +# Get-AzCloudServiceNetworkInterface + +## SYNOPSIS +Get the specified network interface in a cloud service. + +## SYNTAX + +### List1 (Default) +``` +Get-AzCloudServiceNetworkInterface -CloudServiceName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzCloudServiceNetworkInterface -CloudServiceName -Name -ResourceGroupName + -RoleInstanceName [-SubscriptionId ] [-Expand ] [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzCloudServiceNetworkInterface -InputObject [-Expand ] + [-DefaultProfile ] [] +``` + +### List +``` +Get-AzCloudServiceNetworkInterface -CloudServiceName -ResourceGroupName + -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get the specified network interface in a cloud service. + +## EXAMPLES + +### Example 1: Get network interfaces by a cloud service name +```powershell +Get-AzCloudServiceNetworkInterface -ResourceGroupName "BRGThree" -CloudServiceName BService -SubscriptionId 1133e0eb-b53c-1234-b478-2eac8f04afca +``` + +Gets all the network interfaces for a given cloud service name. + +### Example 2: Get network interfaces by a cloud service object +```powershell +$cs = Get-AzCloudService -ResourceGroupName "BRGThree" -CloudServiceName BService -SubscriptionId 1133e0eb-b53c-1234-b478-2eac8f04afca +Get-AzCloudServiceNetworkInterface -InputObject $cs +``` + +Gets all the network interfaces for a given cloud service object. + +## PARAMETERS + +### -CloudServiceName +The name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: Get, List, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Expand +Expands referenced resources. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentity +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the network interface. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: NetworkInterfaceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstanceName +The name of role instance. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20210301.INetworkInterface + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceOSFamily.md b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceOSFamily.md new file mode 100644 index 000000000000..7181c41f1a83 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceOSFamily.md @@ -0,0 +1,162 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceosfamily +schema: 2.0.0 +--- + +# Get-AzCloudServiceOSFamily + +## SYNOPSIS +Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service. + +## SYNTAX + +### List (Default) +``` +Get-AzCloudServiceOSFamily -Location [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzCloudServiceOSFamily -Location -OSFamilyName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzCloudServiceOSFamily -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service. + +## EXAMPLES + +### Example 1: Get all OS families in a location +```powershell +Get-AzCloudServiceOSFamily -location 'westus2' +``` + +```output +Name Label +---- ----- +5 Windows Server 2016 +4 Windows Server 2012 R2 +6 Windows Server 2019 +3 Windows Server 2012 +2 Windows Server 2008 R2 +``` + +This command gets all OS families in location westus2 + +### Example 2: Get OS family +```powershell +Get-AzCloudServiceOSFamily -location 'westus2' -OSFamilyName 5 +``` + +```output +Name Label +---- ----- +5 Windows Server 2016 +``` + +This command gets OS family named 5 that is located in westus2. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +Name of the location that the OS family pertains to. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSFamilyName +Name of the OS family. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IOSFamily + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceOSVersion.md b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceOSVersion.md new file mode 100644 index 000000000000..d9421135599a --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceOSVersion.md @@ -0,0 +1,162 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceosversion +schema: 2.0.0 +--- + +# Get-AzCloudServiceOSVersion + +## SYNOPSIS +Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service. + +## SYNTAX + +### List (Default) +``` +Get-AzCloudServiceOSVersion -Location [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzCloudServiceOSVersion -Location -OSVersionName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzCloudServiceOSVersion -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service. + +## EXAMPLES + +### Example 1: Get all OS versions in a location +```powershell +Get-AzCloudServiceOSVersion -location 'westus2' +``` + +```output +Name Label IsDefault IsActive Family FamilyLabel +---- ----- --------- -------- ------ ----------- +WA-GUEST-OS-6.7_201905-01 Windows Azure Guest OS 6.7 (Release 201905-01) False False 6 Windows Server 2019 +WA-GUEST-OS-3.21_201411-01 Windows Azure Guest OS 3.21 (Release 201411-01) False False 3 Windows Server 2012 +WA-GUEST-OS-3.34_201512-01 Windows Azure Guest OS 3.34 (Release 201512-01) False False 3 Windows Server 2012 +WA-GUEST-OS-3.26_201504-01 Windows Azure Guest OS 3.26 (Release 201504-01) False False 3 Windows Server 2012 +WA-GUEST-OS-2.46_201512-01 Windows Azure Guest OS 2.46 (Release 201512-01) False False 2 Windows Server 2008 R2 +``` + +This command gets all OS versions in location westus2 + +### Example 2: Get OS version +```powershell +Get-AzCloudServiceOSVersion -location 'westus2' -OSVersionName 'WA-GUEST-OS-6.7_201905-01' +``` + +```output +Name Label IsDefault IsActive Family FamilyLabel +---- ----- --------- -------- ------ ----------- +WA-GUEST-OS-6.7_201905-01 Windows Azure Guest OS 6.7 (Release 201905-01) False False 6 Windows Server 2019 +``` + +This command gets OS version named WA-GUEST-OS-6.7_201905-01 that is located in westus2. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +Name of the location that the OS version pertains to. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSVersionName +Name of the OS version. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IOSVersion + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Get-AzCloudServicePublicIPAddress.md b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServicePublicIPAddress.md new file mode 100644 index 000000000000..9102e0056246 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServicePublicIPAddress.md @@ -0,0 +1,230 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudservicepublicipaddress +schema: 2.0.0 +--- + +# Get-AzCloudServicePublicIPAddress + +## SYNOPSIS +Get the specified public IP address in a cloud service. + +## SYNTAX + +### List (Default) +``` +Get-AzCloudServicePublicIPAddress -CloudServiceName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzCloudServicePublicIPAddress -CloudServiceName -IPConfigurationName -Name + -NetworkInterfaceName -ResourceGroupName -RoleInstanceName + [-SubscriptionId ] [-Expand ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzCloudServicePublicIPAddress -InputObject [-Expand ] + [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzCloudServicePublicIPAddress -CloudServiceName -IPConfigurationName + -NetworkInterfaceName -ResourceGroupName -RoleInstanceName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get the specified public IP address in a cloud service. + +## EXAMPLES + +### Example 1: Get instance level public IP addresses for a given cloud service name. +```powershell +Get-AzCloudServicePublicIPAddress -ResourceGroupName "BRGThree" -CloudServiceName BService -SubscriptionId 1133e0eb-b53c-1234-b478-2eac8f04afca +``` + +Gets the instance level public IP addresses for a given cloud service name. + +### Example 2: Get instance level public IP addresses for a given cloud service object. +```powershell +$cs = Get-AzCloudService -ResourceGroupName "BRGThree" -CloudServiceName BService -SubscriptionId 1133e0eb-b53c-1234-b478-2eac8f04afca +Get-AzCloudServicePublicIPAddress -InputObject $cs +``` + +Gets the instance level public IP addresses for a given cloud service object. + +## PARAMETERS + +### -CloudServiceName +The name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: Get, List, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Expand +Expands referenced resources. + +```yaml +Type: System.String +Parameter Sets: Get, GetViaIdentity +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IPConfigurationName +The name of the IP configuration. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the public IP Address. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: PublicIPAddressName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NetworkInterfaceName +The name of the network interface. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstanceName +The role instance name. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20210301.IPublicIPAddress + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceRoleInstance.md b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceRoleInstance.md new file mode 100644 index 000000000000..c58c32568f11 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceRoleInstance.md @@ -0,0 +1,193 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceroleinstance +schema: 2.0.0 +--- + +# Get-AzCloudServiceRoleInstance + +## SYNOPSIS +Gets a role instance from a cloud service. + +## SYNTAX + +### List (Default) +``` +Get-AzCloudServiceRoleInstance -CloudServiceName -ResourceGroupName + [-SubscriptionId ] [-Expand ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzCloudServiceRoleInstance -CloudServiceName -ResourceGroupName + -RoleInstanceName [-SubscriptionId ] [-Expand ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzCloudServiceRoleInstance -InputObject [-Expand ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets a role instance from a cloud service. + +## EXAMPLES + +### Example 1: Get all role instances +```powershell +Get-AzCloudServiceRoleInstance -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" +``` + +```output +Name Location SkuName SkuTier +---- -------- ------- ------- +ContosoFrontEnd_IN_0 eastus2euap Standard_D1_v2 Standard +ContosoFrontEnd_IN_1 eastus2euap Standard_D1_v2 Standard +ContosoBackEnd_IN_1 eastus2euap Standard_D1_v2 Standard +ContosoBackEnd_IN_1 eastus2euap Standard_D1_v2 Standard +``` + +This command gets the properties of all role instances of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +### Example 2: Get properties for single role instance +```powershell +Get-AzCloudServiceRoleInstance -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstanceName "ContosoFrontEnd_IN_0" +``` + +```output +Name Location SkuName SkuTier +---- -------- ------- ------- +ContosoFrontEnd_IN_0 eastus2euap Standard_D1_v2 Standard +``` + +This command gets the properties of the role instance named ContosoFrontEnd_IN_0 of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -CloudServiceName +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Expand +The expand expression to apply to the operation. +'UserData' is not supported for cloud services. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.InstanceViewTypes +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstanceName +Name of the role instance. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IRoleInstance + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceRoleInstanceRemoteDesktopFile.md b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceRoleInstanceRemoteDesktopFile.md new file mode 100644 index 000000000000..cc96801d521e --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceRoleInstanceRemoteDesktopFile.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceroleinstanceremotedesktopfile +schema: 2.0.0 +--- + +# Get-AzCloudServiceRoleInstanceRemoteDesktopFile + +## SYNOPSIS +Gets a remote desktop file for a role instance in a cloud service. + +## SYNTAX + +``` +Get-AzCloudServiceRoleInstanceRemoteDesktopFile -CloudServiceName -ResourceGroupName + -RoleInstanceName -OutFile [-SubscriptionId ] [-DefaultProfile ] + [-PassThru] [] +``` + +## DESCRIPTION +Gets a remote desktop file for a role instance in a cloud service. + +## EXAMPLES + +### Example 1: Get an RDP file +```powershell +Get-AzCloudServiceRoleInstanceRemoteDesktopFile -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstanceName "ContosoFrontEnd_IN_0" -OutFile "C:\temp\ContosoFrontEnd_IN_0.rdp" +``` + +This command gets an RDP file for the role instance named ContosoFrontEnd\_IN\_0 of cloud Service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -CloudServiceName +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OutFile +Path to write output file to + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstanceName +Name of the role instance. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceRoleInstanceView.md b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceRoleInstanceView.md new file mode 100644 index 000000000000..5ecda1ec735b --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Get-AzCloudServiceRoleInstanceView.md @@ -0,0 +1,129 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceroleinstanceview +schema: 2.0.0 +--- + +# Get-AzCloudServiceRoleInstanceView + +## SYNOPSIS +Retrieves information about the run-time state of a role instance in a cloud service. + +## SYNTAX + +``` +Get-AzCloudServiceRoleInstanceView -CloudServiceName -ResourceGroupName + -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +Retrieves information about the run-time state of a role instance in a cloud service. + +## EXAMPLES + +### Example 1: Get instance view details for cloud service role instance +```powershell +Get-AzCloudServiceRoleInstanceView -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstanceName "ContosoFrontEnd_IN_0" +``` + +```output +Statuses PlatformFaultDomain PlatformUpdateDomain +-------- ------------------- -------------------- +{RoleStateStarted} 0 0 +``` + +This cmdlet gets the instance view of the role instance named ContosoFrontEnd_IN_0 of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -CloudServiceName +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstanceName +Name of the role instance. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.IRoleInstanceView + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceRebuild.md b/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceRebuild.md new file mode 100644 index 000000000000..99b9849beb60 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceRebuild.md @@ -0,0 +1,236 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/invoke-azcloudservicerebuild +schema: 2.0.0 +--- + +# Invoke-AzCloudServiceRebuild + +## SYNOPSIS +Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. +If you do not want to initialize storage resources, you can use Reimage Role Instances. + +## SYNTAX + +### RebuildExpanded (Default) +``` +Invoke-AzCloudServiceRebuild -CloudServiceName -ResourceGroupName -RoleInstance + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### RebuildViaIdentityExpanded +``` +Invoke-AzCloudServiceRebuild -InputObject -RoleInstance + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Rebuild Role Instances reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. +If you do not want to initialize storage resources, you can use Reimage Role Instances. + +## EXAMPLES + +### Example 1: Rebuild role instances of cloud service +```powershell +$roleInstances = @("ContosoFrontEnd_IN_0", "ContosoBackEnd_IN_1") +Invoke-AzCloudServiceRebuild -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance $roleInstances +``` + +This command rebuilds 2 role instances ContosoFrontEnd_IN_0 and ContosoBackEnd_IN_1 of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +### Example 2: Rebuild all roles of cloud service +```powershell +Invoke-AzCloudServiceRebuild -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance "*" +``` + +This command rebuilds all role instances of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudServiceName +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: RebuildExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: RebuildViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: RebuildExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstance +List of cloud service role instance names. +Value of '*' will signify all role instances of the cloud service. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: RebuildExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceReimage.md b/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceReimage.md new file mode 100644 index 000000000000..33b284721005 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceReimage.md @@ -0,0 +1,234 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/invoke-azcloudservicereimage +schema: 2.0.0 +--- + +# Invoke-AzCloudServiceReimage + +## SYNOPSIS +Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles. + +## SYNTAX + +### ReimageExpanded (Default) +``` +Invoke-AzCloudServiceReimage -Name -ResourceGroupName -RoleInstance + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### ReimageViaIdentityExpanded +``` +Invoke-AzCloudServiceReimage -InputObject -RoleInstance + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles. + +## EXAMPLES + +### Example 1: Reimage role instances of cloud service +```powershell +$roleInstances = @("ContosoFrontEnd_IN_0", "ContosoBackEnd_IN_1") +Invoke-AzCloudServiceReimage -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance $roleInstances +``` + +This command reimages 2 role instances ContosoFrontEnd_IN_0 and ContosoBackEnd_IN_1 of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +### Example 2: Reimage all roles of cloud service +```powershell +Invoke-AzCloudServiceReimage -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance "*" +``` + +This command reimages all role instances of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: ReimageViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: ReimageExpanded +Aliases: CloudServiceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: ReimageExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstance +List of cloud service role instance names. +Value of '*' will signify all role instances of the cloud service. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: ReimageExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceRoleInstanceRebuild.md b/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceRoleInstanceRebuild.md new file mode 100644 index 000000000000..4b1235294551 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceRoleInstanceRebuild.md @@ -0,0 +1,227 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/invoke-azcloudserviceroleinstancerebuild +schema: 2.0.0 +--- + +# Invoke-AzCloudServiceRoleInstanceRebuild + +## SYNOPSIS +The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. +If you do not want to initialize storage resources, you can use Reimage Role Instance. + +## SYNTAX + +### Rebuild (Default) +``` +Invoke-AzCloudServiceRoleInstanceRebuild -CloudServiceName -ResourceGroupName + -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### RebuildViaIdentity +``` +Invoke-AzCloudServiceRoleInstanceRebuild -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles and initializes the storage resources that are used by them. +If you do not want to initialize storage resources, you can use Reimage Role Instance. + +## EXAMPLES + +### Example 1: Rebuild role instance of a cloud service +```powershell +Invoke-AzCloudServiceRoleInstanceRebuild -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstanceName "ContosoFrontEnd_IN_0" +``` + +This command reimages role instance named ContosoFrontEnd_IN_0 of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudServiceName +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: Rebuild +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: RebuildViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Rebuild +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstanceName +Name of the role instance. + +```yaml +Type: System.String +Parameter Sets: Rebuild +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: Rebuild +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceRoleInstanceReimage.md b/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceRoleInstanceReimage.md new file mode 100644 index 000000000000..77c8e707ab10 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Invoke-AzCloudServiceRoleInstanceReimage.md @@ -0,0 +1,225 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/invoke-azcloudserviceroleinstancereimage +schema: 2.0.0 +--- + +# Invoke-AzCloudServiceRoleInstanceReimage + +## SYNOPSIS +The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles. + +## SYNTAX + +### Reimage (Default) +``` +Invoke-AzCloudServiceRoleInstanceReimage -CloudServiceName -ResourceGroupName + -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### ReimageViaIdentity +``` +Invoke-AzCloudServiceRoleInstanceReimage -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles. + +## EXAMPLES + +### Example 1: Reimage role instance of a cloud service +```powershell +Invoke-AzCloudServiceRoleInstanceReimage -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstanceName "ContosoFrontEnd_IN_0" +``` + +This command reimages role instance named ContosoFrontEnd_IN_0 of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudServiceName +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: Reimage +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: ReimageViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Reimage +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstanceName +Name of the role instance. + +```yaml +Type: System.String +Parameter Sets: Reimage +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: Reimage +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/New-AzCloudService.md b/src/CloudService/CloudService.Autorest/help/New-AzCloudService.md new file mode 100644 index 000000000000..64e152ca01b3 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/New-AzCloudService.md @@ -0,0 +1,685 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudservice +schema: 2.0.0 +--- + +# New-AzCloudService + +## SYNOPSIS +Create or update a cloud service. +Please note some properties can be set only during cloud service creation. + +## SYNTAX + +### CreateExpanded (Default) +``` +New-AzCloudService -Name -ResourceGroupName -Location [-SubscriptionId ] + [-AllowModelOverride] [-Configuration ] [-ConfigurationUrl ] + [-ExtensionProfile ] [-NetworkProfile ] + [-OSProfile ] [-PackageUrl ] [-RoleProfile ] + [-StartCloudService] [-Tag ] [-UpgradeMode ] [-Zone ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### quickCreateParameterSetWithoutStorage +``` +New-AzCloudService -Name -ResourceGroupName -ConfigurationFile + -DefinitionFile -Location -PackageUrl [-SubscriptionId ] + [-DnsName ] [-ExtensionProfile ] [-KeyVaultName ] + [-StartCloudService] [-Tag ] [-UpgradeMode ] [-Confirm] [-WhatIf] + [] +``` + +### quickCreateParameterSetWithStorage +``` +New-AzCloudService -Name -ResourceGroupName -ConfigurationFile + -DefinitionFile -Location -PackageFile -StorageAccount + [-SubscriptionId ] [-DnsName ] [-ExtensionProfile ] + [-KeyVaultName ] [-StartCloudService] [-Tag ] [-UpgradeMode ] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create or update a cloud service. +Please note some properties can be set only during cloud service creation. + +## EXAMPLES + +### Example 1: Create new cloud service with single role +```powershell +# Create role profile object +$role = New-AzCloudServiceRoleProfilePropertiesObject -Name 'ContosoFrontend' -SkuName 'Standard_D1_v2' -SkuTier 'Standard' -SkuCapacity 2 +$roleProfile = @{role = @($role)} + +# Create network profile object +$publicIp = Get-AzPublicIpAddress -ResourceGroupName ContosOrg -Name ContosIp +$feIpConfig = New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject -Name 'ContosoFe' -PublicIPAddressId $publicIp.Id +$loadBalancerConfig = New-AzCloudServiceLoadBalancerConfigurationObject -Name 'ContosoLB' -FrontendIPConfiguration $feIpConfig +$networkProfile = @{loadBalancerConfiguration = $loadBalancerConfig} + +# Read Configuration File +$cscfgFile = "" +$cscfgContent = Get-Content $cscfgFile | Out-String + +# Create cloud service +$cloudService = New-AzCloudService ` + -Name ContosoCS ` + -ResourceGroupName ContosOrg ` + -Location EastUS ` + -PackageUrl "https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ` + -Configuration $cscfgContent ` + -UpgradeMode 'Auto' ` + -RoleProfile $roleProfile ` + -NetworkProfile $networkProfile +``` + +Above set of commands creates a cloud service with single role + +### Example 2: Create new cloud service with single role and RDP extension +```powershell +# Create role profile object +$role = New-AzCloudServiceRoleProfilePropertiesObject -Name 'ContosoFrontend' -SkuName 'Standard_D1_v2' -SkuTier 'Standard' -SkuCapacity 2 +$roleProfile = @{role = @($role)} + +# Create network profile object +$publicIp = Get-AzPublicIpAddress -ResourceGroupName ContosoOrg -Name ContosIp +$feIpConfig = New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject -Name 'ContosoFe' -PublicIPAddressId $publicIp.Id +$loadBalancerConfig = New-AzCloudServiceLoadBalancerConfigurationObject -Name 'ContosoLB' -FrontendIPConfiguration $feIpConfig +$networkProfile = @{loadBalancerConfiguration = $loadBalancerConfig} + +# Create RDP extension object +$credential = Get-Credential +$expiration = (Get-Date).AddYears(1) +$extension = New-AzCloudServiceRemoteDesktopExtensionObject -Name 'RDPExtension' -Credential $credential -Expiration $expiration -TypeHandlerVersion '1.2.1' +$extensionProfile = @{extension = @($extension)} + +# Read Configuration File +$cscfgFile = "" +$cscfgContent = Get-Content $cscfgFile | Out-String + +# Create cloud service +$cloudService = New-AzCloudService ` + -Name ContosoCS ` + -ResourceGroupName ContosOrg ` + -Location EastUS ` + -PackageUrl "https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ` + -Configuration $cscfgContent ` + -UpgradeMode 'Auto' ` + -RoleProfile $roleProfile ` + -NetworkProfile $networkProfile ` + -ExtensionProfile $extensionProfile +``` + +Above set of commands creates a cloud service with single role and RDP extension + +### Example 3: Create new cloud service with single role and certificate from key vault +```powershell +# Create role profile object +$role = New-AzCloudServiceRoleProfilePropertiesObject -Name 'ContosoFrontend' -SkuName 'Standard_D1_v2' -SkuTier 'Standard' -SkuCapacity 2 +$roleProfile = @{role = @($role)} + +# Create OS profile object +$keyVault = Get-AzKeyVault -ResourceGroupName ContosOrg -VaultName ContosKeyVault +$certificate=Get-AzKeyVaultCertificate -VaultName ContosKeyVault -Name ContosCert +$secretGroup = New-AzCloudServiceVaultSecretGroupObject -Id $keyVault.ResourceId -CertificateUrl $certificate.SecretId +$osProfile = @{secret = @($secretGroup)} + +# Create network profile object +$publicIp = Get-AzPublicIpAddress -ResourceGroupName ContosOrg -Name ContosIp +$feIpConfig = New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject -Name 'ContosoFe' -PublicIPAddressId $publicIp.Id +$loadBalancerConfig = New-AzCloudServiceLoadBalancerConfigurationObject -Name 'ContosoLB' -FrontendIPConfiguration $feIpConfig +$networkProfile = @{loadBalancerConfiguration = $loadBalancerConfig} + +# Read Configuration File +$cscfgFile = "" +$cscfgContent = Get-Content $cscfgFile | Out-String + +# Create cloud service +$cloudService = New-AzCloudService ` + -Name ContosoCS ` + -ResourceGroupName ContosOrg ` + -Location EastUS ` + -PackageUrl "https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ` + -Configuration $cscfgContent ` + -UpgradeMode 'Auto' ` + -RoleProfile $roleProfile ` + -NetworkProfile $networkProfile ` + -OSProfile $osProfile +``` + +Above set of commands creates a cloud service with single role and certificate from key vault. + +### Example 4: Create new cloud service with multiple roles and extensions +```powershell +# Create role profile object +$role1 = New-AzCloudServiceRoleProfilePropertiesObject -Name 'ContosoFrontend' -SkuName 'Standard_D1_v2' -SkuTier 'Standard' -SkuCapacity 2 +$role2 = New-AzCloudServiceRoleProfilePropertiesObject -Name 'ContosoBackend' -SkuName 'Standard_D1_v2' -SkuTier 'Standard' -SkuCapacity 2 +$roleProfile = @{role = @($role1, $role2)} + +# Create network profile object +$publicIp = Get-AzPublicIpAddress -ResourceGroupName ContosOrg -Name ContosIp +$feIpConfig = New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject -Name 'ContosoFe' -PublicIPAddressId $publicIp.Id +$loadBalancerConfig = New-AzCloudServiceLoadBalancerConfigurationObject -Name 'ContosoLB' -FrontendIPConfiguration $feIpConfig +$networkProfile = @{loadBalancerConfiguration = $loadBalancerConfig} + +# Create RDP extension object +$credential = Get-Credential +$expiration = (Get-Date).AddYears(1) +$rdpExtension = New-AzCloudServiceRemoteDesktopExtensionObject -Name 'RDPExtension' -Credential $credential -Expiration $expiration -TypeHandlerVersion '1.2.1' + +# Create Geneva extension object +$genevaExtension = New-AzCloudServiceExtensionObject -Name GenevaExtension -Publisher Microsoft.Azure.Geneva -Type GenevaMonitoringPaaS -TypeHandlerVersion "2.14.0.2" +$extensionProfile = @{extension = @($rdpExtension, $genevaExtension)} + +# Add tags +$tag=@{"Owner" = "Contoso"} + +# Read Configuration File +$cscfgFile = "" +$cscfgContent = Get-Content $cscfgFile | Out-String + +# Create cloud service +$cloudService = New-AzCloudService ` + -Name ContosoCS ` + -ResourceGroupName ContosOrg ` + -Location EastUS ` + -PackageUrl "https://xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ` + -Configuration $cscfgContent ` + -UpgradeMode 'Auto' ` + -RoleProfile $roleProfile ` + -NetworkProfile $networkProfile ` + -ExtensionProfile $extensionProfile ` + -Tag $tag +``` + +Above set of commands creates a cloud service with single role and certificate from key vault. + +### Example 5: Create new cloud service with CsCfg, CsDef, and Cspkg files using 'quickCreateParameterSetWithStorage' parameter set. +```powershell +# Set up a storage account if you have not +$storageAccount = New-AzStorageAccount -ResourceGroupName ContosoOrg -Name ContosoStorAcc -Location "East US" -SkuName "Standard_RAGRS" -Kind "StorageV2" + +# Create cloud service +$cloudService = New-AzCloudService ` + -Name ContosoCS ` + -ResourceGroupName ContosOrg ` + -Location EastUS ` + -ConfigurationFile C:\files\CS.cscfg ` + -DefinitionFile C:\files\CS.csdef ` + -PackageFile C:\CS.cspkg ` + -StorageAccount ContosoStorAcc ` + -KeyVaultName ContosoKV + +``` + +Above set of commands creates a cloud service by extracting NetworkProfile and RoleProfile information from the .CsCfg and .CsDef files. + +Those files will also provide OSProfile information along with the Certificates from the keyvault provided in the '-KeyVaultName' parameter. +This parameter set also uploads the .CsPkg file to the provided StorageAccount. + +### Example 6: Create new cloud service with CsCfg, CsDef, and Cspkg files using 'quickCreateParameterSetWithoutStorage' parameter set. +```powershell +# getting Package URL +$tokenStartTime = Get-Date +$tokenEndTime = $tokenStartTime.AddYears(1) +$storAcc = Get-AzStorageAccount -ResourceGroupName ContosoOrg -Name ContosoStorAcc +$csPkgBlob = Get-AzStorageBlob -Container Contoso-Container -Blob ContosoBlob.cspkg -Context $storAcc.Context +$csPkgToken = New-AzStorageBlobSASToken -Container Contoso-Container -Blob ContosoBlob.cspkg -Permission rwd -StartTime $tokenStartTime -ExpiryTime $tokenEndTime -Context $storAcc.Context +$cspkgUrl = $csPkgBlob.ICloudBlob.Uri.AbsoluteUri + $csPkgToken + +# Create cloud service +$cloudService = New-AzCloudService ` + -Name ContosoCS ` + -ResourceGroupName ContosOrg ` + -Location EastUS ` + -ConfigurationFile C:\files\CS.cscfg ` + -DefinitionFile C:\files\CS.csdef ` + -packageUrl $cspkgUrl ` + +``` + +Above set of commands creates a cloud service by extracting NetworkProfile and RoleProfile information from the .CsCfg and .CsDef files. + +Those files will also provide OSProfile information along with the Certificates from the keyvault provided in the '-KeyVaultName' parameter. + +## PARAMETERS + +### -AllowModelOverride +(Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively.The default value is `false`. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Configuration +Specifies the XML service configuration (.cscfg) for the cloud service. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationFile +Specifies the XML service configuration (.cscfg) for the cloud service. + +```yaml +Type: System.String +Parameter Sets: quickCreateParameterSetWithoutStorage, quickCreateParameterSetWithStorage +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ConfigurationUrl +Specifies a URL that refers to the location of the service configuration in the Blob service. +The service package URL can be Shared Access Signature (SAS) URI from any storage account.This is a write-only property and is not returned in GET calls. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: CreateExpanded +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefinitionFile +Path to .csdef file. + +```yaml +Type: System.String +Parameter Sets: quickCreateParameterSetWithoutStorage, quickCreateParameterSetWithStorage +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DnsName +Name of Dns to be used for the CloudService resource. + +```yaml +Type: System.String +Parameter Sets: quickCreateParameterSetWithoutStorage, quickCreateParameterSetWithStorage +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExtensionProfile +Describes a cloud service extension profile. +To construct, see NOTES section for EXTENSIONPROFILE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudServiceExtensionProfile +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -KeyVaultName +Name of the KeyVault to be used for the CloudService resource. + +```yaml +Type: System.String +Parameter Sets: quickCreateParameterSetWithoutStorage, quickCreateParameterSetWithStorage +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +Resource location. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: CloudServiceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NetworkProfile +Network Profile for the cloud service. +To construct, see NOTES section for NETWORKPROFILE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudServiceNetworkProfile +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSProfile +Describes the OS profile for the cloud service. +To construct, see NOTES section for OSPROFILE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudServiceOSProfile +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PackageFile +Path to .cspkg file. +It will be uploaded to a blob + +```yaml +Type: System.String +Parameter Sets: quickCreateParameterSetWithStorage +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PackageUrl +Specifies a URL that refers to the location of the service package in the Blob service. +The service package URL can be Shared Access Signature (SAS) URI from any storage account.This is a write-only property and is not returned in GET calls. + +```yaml +Type: System.String +Parameter Sets: CreateExpanded, quickCreateParameterSetWithoutStorage +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleProfile +Describes the role profile for the cloud service. +To construct, see NOTES section for ROLEPROFILE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudServiceRoleProfile +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartCloudService +(Optional) Indicates whether to start the cloud service immediately after it is created. +The default value is `true`.If false, the service model is still deployed, but the code is not run immediately. +Instead, the service is PoweredOff until you call Start, at which time the service will be started. +A deployed service still incurs charges, even if it is poweredoff. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccount +Name of the storage account that will store the Package file. + +```yaml +Type: System.String +Parameter Sets: quickCreateParameterSetWithStorage +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UpgradeMode +Update mode for the cloud service. +Role instances are allocated to update domains when the service is deployed. +Updates can be initiated manually in each update domain or initiated automatically in all update domains.Possible Values are \
\
**Auto**\
\
**Manual** \
\
**Simultaneous**\
\
If not specified, the default value is Auto. +If set to Manual, PUT UpdateDomain must be called to apply the update. +If set to Auto, the update is automatically applied to each update domain in sequence. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Support.CloudServiceUpgradeMode +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +List of logical availability zone of the resource. +List should contain only 1 zone where cloud service should be provisioned. +This field is optional. + +```yaml +Type: System.String[] +Parameter Sets: CreateExpanded +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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceDiagnosticsExtension.md b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceDiagnosticsExtension.md new file mode 100644 index 000000000000..24f1217e350f --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceDiagnosticsExtension.md @@ -0,0 +1,202 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudservicediagnosticsextension +schema: 2.0.0 +--- + +# New-AzCloudServiceDiagnosticsExtension + +## SYNOPSIS +Create a in-memory object for Diagnostics Extension + +## SYNTAX + +``` +New-AzCloudServiceDiagnosticsExtension [-Name] [-ResourceGroupName] + [-CloudServiceName] [-DiagnosticsConfigurationPath] [-StorageAccountName] + [-StorageAccountKey] [[-Subscription] ] [[-TypeHandlerVersion] ] + [[-RolesAppliedTo] ] [[-AutoUpgradeMinorVersion] ] [] +``` + +## DESCRIPTION +Create a in-memory object for Diagnostics Extension + +## EXAMPLES + +### Example 1: Create diagnostics extension object +```powershell +$storageAccountKey = Get-AzStorageAccountKey -ResourceGroupName "ContosOrg" -Name "ContosSA" +$configFile = "" +$extension = New-AzCloudServiceDiagnosticsExtension -Name "WADExtension" -ResourceGroupName "ContosOrg" -CloudServiceName "ContosCS" -StorageAccountName "ContosSA" -StorageAccountKey $storageAccountKey[0].Value -DiagnosticsConfigurationPath $configFile -TypeHandlerVersion "1.5" -AutoUpgradeMinorVersion $true +``` + +This command creates diagnostics extension object which is used for creating or updating a cloud service. +For more details see New-AzCloudService. + +## PARAMETERS + +### -AutoUpgradeMinorVersion +Auto upgrade minor version. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: 9 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudServiceName +Name of Cloud Service. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DiagnosticsConfigurationPath +Specifies the configuration for Azure Diagnostics. +You can download the schema by using the following command: (Get-AzureServiceAvailableExtension -ExtensionName 'PaaSDiagnostics' -ProviderNamespace 'Microsoft.Azure.Diagnostics').PublicConfigurationSchema | Out-File -Encoding utf8 -FilePath 'WadConfig.xsd' + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of Diagnostics Extension. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Resource Group name of Cloud Service. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RolesAppliedTo +Roles applied to. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountKey +Storage Account Key. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageAccountName +Name of the Storage Account. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Subscription +Subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TypeHandlerVersion +Specifies the version of the extension. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.Extension + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceExtensionObject.md b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceExtensionObject.md new file mode 100644 index 000000000000..0ce30e1a4ac3 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceExtensionObject.md @@ -0,0 +1,168 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudserviceextensionobject +schema: 2.0.0 +--- + +# New-AzCloudServiceExtensionObject + +## SYNOPSIS +Create a in-memory object for Extension + +## SYNTAX + +``` +New-AzCloudServiceExtensionObject [-AutoUpgradeMinorVersion ] [-Name ] + [-ProtectedSetting ] [-Publisher ] [-RolesAppliedTo ] [-Setting ] + [-Type ] [-TypeHandlerVersion ] [] +``` + +## DESCRIPTION +Create a in-memory object for Extension + +## EXAMPLES + +### Example 1: Create Geneva extension object +```powershell +$extension = New-AzCloudServiceExtensionObject -Name "GenevaExtension" -Publisher "Microsoft.Azure.Geneva" -Type "GenevaMonitoringPaaS" -TypeHandlerVersion "2.14.0.2" +``` + +This command creates Geneva extension object which is used for creating or updating a cloud service. +For more details see New-AzCloudService. + +## PARAMETERS + +### -AutoUpgradeMinorVersion +Explicitly specify whether CRP can automatically upgrade typeHandlerVersion to higher minor versions when they become available. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProtectedSetting +Protected settings for the extension which are encrypted before sent to the VM. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Publisher +Publisher. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RolesAppliedTo +RolesAppliedTo. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Setting +Public settings for the extension. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +Type. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TypeHandlerVersion +TypeHandlerVersion. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.Extension + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceLoadBalancerConfigurationObject.md b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceLoadBalancerConfigurationObject.md new file mode 100644 index 000000000000..bc7f1530e410 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceLoadBalancerConfigurationObject.md @@ -0,0 +1,80 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudserviceloadbalancerconfigurationobject +schema: 2.0.0 +--- + +# New-AzCloudServiceLoadBalancerConfigurationObject + +## SYNOPSIS +Create a in-memory object for LoadBalancerConfiguration + +## SYNTAX + +``` +New-AzCloudServiceLoadBalancerConfigurationObject + [-FrontendIPConfiguration ] [-Name ] [] +``` + +## DESCRIPTION +Create a in-memory object for LoadBalancerConfiguration + +## EXAMPLES + +### Example 1: Create load balancer configuration object +```powershell +$publicIP = Get-AzPublicIpAddress -ResourceGroupName 'ContosoOrg' -Name 'ContosoPublicIP' +$feIpConfig = New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject -Name 'ContosoFe' -PublicIPAddressId $publicIP.Id +$loadBalancerConfig = New-AzCloudServiceLoadBalancerConfigurationObject -Name 'ContosoLB' -FrontendIPConfiguration $feIpConfig +``` + +This command creates load balancer configuration object which is used for creating or updating a cloud service. +For more details see New-AzCloudService. + +## PARAMETERS + +### -FrontendIPConfiguration +FrontendIPConfiguration. +To construct, see NOTES section for FRONTENDIPCONFIGURATION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ILoadBalancerFrontendIPConfiguration[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of LoadBalancerConfiguration. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.LoadBalancerConfiguration + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject.md b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject.md new file mode 100644 index 000000000000..34e7058c82e4 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject.md @@ -0,0 +1,127 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudserviceloadbalancerfrontendipconfigurationobject +schema: 2.0.0 +--- + +# New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject + +## SYNOPSIS +Create a in-memory object for LoadBalancerFrontendIPConfiguration + +## SYNTAX + +### DefaultParameterSet (Default) +``` +New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject [-Name ] [-PublicIPAddressId ] + [] +``` + +### PrivateIP +``` +New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject [-Name ] [-PrivateIPAddress ] + [-SubnetId ] [] +``` + +## DESCRIPTION +Create a in-memory object for LoadBalancerFrontendIPConfiguration + +## EXAMPLES + +### Example 1: Create load balancer frontend IP configuration object +```powershell +$publicIP = Get-AzPublicIpAddress -ResourceGroupName 'ContosoOrg' -Name 'ContosoPublicIP' +$feIpConfig = New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject -Name 'ContosoFe' -PublicIPAddressId $publicIp.Id +$loadBalancerConfig = New-AzCloudServiceLoadBalancerConfigurationObject -Name 'ContosoLB' -FrontendIPConfiguration $feIpConfig +``` + +This command creates load balancer frontend IP configuration object which is used for creating or updating a cloud service. +For more details see New-AzCloudService. + +### Example 2: Create load balancer frontend IP configuration object with Private ID address +```powershell +# Create role profile object +$subnet = New-AzVirtualNetworkSubnetConfig -Name "WebTier" -AddressPrefix "10.0.0.0/24" -WarningAction SilentlyContinue +$feIpConfig = New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject -Name 'ContosoFe' -privateIPAddress '10.0.0.6' -subnetId $Subnet.Id +$loadBalancerConfig = New-AzCloudServiceLoadBalancerConfigurationObject -Name 'ContosoLB' -FrontendIPConfiguration $feIpConfig + +``` + +This command creates load balancer frontend IP configuration object with a Private IP address + +## PARAMETERS + +### -Name +Name of FrontendIpConfigration. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateIPAddress +Private IP Address + +```yaml +Type: System.String +Parameter Sets: PrivateIP +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PublicIPAddressId +Resource Id. + +```yaml +Type: System.String +Parameter Sets: DefaultParameterSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubnetId +Subnet ID + +```yaml +Type: System.String +Parameter Sets: PrivateIP +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.LoadBalancerFrontendIPConfiguration + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceRemoteDesktopExtensionObject.md b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceRemoteDesktopExtensionObject.md new file mode 100644 index 000000000000..98b816f62dcd --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceRemoteDesktopExtensionObject.md @@ -0,0 +1,140 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudserviceremotedesktopextensionobject +schema: 2.0.0 +--- + +# New-AzCloudServiceRemoteDesktopExtensionObject + +## SYNOPSIS +Create a in-memory object for Remote Desktop Extension + +## SYNTAX + +``` +New-AzCloudServiceRemoteDesktopExtensionObject [-Name] [-Credential] + [[-Expiration] ] [[-TypeHandlerVersion] ] [[-RolesAppliedTo] ] + [[-AutoUpgradeMinorVersion] ] [] +``` + +## DESCRIPTION +Create a in-memory object for Remote Desktop Extension + +## EXAMPLES + +### Example 1: Create remote desktop extension object +```powershell +$credential = Get-Credential +$expiration = (Get-Date).AddYears(1) +$extension = New-AzCloudServiceRemoteDesktopExtensionObject -Name 'RDPExtension' -Credential $credential -Expiration $expiration -TypeHandlerVersion '1.2.1' +``` + +This command creates remote desktop extension object which is used for creating or updating a cloud service. +For more details see New-AzCloudService. + +## PARAMETERS + +### -AutoUpgradeMinorVersion +Auto upgrade minor version. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Credential +Credential for Remote Desktop Extension. + +```yaml +Type: System.Management.Automation.PSCredential +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Expiration +Expiration for Remote Desktop Extension. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Name of Remote Desktop Extension. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RolesAppliedTo +Roles applied to. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TypeHandlerVersion +Remote Desktop Extension version. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.Extension + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceRoleProfilePropertiesObject.md b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceRoleProfilePropertiesObject.md new file mode 100644 index 000000000000..9a23a53c5b0b --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceRoleProfilePropertiesObject.md @@ -0,0 +1,107 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudserviceroleprofilepropertiesobject +schema: 2.0.0 +--- + +# New-AzCloudServiceRoleProfilePropertiesObject + +## SYNOPSIS +Create a in-memory object for CloudServiceRoleProfileProperties + +## SYNTAX + +``` +New-AzCloudServiceRoleProfilePropertiesObject [-Name ] [-SkuCapacity ] [-SkuName ] + [-SkuTier ] [] +``` + +## DESCRIPTION +Create a in-memory object for CloudServiceRoleProfileProperties + +## EXAMPLES + +### Example 1: Create role profile properties object +```powershell +$role = New-AzCloudServiceRoleProfilePropertiesObject -Name 'WebRole' -SkuName 'Standard_D1_v2' -SkuTier 'Standard' -SkuCapacity 2 +``` + +This command creates role profile properties object which is used for creating or updating a cloud service. +For more details see New-AzCloudService. + +## PARAMETERS + +### -Name +Name of role profile. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuCapacity +Specifies the number of role instances in the cloud service. + +```yaml +Type: System.Int64 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuName +The sku name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuTier +SkuTier. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.CloudServiceRoleProfileProperties + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceVaultSecretGroupObject.md b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceVaultSecretGroupObject.md new file mode 100644 index 000000000000..28fb131af869 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/New-AzCloudServiceVaultSecretGroupObject.md @@ -0,0 +1,78 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudservicevaultsecretgroupobject +schema: 2.0.0 +--- + +# New-AzCloudServiceVaultSecretGroupObject + +## SYNOPSIS +Create a in-memory object for Vault Secret Group + +## SYNTAX + +``` +New-AzCloudServiceVaultSecretGroupObject [-CertificateUrl ] [-Id ] [] +``` + +## DESCRIPTION +Create a in-memory object for Secret Group + +## EXAMPLES + +### Example 1: Create vault secret group object +```powershell +$keyVault = Get-AzKeyVault -VaultName 'ContosoKeyVault' +$certificate = Get-AzKeyVaultCertificate -VaultName 'ContosoKeyVault' -Name 'ContosoCert' +$secretGroup = New-AzCloudServiceVaultSecretGroupObject -Id $keyVault.ResourceId -CertificateUrl $certificate.SecretId +``` + +This command creates vault secret group object which is used for creating or updating a cloud service. +For more details see New-AzCloudService. + +## PARAMETERS + +### -CertificateUrl +This is the URL of a certificate that has been uploaded to Key Vault as a secret. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Id +Key Vault Resource Id. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.CloudServiceVaultSecretGroup + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/README.md b/src/CloudService/CloudService.Autorest/help/README.md new file mode 100644 index 000000000000..15bd7022b130 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.CloudService` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.CloudService` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/CloudService/CloudService.Autorest/help/Remove-AzCloudService.md b/src/CloudService/CloudService.Autorest/help/Remove-AzCloudService.md new file mode 100644 index 000000000000..fd51a98f4f4b --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Remove-AzCloudService.md @@ -0,0 +1,209 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/remove-azcloudservice +schema: 2.0.0 +--- + +# Remove-AzCloudService + +## SYNOPSIS +Deletes a cloud service. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzCloudService -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes a cloud service. + +## EXAMPLES + +### Example 1: Remove a cloud service +```powershell +Remove-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" +``` + +This command removes the cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: CloudServiceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Remove-AzCloudServiceRoleInstance.md b/src/CloudService/CloudService.Autorest/help/Remove-AzCloudServiceRoleInstance.md new file mode 100644 index 000000000000..c1f3a67b0684 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Remove-AzCloudServiceRoleInstance.md @@ -0,0 +1,226 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/remove-azcloudserviceroleinstance +schema: 2.0.0 +--- + +# Remove-AzCloudServiceRoleInstance + +## SYNOPSIS +Deletes role instances in a cloud service. + +## SYNTAX + +### DeleteExpanded (Default) +``` +Remove-AzCloudServiceRoleInstance -CloudServiceName -ResourceGroupName + -RoleInstance [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentityExpanded +``` +Remove-AzCloudServiceRoleInstance -InputObject -RoleInstance + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes role instances in a cloud service. + +## EXAMPLES + +### Example 1: Remove a cloud service role instance +```powershell +Remove-AzCloudServiceRoleInstance -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance "ContosoFrontEnd_IN_0" +``` + +This command removes the role instance named ContosoFrontEnd_IN_0 of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudServiceName +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: DeleteExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: DeleteViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: DeleteExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstance +List of cloud service role instance names. +Value of '*' will signify all role instances of the cloud service. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: DeleteExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Restart-AzCloudService.md b/src/CloudService/CloudService.Autorest/help/Restart-AzCloudService.md new file mode 100644 index 000000000000..9d3b333846e4 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Restart-AzCloudService.md @@ -0,0 +1,234 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/restart-azcloudservice +schema: 2.0.0 +--- + +# Restart-AzCloudService + +## SYNOPSIS +Restarts one or more role instances in a cloud service. + +## SYNTAX + +### RestartExpanded (Default) +``` +Restart-AzCloudService -Name -ResourceGroupName -RoleInstance + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### RestartViaIdentityExpanded +``` +Restart-AzCloudService -InputObject -RoleInstance + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Restarts one or more role instances in a cloud service. + +## EXAMPLES + +### Example 1: Restart role instances of cloud service +```powershell +$roleInstances = @("ContosoFrontEnd_IN_0", "ContosoBackEnd_IN_1") +Restart-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance $roleInstances +``` + +This command restarts 2 role instances ContosoFrontEnd_IN_0 and ContosoBackEnd_IN_1 of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +### Example 2: Restart all roles of cloud service +```powershell +Restart-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstance "*" +``` + +This command restarts all role instances of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: RestartViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: RestartExpanded +Aliases: CloudServiceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: RestartExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstance +List of cloud service role instance names. +Value of '*' will signify all role instances of the cloud service. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: RestartExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Restart-AzCloudServiceRoleInstance.md b/src/CloudService/CloudService.Autorest/help/Restart-AzCloudServiceRoleInstance.md new file mode 100644 index 000000000000..78acc47779c9 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Restart-AzCloudServiceRoleInstance.md @@ -0,0 +1,225 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/restart-azcloudserviceroleinstance +schema: 2.0.0 +--- + +# Restart-AzCloudServiceRoleInstance + +## SYNOPSIS +The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service. + +## SYNTAX + +### Restart (Default) +``` +Restart-AzCloudServiceRoleInstance -CloudServiceName -ResourceGroupName + -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### RestartViaIdentity +``` +Restart-AzCloudServiceRoleInstance -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service. + +## EXAMPLES + +### Example 1: Restart role instance of a cloud service +```powershell +Restart-AzCloudServiceRoleInstance -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" -RoleInstanceName "ContosoFrontEnd_IN_0" +``` + +This command restarts role instance named ContosoFrontEnd_IN_0 of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudServiceName +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: Restart +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: RestartViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Restart +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleInstanceName +Name of the role instance. + +```yaml +Type: System.String +Parameter Sets: Restart +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: Restart +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Set-AzCloudServiceUpdateDomain.md b/src/CloudService/CloudService.Autorest/help/Set-AzCloudServiceUpdateDomain.md new file mode 100644 index 000000000000..cd6f1dba9a79 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Set-AzCloudServiceUpdateDomain.md @@ -0,0 +1,201 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/set-azcloudserviceupdatedomain +schema: 2.0.0 +--- + +# Set-AzCloudServiceUpdateDomain + +## SYNOPSIS +Updates the role instances in the specified update domain. + +## SYNTAX + +``` +Set-AzCloudServiceUpdateDomain -CloudServiceName -ResourceGroupName -UpdateDomain + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Updates the role instances in the specified update domain. + +## EXAMPLES + +### Example 1: Update role instance in update domain +```powershell +Set-AzCloudServiceUpdateDomain -CloudServiceName "ContosoCS" -ResourceGroupName "ContosOrg" -UpdateDomain 0 +``` + +This command updates role instances in update domain 0 of cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudServiceName +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UpdateDomain +Specifies an integer value that identifies the update domain. +Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Start-AzCloudService.md b/src/CloudService/CloudService.Autorest/help/Start-AzCloudService.md new file mode 100644 index 000000000000..85a97b6ec40f --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Start-AzCloudService.md @@ -0,0 +1,209 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/start-azcloudservice +schema: 2.0.0 +--- + +# Start-AzCloudService + +## SYNOPSIS +Starts the cloud service. + +## SYNTAX + +### Start (Default) +``` +Start-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### StartViaIdentity +``` +Start-AzCloudService -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Starts the cloud service. + +## EXAMPLES + +### Example 1: Start cloud service +```powershell +Start-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" +``` + +This command starts all the role instances that belong to the the cloud service named ContosoCS. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: StartViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: Start +Aliases: CloudServiceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: Start +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: Start +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Stop-AzCloudService.md b/src/CloudService/CloudService.Autorest/help/Stop-AzCloudService.md new file mode 100644 index 000000000000..bab77082a692 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Stop-AzCloudService.md @@ -0,0 +1,211 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/stop-azcloudservice +schema: 2.0.0 +--- + +# Stop-AzCloudService + +## SYNOPSIS +Power off the cloud service. +Note that resources are still attached and you are getting charged for the resources. + +## SYNTAX + +### PowerOff (Default) +``` +Stop-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### PowerOffViaIdentity +``` +Stop-AzCloudService -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Power off the cloud service. +Note that resources are still attached and you are getting charged for the resources. + +## EXAMPLES + +### Example 1: Stop cloud service +```powershell +Stop-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" +``` + +This command stops all the role instances that belong to the the cloud service named ContosoCS. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: PowerOffViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Name of the cloud service. + +```yaml +Type: System.String +Parameter Sets: PowerOff +Aliases: CloudServiceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +Name of the resource group. + +```yaml +Type: System.String +Parameter Sets: PowerOff +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: PowerOff +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Switch-AzCloudService.md b/src/CloudService/CloudService.Autorest/help/Switch-AzCloudService.md new file mode 100644 index 000000000000..1256c4323647 --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Switch-AzCloudService.md @@ -0,0 +1,200 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/Switch-AzCloudService +schema: 2.0.0 +--- + +# Switch-AzCloudService + +## SYNOPSIS +Swaps VIPs between two cloud service (extended support) load balancers. + +## SYNTAX + +### CloudServiceName (Default) +``` +Switch-AzCloudService -CloudServiceName -ResourceGroupName [-SubscriptionId ] + [-Async] [-DefaultProfile ] [-AsJob] [-Confirm] [-WhatIf] [] +``` + +### CloudService +``` +Switch-AzCloudService -CloudService [-SubscriptionId ] [-Async] + [-DefaultProfile ] [-AsJob] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Swaps VIPs between two cloud service (extended support) load balancers. + +## EXAMPLES + +### Example 1: Switch cloud service using name +```powershell +Switch-AzCloudService -ResourceGroupName "BRGThree" -CloudServiceName BService -SubscriptionId 1133e0eb-b53c-1234-b478-2eac8f04afca +``` + +Above command invokes the vipswap operation on the Cloud service with name 'BService' and will perform the operation once the user confirms the action on the confirmation prompt. +'BService' with be swapped with its swappable cloud service. + +### Example 2: Switch cloud service using cloud service object +```powershell +$cs = Get-AzCloudService -ResourceGroupName "BRGThree" -CloudServiceName BService -SubscriptionId 1133e0eb-b53c-1234-b478-2eac8f04afca +Switch-AzCloudService -CloudService $cs +``` + +Above command invokes the vipswap operation on the Cloud service with name 'BService' and will perform the operation once the user confirms the action on the confirmation prompt. +'BService' with be swapped with its swappable cloud service. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Async + + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudService +To construct, see NOTES section for CLOUDSERVICE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.CloudService +Parameter Sets: CloudService +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudServiceName + + +```yaml +Type: System.String +Parameter Sets: CloudServiceName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName + + +```yaml +Type: System.String +Parameter Sets: CloudServiceName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription credentials which uniquely identify Microsoft Azure subscription. +The subscription ID forms part of the URI for every service call. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/help/Update-AzCloudService.md b/src/CloudService/CloudService.Autorest/help/Update-AzCloudService.md new file mode 100644 index 000000000000..eb810a96159e --- /dev/null +++ b/src/CloudService/CloudService.Autorest/help/Update-AzCloudService.md @@ -0,0 +1,213 @@ +--- +external help file: +Module Name: Az.CloudService +online version: https://learn.microsoft.com/powershell/module/az.cloudservice/update-azcloudservice +schema: 2.0.0 +--- + +# Update-AzCloudService + +## SYNOPSIS +Create or update a cloud service. +Please note some properties can be set only during cloud service creation. + +## SYNTAX + +``` +Update-AzCloudService -InputObject -Parameter + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create or update a cloud service. +Please note some properties can be set only during cloud service creation. + +## EXAMPLES + +### Example 1: Add RDP extension to existing cloud service +```powershell +# Create RDP extension object +$rdpExtension = New-AzCloudServiceRemoteDesktopExtensionObject -Name "RDPExtension" -Credential $credential -Expiration $expiration -TypeHandlerVersion "1.2.1" +# Get existing cloud service +$cloudService = Get-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" +# Add RDP extension to existing cloud service extension object +$cloudService.ExtensionProfile.Extension = $cloudService.ExtensionProfile.Extension + $rdpExtension +# Update cloud service +$cloudService | Update-AzCloudService +``` + +Above set of commands adds a RDP extension to already existing cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +### Example 2: Remove all extensions from cloud service +```powershell +# Get existing cloud service +$cloudService = Get-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" +# Set extension to empty list +$cloudService.ExtensionProfile.Extension = @() +# Update cloud service +$cloudService | Update-AzCloudService +``` + +Above set of commands removes all extensions from existing cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +### Example 3: Remove RDP extension from cloud service +```powershell +# Get existing cloud service +$cloudService = Get-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" +# Remove extension by name RDPExtension +$cloudService.ExtensionProfile.Extension = $cloudService.ExtensionProfile.Extension | Where-Object { $_.Name -ne "RDPExtension" } +# Update cloud service +$cloudService | Update-AzCloudService +``` + +Above set of commands removes RDP extension from existing cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +### Example 4: Scale-Out / Scale-In role instances +```powershell +# Get existing cloud service +$cloudService = Get-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" + +# Scale-out all role instance count by 1 +$cloudService.RoleProfile.Role | ForEach-Object {$_.SkuCapacity += 1} + +# Scale-in ContosoFrontend role instance count by 1 +$role = $cloudService.RoleProfile.Role | Where-Object {$_.Name -eq "ContosoFrontend"} +$role.SkuCapacity -= 1 + +# Update cloud service configuration as per the new role instance count +$cloudService.Configuration = $configuration + +# Update cloud service +$cloudService | Update-AzCloudService +``` + +Above set of commands shows how to scale-out and scale-in role instance count for cloud service named ContosoCS that belongs to the resource group named ContosOrg. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Parameter +Describes the cloud service. +To construct, see NOTES section for PARAMETER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.ICloudServiceIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220904.ICloudService + +## NOTES + +## RELATED LINKS + diff --git a/src/CloudService/CloudService.Autorest/internal/Az.CloudService.internal.psm1 b/src/CloudService/CloudService.Autorest/internal/Az.CloudService.internal.psm1 index a65c510ae4df..56075ed6129a 100644 --- a/src/CloudService/CloudService.Autorest/internal/Az.CloudService.internal.psm1 +++ b/src/CloudService/CloudService.Autorest/internal/Az.CloudService.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/CloudService/CloudService.Autorest/test-module.ps1 b/src/CloudService/CloudService.Autorest/test-module.ps1 index e86c47c0f9f3..a0f57bd5c77a 100644 --- a/src/CloudService/CloudService.Autorest/test-module.ps1 +++ b/src/CloudService/CloudService.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-------------' \ No newline at end of file diff --git a/src/CloudService/CloudService.Autorest/test/loadEnv.ps1 b/src/CloudService/CloudService.Autorest/test/loadEnv.ps1 index 5f079e89615e..6a7c385c6b7d 100644 --- a/src/CloudService/CloudService.Autorest/test/loadEnv.ps1 +++ b/src/CloudService/CloudService.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/CloudService/CloudService.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 b/src/CloudService/CloudService.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/src/CloudService/CloudService.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/CloudService/CloudService/Az.CloudService.psd1 b/src/CloudService/CloudService/Az.CloudService.psd1 index 26973d1934fe..c1ad2df5534c 100644 --- a/src/CloudService/CloudService/Az.CloudService.psd1 +++ b/src/CloudService/CloudService/Az.CloudService.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 12/5/2023 +# Generated on: 4/23/2024 # @{ @@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.2'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.17.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'CloudService.Autorest/bin/Az.CloudService.private.dll' @@ -63,7 +63,7 @@ ScriptsToProcess = @() TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = 'CloudService.Autorest/Az.CloudService.format.ps1xml' +FormatsToProcess = 'CloudService.Autorest\Az.CloudService.format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @('CloudService.Autorest/Az.CloudService.psm1') diff --git a/src/CloudService/CloudService/ChangeLog.md b/src/CloudService/CloudService/ChangeLog.md index 8608c0606b2b..b14b0eca4911 100644 --- a/src/CloudService/CloudService/ChangeLog.md +++ b/src/CloudService/CloudService/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Introduced secrets detection feature to safeguard sensitive data. ## Version 2.0.0 * Downgraded the api version of referenced network to 2021-03-01. diff --git a/src/CloudService/CloudService/help/Get-AzCloudService.md b/src/CloudService/CloudService/help/Get-AzCloudService.md index fef86a0ac837..4a30179dc830 100644 --- a/src/CloudService/CloudService/help/Get-AzCloudService.md +++ b/src/CloudService/CloudService/help/Get-AzCloudService.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudservice schema: 2.0.0 @@ -14,24 +14,26 @@ Display information about a cloud service. ### List (Default) ``` -Get-AzCloudService [-SubscriptionId ] [-DefaultProfile ] [] +Get-AzCloudService [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### Get ``` Get-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` -### GetViaIdentity +### List1 ``` -Get-AzCloudService -InputObject [-DefaultProfile ] [] +Get-AzCloudService -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] ``` -### List1 +### GetViaIdentity ``` -Get-AzCloudService -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] - [] +Get-AzCloudService -InputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -132,6 +134,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 Name of the resource group. @@ -153,7 +170,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String[] -Parameter Sets: Get, List, List1 +Parameter Sets: List, Get, List1 Aliases: Required: False @@ -176,27 +193,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Get-AzCloudServiceInstanceView.md b/src/CloudService/CloudService/help/Get-AzCloudServiceInstanceView.md index b64d439ca830..f96cb91684f8 100644 --- a/src/CloudService/CloudService/help/Get-AzCloudServiceInstanceView.md +++ b/src/CloudService/CloudService/help/Get-AzCloudServiceInstanceView.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceinstanceview schema: 2.0.0 @@ -14,7 +14,8 @@ Gets the status of a cloud service. ``` Get-AzCloudServiceInstanceView -CloudServiceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -110,6 +111,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 Name of the resource group. @@ -152,7 +168,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Get-AzCloudServiceNetworkInterface.md b/src/CloudService/CloudService/help/Get-AzCloudServiceNetworkInterface.md index fcadbe2cd0ac..56142c703a15 100644 --- a/src/CloudService/CloudService/help/Get-AzCloudServiceNetworkInterface.md +++ b/src/CloudService/CloudService/help/Get-AzCloudServiceNetworkInterface.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudservicenetworkinterface schema: 2.0.0 @@ -15,26 +15,28 @@ Get the specified network interface in a cloud service. ### List1 (Default) ``` Get-AzCloudServiceNetworkInterface -CloudServiceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### List +``` +Get-AzCloudServiceNetworkInterface -CloudServiceName -ResourceGroupName + -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### Get ``` Get-AzCloudServiceNetworkInterface -CloudServiceName -Name -ResourceGroupName -RoleInstanceName [-SubscriptionId ] [-Expand ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzCloudServiceNetworkInterface -InputObject [-Expand ] - [-DefaultProfile ] [] -``` - -### List -``` -Get-AzCloudServiceNetworkInterface -CloudServiceName -ResourceGroupName - -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -64,7 +66,7 @@ The name of the cloud service. ```yaml Type: System.String -Parameter Sets: Get, List, List1 +Parameter Sets: List1, List, Get Aliases: Required: True @@ -136,12 +138,27 @@ 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. ```yaml Type: System.String -Parameter Sets: Get, List, List1 +Parameter Sets: List1, List, Get Aliases: Required: True @@ -156,7 +173,7 @@ The name of role instance. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -172,7 +189,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String[] -Parameter Sets: Get, List, List1 +Parameter Sets: List1, List, Get Aliases: Required: False @@ -195,27 +212,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Get-AzCloudServiceOSFamily.md b/src/CloudService/CloudService/help/Get-AzCloudServiceOSFamily.md index aacce224c7c0..40d6e3230b1c 100644 --- a/src/CloudService/CloudService/help/Get-AzCloudServiceOSFamily.md +++ b/src/CloudService/CloudService/help/Get-AzCloudServiceOSFamily.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceosfamily schema: 2.0.0 @@ -15,19 +15,19 @@ Gets properties of a guest operating system family that can be specified in the ### List (Default) ``` Get-AzCloudServiceOSFamily -Location [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Get ``` Get-AzCloudServiceOSFamily -Location -OSFamilyName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzCloudServiceOSFamily -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -104,7 +104,7 @@ Name of the location that the OS family pertains to. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -129,13 +129,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 +``` + ### -SubscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -158,27 +173,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Get-AzCloudServiceOSVersion.md b/src/CloudService/CloudService/help/Get-AzCloudServiceOSVersion.md index a79af998ce9f..88be0277ff59 100644 --- a/src/CloudService/CloudService/help/Get-AzCloudServiceOSVersion.md +++ b/src/CloudService/CloudService/help/Get-AzCloudServiceOSVersion.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceosversion schema: 2.0.0 @@ -15,19 +15,19 @@ Gets properties of a guest operating system version that can be specified in the ### List (Default) ``` Get-AzCloudServiceOSVersion -Location [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Get ``` Get-AzCloudServiceOSVersion -Location -OSVersionName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzCloudServiceOSVersion -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -104,7 +104,7 @@ Name of the location that the OS version pertains to. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -129,13 +129,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 +``` + ### -SubscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -158,27 +173,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Get-AzCloudServicePublicIPAddress.md b/src/CloudService/CloudService/help/Get-AzCloudServicePublicIPAddress.md index 0e234acd4e9f..dbb6e07a035d 100644 --- a/src/CloudService/CloudService/help/Get-AzCloudServicePublicIPAddress.md +++ b/src/CloudService/CloudService/help/Get-AzCloudServicePublicIPAddress.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudservicepublicipaddress schema: 2.0.0 @@ -15,27 +15,30 @@ Get the specified public IP address in a cloud service. ### List (Default) ``` Get-AzCloudServicePublicIPAddress -CloudServiceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] +``` + +### List1 +``` +Get-AzCloudServicePublicIPAddress -CloudServiceName -IPConfigurationName + -NetworkInterfaceName -ResourceGroupName -RoleInstanceName + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] ``` ### Get ``` Get-AzCloudServicePublicIPAddress -CloudServiceName -IPConfigurationName -Name -NetworkInterfaceName -ResourceGroupName -RoleInstanceName - [-SubscriptionId ] [-Expand ] [-DefaultProfile ] [] + [-SubscriptionId ] [-Expand ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzCloudServicePublicIPAddress -InputObject [-Expand ] - [-DefaultProfile ] [] -``` - -### List1 -``` -Get-AzCloudServicePublicIPAddress -CloudServiceName -IPConfigurationName - -NetworkInterfaceName -ResourceGroupName -RoleInstanceName - [-SubscriptionId ] [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -65,7 +68,7 @@ The name of the cloud service. ```yaml Type: System.String -Parameter Sets: Get, List, List1 +Parameter Sets: List, List1, Get Aliases: Required: True @@ -127,7 +130,7 @@ The name of the IP configuration. ```yaml Type: System.String -Parameter Sets: Get, List1 +Parameter Sets: List1, Get Aliases: Required: True @@ -157,7 +160,7 @@ The name of the network interface. ```yaml Type: System.String -Parameter Sets: Get, List1 +Parameter Sets: List1, Get Aliases: Required: True @@ -167,12 +170,27 @@ 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. ```yaml Type: System.String -Parameter Sets: Get, List, List1 +Parameter Sets: List, List1, Get Aliases: Required: True @@ -187,7 +205,7 @@ The role instance name. ```yaml Type: System.String -Parameter Sets: Get, List1 +Parameter Sets: List1, Get Aliases: Required: True @@ -203,7 +221,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String[] -Parameter Sets: Get, List, List1 +Parameter Sets: List, List1, Get Aliases: Required: False @@ -226,27 +244,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstance.md b/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstance.md index 2b2bd3c0d524..3f55495afba6 100644 --- a/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstance.md +++ b/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstance.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceroleinstance schema: 2.0.0 @@ -15,20 +15,21 @@ Gets a role instance from a cloud service. ### List (Default) ``` Get-AzCloudServiceRoleInstance -CloudServiceName -ResourceGroupName - [-SubscriptionId ] [-Expand ] [-DefaultProfile ] [] + [-SubscriptionId ] [-Expand ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### Get ``` Get-AzCloudServiceRoleInstance -CloudServiceName -ResourceGroupName -RoleInstanceName [-SubscriptionId ] [-Expand ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzCloudServiceRoleInstance -InputObject [-Expand ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -72,7 +73,7 @@ Name of the cloud service. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -130,12 +131,27 @@ Accept pipeline input: True (ByValue) 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 Name of the resource group. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -166,7 +182,7 @@ The subscription ID forms part of the URI for every service call. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -189,27 +205,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstanceRemoteDesktopFile.md b/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstanceRemoteDesktopFile.md index 62aeed32cb9a..30b4a6228770 100644 --- a/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstanceRemoteDesktopFile.md +++ b/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstanceRemoteDesktopFile.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceroleinstanceremotedesktopfile schema: 2.0.0 @@ -14,8 +14,8 @@ Gets a remote desktop file for a role instance in a cloud service. ``` Get-AzCloudServiceRoleInstanceRemoteDesktopFile -CloudServiceName -ResourceGroupName - -RoleInstanceName -OutFile [-SubscriptionId ] [-DefaultProfile ] - [-PassThru] [] + -RoleInstanceName [-SubscriptionId ] -OutFile [-DefaultProfile ] + [-PassThru] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -93,6 +93,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 Name of the resource group. @@ -150,7 +165,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstanceView.md b/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstanceView.md index 1785f5033d66..bf743db9c0f8 100644 --- a/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstanceView.md +++ b/src/CloudService/CloudService/help/Get-AzCloudServiceRoleInstanceView.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/get-azcloudserviceroleinstanceview schema: 2.0.0 @@ -14,7 +14,8 @@ Retrieves information about the run-time state of a role instance in a cloud ser ``` Get-AzCloudServiceRoleInstanceView -CloudServiceName -ResourceGroupName - -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] [] + -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -68,6 +69,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 Name of the resource group. @@ -125,7 +141,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Invoke-AzCloudServiceRebuild.md b/src/CloudService/CloudService/help/Invoke-AzCloudServiceRebuild.md index 1f81f5b0f6bb..565f11e68714 100644 --- a/src/CloudService/CloudService/help/Invoke-AzCloudServiceRebuild.md +++ b/src/CloudService/CloudService/help/Invoke-AzCloudServiceRebuild.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/invoke-azcloudservicerebuild schema: 2.0.0 @@ -15,15 +15,16 @@ If you do not want to initialize storage resources, you can use Reimage Role Ins ### RebuildExpanded (Default) ``` -Invoke-AzCloudServiceRebuild -CloudServiceName -ResourceGroupName -RoleInstance - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] - [] +Invoke-AzCloudServiceRebuild -CloudServiceName -ResourceGroupName [-SubscriptionId ] + -RoleInstance [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RebuildViaIdentityExpanded ``` Invoke-AzCloudServiceRebuild -InputObject -RoleInstance - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -141,6 +142,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 Name of the resource group. @@ -232,27 +248,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Invoke-AzCloudServiceReimage.md b/src/CloudService/CloudService/help/Invoke-AzCloudServiceReimage.md index 5fc974c2c4f6..a70ab88da6c9 100644 --- a/src/CloudService/CloudService/help/Invoke-AzCloudServiceReimage.md +++ b/src/CloudService/CloudService/help/Invoke-AzCloudServiceReimage.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/invoke-azcloudservicereimage schema: 2.0.0 @@ -14,15 +14,16 @@ Reimage asynchronous operation reinstalls the operating system on instances of w ### ReimageExpanded (Default) ``` -Invoke-AzCloudServiceReimage -Name -ResourceGroupName -RoleInstance - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] - [] +Invoke-AzCloudServiceReimage -Name -ResourceGroupName [-SubscriptionId ] + -RoleInstance [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ReimageViaIdentityExpanded ``` Invoke-AzCloudServiceReimage -InputObject -RoleInstance - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -139,6 +140,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 Name of the resource group. @@ -230,27 +246,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Invoke-AzCloudServiceRoleInstanceRebuild.md b/src/CloudService/CloudService/help/Invoke-AzCloudServiceRoleInstanceRebuild.md index e34510dc5aa1..468a8b544e08 100644 --- a/src/CloudService/CloudService/help/Invoke-AzCloudServiceRoleInstanceRebuild.md +++ b/src/CloudService/CloudService/help/Invoke-AzCloudServiceRoleInstanceRebuild.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/invoke-azcloudserviceroleinstancerebuild schema: 2.0.0 @@ -17,13 +17,13 @@ If you do not want to initialize storage resources, you can use Reimage Role Ins ``` Invoke-AzCloudServiceRoleInstanceRebuild -CloudServiceName -ResourceGroupName -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RebuildViaIdentity ``` Invoke-AzCloudServiceRoleInstanceRebuild -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -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 Name of the resource group. @@ -223,27 +238,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Invoke-AzCloudServiceRoleInstanceReimage.md b/src/CloudService/CloudService/help/Invoke-AzCloudServiceRoleInstanceReimage.md index 906e2dabf056..3f28a14e5331 100644 --- a/src/CloudService/CloudService/help/Invoke-AzCloudServiceRoleInstanceReimage.md +++ b/src/CloudService/CloudService/help/Invoke-AzCloudServiceRoleInstanceReimage.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/invoke-azcloudserviceroleinstancereimage schema: 2.0.0 @@ -16,13 +16,13 @@ The Reimage Role Instance asynchronous operation reinstalls the operating system ``` Invoke-AzCloudServiceRoleInstanceReimage -CloudServiceName -ResourceGroupName -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ReimageViaIdentity ``` Invoke-AzCloudServiceRoleInstanceReimage -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -131,6 +131,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 Name of the resource group. @@ -221,27 +236,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/New-AzCloudService.md b/src/CloudService/CloudService/help/New-AzCloudService.md index cf5cc99d0a37..198b9e7ad9b6 100644 --- a/src/CloudService/CloudService/help/New-AzCloudService.md +++ b/src/CloudService/CloudService/help/New-AzCloudService.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudservice schema: 2.0.0 @@ -15,30 +15,31 @@ Please note some properties can be set only during cloud service creation. ### CreateExpanded (Default) ``` -New-AzCloudService -Name -ResourceGroupName -Location [-SubscriptionId ] +New-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] -Location [-AllowModelOverride] [-Configuration ] [-ConfigurationUrl ] [-ExtensionProfile ] [-NetworkProfile ] [-OSProfile ] [-PackageUrl ] [-RoleProfile ] [-StartCloudService] [-Tag ] [-UpgradeMode ] [-Zone ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### quickCreateParameterSetWithoutStorage ``` -New-AzCloudService -Name -ResourceGroupName -ConfigurationFile - -DefinitionFile -Location -PackageUrl [-SubscriptionId ] - [-DnsName ] [-ExtensionProfile ] [-KeyVaultName ] - [-StartCloudService] [-Tag ] [-UpgradeMode ] [-Confirm] [-WhatIf] - [] +New-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] -Location + [-ExtensionProfile ] -PackageUrl [-StartCloudService] + [-Tag ] [-UpgradeMode ] -ConfigurationFile + -DefinitionFile [-DnsName ] [-KeyVaultName ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### quickCreateParameterSetWithStorage ``` -New-AzCloudService -Name -ResourceGroupName -ConfigurationFile - -DefinitionFile -Location -PackageFile -StorageAccount - [-SubscriptionId ] [-DnsName ] [-ExtensionProfile ] - [-KeyVaultName ] [-StartCloudService] [-Tag ] [-UpgradeMode ] - [-Confirm] [-WhatIf] [] +New-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] -Location + [-ExtensionProfile ] [-StartCloudService] [-Tag ] + [-UpgradeMode ] -ConfigurationFile -DefinitionFile + -PackageFile -StorageAccount [-DnsName ] [-KeyVaultName ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -211,7 +212,6 @@ $cloudService = New-AzCloudService -PackageFile C:\CS.cspkg ` -StorageAccount ContosoStorAcc ` -KeyVaultName ContosoKV - ``` Above set of commands creates a cloud service by extracting NetworkProfile and RoleProfile information from the .CsCfg and .CsDef files. @@ -237,7 +237,6 @@ $cloudService = New-AzCloudService -ConfigurationFile C:\files\CS.cscfg ` -DefinitionFile C:\files\CS.csdef ` -packageUrl $cspkgUrl ` - ``` Above set of commands creates a cloud service by extracting NetworkProfile and RoleProfile information from the .CsCfg and .CsDef files. @@ -498,7 +497,19 @@ The service package URL can be Shared Access Signature (SAS) URI from any storag ```yaml Type: System.String -Parameter Sets: CreateExpanded, quickCreateParameterSetWithoutStorage +Parameter Sets: CreateExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +```yaml +Type: System.String +Parameter Sets: quickCreateParameterSetWithoutStorage Aliases: Required: True @@ -508,6 +519,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 Name of the resource group. @@ -681,52 +707,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`EXTENSIONPROFILE `: Describes a cloud service extension profile. - - `[Extension ]`: List of extensions for the cloud service. - - `[AutoUpgradeMinorVersion ]`: Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. - - `[ForceUpdateTag ]`: Tag to force apply the provided public and protected settings. Changing the tag value allows for re-running the extension without changing any of the public or protected settings. If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and it is up to handler implementation whether to re-run it or not - - `[Name ]`: The name of the extension. - - `[ProtectedSetting ]`: Protected settings for the extension which are encrypted before sent to the role instance. - - `[ProtectedSettingFromKeyVaultSecretUrl ]`: Secret URL which contains the protected settings of the extension - - `[Publisher ]`: The name of the extension handler publisher. - - `[RolesAppliedTo ]`: Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service. - - `[Setting ]`: Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension. - - `[SourceVaultId ]`: Resource Id - - `[Type ]`: Specifies the type of the extension. - - `[TypeHandlerVersion ]`: Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance. - -`NETWORKPROFILE `: Network Profile for the cloud service. - - `[LoadBalancerConfiguration ]`: List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a Public Load Balancer and an Internal Load Balancer. - - `FrontendIPConfiguration `: Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. - - `Name `: The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. - - `[PrivateIPAddress ]`: The virtual network private IP address of the IP configuration. - - `[PublicIPAddressId ]`: Resource Id - - `[SubnetId ]`: Resource Id - - `Name `: The name of the Load balancer - - `[Id ]`: Resource Id - - `[SlotType ]`: Slot type for the cloud service. Possible values are

**Production**

**Staging**

If not specified, the default value is Production. - - `[SwappableCloudService ]`: The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap. This property cannot be updated once it is set. The swappable cloud service referred by this id must be present otherwise an error will be thrown. - - `[Id ]`: Resource Id - -`OSPROFILE `: Describes the OS profile for the cloud service. - - `[Secret ]`: Specifies set of certificates that should be installed onto the role instances. - - `[SourceVaultId ]`: Resource Id - - `[VaultCertificate ]`: The list of key vault references in SourceVault which contain certificates. - - `[CertificateUrl ]`: This is the URL of a certificate that has been uploaded to Key Vault as a secret. - -`ROLEPROFILE `: Describes the role profile for the cloud service. - - `[Role ]`: List of roles for the cloud service. - - `[Name ]`: Resource name. - - `[SkuCapacity ]`: Specifies the number of role instances in the cloud service. - - `[SkuName ]`: The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku. - - `[SkuTier ]`: Specifies the tier of the cloud service. Possible Values are

**Standard**

**Basic** - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/New-AzCloudServiceDiagnosticsExtension.md b/src/CloudService/CloudService/help/New-AzCloudServiceDiagnosticsExtension.md index f8390b05b677..c6b5666bcf98 100644 --- a/src/CloudService/CloudService/help/New-AzCloudServiceDiagnosticsExtension.md +++ b/src/CloudService/CloudService/help/New-AzCloudServiceDiagnosticsExtension.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudservicediagnosticsextension schema: 2.0.0 @@ -13,10 +13,11 @@ Create a in-memory object for Diagnostics Extension ## SYNTAX ``` -New-AzCloudServiceDiagnosticsExtension [-Name] [-ResourceGroupName] - [-CloudServiceName] [-DiagnosticsConfigurationPath] [-StorageAccountName] - [-StorageAccountKey] [[-Subscription] ] [[-TypeHandlerVersion] ] - [[-RolesAppliedTo] ] [[-AutoUpgradeMinorVersion] ] [] +New-AzCloudServiceDiagnosticsExtension [[-Subscription] ] [-Name] + [-ResourceGroupName] [-CloudServiceName] [-DiagnosticsConfigurationPath] + [-StorageAccountName] [-StorageAccountKey] [[-TypeHandlerVersion] ] + [[-RolesAppliedTo] ] [[-AutoUpgradeMinorVersion] ] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -45,7 +46,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 9 +Position: 10 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -60,7 +61,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 3 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -76,7 +77,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 4 +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -91,7 +92,22 @@ Parameter Sets: (All) Aliases: Required: True -Position: 0 +Position: 1 +Default value: None +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 @@ -106,7 +122,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 2 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -121,7 +137,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 8 +Position: 9 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -136,7 +152,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 6 +Position: 7 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -151,7 +167,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 5 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -166,7 +182,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 1 +Position: 2 Default value: (Get-AzContext).Subscription.Id Accept pipeline input: False Accept wildcard characters: False @@ -181,7 +197,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 7 +Position: 8 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -198,7 +214,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/New-AzCloudServiceExtensionObject.md b/src/CloudService/CloudService/help/New-AzCloudServiceExtensionObject.md index 4399ea3e9893..d435531e84ae 100644 --- a/src/CloudService/CloudService/help/New-AzCloudServiceExtensionObject.md +++ b/src/CloudService/CloudService/help/New-AzCloudServiceExtensionObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudserviceextensionobject schema: 2.0.0 @@ -15,7 +15,7 @@ Create a in-memory object for Extension ``` New-AzCloudServiceExtensionObject [-AutoUpgradeMinorVersion ] [-Name ] [-ProtectedSetting ] [-Publisher ] [-RolesAppliedTo ] [-Setting ] - [-Type ] [-TypeHandlerVersion ] [] + [-Type ] [-TypeHandlerVersion ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -63,6 +63,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 +``` + ### -ProtectedSetting Protected settings for the extension which are encrypted before sent to the VM. @@ -164,7 +179,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/New-AzCloudServiceLoadBalancerConfigurationObject.md b/src/CloudService/CloudService/help/New-AzCloudServiceLoadBalancerConfigurationObject.md index a55c98311cc3..c5121f4048bc 100644 --- a/src/CloudService/CloudService/help/New-AzCloudServiceLoadBalancerConfigurationObject.md +++ b/src/CloudService/CloudService/help/New-AzCloudServiceLoadBalancerConfigurationObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudserviceloadbalancerconfigurationobject schema: 2.0.0 @@ -14,7 +14,8 @@ Create a in-memory object for LoadBalancerConfiguration ``` New-AzCloudServiceLoadBalancerConfigurationObject - [-FrontendIPConfiguration ] [-Name ] [] + [-FrontendIPConfiguration ] [-Name ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -65,6 +66,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). @@ -76,18 +92,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`FRONTENDIPCONFIGURATION `: FrontendIPConfiguration. - - `Name `: The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. - - `[PrivateIPAddress ]`: The virtual network private IP address of the IP configuration. - - `[PublicIPAddressId ]`: Resource Id - - `[SubnetId ]`: Resource Id - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject.md b/src/CloudService/CloudService/help/New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject.md index 192fce805498..07010d7d17e2 100644 --- a/src/CloudService/CloudService/help/New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject.md +++ b/src/CloudService/CloudService/help/New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudserviceloadbalancerfrontendipconfigurationobject schema: 2.0.0 @@ -15,13 +15,13 @@ Create a in-memory object for LoadBalancerFrontendIPConfiguration ### DefaultParameterSet (Default) ``` New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject [-Name ] [-PublicIPAddressId ] - [] + [-ProgressAction ] [] ``` ### PrivateIP ``` New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject [-Name ] [-PrivateIPAddress ] - [-SubnetId ] [] + [-SubnetId ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -45,7 +45,6 @@ For more details see New-AzCloudService. $subnet = New-AzVirtualNetworkSubnetConfig -Name "WebTier" -AddressPrefix "10.0.0.0/24" -WarningAction SilentlyContinue $feIpConfig = New-AzCloudServiceLoadBalancerFrontendIPConfigurationObject -Name 'ContosoFe' -privateIPAddress '10.0.0.6' -subnetId $Subnet.Id $loadBalancerConfig = New-AzCloudServiceLoadBalancerConfigurationObject -Name 'ContosoLB' -FrontendIPConfiguration $feIpConfig - ``` This command creates load balancer frontend IP configuration object with a Private IP address @@ -82,6 +81,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 +``` + ### -PublicIPAddressId Resource Id. @@ -123,7 +137,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/New-AzCloudServiceRemoteDesktopExtensionObject.md b/src/CloudService/CloudService/help/New-AzCloudServiceRemoteDesktopExtensionObject.md index 022a06daeade..a1b342f44110 100644 --- a/src/CloudService/CloudService/help/New-AzCloudServiceRemoteDesktopExtensionObject.md +++ b/src/CloudService/CloudService/help/New-AzCloudServiceRemoteDesktopExtensionObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudserviceremotedesktopextensionobject schema: 2.0.0 @@ -15,7 +15,7 @@ Create a in-memory object for Remote Desktop Extension ``` New-AzCloudServiceRemoteDesktopExtensionObject [-Name] [-Credential] [[-Expiration] ] [[-TypeHandlerVersion] ] [[-RolesAppliedTo] ] - [[-AutoUpgradeMinorVersion] ] [] + [[-AutoUpgradeMinorVersion] ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -44,7 +44,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 5 +Position: 6 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -59,7 +59,7 @@ Parameter Sets: (All) Aliases: Required: True -Position: 1 +Position: 2 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -74,7 +74,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 2 +Position: 3 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -89,7 +89,22 @@ Parameter Sets: (All) Aliases: Required: True -Position: 0 +Position: 1 +Default value: None +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 @@ -104,7 +119,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 4 +Position: 5 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -119,7 +134,7 @@ Parameter Sets: (All) Aliases: Required: False -Position: 3 +Position: 4 Default value: None Accept pipeline input: False Accept wildcard characters: False @@ -136,7 +151,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/New-AzCloudServiceRoleProfilePropertiesObject.md b/src/CloudService/CloudService/help/New-AzCloudServiceRoleProfilePropertiesObject.md index a9d4f6ed4153..83ef665488e5 100644 --- a/src/CloudService/CloudService/help/New-AzCloudServiceRoleProfilePropertiesObject.md +++ b/src/CloudService/CloudService/help/New-AzCloudServiceRoleProfilePropertiesObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudserviceroleprofilepropertiesobject schema: 2.0.0 @@ -14,7 +14,7 @@ Create a in-memory object for CloudServiceRoleProfileProperties ``` New-AzCloudServiceRoleProfilePropertiesObject [-Name ] [-SkuCapacity ] [-SkuName ] - [-SkuTier ] [] + [-SkuTier ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -47,6 +47,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 +``` + ### -SkuCapacity Specifies the number of role instances in the cloud service. @@ -103,7 +118,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/New-AzCloudServiceVaultSecretGroupObject.md b/src/CloudService/CloudService/help/New-AzCloudServiceVaultSecretGroupObject.md index 45e953ac8ea6..4c2c7616d30d 100644 --- a/src/CloudService/CloudService/help/New-AzCloudServiceVaultSecretGroupObject.md +++ b/src/CloudService/CloudService/help/New-AzCloudServiceVaultSecretGroupObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/new-azcloudservicevaultsecretgroupobject schema: 2.0.0 @@ -13,7 +13,8 @@ Create a in-memory object for Vault Secret Group ## SYNTAX ``` -New-AzCloudServiceVaultSecretGroupObject [-CertificateUrl ] [-Id ] [] +New-AzCloudServiceVaultSecretGroupObject [-Id ] [-CertificateUrl ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -63,6 +64,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). @@ -74,7 +90,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Remove-AzCloudService.md b/src/CloudService/CloudService/help/Remove-AzCloudService.md index 8a9ecaffa83e..37f06d05f304 100644 --- a/src/CloudService/CloudService/help/Remove-AzCloudService.md +++ b/src/CloudService/CloudService/help/Remove-AzCloudService.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/remove-azcloudservice schema: 2.0.0 @@ -15,13 +15,14 @@ Deletes a cloud service. ### Delete (Default) ``` Remove-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzCloudService -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -130,6 +131,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 Name of the resource group. @@ -205,27 +221,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Remove-AzCloudServiceRoleInstance.md b/src/CloudService/CloudService/help/Remove-AzCloudServiceRoleInstance.md index 73f300c240bb..93264f1ac1f5 100644 --- a/src/CloudService/CloudService/help/Remove-AzCloudServiceRoleInstance.md +++ b/src/CloudService/CloudService/help/Remove-AzCloudServiceRoleInstance.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/remove-azcloudserviceroleinstance schema: 2.0.0 @@ -15,14 +15,15 @@ Deletes role instances in a cloud service. ### DeleteExpanded (Default) ``` Remove-AzCloudServiceRoleInstance -CloudServiceName -ResourceGroupName - -RoleInstance [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-SubscriptionId ] -RoleInstance [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentityExpanded ``` Remove-AzCloudServiceRoleInstance -InputObject -RoleInstance - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -131,6 +132,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 Name of the resource group. @@ -222,27 +238,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Restart-AzCloudService.md b/src/CloudService/CloudService/help/Restart-AzCloudService.md index 2ca51b1621d8..966573fb21e6 100644 --- a/src/CloudService/CloudService/help/Restart-AzCloudService.md +++ b/src/CloudService/CloudService/help/Restart-AzCloudService.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/restart-azcloudservice schema: 2.0.0 @@ -14,15 +14,16 @@ Restarts one or more role instances in a cloud service. ### RestartExpanded (Default) ``` -Restart-AzCloudService -Name -ResourceGroupName -RoleInstance - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] - [] +Restart-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] + -RoleInstance [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RestartViaIdentityExpanded ``` Restart-AzCloudService -InputObject -RoleInstance - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -139,6 +140,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 Name of the resource group. @@ -230,27 +246,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Restart-AzCloudServiceRoleInstance.md b/src/CloudService/CloudService/help/Restart-AzCloudServiceRoleInstance.md index f93051417def..f6932c1e60b9 100644 --- a/src/CloudService/CloudService/help/Restart-AzCloudServiceRoleInstance.md +++ b/src/CloudService/CloudService/help/Restart-AzCloudServiceRoleInstance.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/restart-azcloudserviceroleinstance schema: 2.0.0 @@ -16,13 +16,13 @@ The Reboot Role Instance asynchronous operation requests a reboot of a role inst ``` Restart-AzCloudServiceRoleInstance -CloudServiceName -ResourceGroupName -RoleInstanceName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RestartViaIdentity ``` Restart-AzCloudServiceRoleInstance -InputObject [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -131,6 +131,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 Name of the resource group. @@ -221,27 +236,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Set-AzCloudServiceUpdateDomain.md b/src/CloudService/CloudService/help/Set-AzCloudServiceUpdateDomain.md index 0698e154be8c..ad72b1f01c89 100644 --- a/src/CloudService/CloudService/help/Set-AzCloudServiceUpdateDomain.md +++ b/src/CloudService/CloudService/help/Set-AzCloudServiceUpdateDomain.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/set-azcloudserviceupdatedomain schema: 2.0.0 @@ -14,8 +14,8 @@ Updates the role instances in the specified update domain. ``` Set-AzCloudServiceUpdateDomain -CloudServiceName -ResourceGroupName -UpdateDomain - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] - [] + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -108,6 +108,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 Name of the resource group. @@ -197,7 +212,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Start-AzCloudService.md b/src/CloudService/CloudService/help/Start-AzCloudService.md index a6cc72a2cf69..4c822a48da0d 100644 --- a/src/CloudService/CloudService/help/Start-AzCloudService.md +++ b/src/CloudService/CloudService/help/Start-AzCloudService.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/start-azcloudservice schema: 2.0.0 @@ -15,13 +15,14 @@ Starts the cloud service. ### Start (Default) ``` Start-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### StartViaIdentity ``` Start-AzCloudService -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -34,7 +35,7 @@ Starts the cloud service. Start-AzCloudService -ResourceGroupName "ContosOrg" -CloudServiceName "ContosoCS" ``` -This command starts all the role instances that belong to the cloud service named ContosoCS. +This command starts all the role instances that belong to the the cloud service named ContosoCS. ## PARAMETERS @@ -130,6 +131,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 Name of the resource group. @@ -205,27 +221,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Stop-AzCloudService.md b/src/CloudService/CloudService/help/Stop-AzCloudService.md index 0791be9ad824..b3b50b148687 100644 --- a/src/CloudService/CloudService/help/Stop-AzCloudService.md +++ b/src/CloudService/CloudService/help/Stop-AzCloudService.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/stop-azcloudservice schema: 2.0.0 @@ -16,13 +16,14 @@ Note that resources are still attached and you are getting charged for the resou ### PowerOff (Default) ``` Stop-AzCloudService -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### PowerOffViaIdentity ``` Stop-AzCloudService -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -132,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 Name of the resource group. @@ -207,27 +223,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Switch-AzCloudService.md b/src/CloudService/CloudService/help/Switch-AzCloudService.md index c295e972d0d2..d51cc38ac45b 100644 --- a/src/CloudService/CloudService/help/Switch-AzCloudService.md +++ b/src/CloudService/CloudService/help/Switch-AzCloudService.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/Switch-AzCloudService schema: 2.0.0 @@ -14,14 +14,16 @@ Swaps VIPs between two cloud service (extended support) load balancers. ### CloudServiceName (Default) ``` -Switch-AzCloudService -CloudServiceName -ResourceGroupName [-SubscriptionId ] - [-Async] [-DefaultProfile ] [-AsJob] [-Confirm] [-WhatIf] [] +Switch-AzCloudService -ResourceGroupName -CloudServiceName [-SubscriptionId ] + [-Async] [-DefaultProfile ] [-AsJob] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### CloudService ``` -Switch-AzCloudService -CloudService [-SubscriptionId ] [-Async] - [-DefaultProfile ] [-AsJob] [-Confirm] [-WhatIf] [] +Switch-AzCloudService [-SubscriptionId ] -CloudService [-Async] + [-DefaultProfile ] [-AsJob] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -65,7 +67,6 @@ Accept wildcard characters: False ### -Async - ```yaml Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) @@ -95,7 +96,6 @@ Accept wildcard characters: False ### -CloudServiceName - ```yaml Type: System.String Parameter Sets: CloudServiceName @@ -123,8 +123,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -ResourceGroupName +### -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 ```yaml Type: System.String @@ -196,60 +210,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`CLOUDSERVICE `: - - `Location `: Resource location. - - `[AllowModelOverride ]`: (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. The default value is `false`. - - `[Configuration ]`: Specifies the XML service configuration (.cscfg) for the cloud service. - - `[ConfigurationUrl ]`: Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. This is a write-only property and is not returned in GET calls. - - `[ExtensionProfile ]`: Describes a cloud service extension profile. - - `[Extension ]`: List of extensions for the cloud service. - - `[AutoUpgradeMinorVersion ]`: Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. - - `[ForceUpdateTag ]`: Tag to force apply the provided public and protected settings. Changing the tag value allows for re-running the extension without changing any of the public or protected settings. If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and it is up to handler implementation whether to re-run it or not - - `[Name ]`: The name of the extension. - - `[ProtectedSetting ]`: Protected settings for the extension which are encrypted before sent to the role instance. - - `[ProtectedSettingFromKeyVaultSecretUrl ]`: Secret URL which contains the protected settings of the extension - - `[Publisher ]`: The name of the extension handler publisher. - - `[RolesAppliedTo ]`: Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service. - - `[Setting ]`: Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension. - - `[SourceVaultId ]`: Resource Id - - `[Type ]`: Specifies the type of the extension. - - `[TypeHandlerVersion ]`: Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance. - - `[NetworkProfile ]`: Network Profile for the cloud service. - - `[LoadBalancerConfiguration ]`: List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a Public Load Balancer and an Internal Load Balancer. - - `FrontendIPConfiguration `: Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. - - `Name `: The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. - - `[PrivateIPAddress ]`: The virtual network private IP address of the IP configuration. - - `[PublicIPAddressId ]`: Resource Id - - `[SubnetId ]`: Resource Id - - `Name `: The name of the Load balancer - - `[Id ]`: Resource Id - - `[SlotType ]`: Slot type for the cloud service. Possible values are

**Production**

**Staging**

If not specified, the default value is Production. - - `[SwappableCloudService ]`: The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap. This property cannot be updated once it is set. The swappable cloud service referred by this id must be present otherwise an error will be thrown. - - `[Id ]`: Resource Id - - `[OSProfile ]`: Describes the OS profile for the cloud service. - - `[Secret ]`: Specifies set of certificates that should be installed onto the role instances. - - `[SourceVaultId ]`: Resource Id - - `[VaultCertificate ]`: The list of key vault references in SourceVault which contain certificates. - - `[CertificateUrl ]`: This is the URL of a certificate that has been uploaded to Key Vault as a secret. - - `[PackageUrl ]`: Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. This is a write-only property and is not returned in GET calls. - - `[RoleProfile ]`: Describes the role profile for the cloud service. - - `[Role ]`: List of roles for the cloud service. - - `[Name ]`: Resource name. - - `[SkuCapacity ]`: Specifies the number of role instances in the cloud service. - - `[SkuName ]`: The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku. - - `[SkuTier ]`: Specifies the tier of the cloud service. Possible Values are

**Standard**

**Basic** - - `[StartCloudService ]`: (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. - - `[Tag ]`: Resource tags. - - `[(Any) ]`: This indicates any property can be added to this object. - - `[UpgradeMode ]`: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. Possible Values are

**Auto**

**Manual**

**Simultaneous**

If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. - - `[Zone ]`: List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional. - ## RELATED LINKS - diff --git a/src/CloudService/CloudService/help/Update-AzCloudService.md b/src/CloudService/CloudService/help/Update-AzCloudService.md index 8eb298bcdee0..aa8bf492d60a 100644 --- a/src/CloudService/CloudService/help/Update-AzCloudService.md +++ b/src/CloudService/CloudService/help/Update-AzCloudService.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CloudService-help.xml Module Name: Az.CloudService online version: https://learn.microsoft.com/powershell/module/az.cloudservice/update-azcloudservice schema: 2.0.0 @@ -15,7 +15,8 @@ Please note some properties can be set only during cloud service creation. ``` Update-AzCloudService -InputObject -Parameter - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -163,6 +164,21 @@ Accept pipeline input: True (ByValue) 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 +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. @@ -209,75 +225,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[CloudServiceName ]`: Name of the cloud service. - - `[IPConfigurationName ]`: The IP configuration name. - - `[Id ]`: Resource identity path - - `[Location ]`: Name of the location that the OS version pertains to. - - `[NetworkInterfaceName ]`: The name of the network interface. - - `[OSFamilyName ]`: Name of the OS family. - - `[OSVersionName ]`: Name of the OS version. - - `[PublicIPAddressName ]`: The name of the public IP Address. - - `[ResourceGroupName ]`: Name of the resource group. - - `[RoleInstanceName ]`: Name of the role instance. - - `[RoleName ]`: Name of the role. - - `[SubscriptionId ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - - `[UpdateDomain ]`: Specifies an integer value that identifies the update domain. Update domains are identified with a zero-based index: the first update domain has an ID of 0, the second has an ID of 1, and so on. - -`PARAMETER `: Describes the cloud service. - - `Location `: Resource location. - - `[AllowModelOverride ]`: (Optional) Indicates whether the role sku properties (roleProfile.roles.sku) specified in the model/template should override the role instance count and vm size specified in the .cscfg and .csdef respectively. The default value is `false`. - - `[Configuration ]`: Specifies the XML service configuration (.cscfg) for the cloud service. - - `[ConfigurationUrl ]`: Specifies a URL that refers to the location of the service configuration in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. This is a write-only property and is not returned in GET calls. - - `[ExtensionProfile ]`: Describes a cloud service extension profile. - - `[Extension ]`: List of extensions for the cloud service. - - `[AutoUpgradeMinorVersion ]`: Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available. - - `[ForceUpdateTag ]`: Tag to force apply the provided public and protected settings. Changing the tag value allows for re-running the extension without changing any of the public or protected settings. If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and it is up to handler implementation whether to re-run it or not - - `[Name ]`: The name of the extension. - - `[ProtectedSetting ]`: Protected settings for the extension which are encrypted before sent to the role instance. - - `[ProtectedSettingFromKeyVaultSecretUrl ]`: Secret URL which contains the protected settings of the extension - - `[Publisher ]`: The name of the extension handler publisher. - - `[RolesAppliedTo ]`: Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service. - - `[Setting ]`: Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension. - - `[SourceVaultId ]`: Resource Id - - `[Type ]`: Specifies the type of the extension. - - `[TypeHandlerVersion ]`: Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance. - - `[NetworkProfile ]`: Network Profile for the cloud service. - - `[LoadBalancerConfiguration ]`: List of Load balancer configurations. Cloud service can have up to two load balancer configurations, corresponding to a Public Load Balancer and an Internal Load Balancer. - - `FrontendIPConfiguration `: Specifies the frontend IP to be used for the load balancer. Only IPv4 frontend IP address is supported. Each load balancer configuration must have exactly one frontend IP configuration. - - `Name `: The name of the resource that is unique within the set of frontend IP configurations used by the load balancer. This name can be used to access the resource. - - `[PrivateIPAddress ]`: The virtual network private IP address of the IP configuration. - - `[PublicIPAddressId ]`: Resource Id - - `[SubnetId ]`: Resource Id - - `Name `: The name of the Load balancer - - `[Id ]`: Resource Id - - `[SlotType ]`: Slot type for the cloud service. Possible values are

**Production**

**Staging**

If not specified, the default value is Production. - - `[SwappableCloudService ]`: The id reference of the cloud service containing the target IP with which the subject cloud service can perform a swap. This property cannot be updated once it is set. The swappable cloud service referred by this id must be present otherwise an error will be thrown. - - `[Id ]`: Resource Id - - `[OSProfile ]`: Describes the OS profile for the cloud service. - - `[Secret ]`: Specifies set of certificates that should be installed onto the role instances. - - `[SourceVaultId ]`: Resource Id - - `[VaultCertificate ]`: The list of key vault references in SourceVault which contain certificates. - - `[CertificateUrl ]`: This is the URL of a certificate that has been uploaded to Key Vault as a secret. - - `[PackageUrl ]`: Specifies a URL that refers to the location of the service package in the Blob service. The service package URL can be Shared Access Signature (SAS) URI from any storage account. This is a write-only property and is not returned in GET calls. - - `[RoleProfile ]`: Describes the role profile for the cloud service. - - `[Role ]`: List of roles for the cloud service. - - `[Name ]`: Resource name. - - `[SkuCapacity ]`: Specifies the number of role instances in the cloud service. - - `[SkuName ]`: The sku name. NOTE: If the new SKU is not supported on the hardware the cloud service is currently on, you need to delete and recreate the cloud service or move back to the old sku. - - `[SkuTier ]`: Specifies the tier of the cloud service. Possible Values are

**Standard**

**Basic** - - `[StartCloudService ]`: (Optional) Indicates whether to start the cloud service immediately after it is created. The default value is `true`. If false, the service model is still deployed, but the code is not run immediately. Instead, the service is PoweredOff until you call Start, at which time the service will be started. A deployed service still incurs charges, even if it is poweredoff. - - `[Tag ]`: Resource tags. - - `[(Any) ]`: This indicates any property can be added to this object. - - `[UpgradeMode ]`: Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. Possible Values are

**Auto**

**Manual**

**Simultaneous**

If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. - - `[Zone ]`: List of logical availability zone of the resource. List should contain only 1 zone where cloud service should be provisioned. This field is optional. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/Az.ConnectedNetwork.psd1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/Az.ConnectedNetwork.psd1 index d001c12b3aa1..78c8459c0bb9 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/Az.ConnectedNetwork.psd1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/Az.ConnectedNetwork.psd1 @@ -1,161 +1,24 @@ -# -# Module manifest for module 'Az.ConnectedNetwork' -# -# Generated by: Microsoft Corporation -# -# Generated on: 2/24/2022 -# - @{ - -# Script module or binary module file associated with this manifest. -RootModule = './Az.ConnectedNetwork.psm1' - -# Version number of this module. -ModuleVersion = '0.1.0' - -# Supported PSEditions -CompatiblePSEditions = 'Core', 'Desktop' - -# ID used to uniquely identify this module -GUID = '86910398-1fa6-447a-8b10-54e0ac5a2a6a' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = 'Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Microsoft Azure PowerShell: ConnectedNetwork cmdlets' - -# Minimum version of the PowerShell engine required by this module -PowerShellVersion = '5.1' - -# Name of the PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -DotNetFrameworkVersion = '4.7.2' - -# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# ClrVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.7.4'; }) - -# Assemblies that must be loaded prior to importing this module -RequiredAssemblies = './bin/Az.ConnectedNetwork.private.dll' - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = './Az.ConnectedNetwork.format.ps1xml' - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions 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 functions to export. -FunctionsToExport = 'Get-AzConnectedNetworkDevice', - 'Get-AzConnectedNetworkDeviceRegistrationKey', - 'Get-AzConnectedNetworkFunction', - 'Get-AzConnectedNetworkFunctionVendor', - 'Get-AzConnectedNetworkVendor', - 'Get-AzConnectedNetworkVendorFunction', - 'Get-AzConnectedNetworkVendorFunctionRoleInstance', - 'Get-AzConnectedNetworkVendorSku', - 'Get-AzConnectedNetworkVendorSkuPreview', - 'New-AzConnectedNetworkAzureStackEdgeObject', - 'New-AzConnectedNetworkDevice', 'New-AzConnectedNetworkFunction', - 'New-AzConnectedNetworkFunctionRoleConfigurationObject', - 'New-AzConnectedNetworkFunctionUserConfigurationObject', - 'New-AzConnectedNetworkFunctionVendorConfigurationObject', - 'New-AzConnectedNetworkInterfaceIPConfigurationObject', - 'New-AzConnectedNetworkInterfaceObject', - 'New-AzConnectedNetworkVendor', - 'New-AzConnectedNetworkVendorFunction', - 'New-AzConnectedNetworkVendorSku', - 'New-AzConnectedNetworkVendorSkuPreview', - 'Remove-AzConnectedNetworkDevice', - 'Remove-AzConnectedNetworkFunction', - 'Remove-AzConnectedNetworkVendor', - 'Remove-AzConnectedNetworkVendorSku', - 'Remove-AzConnectedNetworkVendorSkuPreview', - 'Restart-AzConnectedNetworkVendorFunctionRoleInstance', - 'Start-AzConnectedNetworkVendorFunctionRoleInstance', - 'Stop-AzConnectedNetworkVendorFunctionRoleInstance', - 'Update-AzConnectedNetworkDeviceTag', - 'Update-AzConnectedNetworkFunctionTag' - -# Cmdlets 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 cmdlets to export. -CmdletsToExport = @() - -# Variables to export from this module -# 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 = '*' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - + GUID = '86910398-1fa6-447a-8b10-54e0ac5a2a6a' + RootModule = './Az.ConnectedNetwork.psm1' + ModuleVersion = '0.1.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: ConnectedNetwork cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.ConnectedNetwork.private.dll' + FormatsToProcess = './Az.ConnectedNetwork.format.ps1xml' + FunctionsToExport = 'Get-AzConnectedNetworkDevice', 'Get-AzConnectedNetworkDeviceRegistrationKey', 'Get-AzConnectedNetworkFunction', 'Get-AzConnectedNetworkFunctionVendor', 'Get-AzConnectedNetworkVendor', 'Get-AzConnectedNetworkVendorFunction', 'Get-AzConnectedNetworkVendorFunctionRoleInstance', 'Get-AzConnectedNetworkVendorSku', 'Get-AzConnectedNetworkVendorSkuPreview', 'New-AzConnectedNetworkAzureStackEdgeObject', 'New-AzConnectedNetworkDevice', 'New-AzConnectedNetworkFunction', 'New-AzConnectedNetworkFunctionRoleConfigurationObject', 'New-AzConnectedNetworkFunctionUserConfigurationObject', 'New-AzConnectedNetworkFunctionVendorConfigurationObject', 'New-AzConnectedNetworkInterfaceIPConfigurationObject', 'New-AzConnectedNetworkInterfaceObject', 'New-AzConnectedNetworkVendor', 'New-AzConnectedNetworkVendorFunction', 'New-AzConnectedNetworkVendorSku', 'New-AzConnectedNetworkVendorSkuPreview', 'Remove-AzConnectedNetworkDevice', 'Remove-AzConnectedNetworkFunction', 'Remove-AzConnectedNetworkVendor', 'Remove-AzConnectedNetworkVendorSku', 'Remove-AzConnectedNetworkVendorSkuPreview', 'Restart-AzConnectedNetworkVendorFunctionRoleInstance', 'Start-AzConnectedNetworkVendorFunctionRoleInstance', 'Stop-AzConnectedNetworkVendorFunctionRoleInstance', 'Update-AzConnectedNetworkDeviceTag', 'Update-AzConnectedNetworkFunctionTag', '*' + AliasesToExport = '*' + PrivateData = @{ PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','ConnectedNetwork' - - # A URL to the license for this module. - LicenseUri = 'https://aka.ms/azps-license' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/Azure/azure-powershell' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - # ReleaseNotes = '' - - # Prerelease string of this module - # Prerelease = '' - - # Flag to indicate whether the module requires explicit user acceptance for install/update/save - # RequireLicenseAcceptance = $false - - # External dependent modules of this module - # ExternalModuleDependencies = @() - - } # End of PSData hashtable - - } # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ConnectedNetwork' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } } - diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/Az.ConnectedNetwork.psm1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/Az.ConnectedNetwork.psm1 index ddd8657e9b3d..5574c8777685 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/Az.ConnectedNetwork.psm1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/Az.ConnectedNetwork.psm1 @@ -25,17 +25,17 @@ } } if(-not $accountsModule) { - $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.2.3' } | Measure-Object).Count -gt 0 + $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0 if($hasAdequateVersion) { - $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.2.3 -Scope Global -PassThru + $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru } } } if(-not $accountsModule) { - Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop - } elseif (($accountsModule.Version -lt [System.Version]'2.2.3') -and (-not $localAccounts)) { - Write-Error "`nThis module requires $accountsName version 2.2.3 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop + } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop } Write-Information "Loaded Module '$($accountsModule.Name)'" @@ -47,33 +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.ConnectedNetwork.custom.psm1' if(Test-Path $customModulePath) { $null = Import-Module -Name $customModulePath } - + # Export nothing to clear implicit exports Export-ModuleMember @@ -93,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/ConnectedNetwork/ConnectedNetwork.Autorest/README.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/README.md index adb394a19662..1f797f74a45a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/README.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/README.md @@ -3,7 +3,6 @@ This directory contains the PowerShell module for the ConnectedNetwork service. --- - ## Info - Modifiable: yes - Generated: all @@ -15,7 +14,7 @@ This directory contains the PowerShell module for the ConnectedNetwork service. This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. ## Module Requirements -- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.2.3 or greater +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater ## Authentication AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. @@ -28,9 +27,9 @@ For information on how to develop for `Az.ConnectedNetwork`, see [how-to.md](how > see https://aka.ms/autorest ``` yaml -branch: 5f32b50e18ed0a91eefe39287078bf66c4d6c3a8 +commit: 5f32b50e18ed0a91eefe39287078bf66c4d6c3a8 require: - - $(this-folder)/../readme.azure.noprofile.md + - $(this-folder)/../../readme.azure.noprofile.md input-file: - $(repo)/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/common.json - $(repo)/specification/hybridnetwork/resource-manager/Microsoft.HybridNetwork/stable/2021-05-01/networkFunction.json @@ -46,6 +45,10 @@ identity-correction-for-post: true resourcegroup-append: true nested-object-to-string: true +# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option +use-extension: + "@autorest/powershell": "3.x" + directive: - where: variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/build-module.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/build-module.ps1 index cce41778d072..b24e1bf11443 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/build-module.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/build-module.ps1 @@ -123,6 +123,10 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' $modelCmdlets = @() +$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets' +if (Test-Path $modelCmdletFolder) { + $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder +} if ($modelCmdlets.Count -gt 0) { . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') CreateModelCmdlet($modelCmdlets) @@ -139,7 +143,8 @@ if($NoDocs) { $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue } $null = New-Item -ItemType Directory -Force -Path $docsFolder - Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo } Write-Host -ForegroundColor Green 'Creating format.ps1xml...' @@ -158,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol Write-Host -ForegroundColor Green 'Creating example stubs...' Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder +if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) +{ + Write-Host -ForegroundColor Green 'Creating ux metadata...' + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') +} + Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/check-dependencies.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/check-dependencies.ps1 index b02ae9135957..c29591c7bfe1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/check-dependencies.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/check-dependencies.ps1 @@ -25,7 +25,7 @@ if(-not $Isolated) { function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) { if($predicate) { $module = Get-Module -ListAvailable -Name $moduleName - if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0)) { + if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) { $null = New-Item -ItemType Directory -Force -Path $path Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..." if ($requiredVersion) { @@ -47,7 +47,7 @@ if(Test-Path -Path $localModulesPath) { $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" } -DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.2.3' +DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5' DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1' $tools = Join-Path $PSScriptRoot 'tools' diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/create-model-cmdlets.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/create-model-cmdlets.ps1 index a673f67b4ca9..0e5e1f4e7280 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/create-model-cmdlets.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/create-model-cmdlets.ps1 @@ -23,9 +23,13 @@ function CreateModelCmdlet { } $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' - $ModuleName = 'Az.ConnectedNetwork'.Split(".")[1] $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' $null = New-Item -ItemType Directory -Force -Path $OutputDir + if (''.length -gt 0) { + $ModuleName = '' + } else { + $ModuleName = 'Az.ConnectedNetwork' + } $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs $Content = '' @@ -64,10 +68,10 @@ function CreateModelCmdlet { $ObjectType = $Model $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" # remove duplicated module name - if ($ObjectType.StartsWith($ModuleName)) { + if ($ObjectType.StartsWith('ConnectedNetwork')) { $ModulePrefix = '' } else { - $ModulePrefix = $ModuleName + $ModulePrefix = 'ConnectedNetwork' } $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir @@ -115,7 +119,9 @@ function CreateModelCmdlet { # check whether completer is needed $completer = ''; if($Type.Split('.').Split('.')[-2] -eq 'Support') { - $completer += "`n [ArgumentCompleter([${Type}])]" + # If Type is an array, need to strip [] + $strippedType = $Type.Replace('[]', '') + $completer += "`n [ArgumentCompleter([${strippedType}])]" } $ParameterDefineScript = " [Parameter($ParameterDefineProperty)]${completer} @@ -156,7 +162,7 @@ Create an in-memory object for ${ObjectType}. .Outputs ${ObjectTypeWithNamespace} .Link -https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object +https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object #> function New-Az${ModulePrefix}${ObjectType}Object { [OutputType('${ObjectTypeWithNamespace}')] diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkDevice.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkDevice.md index 8e643fbcb34e..8f630c339566 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkDevice.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkDevice.md @@ -1,8 +1,9 @@ ### Example 1: Get-AzConnectedNetworkDevice via Resource Group and Resource name ```powershell Get-AzConnectedNetworkDevice -ResourceGroupName myResources -Name myMecDevice +``` - +```output DeviceType : AzureStackEdge Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice Location : westcentralus @@ -28,8 +29,9 @@ Getting information about the NFM device in resource group myResources with name ```powershell $mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} Get-AzConnectedNetworkDevice -InputObject $mecDevice +``` - +```output DeviceType : AzureStackEdge Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice1 Location : eastus diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkDeviceRegistrationKey.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkDeviceRegistrationKey.md index 063f72c60974..d26085c6a155 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkDeviceRegistrationKey.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkDeviceRegistrationKey.md @@ -1,7 +1,9 @@ ### Example 1: Get-AzConnectedNetworkDeviceRegistrationKey using Resource Group, Resource name ```powershell Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources +``` +```output eyJNZWNEZXZpY2VUcmFuc2llbnRBdXRoS2V5IjoiMTIzNCIsIk1lY0RldmljZUF1dGhLZXlTdGFydFRpbWUiOiIyMDIxLTExLTIyVDA5OjQ2OjQwLjY0ODExOTFaIiwiU2VydmljZUJ1c1F1ZXVlTmFtZSI6ImFiY2QtMTIzNCIsIkFBREVuZHBvaW50IjpudWxsLCJBQURBdWRpZW5jZSI6bnVsbCwiQXJtUmVzb3VyY2VJZCI6bnVsbCwiTWVjQ29udHJvbGxlckVuZHBvaW50IjoiaHR0cHM6Ly93ZXN0Y2VudHJhbHVzLXByb2QubWVjZGV2aWNlLmF6dXJlLmNvbTo0NDMiLCJEYmVEZXZpY2VJZCI6bnVsbCwiUmVzb3VyY2VVbmlxdWVJZCI6IjEyMy1hYmMtMTIzIiwiU3Vic2NyaXB0aW9uSWQiOiJ4eHh4LTEyMzQteHh4eC0xMjM0IiwiUmVzb3VyY2VHcm91cE5hbWUiOiJzYW1wbGVSR25hbWUiLCJQcm92aWRlck5hbWVzcGFjZSI6Ik1pY3Jvc29mdC5IeWJyaWROZXR3b3JrIiwiUmVzb3VyY2VUeXBlIjoiRGV2aWNlcyIsIlJlc291cmNlVHlwZU5hbWUiOiJJREMtRGV2aWNlNC1XZXN0Q2VudHJhbCJ9 ``` @@ -10,7 +12,9 @@ Getting the registration key for NFM device in resource group myResources with r ### Example 2: Get-AzConnectedNetworkDeviceRegistrationKey using Resource Group, Resource name and Subscription Id ```powershell Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 +``` +```output eyJNZWNEZXZpY2VUcmFuc2llbnRBdXRoS2V5IjoiMTIzNCIsIk1lY0RldmljZUF1dGhLZXlTdGFydFRpbWUiOiIyMDIxLTExLTIyVDA5OjQ2OjQwLjY0ODExOTFaIiwiU2VydmljZUJ1c1F1ZXVlTmFtZSI6ImFiY2QtMTIzNCIsIkFBREVuZHBvaW50IjpudWxsLCJBQURBdWRpZW5jZSI6bnVsbCwiQXJtUmVzb3VyY2VJZCI6bnVsbCwiTWVjQ29udHJvbGxlckVuZHBvaW50IjoiaHR0cHM6Ly93ZXN0Y2VudHJhbHVzLXByb2QubWVjZGV2aWNlLmF6dXJlLmNvbTo0NDMiLCJEYmVEZXZpY2VJZCI6bnVsbCwiUmVzb3VyY2VVbmlxdWVJZCI6IjEyMy1hYmMtMTIzIiwiU3Vic2NyaXB0aW9uSWQiOiJ4eHh4LTEyMzQteHh4eC0xMjM0IiwiUmVzb3VyY2VHcm91cE5hbWUiOiJzYW1wbGVSR25hbWUiLCJQcm92aWRlck5hbWVzcGFjZSI6Ik1pY3Jvc29mdC5IeWJyaWROZXR3b3JrIiwiUmVzb3VyY2VUeXBlIjoiRGV2aWNlcyIsIlJlc291cmNlVHlwZU5hbWUiOiJJREMtRGV2aWNlNC1XZXN0Q2VudHJhbCJ9 ``` diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkFunction.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkFunction.md index 11aa04186caa..056283cb0ee0 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkFunction.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkFunction.md @@ -1,8 +1,9 @@ ### Example 1: Get-AzConnectedNetworkFunction via Resource group and Resource name ```powershell Get-AzConnectedNetworkFunction -Name myVnf -ResourceGroupName myResources +``` - +```output ContainerConfiguration : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations DeviceId : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMec Etag : "0000a530-0000-3400-0000-615c10fa0000" @@ -36,8 +37,9 @@ Getting information about the network function in resource group myResources wit ```powershell $vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} Get-AzConnectedNetworkFunction -InputObject $vnf +``` - +```output ContainerConfiguration : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations DeviceId : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMec1 Etag : "sampleEtagValue" diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkFunctionVendor.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkFunctionVendor.md index 56ad541f5e50..97919afcf78b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkFunctionVendor.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkFunctionVendor.md @@ -1,7 +1,9 @@ ### Example 1: Get-AzConnectedNetworkFunctionVendor ```powershell Get-AzConnectedNetworkFunctionVendor +``` +```output SkuList VendorName ------- ---------- {vendor-sku, vendor-sku1, vendor-sku2, vendor-sku3, vendor-sku4, vendor-sku4, vendor-sku5...} myVendor @@ -14,7 +16,9 @@ Getting information about the vendors and their skus ### Example 2: Get-AzConnectedNetworkFunctionVendor via Subscription Id ```powershell Get-AzConnectedNetworkFunctionVendor -SubscriptionId "xxxxx-00000-xxxxx-00000" +``` +```output SkuList VendorName ------- ---------- {vendor1-sku, vendor1-sku2} myVendor1 diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendor.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendor.md index 2e6a2772178f..2dfc8edd791a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendor.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendor.md @@ -1,8 +1,9 @@ ### Example 1: Get-AzConnectedNetworkVendor using vendor name ```powershell Get-AzConnectedNetworkVendor -Name myVendor +``` - +```output Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor Name : myVendor ProvisioningState : Succeeded @@ -24,8 +25,9 @@ Getting information about the vendor with vendor name myVendor. ```powershell $vendor = @{ VendorName = "myVendor1"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} Get-AzConnectedNetworkVendor -InputObject $vendor +``` - +```output Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor1 Name : myVendor1 ProvisioningState : Succeeded diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorFunction.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorFunction.md index 97136f772f95..241d155197c6 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorFunction.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorFunction.md @@ -1,7 +1,9 @@ ### Example 1: Get-AzConnectedNetworkVendorFunction via Location Name, Service Key and Subscription ```powershell Get-AzConnectedNetworkVendorFunction -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor +``` +```output Id : /subscriptions/xxxx-3333-xxxx-3333/providers/Microsoft.HybridNetwork/locations/centraluseuap/vendors/myVendor/networkfunctions/1b69005b-9168-4d74-a371-d4c4f6a521d 0 Name : 1234-abcd-4321-dcba @@ -27,7 +29,9 @@ Getting the information of a vendor network function with service key 1234-abcd- ```powershell $vendorNF = @{ ServiceKey = "1234-abcd-4321-dcba"; VendorName = "myVendor"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"} Get-AzConnectedNetworkVendorFunction -InputObject $vendorNF +``` +```output Id : /subscriptions/xxxx-3333-xxxx-3333/providers/Microsoft.HybridNetwork/locations/centraluseuap/vendors/myVendor/networkfunctions/1b69005b-9168-4d74-a371-d4c4f6a521d 0 Name : 1234-abcd-4321-dcba diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorFunctionRoleInstance.md index 8f1d0390b4a8..94babdae65fa 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorFunctionRoleInstance.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -1,7 +1,9 @@ ### Example 1: Get-AzConnectedNetworkVendorFunctionRoleInstance via Location, Service key, vendor name and role name ```powershell - Get-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name hpehss +Get-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name hpehss +``` +```output Id : Name : hpehss OperationalState : Running @@ -23,7 +25,9 @@ Getting the role instance information of role hpehss with Location centraluseuap ```powershell $role = @{ RoleInstanceName = "hpehss"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} Get-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role +``` +```output Id : Name : hpehss OperationalState : Stopped diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorSku.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorSku.md index 2afd01453fc2..37575860f749 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorSku.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorSku.md @@ -1,7 +1,9 @@ ### Example 1: Get-AzConnectedNetworkVendorSku using Vendor name and Subscription Id ```powershell Get-AzConnectedNetworkVendorSku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 +``` +```output DeploymentMode : PrivateEdgeZone Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor/VendorSkus/mySku ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationParameters diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorSkuPreview.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorSkuPreview.md index 4171cb06e2a5..30cf73c5ae49 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorSkuPreview.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Get-AzConnectedNetworkVendorSkuPreview.md @@ -1,7 +1,9 @@ ### Example 1: Get-AzConnectedNetworkVendorSkuPreview using sku name, vendor name and preview subscription ```powershell Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 +``` +```output Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-22222-xxxxx-22222 Name : xxxxx-22222-xxxxx-22222 ProvisioningState : Succeeded @@ -22,7 +24,9 @@ Getting the preview information of a vendor sku mySku with vendor myVendor for t ```powershell $skuPreview = @{ SkuName = "mySku"; VendorName = "myVendor"; PreviewSubscription = "xxxxx-22222-xxxxx-22222"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} Get-AzConnectedNetworkVendorSkuPreview -InputObject $skuPreview +``` +```output Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-22222-xxxxx-22222 Name : xxxxx-22222-xxxxx-22222 ProvisioningState : Succeeded diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkAzureStackEdgeObject.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkAzureStackEdgeObject.md index 881f902cd109..d69b7a2b1e57 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkAzureStackEdgeObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkAzureStackEdgeObject.md @@ -1,7 +1,9 @@ ### Example 1: Create a in-memory stored AzureStackEdgeFormat object for creating the device ```powershell New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" +``` +```output eviceType ProvisioningState Status ---------- ----------------- ------ AzureStackEdge diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkDevice.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkDevice.md index f26ef9507918..173ac34679a2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkDevice.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkDevice.md @@ -2,7 +2,9 @@ ```powershell $ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse" New-AzConnectedNetworkDevice -Name "myMecDevice" -ResourceGroupName "myResources" -Location "eastus" -Property $ase +``` +```output DeviceType : AzureStackEdge Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice Location : eastus @@ -28,7 +30,9 @@ Create a device with Device Name with resource myMecDevice name in Resource Grou ```powershell $ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" New-AzConnectedNetworkDevice -Name "myMecDevice1" -ResourceGroupName "myResources" -Location "eastus2euap" -Property $ase -SubscriptionId xxxxx-00000-xxxxx-00000 +``` +```output DeviceType : AzureStackEdge Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice1 Location : eastus diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkFunction.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkFunction.md index 58b6477fc05b..83d1d380f41a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkFunction.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkFunction.md @@ -7,7 +7,9 @@ $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mr $customData = "I2Nsb3VkLWNvbmZpZwp3cml0ZV9maWxlczoKLSBwYXRoOiAvdmFyL2xpYi9jbG91ZC9paHNzY29uZmlnLmpzb24KICBwZXJtaXNzaW9uczogJzA2NDQnCiAgb3duZXI6IHJvb3Q6cm9vdAogIGNvbnRlbnQ6IHwKICAgIHsKICAgICAgICAgICAiRGlhbWV0ZXJHVyI6ewogICAgICAgICAgICAgICAgICAiSE9TVElQQUREUkVTUyI6IjEyOC4wLjAuMSIsCiAgICAgICAgICAgICAgICAgICJGUUROIjoiaHNzLmF5VmVuZG9yLmNvbSIsCiAgICAgICAgICAgICAgICAgICJSRUFMTSI6Imhzcy5lcGMubXlWZW5kb3I5OS5teVZlbmRvci4zZ3BwbmV0d29yay5vcmciCiAgICAgICAgICAgfSwKICAgICAgICAgICAiREdXQmluZEFkZHIiOnsKICAgICAgICAgICAgICAgICAgIkFERFJFU1MiOiIxMjguMC4wLjIiLAogICAgICAgICAgICAgICAgICAiVFJBTlNQT1JUIjoiU0NUUCIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjozODY4CiAgICAgICAgICAgfSwKICAgICAgICAgICAiU05NUFRhcmdldCI6ewogICAgICAgICAgICAgICAgICAiSE9TVCI6IjEyOC4wLjAuMyIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjoiMTYyIiwKICAgICAgICAgICAgICAgICAgIlRSSUdHRVJfTEVWRUwiOiIzIgogICAgICAgICAgIH0sCiAgICAgICAgICAgIk1hbmFnZW1lbnQiOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNCIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjEvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAogICAgICAgICAgICJMYW4iOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNSIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjAvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAoKICAgIH0JCSAgCg==" $userconf = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -OSProfileCustomData $customData -RoleName "hpehss" New-AzConnectedNetworkFunction -Name vnf_Test1 -ResourceGroupName myResources -Location "eastus" -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_2111_020 -SkuName Affirmed-HSS-0527 -UserConfiguration $userconf -VendorName "AffirmedVendor" +``` +```output Location Name Etag ResourceGroupName -------- ---- ---- ----------------- eastus vnf_Test1 "SampleEtagvalue" myResources @@ -24,6 +26,9 @@ $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mr $userconfig2 = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName "hpehss" $vnf1 = New-AzConnectedNetworkFunction -Name vnftest11 -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_autotest_01 -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 -Location eastus2euap -SkuName staticSku -VendorName hssvendor01 -UserConfiguration $userconfig2 -verbose $v2.ServiceKey +``` + +```output abcd-sample-service-key-val-1234 ``` diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkFunctionRoleConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkFunctionRoleConfigurationObject.md index 6bb5bf8ddf62..7c6b34b49ecb 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkFunctionRoleConfigurationObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkFunctionRoleConfigurationObject.md @@ -7,7 +7,9 @@ $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mr $keyData = @{keyData = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb"; path = $Null} $key = @( $keyData) $role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName Disk1 -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" +``` +```output RoleName RoleType VirtualMachineSize -------- -------- ------------------ hpehss VirtualMachine Standard_D3_v2 diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkInterfaceIPConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkInterfaceIPConfigurationObject.md index 4d1d398bedb3..122e63cc63a4 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkInterfaceIPConfigurationObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkInterfaceIPConfigurationObject.md @@ -1,7 +1,9 @@ ### Example 1: Create a in-memory object for NetworkInterfaceIPConfiguration ```powershell New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +``` +```output DnsServer Gateway IPAddress IPAllocationMethod IPVersion Subnet --------- ------- --------- ------------------ --------- ------ Dynamic IPv4 diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkInterfaceObject.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkInterfaceObject.md index 8452251e651b..a7fc160ded68 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkInterfaceObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkInterfaceObject.md @@ -1,7 +1,9 @@ ### Example 1: Create a in-memory object for NetworkInterface ```powershell New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +``` +```output MacAddress Name VMSwitchType ---------- ---- ------------ mrmmanagementnic1 Management diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendor.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendor.md index 312a57fc97d0..a7afbb32505b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendor.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendor.md @@ -1,8 +1,9 @@ ### Example 1: New-AzConnectedNetworkVendor ```powershell New-AzConnectedNetworkVendor -Name myVendor +``` - +```output Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor Name : myVendor ProvisioningState : Succeeded @@ -22,8 +23,9 @@ Creating a vendor with name myVendor. ### Example 2: New-AzConnectedNetworkVendor with SubscriptionId ```powershell New-AzConnectedNetworkVendor -Name myVendor2 -SubscriptionId xxxxx-22222-xxxxx-22222 +``` - +```output Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor2 Name : myVendor2 ProvisioningState : Succeeded diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendorSku.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendorSku.md index bbc621ba4e9d..dbd4e317212b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendorSku.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendorSku.md @@ -2,7 +2,6 @@ ```powershell $role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName NetFoundry -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" New-AzConnectedNetworkVendorSku -SkuName sku1 -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 -SkuType VirtualMachine -DeploymentMode PrivateEdgeZone -NetworkFunctionRoleConfigurationType @($role) - ``` Creating NF role configuration object wuth the specified details. Using this to create sku with sku name sku1, vendor name myVendor, sku type VirtualMachine, deployment type PrivateEdgeZone. \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendorSkuPreview.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendorSkuPreview.md index cecb9c6db08d..562e6bc0798d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendorSkuPreview.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/New-AzConnectedNetworkVendorSkuPreview.md @@ -1,7 +1,9 @@ ### Example 1: New-AzConnectedNetworkVendorSkuPreview using preview subscription, sku name, vendor name and subscription ```powershell New-AzConnectedNetworkVendorSkuPreview -PreviewSubscription xxxxx-00000-xxxxx-00000 -SkuName mySku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 +``` +```output Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-00000-xxxxx-00000 Name : xxxxx-00000-xxxxx-00000 ProvisioningState : Succeeded diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkDevice.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkDevice.md index 7ef8400e8c34..e1ec2c2d0aa1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkDevice.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkDevice.md @@ -1,7 +1,6 @@ ### Example 1: Remove-AzConnectedNetworkDevice via resource name and resource group ```powershell Remove-AzConnectedNetworkDevice -Name myMecDevice -ResourceGroupName myResources - ``` Deleting the NFM device with device name myMecDevice in resource group myResources. @@ -10,7 +9,6 @@ Deleting the NFM device with device name myMecDevice in resource group myResourc ```powershell $mecDevice = Get-AzConnectedNetworkDevice -Name myMecDevice2 -ResourceGroupName myResources Remove-AzConnectedNetworkDevice -InputObject $mecDevice - ``` Creating an identity with name myMecDevice2 and resource group name myResources. Deleting the NFM device with the given identity. \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkFunction.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkFunction.md index 5b5312b86431..d8e6eef12bd4 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkFunction.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkFunction.md @@ -1,7 +1,6 @@ ### Example 1: Remove-AzConnectedNetworkFunction via Resource Group and Resource name ```powershell Remove-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf - ``` Deleting the Network Function in Resource Group myResources with name myVnf. @@ -10,7 +9,6 @@ Deleting the Network Function in Resource Group myResources with name myVnf. ```powershell $vnf = Get-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf1 Remove-AzConnectedNetworkFunction -InputObject $vnf - ``` Creating an identity with name myVnf1 and resource group name myResources. Deleting the Network Function with the given Identity. \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendor.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendor.md index 079ce547c7ce..89e75a18200f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendor.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendor.md @@ -1,7 +1,6 @@ ### Example 1: Remove-AzConnectedNetworkVendor via vendor name ```powershell Remove-AzConnectedNetworkVendor -Name MyVendor - ``` Deleting the vendor with name MyVendor @@ -10,7 +9,6 @@ Deleting the vendor with name MyVendor ```powershell $vendor = Get-AzConnectedNetworkVendor -Name MyVendor1 Remove-AzConnectedNetworkVendor -InputObject $vendor - ``` Deleting the vendor with name MyVendor1 \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendorSku.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendorSku.md index 395f10376582..5ba11e0b598b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendorSku.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendorSku.md @@ -1,7 +1,6 @@ ### Example 1: Remove-AzConnectedNetworkVendorSku via Sku name and Vendor name ```powershell Remove-AzConnectedNetworkVendorSku -SkuName MySku -VendorName MyVendor - ``` Deleting the sku MySku with Vendor name MyVendor. @@ -10,7 +9,6 @@ Deleting the sku MySku with Vendor name MyVendor. ```powershell $sku = Get-AzConnectedNetworkVendorSku -SkuName MySku1 -VendorName MyVendor Remove-AzConnectedNetworkVendorSku -InputObject $sku - ``` Creating an identity with sku name MySku1 and vendor name MyVendor. Deleting the sku with the given Identity. \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendorSkuPreview.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendorSkuPreview.md index 7374d75b7b87..533d35003863 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendorSkuPreview.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Remove-AzConnectedNetworkVendorSkuPreview.md @@ -1,7 +1,6 @@ ### Example 1: Remove-AzConnectedNetworkVendorSkuPreview via sku name, vendor name and preview subscription ```powershell Remove-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 - ``` Deleting the preview information of sku mySku with vendor name myVendor for the given preview subscription. @@ -10,7 +9,6 @@ Deleting the preview information of sku mySku with vendor name myVendor for the ```powershell $sku = Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku1 -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 Remove-AzConnectedNetworkVendorSkuPreview -InputObject $sku - ``` Creating an identity with skuname mySku1, vendor name myVendor and preview subscription. Deleting the preview information using the given identity. \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Restart-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Restart-AzConnectedNetworkVendorFunctionRoleInstance.md index 944c781d3747..c651a35a7fe6 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Restart-AzConnectedNetworkVendorFunctionRoleInstance.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Restart-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -1,7 +1,6 @@ ### Example 1: Restart-AzConnectedNetworkVendorFunctionRoleInstance via location, serviceKey, vendor name and role instance name ```powershell Restart-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 - ``` Restarting a role instance of a vendor network function with the specified serviceKey, location centraluseuap, vendor name myVendor and role instance name role1. @@ -10,7 +9,6 @@ Restarting a role instance of a vendor network function with the specified servi ```powershell $role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} Restart-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role - ``` Creating an identity with role instance name role1, location centraluseuap, vendor name myVendor specified subscription, serviceKey. Restarting a role instance with the given identity. \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Start-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Start-AzConnectedNetworkVendorFunctionRoleInstance.md index fa33bfc293c3..0a0ba8a73979 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Start-AzConnectedNetworkVendorFunctionRoleInstance.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Start-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -1,7 +1,6 @@ ### Example 1: Start-AzConnectedNetworkVendorFunctionRoleInstance via location, serviceKey, vendor name and role instance name ```powershell Start-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 - ``` Starting a role instance of a vendor network function with the specified serviceKey, location centraluseuap, vendor name myVendor and role instance name role1. @@ -10,7 +9,6 @@ Starting a role instance of a vendor network function with the specified service ```powershell $role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} Start-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role - ``` Creating an identity with role instance name role1, location centraluseuap, vendor name myVendor specified subscription, serviceKey. Starting a role instance with the given identity. \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Stop-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Stop-AzConnectedNetworkVendorFunctionRoleInstance.md index 4e6ae8a9aff1..4f0d18126c78 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Stop-AzConnectedNetworkVendorFunctionRoleInstance.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Stop-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -1,7 +1,6 @@ ### Example 1: Stop-AzConnectedNetworkVendorFunctionRoleInstance via location, serviceKey, vendor name and role instance name ```powershell Stop-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 - ``` Stoping a role instance of a vendor network function with the specified serviceKey, location centraluseuap, vendor name myVendor and role instance name role1. @@ -10,7 +9,6 @@ Stoping a role instance of a vendor network function with the specified serviceK ```powershell $role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} Stop-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role - ``` Creating an identity with role instance name role1, location centraluseuap, vendor name myVendor specified subscription, serviceKey. Stopping a role instance with the given identity. \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Update-AzConnectedNetworkDeviceTag.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Update-AzConnectedNetworkDeviceTag.md index d43397e63148..eb42caa06d55 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Update-AzConnectedNetworkDeviceTag.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Update-AzConnectedNetworkDeviceTag.md @@ -2,8 +2,9 @@ ```powershell $tags = @{ NewTag = "NewTagValue"} Update-AzConnectedNetworkDeviceTag -DeviceName "myMecDevice" -ResourceGroupName "myResources" -Tag $tags +``` - +```output DeviceType : AzureStackEdge Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice Location : eastus @@ -29,7 +30,9 @@ Creating an identity with field NewTag and value NewTagValue. Updating the tag o $tags = @{ NewTag1 = "NewTagValue1"} $mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} Update-AzConnectedNetworkDeviceTag -InputObject $mecDevice -Tag $tags +``` +```output DeviceType : AzureStackEdge Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_2111_09 Location : eastus diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Update-AzConnectedNetworkFunctionTag.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Update-AzConnectedNetworkFunctionTag.md index 6abc4746c5db..ecb3c9592ea7 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Update-AzConnectedNetworkFunctionTag.md +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/examples/Update-AzConnectedNetworkFunctionTag.md @@ -2,7 +2,9 @@ ```powershell $tags = @{ NewTag = "NewTagValue"} Update-AzConnectedNetworkFunctionTag -NetworkFunctionName myNewVnf1 -ResourceGroupName myResources -Tag $tags +``` +```output Location Name Etag ResourceGroupName -------- ---- ---- ----------------- eastus2euap myNewVnf1 "sampleEtagValue" myResources @@ -15,7 +17,9 @@ Creating an identity with field NewTag and value NewTagValue. Updating the tag o $tags = @{ NewTag = "NewTagValue"} $vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "00000000-0000-0000-0000-000000000000"} Update-AzConnectedNetworkFunctionTag -InputObject $vnf -Tag $tags +``` +```output Location Name Etag ResourceGroupName -------- ---- ---- ----------------- eastus2euap myNewVnf1 "0000f211-0000-3300-0000-61a9edc70000" myResources diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkDevice.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkDevice.ps1 index 271483aac54e..e9ff7c73b6ac 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkDevice.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkDevice.ps1 @@ -20,48 +20,10 @@ Gets information about the specified device. .Description Gets information about the specified device. .Example -PS C:\> Get-AzConnectedNetworkDevice -ResourceGroupName myResources -Name myMecDevice - - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice -Location : westcentralus -Name : myMecDevice -NetworkFunction : {/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.HybridNetwork/networkFunctions/myVnf1} -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : Registered -SystemDataCreatedAt : 11/25/2020 5:34:49 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/25/2020 5:58:38 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : Microsoft.HybridNetwork/devices - +Get-AzConnectedNetworkDevice -ResourceGroupName myResources -Name myMecDevice .Example -PS C:\> $mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} -PS C:\> Get-AzConnectedNetworkDevice -InputObject $mecDevice - - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice1 -Location : eastus -Name : myMecDevice1 -NetworkFunction : {/subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/mrg-vmware_sdwan_edge_zones-20211124063650/providers/Microsoft.HybridNetwork/networkFunctions/myEdge1} -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : Registered -SystemDataCreatedAt : 11/23/2021 10:27:13 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/24/2021 7:42:41 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/devices - +$mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkDevice -InputObject $mecDevice .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -128,7 +90,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -178,6 +141,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkDevice_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkDevice_GetViaIdentity'; @@ -185,15 +166,26 @@ begin { List1 = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkDevice_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -202,15 +194,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkDeviceRegistrationKey.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkDeviceRegistrationKey.ps1 index d632af4f0c41..972d92827d62 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkDeviceRegistrationKey.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkDeviceRegistrationKey.ps1 @@ -20,13 +20,9 @@ List the registration key for the device. .Description List the registration key for the device. .Example -PS C:\> Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources - -eyJNZWNEZXZpY2VUcmFuc2llbnRBdXRoS2V5IjoiMTIzNCIsIk1lY0RldmljZUF1dGhLZXlTdGFydFRpbWUiOiIyMDIxLTExLTIyVDA5OjQ2OjQwLjY0ODExOTFaIiwiU2VydmljZUJ1c1F1ZXVlTmFtZSI6ImFiY2QtMTIzNCIsIkFBREVuZHBvaW50IjpudWxsLCJBQURBdWRpZW5jZSI6bnVsbCwiQXJtUmVzb3VyY2VJZCI6bnVsbCwiTWVjQ29udHJvbGxlckVuZHBvaW50IjoiaHR0cHM6Ly93ZXN0Y2VudHJhbHVzLXByb2QubWVjZGV2aWNlLmF6dXJlLmNvbTo0NDMiLCJEYmVEZXZpY2VJZCI6bnVsbCwiUmVzb3VyY2VVbmlxdWVJZCI6IjEyMy1hYmMtMTIzIiwiU3Vic2NyaXB0aW9uSWQiOiJ4eHh4LTEyMzQteHh4eC0xMjM0IiwiUmVzb3VyY2VHcm91cE5hbWUiOiJzYW1wbGVSR25hbWUiLCJQcm92aWRlck5hbWVzcGFjZSI6Ik1pY3Jvc29mdC5IeWJyaWROZXR3b3JrIiwiUmVzb3VyY2VUeXBlIjoiRGV2aWNlcyIsIlJlc291cmNlVHlwZU5hbWUiOiJJREMtRGV2aWNlNC1XZXN0Q2VudHJhbCJ9 +Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources .Example -PS C:\> Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 - -eyJNZWNEZXZpY2VUcmFuc2llbnRBdXRoS2V5IjoiMTIzNCIsIk1lY0RldmljZUF1dGhLZXlTdGFydFRpbWUiOiIyMDIxLTExLTIyVDA5OjQ2OjQwLjY0ODExOTFaIiwiU2VydmljZUJ1c1F1ZXVlTmFtZSI6ImFiY2QtMTIzNCIsIkFBREVuZHBvaW50IjpudWxsLCJBQURBdWRpZW5jZSI6bnVsbCwiQXJtUmVzb3VyY2VJZCI6bnVsbCwiTWVjQ29udHJvbGxlckVuZHBvaW50IjoiaHR0cHM6Ly93ZXN0Y2VudHJhbHVzLXByb2QubWVjZGV2aWNlLmF6dXJlLmNvbTo0NDMiLCJEYmVEZXZpY2VJZCI6bnVsbCwiUmVzb3VyY2VVbmlxdWVJZCI6IjEyMy1hYmMtMTIzIiwiU3Vic2NyaXB0aW9uSWQiOiJ4eHh4LTEyMzQteHh4eC0xMjM0IiwiUmVzb3VyY2VHcm91cE5hbWUiOiJzYW1wbGVSR25hbWUiLCJQcm92aWRlck5hbWVzcGFjZSI6Ik1pY3Jvc29mdC5IeWJyaWROZXR3b3JrIiwiUmVzb3VyY2VUeXBlIjoiRGV2aWNlcyIsIlJlc291cmNlVHlwZU5hbWUiOiJJREMtRGV2aWNlNC1XZXN0Q2VudHJhbCJ9 +Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 .Outputs System.String @@ -62,7 +58,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -112,19 +109,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkDeviceRegistrationKey_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -133,15 +159,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkFunction.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkFunction.ps1 index b06bdf4547a5..9bfd850746c9 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkFunction.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkFunction.ps1 @@ -20,64 +20,10 @@ Gets information about the specified network function resource. .Description Gets information about the specified network function resource. .Example -PS C:\> Get-AzConnectedNetworkFunction -Name myVnf -ResourceGroupName myResources - - -ContainerConfiguration : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations -DeviceId : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMec -Etag : "0000a530-0000-3400-0000-615c10fa0000" -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/networkFunctions/myVnf -Location : centraluseuap -ManagedApplicationId : -ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatManagedApplicationParameters -Name : myVnf -ProvisioningState : Failed -ResourceGroupName : myResources -ServiceKey : 397a7415-ec52-46b5-892b-f840ba491aab -SkuName : mySku1 -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 10/5/2021 8:45:49 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 10/5/2021 8:46:49 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/networkfunctions -UserConfiguration : {hpehss} -VendorName : AffirmedVendor -VendorProvisioningState : NotProvisioned - +Get-AzConnectedNetworkFunction -Name myVnf -ResourceGroupName myResources .Example -PS C:\> $vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} -PS C:\> Get-AzConnectedNetworkFunction -InputObject $vnf - - -ContainerConfiguration : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations -DeviceId : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMec1 -Etag : "sampleEtagValue" -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/networkFunctions/myVnf1 -Location : eastus -ManagedApplicationId : -ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatManagedApplicationParameters -Name : myVnf1 -ProvisioningState : Succeeded -ResourceGroupName : myResources -ServiceKey : aa11-bb22-cc33-dd44 -SkuName : mySku -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 11/1/2021 11:13:57 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/15/2021 4:53:08 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/networkfunctions -UserConfiguration : {hpehss} -VendorName : AffirmedVendor -VendorProvisioningState : Provisioned - +$vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkFunction -InputObject $vnf .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -144,7 +90,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -194,6 +141,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunction_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunction_GetViaIdentity'; @@ -201,15 +166,26 @@ begin { List1 = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunction_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -218,15 +194,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkFunctionVendor.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkFunctionVendor.ps1 index fac33e9ebb6f..d4bea3136b6e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkFunctionVendor.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkFunctionVendor.ps1 @@ -20,20 +20,9 @@ Lists all the available vendor and sku information. .Description Lists all the available vendor and sku information. .Example -PS C:\> Get-AzConnectedNetworkFunctionVendor - -SkuList VendorName -------- ---------- -{vendor-sku, vendor-sku1, vendor-sku2, vendor-sku3, vendor-sku4, vendor-sku4, vendor-sku5...} myVendor -{vendor1-sku, vendor1-sku2} myVendor1 -{vendor2-sku1} myVendor2 +Get-AzConnectedNetworkFunctionVendor .Example -PS C:\> Get-AzConnectedNetworkFunctionVendor -SubscriptionId "xxxxx-00000-xxxxx-00000" - -SkuList VendorName -------- ---------- -{vendor1-sku, vendor1-sku2} myVendor1 -{vendor2-sku1} myVendor2 +Get-AzConnectedNetworkFunctionVendor -SubscriptionId "xxxxx-00000-xxxxx-00000" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendor @@ -56,7 +45,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -106,19 +96,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunctionVendor_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -127,15 +146,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendor.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendor.ps1 index e50c4e6c6cd3..538cd82bd5ed 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendor.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendor.ps1 @@ -20,40 +20,10 @@ Gets information about the specified vendor. .Description Gets information about the specified vendor. .Example -PS C:\> Get-AzConnectedNetworkVendor -Name myVendor - - -Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor -Name : myVendor -ProvisioningState : Succeeded -ResourceGroupName : -Sku : -SystemDataCreatedAt : 9/7/2021 3:02:02 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 9/7/2021 3:02:03 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/vendors - +Get-AzConnectedNetworkVendor -Name myVendor .Example -PS C:\> $vendor = @{ VendorName = "myVendor1"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} -PS C:\> Get-AzConnectedNetworkVendor -InputObject $vendor - - -Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor1 -Name : myVendor1 -ProvisioningState : Succeeded -ResourceGroupName : -Sku : -SystemDataCreatedAt : 9/7/2021 3:02:02 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 9/7/2021 3:02:03 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/vendors - +$vendor = @{ VendorName = "myVendor1"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkVendor -InputObject $vendor .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -111,7 +81,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -161,21 +132,50 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendor_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendor_GetViaIdentity'; List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendor_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -184,15 +184,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorFunction.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorFunction.ps1 index 4bb952c06c9d..c8f282d60a5a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorFunction.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorFunction.ps1 @@ -20,46 +20,10 @@ Gets information about the specified vendor network function. .Description Gets information about the specified vendor network function. .Example -PS C:\> Get-AzConnectedNetworkVendorFunction -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor - -Id : /subscriptions/xxxx-3333-xxxx-3333/providers/Microsoft.HybridNetwork/locations/centraluseuap/vendors/myVendor/networkfunctions/1b69005b-9168-4d74-a371-d4c4f6a521d - 0 -Name : 1234-abcd-4321-dcba -NetworkFunctionVendorConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} -ProvisioningState : Succeeded -ResourceGroupName : -SkuName : mySku -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 11/25/2021 2:04:28 PM -SystemDataCreatedBy : xxxxx-11111-xxxxx-11111 -SystemDataCreatedByType : Application -SystemDataLastModifiedAt : 11/25/2021 2:04:28 PM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/locations/vendors/networkfunctions -VendorProvisioningState : NotProvisioned - +Get-AzConnectedNetworkVendorFunction -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor .Example -PS C:\> $vendorNF = @{ ServiceKey = "1234-abcd-4321-dcba"; VendorName = "myVendor"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"} -PS C:\> Get-AzConnectedNetworkVendorFunction -InputObject $vendorNF - -Id : /subscriptions/xxxx-3333-xxxx-3333/providers/Microsoft.HybridNetwork/locations/centraluseuap/vendors/myVendor/networkfunctions/1b69005b-9168-4d74-a371-d4c4f6a521d - 0 -Name : 1234-abcd-4321-dcba -NetworkFunctionVendorConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} -ProvisioningState : Succeeded -ResourceGroupName : -SkuName : mySku -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 11/25/2021 2:04:44 PM -SystemDataCreatedBy : xxxxx-11111-xxxxx-11111 -SystemDataCreatedByType : Application -SystemDataLastModifiedAt : 11/25/2021 2:36:28 PM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/locations/vendors/networkfunctions -VendorProvisioningState : Provisioned - +$vendorNF = @{ ServiceKey = "1234-abcd-4321-dcba"; VendorName = "myVendor"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"} +Get-AzConnectedNetworkVendorFunction -InputObject $vendorNF .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -137,7 +101,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -187,21 +152,50 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunction_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunction_GetViaIdentity'; List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunction_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -210,15 +204,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorFunctionRoleInstance.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorFunctionRoleInstance.ps1 index 166cdea1039e..d5b92339d5f5 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorFunctionRoleInstance.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorFunctionRoleInstance.ps1 @@ -20,38 +20,10 @@ Gets the information of role instance of vendor network function. .Description Gets the information of role instance of vendor network function. .Example -PS C:\> Get-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name hpehss - -Id : -Name : hpehss -OperationalState : Running -ProvisioningState : -ResourceGroupName : -SystemDataCreatedAt : -SystemDataCreatedBy : -SystemDataCreatedByType : -SystemDataLastModifiedAt : -SystemDataLastModifiedBy : -SystemDataLastModifiedByType : -Type : - +Get-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name hpehss .Example -PS C:\> $role = @{ RoleInstanceName = "hpehss"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} -PS C:\> Get-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role - -Id : -Name : hpehss -OperationalState : Stopped -ProvisioningState : -ResourceGroupName : -SystemDataCreatedAt : -SystemDataCreatedBy : -SystemDataCreatedByType : -SystemDataLastModifiedAt : -SystemDataLastModifiedBy : -SystemDataLastModifiedByType : -Type : - +$role = @{ RoleInstanceName = "hpehss"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Get-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -130,7 +102,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -180,21 +153,50 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunctionRoleInstance_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunctionRoleInstance_GetViaIdentity'; List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunctionRoleInstance_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -203,15 +205,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorSku.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorSku.ps1 index a9b28c84ad1d..072b5f64d126 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorSku.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorSku.ps1 @@ -20,45 +20,7 @@ Gets information about the specified sku. .Description Gets information about the specified sku. .Example -PS C:\> Get-AzConnectedNetworkVendorSku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 - -DeploymentMode : PrivateEdgeZone -Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor/VendorSkus/mySku -ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationParameters -ManagedApplicationTemplate : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationTemplate -Name : mySku -NetworkFunctionTemplateNetworkFunctionRoleConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} -NetworkFunctionType : -Preview : True -ProvisioningState : Succeeded -ResourceGroupName : -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 11/4/2020 3:35:33 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/4/2020 3:43:58 PM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : Microsoft.HybridNetwork/vendors/VendorSkus - -DeploymentMode : PrivateEdgeZone -Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorskus/mySku_1 -ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationParameters -ManagedApplicationTemplate : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationTemplate -Name : mySku_1 -NetworkFunctionTemplateNetworkFunctionRoleConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} -NetworkFunctionType : -Preview : True -ProvisioningState : Failed -ResourceGroupName : -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 11/11/2020 2:25:32 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/11/2020 2:25:32 PM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Type : Microsoft.HybridNetwork/vendors/vendorskus +Get-AzConnectedNetworkVendorSku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -122,7 +84,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -172,21 +135,50 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSku_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSku_GetViaIdentity'; List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSku_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -195,15 +187,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorSkuPreview.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorSkuPreview.ps1 index dab1bdf997eb..ed8426f94aca 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorSkuPreview.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Get-AzConnectedNetworkVendorSkuPreview.ps1 @@ -20,36 +20,10 @@ Gets the preview information of a vendor sku. .Description Gets the preview information of a vendor sku. .Example -PS C:\> Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 - -Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-22222-xxxxx-22222 -Name : xxxxx-22222-xxxxx-22222 -ProvisioningState : Succeeded -ResourceGroupName : -SystemDataCreatedAt : 11/24/2021 4:41:22 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/24/2021 4:41:22 AM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions - +Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 .Example -PS C:\> $skuPreview = @{ SkuName = "mySku"; VendorName = "myVendor"; PreviewSubscription = "xxxxx-22222-xxxxx-22222"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} -PS C:\> Get-AzConnectedNetworkVendorSkuPreview -InputObject $skuPreview - -Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-22222-xxxxx-22222 -Name : xxxxx-22222-xxxxx-22222 -ProvisioningState : Succeeded -ResourceGroupName : -SystemDataCreatedAt : 11/24/2021 4:41:22 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/24/2021 4:41:22 AM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions - +$skuPreview = @{ SkuName = "mySku"; VendorName = "myVendor"; PreviewSubscription = "xxxxx-22222-xxxxx-22222"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkVendorSkuPreview -InputObject $skuPreview .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -120,7 +94,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -170,21 +145,50 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSkuPreview_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSkuPreview_GetViaIdentity'; List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSkuPreview_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -193,15 +197,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkAzureStackEdgeObject.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkAzureStackEdgeObject.ps1 index 29e705383b54..1cd0d767e434 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkAzureStackEdgeObject.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkAzureStackEdgeObject.ps1 @@ -20,11 +20,7 @@ Create a in-memory object for AzureStackEdgeFormat .Description Create a in-memory object for AzureStackEdgeFormat .Example -PS C:\> New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" - -eviceType ProvisioningState Status ----------- ----------------- ------ -AzureStackEdge +New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.AzureStackEdgeFormat @@ -49,16 +45,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkAzureStackEdgeObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -67,15 +86,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkDevice.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkDevice.ps1 index faafcb9a4388..34651dde4c56 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkDevice.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkDevice.ps1 @@ -20,47 +20,11 @@ Creates or updates a device. .Description Creates or updates a device. .Example -PS C:\> $ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse" -PS C:\> New-AzConnectedNetworkDevice -Name "myMecDevice" -ResourceGroupName "myResources" -Location "eastus" -Property $ase - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice -Location : eastus -Name : myMecDevice -NetworkFunction : -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : NotRegistered -SystemDataCreatedAt : 11/25/2021 4:47:45 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : myVendor -SystemDataLastModifiedAt : 11/25/2021 4:47:47 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/devices - +$ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse" +New-AzConnectedNetworkDevice -Name "myMecDevice" -ResourceGroupName "myResources" -Location "eastus" -Property $ase .Example -PS C:\> $ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" -PS C:\> New-AzConnectedNetworkDevice -Name "myMecDevice1" -ResourceGroupName "myResources" -Location "eastus2euap" -Property $ase -SubscriptionId xxxxx-00000-xxxxx-00000 - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice1 -Location : eastus -Name : myMecDevice1 -NetworkFunction : -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : Registered -SystemDataCreatedAt : 11/25/2021 4:49:34 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : myVendor -SystemDataLastModifiedAt : 11/25/2021 4:57:47 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/devices - +$ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" +New-AzConnectedNetworkDevice -Name "myMecDevice1" -ResourceGroupName "myResources" -Location "eastus2euap" -Property $ase -SubscriptionId xxxxx-00000-xxxxx-00000 .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice @@ -124,7 +88,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -186,19 +151,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkDevice_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -207,15 +201,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunction.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunction.ps1 index 2d1afe634731..324abec59e8c 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunction.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunction.ps1 @@ -24,26 +24,21 @@ Creates or updates a network function resource. This operation can take up to 6 hours to complete. This is expected service behavior. .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" -PS C:\> $customData = "I2Nsb3VkLWNvbmZpZwp3cml0ZV9maWxlczoKLSBwYXRoOiAvdmFyL2xpYi9jbG91ZC9paHNzY29uZmlnLmpzb24KICBwZXJtaXNzaW9uczogJzA2NDQnCiAgb3duZXI6IHJvb3Q6cm9vdAogIGNvbnRlbnQ6IHwKICAgIHsKICAgICAgICAgICAiRGlhbWV0ZXJHVyI6ewogICAgICAgICAgICAgICAgICAiSE9TVElQQUREUkVTUyI6IjEyOC4wLjAuMSIsCiAgICAgICAgICAgICAgICAgICJGUUROIjoiaHNzLmF5VmVuZG9yLmNvbSIsCiAgICAgICAgICAgICAgICAgICJSRUFMTSI6Imhzcy5lcGMubXlWZW5kb3I5OS5teVZlbmRvci4zZ3BwbmV0d29yay5vcmciCiAgICAgICAgICAgfSwKICAgICAgICAgICAiREdXQmluZEFkZHIiOnsKICAgICAgICAgICAgICAgICAgIkFERFJFU1MiOiIxMjguMC4wLjIiLAogICAgICAgICAgICAgICAgICAiVFJBTlNQT1JUIjoiU0NUUCIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjozODY4CiAgICAgICAgICAgfSwKICAgICAgICAgICAiU05NUFRhcmdldCI6ewogICAgICAgICAgICAgICAgICAiSE9TVCI6IjEyOC4wLjAuMyIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjoiMTYyIiwKICAgICAgICAgICAgICAgICAgIlRSSUdHRVJfTEVWRUwiOiIzIgogICAgICAgICAgIH0sCiAgICAgICAgICAgIk1hbmFnZW1lbnQiOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNCIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjEvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAogICAgICAgICAgICJMYW4iOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNSIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjAvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAoKICAgIH0JCSAgCg==" -PS C:\> $userconf = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -OSProfileCustomData $customData -RoleName "hpehss" -PS C:\> New-AzConnectedNetworkFunction -Name vnf_Test1 -ResourceGroupName myResources -Location "eastus" -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_2111_020 -SkuName Affirmed-HSS-0527 -UserConfiguration $userconf -VendorName "AffirmedVendor" - -Location Name Etag ResourceGroupName --------- ---- ---- ----------------- -eastus vnf_Test1 "SampleEtagvalue" myResources +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$customData = "I2Nsb3VkLWNvbmZpZwp3cml0ZV9maWxlczoKLSBwYXRoOiAvdmFyL2xpYi9jbG91ZC9paHNzY29uZmlnLmpzb24KICBwZXJtaXNzaW9uczogJzA2NDQnCiAgb3duZXI6IHJvb3Q6cm9vdAogIGNvbnRlbnQ6IHwKICAgIHsKICAgICAgICAgICAiRGlhbWV0ZXJHVyI6ewogICAgICAgICAgICAgICAgICAiSE9TVElQQUREUkVTUyI6IjEyOC4wLjAuMSIsCiAgICAgICAgICAgICAgICAgICJGUUROIjoiaHNzLmF5VmVuZG9yLmNvbSIsCiAgICAgICAgICAgICAgICAgICJSRUFMTSI6Imhzcy5lcGMubXlWZW5kb3I5OS5teVZlbmRvci4zZ3BwbmV0d29yay5vcmciCiAgICAgICAgICAgfSwKICAgICAgICAgICAiREdXQmluZEFkZHIiOnsKICAgICAgICAgICAgICAgICAgIkFERFJFU1MiOiIxMjguMC4wLjIiLAogICAgICAgICAgICAgICAgICAiVFJBTlNQT1JUIjoiU0NUUCIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjozODY4CiAgICAgICAgICAgfSwKICAgICAgICAgICAiU05NUFRhcmdldCI6ewogICAgICAgICAgICAgICAgICAiSE9TVCI6IjEyOC4wLjAuMyIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjoiMTYyIiwKICAgICAgICAgICAgICAgICAgIlRSSUdHRVJfTEVWRUwiOiIzIgogICAgICAgICAgIH0sCiAgICAgICAgICAgIk1hbmFnZW1lbnQiOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNCIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjEvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAogICAgICAgICAgICJMYW4iOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNSIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjAvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAoKICAgIH0JCSAgCg==" +$userconf = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -OSProfileCustomData $customData -RoleName "hpehss" +New-AzConnectedNetworkFunction -Name vnf_Test1 -ResourceGroupName myResources -Location "eastus" -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_2111_020 -SkuName Affirmed-HSS-0527 -UserConfiguration $userconf -VendorName "AffirmedVendor" .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" -PS C:\> $userconfig2 = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName "hpehss" -PS C:\> $vnf1 = New-AzConnectedNetworkFunction -Name vnftest11 -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_autotest_01 -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 -Location eastus2euap -SkuName staticSku -VendorName hssvendor01 -UserConfiguration $userconfig2 -verbose -PS C:\> $v2.ServiceKey -abcd-sample-service-key-val-1234 +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$userconfig2 = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName "hpehss" +$vnf1 = New-AzConnectedNetworkFunction -Name vnftest11 -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_autotest_01 -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 -Location eastus2euap -SkuName staticSku -VendorName hssvendor01 -UserConfiguration $userconfig2 -verbose +$v2.ServiceKey .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction @@ -64,7 +59,7 @@ USERCONFIGURATION : The network function co [MacAddress ]: The MAC address of the network interface. [Name ]: The name of the network interface. [VMSwitchType ]: The type of the VM switch. - [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) [RoleName ]: The name of the network function role. [UserDataParameter ]: The user data parameters from the customer. .Link @@ -161,7 +156,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -223,19 +219,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkFunction_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -244,15 +269,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionRoleConfigurationObject.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionRoleConfigurationObject.ps1 index a06582f09796..f047a07e5487 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionRoleConfigurationObject.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionRoleConfigurationObject.ps1 @@ -20,18 +20,13 @@ Create a in-memory object for NetworkFunctionRoleConfiguration .Description Create a in-memory object for NetworkFunctionRoleConfiguration .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" -PS C:\> $keyData = @{keyData = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb"; path = $Null} -PS C:\> $key = @( $keyData) -PS C:\> $role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName Disk1 -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" - -RoleName RoleType VirtualMachineSize --------- -------- ------------------ -hpehss VirtualMachine Standard_D3_v2 - +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$keyData = @{keyData = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb"; path = $Null} +$key = @( $keyData) +$role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName Disk1 -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionRoleConfiguration @@ -53,7 +48,7 @@ NETWORKINTERFACE : The network interface configurations. [VMSwitchType ]: The type of the VM switch. SSHPUBLICKEY : The list of SSH public keys used to authenticate with linux based VMs. - [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). [Path ]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys STORAGEPROFILEDATADISK : Specifies the parameters that are used to add a data disk to a virtual machine. @@ -240,16 +235,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkFunctionRoleConfigurationObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -258,15 +276,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionUserConfigurationObject.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionUserConfigurationObject.ps1 index ec45d7ab7ba2..f165e6db9812 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionUserConfigurationObject.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionUserConfigurationObject.ps1 @@ -20,12 +20,12 @@ Create a in-memory object for NetworkFunctionUserConfiguration .Description Create a in-memory object for NetworkFunctionUserConfiguration .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "LAN" -PS C:\> $customData = "I2Nsb3VkLWNvbmZpZwp3cml0ZV9maWxlczoKLSBwYXRoOiAvdmFyL2xpYi9jbG91ZC9paHNzY29uZmlnLmpzb24KICBwZXJtaXNzaW9uczogJzA2NDQnCiAgb3duZXI6IHJvb3Q6cm9vdAogIGNvbnRlbnQ6IHwKICAgIHsKICAgICAgICAgICAiRGlhbWV0ZXJHVyI6ewogICAgICAgICAgICAgICAgICAiSE9TVElQQUREUkVTUyI6IjEyOC4wLjAuMSIsCiAgICAgICAgICAgICAgICAgICJGUUROIjoiaHNzLmF5VmVuZG9yLmNvbSIsCiAgICAgICAgICAgICAgICAgICJSRUFMTSI6Imhzcy5lcGMubXlWZW5kb3I5OS5teVZlbmRvci4zZ3BwbmV0d29yay5vcmciCiAgICAgICAgICAgfSwKICAgICAgICAgICAiREdXQmluZEFkZHIiOnsKICAgICAgICAgICAgICAgICAgIkFERFJFU1MiOiIxMjguMC4wLjIiLAogICAgICAgICAgICAgICAgICAiVFJBTlNQT1JUIjoiU0NUUCIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjozODY4CiAgICAgICAgICAgfSwKICAgICAgICAgICAiU05NUFRhcmdldCI6ewogICAgICAgICAgICAgICAgICAiSE9TVCI6IjEyOC4wLjAuMyIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjoiMTYyIiwKICAgICAgICAgICAgICAgICAgIlRSSUdHRVJfTEVWRUwiOiIzIgogICAgICAgICAgIH0sCiAgICAgICAgICAgIk1hbmFnZW1lbnQiOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNCIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjEvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAogICAgICAgICAgICJMYW4iOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNSIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjAvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAoKICAgIH0JCSAgCg==" -PS C:\> $userconf = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -OSProfileCustomData $customData -RoleName "hpehss" +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "LAN" +$customData = "I2Nsb3VkLWNvbmZpZwp3cml0ZV9maWxlczoKLSBwYXRoOiAvdmFyL2xpYi9jbG91ZC9paHNzY29uZmlnLmpzb24KICBwZXJtaXNzaW9uczogJzA2NDQnCiAgb3duZXI6IHJvb3Q6cm9vdAogIGNvbnRlbnQ6IHwKICAgIHsKICAgICAgICAgICAiRGlhbWV0ZXJHVyI6ewogICAgICAgICAgICAgICAgICAiSE9TVElQQUREUkVTUyI6IjEyOC4wLjAuMSIsCiAgICAgICAgICAgICAgICAgICJGUUROIjoiaHNzLmF5VmVuZG9yLmNvbSIsCiAgICAgICAgICAgICAgICAgICJSRUFMTSI6Imhzcy5lcGMubXlWZW5kb3I5OS5teVZlbmRvci4zZ3BwbmV0d29yay5vcmciCiAgICAgICAgICAgfSwKICAgICAgICAgICAiREdXQmluZEFkZHIiOnsKICAgICAgICAgICAgICAgICAgIkFERFJFU1MiOiIxMjguMC4wLjIiLAogICAgICAgICAgICAgICAgICAiVFJBTlNQT1JUIjoiU0NUUCIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjozODY4CiAgICAgICAgICAgfSwKICAgICAgICAgICAiU05NUFRhcmdldCI6ewogICAgICAgICAgICAgICAgICAiSE9TVCI6IjEyOC4wLjAuMyIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjoiMTYyIiwKICAgICAgICAgICAgICAgICAgIlRSSUdHRVJfTEVWRUwiOiIzIgogICAgICAgICAgIH0sCiAgICAgICAgICAgIk1hbmFnZW1lbnQiOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNCIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjEvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAogICAgICAgICAgICJMYW4iOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNSIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjAvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAoKICAgIH0JCSAgCg==" +$userconf = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -OSProfileCustomData $customData -RoleName "hpehss" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionUserConfiguration @@ -98,16 +98,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkFunctionUserConfigurationObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -116,15 +139,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionVendorConfigurationObject.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionVendorConfigurationObject.ps1 index 0c94ff6eac2b..424615258ee0 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionVendorConfigurationObject.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkFunctionVendorConfigurationObject.ps1 @@ -20,14 +20,14 @@ Create a in-memory object for NetworkFunctionVendorConfiguration .Description Create a in-memory object for NetworkFunctionVendorConfiguration .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" -PS C:\> $keyData = @{keyData = "ssh-rsa\AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb redmond\userk@n1-azuredev1"; path = $Null} -PS C:\> $keys = @{ } -PS C:\> $key += $keyData -PS C:\> $vendorconf = New-AzConnectedNetworkFunctionVendorConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName hpehss -OSProfileAdminUsername MecUser -OSProfileCustomData $customData -OSProfileCustomDataRequired $True -SshPublicKey $key +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$keyData = @{keyData = "ssh-rsa\AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb redmond\userk@n1-azuredev1"; path = $Null} +$keys = @{ } +$key += $keyData +$vendorconf = New-AzConnectedNetworkFunctionVendorConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName hpehss -OSProfileAdminUsername MecUser -OSProfileCustomData $customData -OSProfileCustomDataRequired $True -SshPublicKey $key .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionVendorConfiguration @@ -49,7 +49,7 @@ NETWORKINTERFACE : The network interface configurations. [VMSwitchType ]: The type of the VM switch. SSHPUBLICKEY : The list of SSH public keys used to authenticate with linux based VMs. - [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). [Path ]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys .Link https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkFunctionVendorConfigurationObject @@ -132,16 +132,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkFunctionVendorConfigurationObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -150,15 +173,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkInterfaceIPConfigurationObject.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkInterfaceIPConfigurationObject.ps1 index 7f95079f23d7..eb62d487e314 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkInterfaceIPConfigurationObject.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkInterfaceIPConfigurationObject.ps1 @@ -20,11 +20,7 @@ Create a in-memory object for NetworkInterfaceIPConfiguration .Description Create a in-memory object for NetworkInterfaceIPConfiguration .Example -PS C:\> New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" - -DnsServer Gateway IPAddress IPAllocationMethod IPVersion Subnet ---------- ------- --------- ------------------ --------- ------ - Dynamic IPv4 +New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkInterfaceIPConfiguration @@ -79,16 +75,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkInterfaceIPConfigurationObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -97,15 +116,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkInterfaceObject.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkInterfaceObject.ps1 index 47b11e06dd14..ca57e46b93b7 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkInterfaceObject.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkInterfaceObject.ps1 @@ -20,11 +20,7 @@ Create a in-memory object for NetworkInterface .Description Create a in-memory object for NetworkInterface .Example -PS C:\> New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" - -MacAddress Name VMSwitchType ----------- ---- ------------ - mrmmanagementnic1 Management +New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkInterface @@ -80,16 +76,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkInterfaceObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -98,15 +117,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendor.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendor.ps1 index eda370113c8d..ce1b6997b459 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendor.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendor.ps1 @@ -20,37 +20,9 @@ Creates or updates a vendor. .Description Creates or updates a vendor. .Example -PS C:\> New-AzConnectedNetworkVendor -Name myVendor - - -Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor -Name : myVendor -ProvisioningState : Succeeded -ResourceGroupName : -Sku : -SystemDataCreatedAt : 11/23/2021 6:18:55 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/23/2021 6:19:08 PM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/vendors +New-AzConnectedNetworkVendor -Name myVendor .Example -PS C:\> New-AzConnectedNetworkVendor -Name myVendor2 -SubscriptionId xxxxx-22222-xxxxx-22222 - - -Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor2 -Name : myVendor2 -ProvisioningState : Succeeded -ResourceGroupName : -Sku : -SystemDataCreatedAt : 11/23/2021 6:20:28 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/23/2021 6:20:32 PM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/vendors +New-AzConnectedNetworkVendor -Name myVendor2 -SubscriptionId xxxxx-22222-xxxxx-22222 .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor @@ -80,7 +52,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -142,19 +115,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkVendor_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -163,15 +165,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorFunction.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorFunction.ps1 index e79e9f99dd6b..5de2b88ef37f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorFunction.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorFunction.ps1 @@ -24,15 +24,15 @@ Creates or updates a vendor network function. This operation can take up to 6 hours to complete. This is expected service behavior. .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" -PS C:\> $keyData = @{keyData = "ssh-rsa\AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb redmond\user@n1-azuredev1"; path = $Null} -PS C:\> $keys = @{ } -PS C:\> $key += $keyData -PS C:\> $vendorconf = New-AzConnectedNetworkFunctionVendorConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName hpehss -OSProfileAdminUsername MecUser -OSProfileCustomData $customData -OSProfileCustomDataRequired $True -SshPublicKey $key -PS C:\> $vendorvnf1 = New-AzConnectedNetworkVendorFunction -LocationName eastus2euap -ServiceKey b78d39-xxxx-xxxx-00946c5 -SubscriptionId xxxx-4444-xxxx-4444 -VendorName myVendor -VendorConfiguration $vendorconf -SkuType EvolvedPacketCore -VendorProvisioningState Provisioning +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$keyData = @{keyData = "ssh-rsa\AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb redmond\user@n1-azuredev1"; path = $Null} +$keys = @{ } +$key += $keyData +$vendorconf = New-AzConnectedNetworkFunctionVendorConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName hpehss -OSProfileAdminUsername MecUser -OSProfileCustomData $customData -OSProfileCustomDataRequired $True -SshPublicKey $key +$vendorvnf1 = New-AzConnectedNetworkVendorFunction -LocationName eastus2euap -ServiceKey b78d39-xxxx-xxxx-00946c5 -SubscriptionId xxxx-4444-xxxx-4444 -VendorName myVendor -VendorConfiguration $vendorconf -SkuType EvolvedPacketCore -VendorProvisioningState Provisioning .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction @@ -53,12 +53,12 @@ VENDORCONFIGURATION : An array of network [MacAddress ]: The MAC address of the network interface. [Name ]: The name of the network interface. [VMSwitchType ]: The type of the VM switch. - [OSProfileAdminUsername ]: Specifies the name of the administrator account. **Windows-only restriction:** Cannot end in "." **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". **Minimum-length (Linux):** 1 character **Max-length (Linux):** 64 characters **Max-length (Windows):** 20 characters
  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + [OSProfileAdminUsername ]: Specifies the name of the administrator account. **Windows-only restriction:** Cannot end in "." **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". **Minimum-length (Linux):** 1 character **Max-length (Linux):** 64 characters **Max-length (Windows):** 20 characters
  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) [OSProfileCustomDataRequired ]: Indicates if custom data is required to deploy this role. [RoleName ]: The name of the vendor network function role. [SshPublicKey ]: The list of SSH public keys used to authenticate with linux based VMs. - [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). [Path ]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys .Link https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkvendorfunction @@ -119,7 +119,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -181,19 +182,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkVendorFunction_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -202,15 +232,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorSku.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorSku.ps1 index af4998a7c6f4..26f10fb8babe 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorSku.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorSku.ps1 @@ -24,9 +24,8 @@ Creates or updates a sku. This operation can take up to 2 hours to complete. This is expected service behavior. .Example -PS C:\> $role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName NetFoundry -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" -PS C:\> New-AzConnectedNetworkVendorSku -SkuName sku1 -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 -SkuType VirtualMachine -DeploymentMode PrivateEdgeZone -NetworkFunctionRoleConfigurationType @($role) - +$role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName NetFoundry -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" +New-AzConnectedNetworkVendorSku -SkuName sku1 -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 -SkuType VirtualMachine -DeploymentMode PrivateEdgeZone -NetworkFunctionRoleConfigurationType @($role) .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku @@ -56,13 +55,13 @@ NETWORKFUNCTIONROLECONFIGURATIONTYPE : An a [OSDiskName ]: The VHD name. [OSDiskOstype ]: The OS type. [OSDiskSizeGb ]: Specifies the size of os disk in gigabytes. This is the fully expanded disk size needed of the VHD image on the ASE. This disk size should be greater than the size of the VHD provided in vhdUri. - [OSProfileAdminUsername ]: Specifies the name of the administrator account. **Windows-only restriction:** Cannot end in "." **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". **Minimum-length (Linux):** 1 character **Max-length (Linux):** 64 characters **Max-length (Windows):** 20 characters
  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + [OSProfileAdminUsername ]: Specifies the name of the administrator account. **Windows-only restriction:** Cannot end in "." **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". **Minimum-length (Linux):** 1 character **Max-length (Linux):** 64 characters **Max-length (Windows):** 20 characters
  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) [OSProfileCustomDataRequired ]: Indicates if custom data is required to deploy this role. [RoleName ]: The name of the network function role. [RoleType ]: Role type. [SshPublicKey ]: The list of SSH public keys used to authenticate with linux based VMs. - [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). [Path ]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys [StorageProfileDataDisk ]: Specifies the parameters that are used to add a data disk to a virtual machine. [CreateOption ]: Specifies how the virtual machine should be created. @@ -152,7 +151,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -214,19 +214,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkVendorSku_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -235,15 +264,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorSkuPreview.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorSkuPreview.ps1 index 208f63d1123d..823bedfdfa1a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorSkuPreview.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/New-AzConnectedNetworkVendorSkuPreview.ps1 @@ -20,20 +20,7 @@ Creates or updates preview information of a vendor sku. .Description Creates or updates preview information of a vendor sku. .Example -PS C:\> New-AzConnectedNetworkVendorSkuPreview -PreviewSubscription xxxxx-00000-xxxxx-00000 -SkuName mySku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 - -Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-00000-xxxxx-00000 -Name : xxxxx-00000-xxxxx-00000 -ProvisioningState : Succeeded -ResourceGroupName : -SystemDataCreatedAt : 12/6/2021 5:37:35 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 12/6/2021 5:37:35 AM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions - +New-AzConnectedNetworkVendorSkuPreview -PreviewSubscription xxxxx-00000-xxxxx-00000 -SkuName mySku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription @@ -74,7 +61,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -136,19 +124,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkVendorSkuPreview_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -157,15 +174,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/ProxyCmdletDefinitions.ps1 index e633679c52da..ffb98d2a3297 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -20,13 +20,9 @@ List the registration key for the device. .Description List the registration key for the device. .Example -PS C:\> Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources - -eyJNZWNEZXZpY2VUcmFuc2llbnRBdXRoS2V5IjoiMTIzNCIsIk1lY0RldmljZUF1dGhLZXlTdGFydFRpbWUiOiIyMDIxLTExLTIyVDA5OjQ2OjQwLjY0ODExOTFaIiwiU2VydmljZUJ1c1F1ZXVlTmFtZSI6ImFiY2QtMTIzNCIsIkFBREVuZHBvaW50IjpudWxsLCJBQURBdWRpZW5jZSI6bnVsbCwiQXJtUmVzb3VyY2VJZCI6bnVsbCwiTWVjQ29udHJvbGxlckVuZHBvaW50IjoiaHR0cHM6Ly93ZXN0Y2VudHJhbHVzLXByb2QubWVjZGV2aWNlLmF6dXJlLmNvbTo0NDMiLCJEYmVEZXZpY2VJZCI6bnVsbCwiUmVzb3VyY2VVbmlxdWVJZCI6IjEyMy1hYmMtMTIzIiwiU3Vic2NyaXB0aW9uSWQiOiJ4eHh4LTEyMzQteHh4eC0xMjM0IiwiUmVzb3VyY2VHcm91cE5hbWUiOiJzYW1wbGVSR25hbWUiLCJQcm92aWRlck5hbWVzcGFjZSI6Ik1pY3Jvc29mdC5IeWJyaWROZXR3b3JrIiwiUmVzb3VyY2VUeXBlIjoiRGV2aWNlcyIsIlJlc291cmNlVHlwZU5hbWUiOiJJREMtRGV2aWNlNC1XZXN0Q2VudHJhbCJ9 +Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources .Example -PS C:\> Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 - -eyJNZWNEZXZpY2VUcmFuc2llbnRBdXRoS2V5IjoiMTIzNCIsIk1lY0RldmljZUF1dGhLZXlTdGFydFRpbWUiOiIyMDIxLTExLTIyVDA5OjQ2OjQwLjY0ODExOTFaIiwiU2VydmljZUJ1c1F1ZXVlTmFtZSI6ImFiY2QtMTIzNCIsIkFBREVuZHBvaW50IjpudWxsLCJBQURBdWRpZW5jZSI6bnVsbCwiQXJtUmVzb3VyY2VJZCI6bnVsbCwiTWVjQ29udHJvbGxlckVuZHBvaW50IjoiaHR0cHM6Ly93ZXN0Y2VudHJhbHVzLXByb2QubWVjZGV2aWNlLmF6dXJlLmNvbTo0NDMiLCJEYmVEZXZpY2VJZCI6bnVsbCwiUmVzb3VyY2VVbmlxdWVJZCI6IjEyMy1hYmMtMTIzIiwiU3Vic2NyaXB0aW9uSWQiOiJ4eHh4LTEyMzQteHh4eC0xMjM0IiwiUmVzb3VyY2VHcm91cE5hbWUiOiJzYW1wbGVSR25hbWUiLCJQcm92aWRlck5hbWVzcGFjZSI6Ik1pY3Jvc29mdC5IeWJyaWROZXR3b3JrIiwiUmVzb3VyY2VUeXBlIjoiRGV2aWNlcyIsIlJlc291cmNlVHlwZU5hbWUiOiJJREMtRGV2aWNlNC1XZXN0Q2VudHJhbCJ9 +Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 .Outputs System.String @@ -62,7 +58,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -112,19 +109,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkDeviceRegistrationKey_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -133,17 +159,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -152,48 +195,10 @@ Gets information about the specified device. .Description Gets information about the specified device. .Example -PS C:\> Get-AzConnectedNetworkDevice -ResourceGroupName myResources -Name myMecDevice - - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice -Location : westcentralus -Name : myMecDevice -NetworkFunction : {/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.HybridNetwork/networkFunctions/myVnf1} -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : Registered -SystemDataCreatedAt : 11/25/2020 5:34:49 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/25/2020 5:58:38 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : Microsoft.HybridNetwork/devices - +Get-AzConnectedNetworkDevice -ResourceGroupName myResources -Name myMecDevice .Example -PS C:\> $mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} -PS C:\> Get-AzConnectedNetworkDevice -InputObject $mecDevice - - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice1 -Location : eastus -Name : myMecDevice1 -NetworkFunction : {/subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/mrg-vmware_sdwan_edge_zones-20211124063650/providers/Microsoft.HybridNetwork/networkFunctions/myEdge1} -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : Registered -SystemDataCreatedAt : 11/23/2021 10:27:13 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/24/2021 7:42:41 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/devices - +$mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkDevice -InputObject $mecDevice .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -260,7 +265,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -310,6 +316,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkDevice_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkDevice_GetViaIdentity'; @@ -317,15 +341,26 @@ begin { List1 = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkDevice_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -334,17 +369,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -353,20 +405,9 @@ Lists all the available vendor and sku information. .Description Lists all the available vendor and sku information. .Example -PS C:\> Get-AzConnectedNetworkFunctionVendor - -SkuList VendorName -------- ---------- -{vendor-sku, vendor-sku1, vendor-sku2, vendor-sku3, vendor-sku4, vendor-sku4, vendor-sku5...} myVendor -{vendor1-sku, vendor1-sku2} myVendor1 -{vendor2-sku1} myVendor2 +Get-AzConnectedNetworkFunctionVendor .Example -PS C:\> Get-AzConnectedNetworkFunctionVendor -SubscriptionId "xxxxx-00000-xxxxx-00000" - -SkuList VendorName -------- ---------- -{vendor1-sku, vendor1-sku2} myVendor1 -{vendor2-sku1} myVendor2 +Get-AzConnectedNetworkFunctionVendor -SubscriptionId "xxxxx-00000-xxxxx-00000" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendor @@ -389,7 +430,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -439,19 +481,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunctionVendor_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -460,17 +531,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -479,64 +567,10 @@ Gets information about the specified network function resource. .Description Gets information about the specified network function resource. .Example -PS C:\> Get-AzConnectedNetworkFunction -Name myVnf -ResourceGroupName myResources - - -ContainerConfiguration : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations -DeviceId : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMec -Etag : "0000a530-0000-3400-0000-615c10fa0000" -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/networkFunctions/myVnf -Location : centraluseuap -ManagedApplicationId : -ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatManagedApplicationParameters -Name : myVnf -ProvisioningState : Failed -ResourceGroupName : myResources -ServiceKey : 397a7415-ec52-46b5-892b-f840ba491aab -SkuName : mySku1 -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 10/5/2021 8:45:49 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 10/5/2021 8:46:49 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/networkfunctions -UserConfiguration : {hpehss} -VendorName : AffirmedVendor -VendorProvisioningState : NotProvisioned - +Get-AzConnectedNetworkFunction -Name myVnf -ResourceGroupName myResources .Example -PS C:\> $vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} -PS C:\> Get-AzConnectedNetworkFunction -InputObject $vnf - - -ContainerConfiguration : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations -DeviceId : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMec1 -Etag : "sampleEtagValue" -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/networkFunctions/myVnf1 -Location : eastus -ManagedApplicationId : -ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatManagedApplicationParameters -Name : myVnf1 -ProvisioningState : Succeeded -ResourceGroupName : myResources -ServiceKey : aa11-bb22-cc33-dd44 -SkuName : mySku -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 11/1/2021 11:13:57 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/15/2021 4:53:08 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/networkfunctions -UserConfiguration : {hpehss} -VendorName : AffirmedVendor -VendorProvisioningState : Provisioned - +$vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkFunction -InputObject $vnf .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -603,7 +637,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -653,6 +688,24 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunction_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunction_GetViaIdentity'; @@ -660,15 +713,26 @@ begin { List1 = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunction_List1'; } if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -677,17 +741,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -696,38 +777,10 @@ Gets the information of role instance of vendor network function. .Description Gets the information of role instance of vendor network function. .Example -PS C:\> Get-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name hpehss - -Id : -Name : hpehss -OperationalState : Running -ProvisioningState : -ResourceGroupName : -SystemDataCreatedAt : -SystemDataCreatedBy : -SystemDataCreatedByType : -SystemDataLastModifiedAt : -SystemDataLastModifiedBy : -SystemDataLastModifiedByType : -Type : - +Get-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name hpehss .Example -PS C:\> $role = @{ RoleInstanceName = "hpehss"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} -PS C:\> Get-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role - -Id : -Name : hpehss -OperationalState : Stopped -ProvisioningState : -ResourceGroupName : -SystemDataCreatedAt : -SystemDataCreatedBy : -SystemDataCreatedByType : -SystemDataLastModifiedAt : -SystemDataLastModifiedBy : -SystemDataLastModifiedByType : -Type : - +$role = @{ RoleInstanceName = "hpehss"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Get-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -806,7 +859,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -856,21 +910,50 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunctionRoleInstance_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunctionRoleInstance_GetViaIdentity'; List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunctionRoleInstance_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -879,17 +962,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -898,46 +998,10 @@ Gets information about the specified vendor network function. .Description Gets information about the specified vendor network function. .Example -PS C:\> Get-AzConnectedNetworkVendorFunction -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor - -Id : /subscriptions/xxxx-3333-xxxx-3333/providers/Microsoft.HybridNetwork/locations/centraluseuap/vendors/myVendor/networkfunctions/1b69005b-9168-4d74-a371-d4c4f6a521d - 0 -Name : 1234-abcd-4321-dcba -NetworkFunctionVendorConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} -ProvisioningState : Succeeded -ResourceGroupName : -SkuName : mySku -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 11/25/2021 2:04:28 PM -SystemDataCreatedBy : xxxxx-11111-xxxxx-11111 -SystemDataCreatedByType : Application -SystemDataLastModifiedAt : 11/25/2021 2:04:28 PM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/locations/vendors/networkfunctions -VendorProvisioningState : NotProvisioned - +Get-AzConnectedNetworkVendorFunction -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor .Example -PS C:\> $vendorNF = @{ ServiceKey = "1234-abcd-4321-dcba"; VendorName = "myVendor"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"} -PS C:\> Get-AzConnectedNetworkVendorFunction -InputObject $vendorNF - -Id : /subscriptions/xxxx-3333-xxxx-3333/providers/Microsoft.HybridNetwork/locations/centraluseuap/vendors/myVendor/networkfunctions/1b69005b-9168-4d74-a371-d4c4f6a521d - 0 -Name : 1234-abcd-4321-dcba -NetworkFunctionVendorConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} -ProvisioningState : Succeeded -ResourceGroupName : -SkuName : mySku -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 11/25/2021 2:04:44 PM -SystemDataCreatedBy : xxxxx-11111-xxxxx-11111 -SystemDataCreatedByType : Application -SystemDataLastModifiedAt : 11/25/2021 2:36:28 PM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/locations/vendors/networkfunctions -VendorProvisioningState : Provisioned - +$vendorNF = @{ ServiceKey = "1234-abcd-4321-dcba"; VendorName = "myVendor"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"} +Get-AzConnectedNetworkVendorFunction -InputObject $vendorNF .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -1015,7 +1079,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -1065,21 +1130,50 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunction_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunction_GetViaIdentity'; List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorFunction_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1088,17 +1182,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -1107,36 +1218,10 @@ Gets the preview information of a vendor sku. .Description Gets the preview information of a vendor sku. .Example -PS C:\> Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 - -Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-22222-xxxxx-22222 -Name : xxxxx-22222-xxxxx-22222 -ProvisioningState : Succeeded -ResourceGroupName : -SystemDataCreatedAt : 11/24/2021 4:41:22 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/24/2021 4:41:22 AM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions - +Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 .Example -PS C:\> $skuPreview = @{ SkuName = "mySku"; VendorName = "myVendor"; PreviewSubscription = "xxxxx-22222-xxxxx-22222"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} -PS C:\> Get-AzConnectedNetworkVendorSkuPreview -InputObject $skuPreview - -Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-22222-xxxxx-22222 -Name : xxxxx-22222-xxxxx-22222 -ProvisioningState : Succeeded -ResourceGroupName : -SystemDataCreatedAt : 11/24/2021 4:41:22 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/24/2021 4:41:22 AM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions - +$skuPreview = @{ SkuName = "mySku"; VendorName = "myVendor"; PreviewSubscription = "xxxxx-22222-xxxxx-22222"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkVendorSkuPreview -InputObject $skuPreview .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -1207,7 +1292,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -1257,21 +1343,50 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSkuPreview_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSkuPreview_GetViaIdentity'; List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSkuPreview_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1280,17 +1395,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -1299,45 +1431,7 @@ Gets information about the specified sku. .Description Gets information about the specified sku. .Example -PS C:\> Get-AzConnectedNetworkVendorSku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 - -DeploymentMode : PrivateEdgeZone -Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor/VendorSkus/mySku -ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationParameters -ManagedApplicationTemplate : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationTemplate -Name : mySku -NetworkFunctionTemplateNetworkFunctionRoleConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} -NetworkFunctionType : -Preview : True -ProvisioningState : Succeeded -ResourceGroupName : -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 11/4/2020 3:35:33 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/4/2020 3:43:58 PM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : Microsoft.HybridNetwork/vendors/VendorSkus - -DeploymentMode : PrivateEdgeZone -Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorskus/mySku_1 -ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationParameters -ManagedApplicationTemplate : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationTemplate -Name : mySku_1 -NetworkFunctionTemplateNetworkFunctionRoleConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} -NetworkFunctionType : -Preview : True -ProvisioningState : Failed -ResourceGroupName : -SkuType : EvolvedPacketCore -SystemDataCreatedAt : 11/11/2020 2:25:32 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/11/2020 2:25:32 PM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Type : Microsoft.HybridNetwork/vendors/vendorskus +Get-AzConnectedNetworkVendorSku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -1401,7 +1495,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -1451,21 +1546,50 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSku_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSku_GetViaIdentity'; List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendorSku_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1474,17 +1598,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -1493,40 +1634,10 @@ Gets information about the specified vendor. .Description Gets information about the specified vendor. .Example -PS C:\> Get-AzConnectedNetworkVendor -Name myVendor - - -Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor -Name : myVendor -ProvisioningState : Succeeded -ResourceGroupName : -Sku : -SystemDataCreatedAt : 9/7/2021 3:02:02 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 9/7/2021 3:02:03 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/vendors - +Get-AzConnectedNetworkVendor -Name myVendor .Example -PS C:\> $vendor = @{ VendorName = "myVendor1"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} -PS C:\> Get-AzConnectedNetworkVendor -InputObject $vendor - - -Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor1 -Name : myVendor1 -ProvisioningState : Succeeded -ResourceGroupName : -Sku : -SystemDataCreatedAt : 9/7/2021 3:02:02 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 9/7/2021 3:02:03 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/vendors - +$vendor = @{ VendorName = "myVendor1"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkVendor -InputObject $vendor .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -1584,7 +1695,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -1634,21 +1746,50 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Get = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendor_Get'; GetViaIdentity = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendor_GetViaIdentity'; List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkVendor_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1657,17 +1798,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -1676,47 +1834,11 @@ Creates or updates a device. .Description Creates or updates a device. .Example -PS C:\> $ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse" -PS C:\> New-AzConnectedNetworkDevice -Name "myMecDevice" -ResourceGroupName "myResources" -Location "eastus" -Property $ase - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice -Location : eastus -Name : myMecDevice -NetworkFunction : -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : NotRegistered -SystemDataCreatedAt : 11/25/2021 4:47:45 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : myVendor -SystemDataLastModifiedAt : 11/25/2021 4:47:47 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/devices - +$ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse" +New-AzConnectedNetworkDevice -Name "myMecDevice" -ResourceGroupName "myResources" -Location "eastus" -Property $ase .Example -PS C:\> $ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" -PS C:\> New-AzConnectedNetworkDevice -Name "myMecDevice1" -ResourceGroupName "myResources" -Location "eastus2euap" -Property $ase -SubscriptionId xxxxx-00000-xxxxx-00000 - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice1 -Location : eastus -Name : myMecDevice1 -NetworkFunction : -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : Registered -SystemDataCreatedAt : 11/25/2021 4:49:34 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : myVendor -SystemDataLastModifiedAt : 11/25/2021 4:57:47 AM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/devices - +$ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" +New-AzConnectedNetworkDevice -Name "myMecDevice1" -ResourceGroupName "myResources" -Location "eastus2euap" -Property $ase -SubscriptionId xxxxx-00000-xxxxx-00000 .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice @@ -1780,7 +1902,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -1842,19 +1965,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkDevice_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -1863,17 +2015,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -1886,26 +2055,21 @@ Creates or updates a network function resource. This operation can take up to 6 hours to complete. This is expected service behavior. .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" -PS C:\> $customData = "I2Nsb3VkLWNvbmZpZwp3cml0ZV9maWxlczoKLSBwYXRoOiAvdmFyL2xpYi9jbG91ZC9paHNzY29uZmlnLmpzb24KICBwZXJtaXNzaW9uczogJzA2NDQnCiAgb3duZXI6IHJvb3Q6cm9vdAogIGNvbnRlbnQ6IHwKICAgIHsKICAgICAgICAgICAiRGlhbWV0ZXJHVyI6ewogICAgICAgICAgICAgICAgICAiSE9TVElQQUREUkVTUyI6IjEyOC4wLjAuMSIsCiAgICAgICAgICAgICAgICAgICJGUUROIjoiaHNzLmF5VmVuZG9yLmNvbSIsCiAgICAgICAgICAgICAgICAgICJSRUFMTSI6Imhzcy5lcGMubXlWZW5kb3I5OS5teVZlbmRvci4zZ3BwbmV0d29yay5vcmciCiAgICAgICAgICAgfSwKICAgICAgICAgICAiREdXQmluZEFkZHIiOnsKICAgICAgICAgICAgICAgICAgIkFERFJFU1MiOiIxMjguMC4wLjIiLAogICAgICAgICAgICAgICAgICAiVFJBTlNQT1JUIjoiU0NUUCIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjozODY4CiAgICAgICAgICAgfSwKICAgICAgICAgICAiU05NUFRhcmdldCI6ewogICAgICAgICAgICAgICAgICAiSE9TVCI6IjEyOC4wLjAuMyIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjoiMTYyIiwKICAgICAgICAgICAgICAgICAgIlRSSUdHRVJfTEVWRUwiOiIzIgogICAgICAgICAgIH0sCiAgICAgICAgICAgIk1hbmFnZW1lbnQiOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNCIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjEvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAogICAgICAgICAgICJMYW4iOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNSIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjAvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAoKICAgIH0JCSAgCg==" -PS C:\> $userconf = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -OSProfileCustomData $customData -RoleName "hpehss" -PS C:\> New-AzConnectedNetworkFunction -Name vnf_Test1 -ResourceGroupName myResources -Location "eastus" -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_2111_020 -SkuName Affirmed-HSS-0527 -UserConfiguration $userconf -VendorName "AffirmedVendor" - -Location Name Etag ResourceGroupName --------- ---- ---- ----------------- -eastus vnf_Test1 "SampleEtagvalue" myResources +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$customData = "I2Nsb3VkLWNvbmZpZwp3cml0ZV9maWxlczoKLSBwYXRoOiAvdmFyL2xpYi9jbG91ZC9paHNzY29uZmlnLmpzb24KICBwZXJtaXNzaW9uczogJzA2NDQnCiAgb3duZXI6IHJvb3Q6cm9vdAogIGNvbnRlbnQ6IHwKICAgIHsKICAgICAgICAgICAiRGlhbWV0ZXJHVyI6ewogICAgICAgICAgICAgICAgICAiSE9TVElQQUREUkVTUyI6IjEyOC4wLjAuMSIsCiAgICAgICAgICAgICAgICAgICJGUUROIjoiaHNzLmF5VmVuZG9yLmNvbSIsCiAgICAgICAgICAgICAgICAgICJSRUFMTSI6Imhzcy5lcGMubXlWZW5kb3I5OS5teVZlbmRvci4zZ3BwbmV0d29yay5vcmciCiAgICAgICAgICAgfSwKICAgICAgICAgICAiREdXQmluZEFkZHIiOnsKICAgICAgICAgICAgICAgICAgIkFERFJFU1MiOiIxMjguMC4wLjIiLAogICAgICAgICAgICAgICAgICAiVFJBTlNQT1JUIjoiU0NUUCIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjozODY4CiAgICAgICAgICAgfSwKICAgICAgICAgICAiU05NUFRhcmdldCI6ewogICAgICAgICAgICAgICAgICAiSE9TVCI6IjEyOC4wLjAuMyIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjoiMTYyIiwKICAgICAgICAgICAgICAgICAgIlRSSUdHRVJfTEVWRUwiOiIzIgogICAgICAgICAgIH0sCiAgICAgICAgICAgIk1hbmFnZW1lbnQiOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNCIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjEvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAogICAgICAgICAgICJMYW4iOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNSIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjAvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAoKICAgIH0JCSAgCg==" +$userconf = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -OSProfileCustomData $customData -RoleName "hpehss" +New-AzConnectedNetworkFunction -Name vnf_Test1 -ResourceGroupName myResources -Location "eastus" -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_2111_020 -SkuName Affirmed-HSS-0527 -UserConfiguration $userconf -VendorName "AffirmedVendor" .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" -PS C:\> $userconfig2 = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName "hpehss" -PS C:\> $vnf1 = New-AzConnectedNetworkFunction -Name vnftest11 -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_autotest_01 -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 -Location eastus2euap -SkuName staticSku -VendorName hssvendor01 -UserConfiguration $userconfig2 -verbose -PS C:\> $v2.ServiceKey -abcd-sample-service-key-val-1234 +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$userconfig2 = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName "hpehss" +$vnf1 = New-AzConnectedNetworkFunction -Name vnftest11 -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_autotest_01 -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 -Location eastus2euap -SkuName staticSku -VendorName hssvendor01 -UserConfiguration $userconfig2 -verbose +$v2.ServiceKey .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction @@ -1926,7 +2090,7 @@ USERCONFIGURATION : The network function co [MacAddress ]: The MAC address of the network interface. [Name ]: The name of the network interface. [VMSwitchType ]: The type of the VM switch. - [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) [RoleName ]: The name of the network function role. [UserDataParameter ]: The user data parameters from the customer. .Link @@ -2023,7 +2187,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -2085,19 +2250,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkFunction_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -2106,17 +2300,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -2129,15 +2340,15 @@ Creates or updates a vendor network function. This operation can take up to 6 hours to complete. This is expected service behavior. .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" -PS C:\> $keyData = @{keyData = "ssh-rsa\AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb redmond\user@n1-azuredev1"; path = $Null} -PS C:\> $keys = @{ } -PS C:\> $key += $keyData -PS C:\> $vendorconf = New-AzConnectedNetworkFunctionVendorConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName hpehss -OSProfileAdminUsername MecUser -OSProfileCustomData $customData -OSProfileCustomDataRequired $True -SshPublicKey $key -PS C:\> $vendorvnf1 = New-AzConnectedNetworkVendorFunction -LocationName eastus2euap -ServiceKey b78d39-xxxx-xxxx-00946c5 -SubscriptionId xxxx-4444-xxxx-4444 -VendorName myVendor -VendorConfiguration $vendorconf -SkuType EvolvedPacketCore -VendorProvisioningState Provisioning +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$keyData = @{keyData = "ssh-rsa\AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb redmond\user@n1-azuredev1"; path = $Null} +$keys = @{ } +$key += $keyData +$vendorconf = New-AzConnectedNetworkFunctionVendorConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName hpehss -OSProfileAdminUsername MecUser -OSProfileCustomData $customData -OSProfileCustomDataRequired $True -SshPublicKey $key +$vendorvnf1 = New-AzConnectedNetworkVendorFunction -LocationName eastus2euap -ServiceKey b78d39-xxxx-xxxx-00946c5 -SubscriptionId xxxx-4444-xxxx-4444 -VendorName myVendor -VendorConfiguration $vendorconf -SkuType EvolvedPacketCore -VendorProvisioningState Provisioning .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction @@ -2158,12 +2369,12 @@ VENDORCONFIGURATION : An array of network [MacAddress ]: The MAC address of the network interface. [Name ]: The name of the network interface. [VMSwitchType ]: The type of the VM switch. - [OSProfileAdminUsername ]: Specifies the name of the administrator account. **Windows-only restriction:** Cannot end in "." **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". **Minimum-length (Linux):** 1 character **Max-length (Linux):** 64 characters **Max-length (Windows):** 20 characters
  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + [OSProfileAdminUsername ]: Specifies the name of the administrator account. **Windows-only restriction:** Cannot end in "." **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". **Minimum-length (Linux):** 1 character **Max-length (Linux):** 64 characters **Max-length (Windows):** 20 characters
  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) [OSProfileCustomDataRequired ]: Indicates if custom data is required to deploy this role. [RoleName ]: The name of the vendor network function role. [SshPublicKey ]: The list of SSH public keys used to authenticate with linux based VMs. - [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). [Path ]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys .Link https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkvendorfunction @@ -2224,7 +2435,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -2286,19 +2498,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkVendorFunction_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -2307,17 +2548,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -2326,20 +2584,7 @@ Creates or updates preview information of a vendor sku. .Description Creates or updates preview information of a vendor sku. .Example -PS C:\> New-AzConnectedNetworkVendorSkuPreview -PreviewSubscription xxxxx-00000-xxxxx-00000 -SkuName mySku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 - -Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-00000-xxxxx-00000 -Name : xxxxx-00000-xxxxx-00000 -ProvisioningState : Succeeded -ResourceGroupName : -SystemDataCreatedAt : 12/6/2021 5:37:35 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 12/6/2021 5:37:35 AM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions - +New-AzConnectedNetworkVendorSkuPreview -PreviewSubscription xxxxx-00000-xxxxx-00000 -SkuName mySku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription @@ -2380,7 +2625,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -2442,19 +2688,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkVendorSkuPreview_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -2463,17 +2738,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -2486,9 +2778,8 @@ Creates or updates a sku. This operation can take up to 2 hours to complete. This is expected service behavior. .Example -PS C:\> $role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName NetFoundry -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" -PS C:\> New-AzConnectedNetworkVendorSku -SkuName sku1 -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 -SkuType VirtualMachine -DeploymentMode PrivateEdgeZone -NetworkFunctionRoleConfigurationType @($role) - +$role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName NetFoundry -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" +New-AzConnectedNetworkVendorSku -SkuName sku1 -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 -SkuType VirtualMachine -DeploymentMode PrivateEdgeZone -NetworkFunctionRoleConfigurationType @($role) .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku @@ -2518,13 +2809,13 @@ NETWORKFUNCTIONROLECONFIGURATIONTYPE : An a [OSDiskName ]: The VHD name. [OSDiskOstype ]: The OS type. [OSDiskSizeGb ]: Specifies the size of os disk in gigabytes. This is the fully expanded disk size needed of the VHD image on the ASE. This disk size should be greater than the size of the VHD provided in vhdUri. - [OSProfileAdminUsername ]: Specifies the name of the administrator account. **Windows-only restriction:** Cannot end in "." **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". **Minimum-length (Linux):** 1 character **Max-length (Linux):** 64 characters **Max-length (Windows):** 20 characters
  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + [OSProfileAdminUsername ]: Specifies the name of the administrator account. **Windows-only restriction:** Cannot end in "." **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". **Minimum-length (Linux):** 1 character **Max-length (Linux):** 64 characters **Max-length (Windows):** 20 characters
  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [OSProfileCustomData ]: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) [OSProfileCustomDataRequired ]: Indicates if custom data is required to deploy this role. [RoleName ]: The name of the network function role. [RoleType ]: Role type. [SshPublicKey ]: The list of SSH public keys used to authenticate with linux based VMs. - [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). [Path ]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys [StorageProfileDataDisk ]: Specifies the parameters that are used to add a data disk to a virtual machine. [CreateOption ]: Specifies how the virtual machine should be created. @@ -2614,7 +2905,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -2676,19 +2968,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkVendorSku_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -2697,17 +3018,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -2716,37 +3054,9 @@ Creates or updates a vendor. .Description Creates or updates a vendor. .Example -PS C:\> New-AzConnectedNetworkVendor -Name myVendor - - -Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor -Name : myVendor -ProvisioningState : Succeeded -ResourceGroupName : -Sku : -SystemDataCreatedAt : 11/23/2021 6:18:55 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/23/2021 6:19:08 PM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/vendors +New-AzConnectedNetworkVendor -Name myVendor .Example -PS C:\> New-AzConnectedNetworkVendor -Name myVendor2 -SubscriptionId xxxxx-22222-xxxxx-22222 - - -Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor2 -Name : myVendor2 -ProvisioningState : Succeeded -ResourceGroupName : -Sku : -SystemDataCreatedAt : 11/23/2021 6:20:28 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/23/2021 6:20:32 PM -SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 -SystemDataLastModifiedByType : Application -Type : microsoft.hybridnetwork/vendors +New-AzConnectedNetworkVendor -Name myVendor2 -SubscriptionId xxxxx-22222-xxxxx-22222 .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor @@ -2776,7 +3086,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -2838,19 +3149,48 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ CreateExpanded = 'Az.ConnectedNetwork.private\New-AzConnectedNetworkVendor_CreateExpanded'; } if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -2859,17 +3199,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -2878,12 +3235,10 @@ Deletes the specified device. .Description Deletes the specified device. .Example -PS C:\> Remove-AzConnectedNetworkDevice -Name myMecDevice -ResourceGroupName myResources - +Remove-AzConnectedNetworkDevice -Name myMecDevice -ResourceGroupName myResources .Example -PS C:\> $mecDevice = Get-AzConnectedNetworkDevice -Name myMecDevice2 -ResourceGroupName myResources -PS C:\> Remove-AzConnectedNetworkDevice -InputObject $mecDevice - +$mecDevice = Get-AzConnectedNetworkDevice -Name myMecDevice2 -ResourceGroupName myResources +Remove-AzConnectedNetworkDevice -InputObject $mecDevice .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -2947,7 +3302,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -3015,20 +3371,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkDevice_Delete'; DeleteViaIdentity = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkDevice_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -3037,17 +3422,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -3060,12 +3462,10 @@ Deletes the specified network function resource. This operation can take up to 1 hour to complete. This is expected service behavior. .Example -PS C:\> Remove-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf - +Remove-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf .Example -PS C:\> $vnf = Get-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf1 -PS C:\> Remove-AzConnectedNetworkFunction -InputObject $vnf - +$vnf = Get-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf1 +Remove-AzConnectedNetworkFunction -InputObject $vnf .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -3129,7 +3529,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -3197,20 +3598,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkFunction_Delete'; DeleteViaIdentity = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkFunction_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -3219,17 +3649,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -3238,12 +3685,10 @@ Deletes the preview information of a vendor sku. .Description Deletes the preview information of a vendor sku. .Example -PS C:\> Remove-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 - +Remove-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 .Example -PS C:\> $sku = Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku1 -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 -PS C:\> Remove-AzConnectedNetworkVendorSkuPreview -InputObject $sku - +$sku = Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku1 -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 +Remove-AzConnectedNetworkVendorSkuPreview -InputObject $sku .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -3311,7 +3756,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -3379,20 +3825,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendorSkuPreview_Delete'; DeleteViaIdentity = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendorSkuPreview_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -3401,17 +3876,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -3424,12 +3916,10 @@ Deletes the specified sku. This operation can take up to 2 hours to complete. This is expected service behavior. .Example -PS C:\> Remove-AzConnectedNetworkVendorSku -SkuName MySku -VendorName MyVendor - +Remove-AzConnectedNetworkVendorSku -SkuName MySku -VendorName MyVendor .Example $sku = Get-AzConnectedNetworkVendorSku -SkuName MySku1 -VendorName MyVendor -PS C:\> Remove-AzConnectedNetworkVendorSku -InputObject $sku - +Remove-AzConnectedNetworkVendorSku -InputObject $sku .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -3491,7 +3981,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -3559,20 +4050,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendorSku_Delete'; DeleteViaIdentity = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendorSku_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -3581,17 +4101,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -3600,12 +4137,10 @@ Deletes the specified vendor. .Description Deletes the specified vendor. .Example -PS C:\> Remove-AzConnectedNetworkVendor -Name MyVendor - +Remove-AzConnectedNetworkVendor -Name MyVendor .Example -PS C:\> $vendor = Get-AzConnectedNetworkVendor -Name MyVendor1 -PS C:\> Remove-AzConnectedNetworkVendor -InputObject $vendor - +$vendor = Get-AzConnectedNetworkVendor -Name MyVendor1 +Remove-AzConnectedNetworkVendor -InputObject $vendor .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -3662,7 +4197,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -3730,20 +4266,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendor_Delete'; DeleteViaIdentity = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendor_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -3752,17 +4317,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -3771,12 +4353,10 @@ Restarts a role instance of a vendor network function. .Description Restarts a role instance of a vendor network function. .Example -PS C:\> Restart-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 - +Restart-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 .Example -PS C:\> $role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} -PS C:\> Restart-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role - +$role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Restart-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -3851,7 +4431,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -3919,20 +4500,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Restart = 'Az.ConnectedNetwork.private\Restart-AzConnectedNetworkVendorFunctionRoleInstance_Restart'; RestartViaIdentity = 'Az.ConnectedNetwork.private\Restart-AzConnectedNetworkVendorFunctionRoleInstance_RestartViaIdentity'; } if (('Restart') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -3941,17 +4551,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -3960,12 +4587,10 @@ Starts a role instance of a vendor network function. .Description Starts a role instance of a vendor network function. .Example -PS C:\> Start-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 - +Start-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 .Example -PS C:\> $role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} -PS C:\> Start-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role - +$role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Start-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -4040,7 +4665,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -4108,20 +4734,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Start = 'Az.ConnectedNetwork.private\Start-AzConnectedNetworkVendorFunctionRoleInstance_Start'; StartViaIdentity = 'Az.ConnectedNetwork.private\Start-AzConnectedNetworkVendorFunctionRoleInstance_StartViaIdentity'; } if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -4130,17 +4785,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -4149,12 +4821,10 @@ Powers off (stop) a role instance of a vendor network function. .Description Powers off (stop) a role instance of a vendor network function. .Example -PS C:\> Stop-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 - +Stop-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 .Example -PS C:\> $role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} -PS C:\> Stop-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role - +$role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Stop-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -4229,7 +4899,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -4297,20 +4968,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Stop = 'Az.ConnectedNetwork.private\Stop-AzConnectedNetworkVendorFunctionRoleInstance_Stop'; StopViaIdentity = 'Az.ConnectedNetwork.private\Stop-AzConnectedNetworkVendorFunctionRoleInstance_StopViaIdentity'; } if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -4319,17 +5019,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -4338,48 +5055,12 @@ Updates device tags. .Description Updates device tags. .Example -PS C:\> $tags = @{ NewTag = "NewTagValue"} -PS C:\> Update-AzConnectedNetworkDeviceTag -DeviceName "myMecDevice" -ResourceGroupName "myResources" -Tag $tags - - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice -Location : eastus -Name : myMecDevice -NetworkFunction : -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : NotRegistered -SystemDataCreatedAt : 11/25/2021 4:47:45 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/25/2021 5:22:57 AM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/devices +$tags = @{ NewTag = "NewTagValue"} +Update-AzConnectedNetworkDeviceTag -DeviceName "myMecDevice" -ResourceGroupName "myResources" -Tag $tags .Example -PS C:\> $tags = @{ NewTag1 = "NewTagValue1"} -PS C:\> $mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} -PS C:\> Update-AzConnectedNetworkDeviceTag -InputObject $mecDevice -Tag $tags - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_2111_09 -Location : eastus -Name : mec_2111_09 -NetworkFunction : {/subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/mrg-vmware_sdwan_edge_zones-20211124063650/providers/Microsoft.HybridNetwork/networkFunctions/Edge101} -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : Registered -SystemDataCreatedAt : 11/23/2021 10:27:13 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/25/2021 5:53:12 AM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/devices - +$tags = @{ NewTag1 = "NewTagValue1"} +$mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Update-AzConnectedNetworkDeviceTag -InputObject $mecDevice -Tag $tags .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -4449,7 +5130,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -4499,20 +5181,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.ConnectedNetwork.private\Update-AzConnectedNetworkDeviceTag_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.ConnectedNetwork.private\Update-AzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -4521,17 +5232,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -4540,20 +5268,12 @@ Updates the tags for the network function resource. .Description Updates the tags for the network function resource. .Example -PS C:\> $tags = @{ NewTag = "NewTagValue"} -PS C:\> Update-AzConnectedNetworkFunctionTag -NetworkFunctionName myNewVnf1 -ResourceGroupName myResources -Tag $tags - -Location Name Etag ResourceGroupName --------- ---- ---- ----------------- -eastus2euap myNewVnf1 "sampleEtagValue" myResources +$tags = @{ NewTag = "NewTagValue"} +Update-AzConnectedNetworkFunctionTag -NetworkFunctionName myNewVnf1 -ResourceGroupName myResources -Tag $tags .Example -PS C:\> $tags = @{ NewTag = "NewTagValue"} -PS C:\> $vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "00000000-0000-0000-0000-000000000000"} -PS C:\> Update-AzConnectedNetworkFunctionTag -InputObject $vnf -Tag $tags - -Location Name Etag ResourceGroupName --------- ---- ---- ----------------- -eastus2euap myNewVnf1 "0000f211-0000-3300-0000-61a9edc70000" myResources +$tags = @{ NewTag = "NewTagValue"} +$vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "00000000-0000-0000-0000-000000000000"} +Update-AzConnectedNetworkFunctionTag -InputObject $vnf -Tag $tags .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -4623,7 +5343,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -4673,20 +5394,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.ConnectedNetwork.private\Update-AzConnectedNetworkFunctionTag_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.ConnectedNetwork.private\Update-AzConnectedNetworkFunctionTag_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -4695,17 +5445,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -4714,11 +5481,7 @@ Create a in-memory object for AzureStackEdgeFormat .Description Create a in-memory object for AzureStackEdgeFormat .Example -PS C:\> New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" - -eviceType ProvisioningState Status ----------- ----------------- ------ -AzureStackEdge +New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.AzureStackEdgeFormat @@ -4743,16 +5506,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkAzureStackEdgeObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -4761,17 +5547,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -4780,18 +5583,13 @@ Create a in-memory object for NetworkFunctionRoleConfiguration .Description Create a in-memory object for NetworkFunctionRoleConfiguration .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" -PS C:\> $keyData = @{keyData = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb"; path = $Null} -PS C:\> $key = @( $keyData) -PS C:\> $role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName Disk1 -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" - -RoleName RoleType VirtualMachineSize --------- -------- ------------------ -hpehss VirtualMachine Standard_D3_v2 - +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$keyData = @{keyData = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb"; path = $Null} +$key = @( $keyData) +$role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName Disk1 -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionRoleConfiguration @@ -4813,7 +5611,7 @@ NETWORKINTERFACE : The network interface configurations. [VMSwitchType ]: The type of the VM switch. SSHPUBLICKEY : The list of SSH public keys used to authenticate with linux based VMs. - [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). [Path ]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys STORAGEPROFILEDATADISK : Specifies the parameters that are used to add a data disk to a virtual machine. @@ -5000,16 +5798,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkFunctionRoleConfigurationObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -5018,17 +5839,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -5037,12 +5875,12 @@ Create a in-memory object for NetworkFunctionUserConfiguration .Description Create a in-memory object for NetworkFunctionUserConfiguration .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "LAN" -PS C:\> $customData = "I2Nsb3VkLWNvbmZpZwp3cml0ZV9maWxlczoKLSBwYXRoOiAvdmFyL2xpYi9jbG91ZC9paHNzY29uZmlnLmpzb24KICBwZXJtaXNzaW9uczogJzA2NDQnCiAgb3duZXI6IHJvb3Q6cm9vdAogIGNvbnRlbnQ6IHwKICAgIHsKICAgICAgICAgICAiRGlhbWV0ZXJHVyI6ewogICAgICAgICAgICAgICAgICAiSE9TVElQQUREUkVTUyI6IjEyOC4wLjAuMSIsCiAgICAgICAgICAgICAgICAgICJGUUROIjoiaHNzLmF5VmVuZG9yLmNvbSIsCiAgICAgICAgICAgICAgICAgICJSRUFMTSI6Imhzcy5lcGMubXlWZW5kb3I5OS5teVZlbmRvci4zZ3BwbmV0d29yay5vcmciCiAgICAgICAgICAgfSwKICAgICAgICAgICAiREdXQmluZEFkZHIiOnsKICAgICAgICAgICAgICAgICAgIkFERFJFU1MiOiIxMjguMC4wLjIiLAogICAgICAgICAgICAgICAgICAiVFJBTlNQT1JUIjoiU0NUUCIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjozODY4CiAgICAgICAgICAgfSwKICAgICAgICAgICAiU05NUFRhcmdldCI6ewogICAgICAgICAgICAgICAgICAiSE9TVCI6IjEyOC4wLjAuMyIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjoiMTYyIiwKICAgICAgICAgICAgICAgICAgIlRSSUdHRVJfTEVWRUwiOiIzIgogICAgICAgICAgIH0sCiAgICAgICAgICAgIk1hbmFnZW1lbnQiOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNCIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjEvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAogICAgICAgICAgICJMYW4iOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNSIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjAvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAoKICAgIH0JCSAgCg==" -PS C:\> $userconf = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -OSProfileCustomData $customData -RoleName "hpehss" +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "LAN" +$customData = "I2Nsb3VkLWNvbmZpZwp3cml0ZV9maWxlczoKLSBwYXRoOiAvdmFyL2xpYi9jbG91ZC9paHNzY29uZmlnLmpzb24KICBwZXJtaXNzaW9uczogJzA2NDQnCiAgb3duZXI6IHJvb3Q6cm9vdAogIGNvbnRlbnQ6IHwKICAgIHsKICAgICAgICAgICAiRGlhbWV0ZXJHVyI6ewogICAgICAgICAgICAgICAgICAiSE9TVElQQUREUkVTUyI6IjEyOC4wLjAuMSIsCiAgICAgICAgICAgICAgICAgICJGUUROIjoiaHNzLmF5VmVuZG9yLmNvbSIsCiAgICAgICAgICAgICAgICAgICJSRUFMTSI6Imhzcy5lcGMubXlWZW5kb3I5OS5teVZlbmRvci4zZ3BwbmV0d29yay5vcmciCiAgICAgICAgICAgfSwKICAgICAgICAgICAiREdXQmluZEFkZHIiOnsKICAgICAgICAgICAgICAgICAgIkFERFJFU1MiOiIxMjguMC4wLjIiLAogICAgICAgICAgICAgICAgICAiVFJBTlNQT1JUIjoiU0NUUCIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjozODY4CiAgICAgICAgICAgfSwKICAgICAgICAgICAiU05NUFRhcmdldCI6ewogICAgICAgICAgICAgICAgICAiSE9TVCI6IjEyOC4wLjAuMyIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjoiMTYyIiwKICAgICAgICAgICAgICAgICAgIlRSSUdHRVJfTEVWRUwiOiIzIgogICAgICAgICAgIH0sCiAgICAgICAgICAgIk1hbmFnZW1lbnQiOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNCIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjEvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAogICAgICAgICAgICJMYW4iOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNSIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjAvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAoKICAgIH0JCSAgCg==" +$userconf = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -OSProfileCustomData $customData -RoleName "hpehss" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionUserConfiguration @@ -5115,16 +5953,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkFunctionUserConfigurationObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -5133,17 +5994,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -5152,14 +6030,14 @@ Create a in-memory object for NetworkFunctionVendorConfiguration .Description Create a in-memory object for NetworkFunctionVendorConfiguration .Example -PS C:\> $ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" -PS C:\> $ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" -PS C:\> $ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" -PS C:\> $keyData = @{keyData = "ssh-rsa\AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb redmond\userk@n1-azuredev1"; path = $Null} -PS C:\> $keys = @{ } -PS C:\> $key += $keyData -PS C:\> $vendorconf = New-AzConnectedNetworkFunctionVendorConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName hpehss -OSProfileAdminUsername MecUser -OSProfileCustomData $customData -OSProfileCustomDataRequired $True -SshPublicKey $key +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$keyData = @{keyData = "ssh-rsa\AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb redmond\userk@n1-azuredev1"; path = $Null} +$keys = @{ } +$key += $keyData +$vendorconf = New-AzConnectedNetworkFunctionVendorConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName hpehss -OSProfileAdminUsername MecUser -OSProfileCustomData $customData -OSProfileCustomDataRequired $True -SshPublicKey $key .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionVendorConfiguration @@ -5181,7 +6059,7 @@ NETWORKINTERFACE : The network interface configurations. [VMSwitchType ]: The type of the VM switch. SSHPUBLICKEY : The list of SSH public keys used to authenticate with linux based VMs. - [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + [KeyData ]: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). [Path ]: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys .Link https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkFunctionVendorConfigurationObject @@ -5264,16 +6142,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkFunctionVendorConfigurationObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -5282,17 +6183,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -5301,11 +6219,7 @@ Create a in-memory object for NetworkInterfaceIPConfiguration .Description Create a in-memory object for NetworkInterfaceIPConfiguration .Example -PS C:\> New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" - -DnsServer Gateway IPAddress IPAllocationMethod IPVersion Subnet ---------- ------- --------- ------------------ --------- ------ - Dynamic IPv4 +New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkInterfaceIPConfiguration @@ -5360,16 +6274,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkInterfaceIPConfigurationObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -5378,17 +6315,34 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } <# @@ -5397,11 +6351,7 @@ Create a in-memory object for NetworkInterface .Description Create a in-memory object for NetworkInterface .Example -PS C:\> New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" - -MacAddress Name VMSwitchType ----------- ---- ------------ - mrmmanagementnic1 Management +New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkInterface @@ -5457,16 +6407,39 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ __AllParameterSets = 'Az.ConnectedNetwork.custom\New-AzConnectedNetworkInterfaceObject'; } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -5475,15 +6448,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkDevice.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkDevice.ps1 index 2b314e50f008..4cabf7b7d3cd 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkDevice.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkDevice.ps1 @@ -20,12 +20,10 @@ Deletes the specified device. .Description Deletes the specified device. .Example -PS C:\> Remove-AzConnectedNetworkDevice -Name myMecDevice -ResourceGroupName myResources - +Remove-AzConnectedNetworkDevice -Name myMecDevice -ResourceGroupName myResources .Example -PS C:\> $mecDevice = Get-AzConnectedNetworkDevice -Name myMecDevice2 -ResourceGroupName myResources -PS C:\> Remove-AzConnectedNetworkDevice -InputObject $mecDevice - +$mecDevice = Get-AzConnectedNetworkDevice -Name myMecDevice2 -ResourceGroupName myResources +Remove-AzConnectedNetworkDevice -InputObject $mecDevice .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -89,7 +87,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -157,20 +156,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkDevice_Delete'; DeleteViaIdentity = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkDevice_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -179,15 +207,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkFunction.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkFunction.ps1 index d5068cdec6ed..0cff8628dd47 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkFunction.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkFunction.ps1 @@ -24,12 +24,10 @@ Deletes the specified network function resource. This operation can take up to 1 hour to complete. This is expected service behavior. .Example -PS C:\> Remove-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf - +Remove-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf .Example -PS C:\> $vnf = Get-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf1 -PS C:\> Remove-AzConnectedNetworkFunction -InputObject $vnf - +$vnf = Get-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf1 +Remove-AzConnectedNetworkFunction -InputObject $vnf .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -93,7 +91,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -161,20 +160,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkFunction_Delete'; DeleteViaIdentity = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkFunction_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -183,15 +211,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendor.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendor.ps1 index 732065bd7e3e..88a86c25d285 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendor.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendor.ps1 @@ -20,12 +20,10 @@ Deletes the specified vendor. .Description Deletes the specified vendor. .Example -PS C:\> Remove-AzConnectedNetworkVendor -Name MyVendor - +Remove-AzConnectedNetworkVendor -Name MyVendor .Example -PS C:\> $vendor = Get-AzConnectedNetworkVendor -Name MyVendor1 -PS C:\> Remove-AzConnectedNetworkVendor -InputObject $vendor - +$vendor = Get-AzConnectedNetworkVendor -Name MyVendor1 +Remove-AzConnectedNetworkVendor -InputObject $vendor .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -82,7 +80,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -150,20 +149,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendor_Delete'; DeleteViaIdentity = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendor_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -172,15 +200,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendorSku.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendorSku.ps1 index 8794ce19a7ce..b3a21de5a582 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendorSku.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendorSku.ps1 @@ -24,12 +24,10 @@ Deletes the specified sku. This operation can take up to 2 hours to complete. This is expected service behavior. .Example -PS C:\> Remove-AzConnectedNetworkVendorSku -SkuName MySku -VendorName MyVendor - +Remove-AzConnectedNetworkVendorSku -SkuName MySku -VendorName MyVendor .Example $sku = Get-AzConnectedNetworkVendorSku -SkuName MySku1 -VendorName MyVendor -PS C:\> Remove-AzConnectedNetworkVendorSku -InputObject $sku - +Remove-AzConnectedNetworkVendorSku -InputObject $sku .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -91,7 +89,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -159,20 +158,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendorSku_Delete'; DeleteViaIdentity = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendorSku_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -181,15 +209,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendorSkuPreview.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendorSkuPreview.ps1 index 6ffe655464c1..c6167a6e3dd1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendorSkuPreview.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Remove-AzConnectedNetworkVendorSkuPreview.ps1 @@ -20,12 +20,10 @@ Deletes the preview information of a vendor sku. .Description Deletes the preview information of a vendor sku. .Example -PS C:\> Remove-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 - +Remove-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 .Example -PS C:\> $sku = Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku1 -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 -PS C:\> Remove-AzConnectedNetworkVendorSkuPreview -InputObject $sku - +$sku = Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku1 -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 +Remove-AzConnectedNetworkVendorSkuPreview -InputObject $sku .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -93,7 +91,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -161,20 +160,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Delete = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendorSkuPreview_Delete'; DeleteViaIdentity = 'Az.ConnectedNetwork.private\Remove-AzConnectedNetworkVendorSkuPreview_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -183,15 +211,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Restart-AzConnectedNetworkVendorFunctionRoleInstance.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Restart-AzConnectedNetworkVendorFunctionRoleInstance.ps1 index c5095771d794..0e6ac9c7c1e0 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Restart-AzConnectedNetworkVendorFunctionRoleInstance.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Restart-AzConnectedNetworkVendorFunctionRoleInstance.ps1 @@ -20,12 +20,10 @@ Restarts a role instance of a vendor network function. .Description Restarts a role instance of a vendor network function. .Example -PS C:\> Restart-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 - +Restart-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 .Example -PS C:\> $role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} -PS C:\> Restart-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role - +$role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Restart-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -100,7 +98,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -168,20 +167,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Restart = 'Az.ConnectedNetwork.private\Restart-AzConnectedNetworkVendorFunctionRoleInstance_Restart'; RestartViaIdentity = 'Az.ConnectedNetwork.private\Restart-AzConnectedNetworkVendorFunctionRoleInstance_RestartViaIdentity'; } if (('Restart') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -190,15 +218,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Start-AzConnectedNetworkVendorFunctionRoleInstance.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Start-AzConnectedNetworkVendorFunctionRoleInstance.ps1 index 7eded312b526..e8fd02822c46 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Start-AzConnectedNetworkVendorFunctionRoleInstance.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Start-AzConnectedNetworkVendorFunctionRoleInstance.ps1 @@ -20,12 +20,10 @@ Starts a role instance of a vendor network function. .Description Starts a role instance of a vendor network function. .Example -PS C:\> Start-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 - +Start-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 .Example -PS C:\> $role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} -PS C:\> Start-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role - +$role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Start-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -100,7 +98,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -168,20 +167,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Start = 'Az.ConnectedNetwork.private\Start-AzConnectedNetworkVendorFunctionRoleInstance_Start'; StartViaIdentity = 'Az.ConnectedNetwork.private\Start-AzConnectedNetworkVendorFunctionRoleInstance_StartViaIdentity'; } if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -190,15 +218,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Stop-AzConnectedNetworkVendorFunctionRoleInstance.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Stop-AzConnectedNetworkVendorFunctionRoleInstance.ps1 index 66aa82fbf40e..32d96319e539 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Stop-AzConnectedNetworkVendorFunctionRoleInstance.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Stop-AzConnectedNetworkVendorFunctionRoleInstance.ps1 @@ -20,12 +20,10 @@ Powers off (stop) a role instance of a vendor network function. .Description Powers off (stop) a role instance of a vendor network function. .Example -PS C:\> Stop-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 - +Stop-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 .Example -PS C:\> $role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} -PS C:\> Stop-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role - +$role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Stop-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -100,7 +98,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -168,20 +167,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ Stop = 'Az.ConnectedNetwork.private\Stop-AzConnectedNetworkVendorFunctionRoleInstance_Stop'; StopViaIdentity = 'Az.ConnectedNetwork.private\Stop-AzConnectedNetworkVendorFunctionRoleInstance_StopViaIdentity'; } if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -190,15 +218,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Update-AzConnectedNetworkDeviceTag.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Update-AzConnectedNetworkDeviceTag.ps1 index a11ff7bb4d6c..f8db7dde075e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Update-AzConnectedNetworkDeviceTag.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Update-AzConnectedNetworkDeviceTag.ps1 @@ -20,48 +20,12 @@ Updates device tags. .Description Updates device tags. .Example -PS C:\> $tags = @{ NewTag = "NewTagValue"} -PS C:\> Update-AzConnectedNetworkDeviceTag -DeviceName "myMecDevice" -ResourceGroupName "myResources" -Tag $tags - - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice -Location : eastus -Name : myMecDevice -NetworkFunction : -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : NotRegistered -SystemDataCreatedAt : 11/25/2021 4:47:45 AM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/25/2021 5:22:57 AM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/devices +$tags = @{ NewTag = "NewTagValue"} +Update-AzConnectedNetworkDeviceTag -DeviceName "myMecDevice" -ResourceGroupName "myResources" -Tag $tags .Example -PS C:\> $tags = @{ NewTag1 = "NewTagValue1"} -PS C:\> $mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} -PS C:\> Update-AzConnectedNetworkDeviceTag -InputObject $mecDevice -Tag $tags - -DeviceType : AzureStackEdge -Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_2111_09 -Location : eastus -Name : mec_2111_09 -NetworkFunction : {/subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/mrg-vmware_sdwan_edge_zones-20211124063650/providers/Microsoft.HybridNetwork/networkFunctions/Edge101} -ProvisioningState : Succeeded -ResourceGroupName : myResources -Status : Registered -SystemDataCreatedAt : 11/23/2021 10:27:13 PM -SystemDataCreatedBy : user@microsoft.com -SystemDataCreatedByType : User -SystemDataLastModifiedAt : 11/25/2021 5:53:12 AM -SystemDataLastModifiedBy : user@microsoft.com -SystemDataLastModifiedByType : User -Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags -Type : microsoft.hybridnetwork/devices - +$tags = @{ NewTag1 = "NewTagValue1"} +$mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Update-AzConnectedNetworkDeviceTag -InputObject $mecDevice -Tag $tags .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -131,7 +95,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -181,20 +146,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.ConnectedNetwork.private\Update-AzConnectedNetworkDeviceTag_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.ConnectedNetwork.private\Update-AzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -203,15 +197,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Update-AzConnectedNetworkFunctionTag.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Update-AzConnectedNetworkFunctionTag.ps1 index ad98dcfb3774..83324d06b942 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Update-AzConnectedNetworkFunctionTag.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/exports/Update-AzConnectedNetworkFunctionTag.ps1 @@ -20,20 +20,12 @@ Updates the tags for the network function resource. .Description Updates the tags for the network function resource. .Example -PS C:\> $tags = @{ NewTag = "NewTagValue"} -PS C:\> Update-AzConnectedNetworkFunctionTag -NetworkFunctionName myNewVnf1 -ResourceGroupName myResources -Tag $tags - -Location Name Etag ResourceGroupName --------- ---- ---- ----------------- -eastus2euap myNewVnf1 "sampleEtagValue" myResources +$tags = @{ NewTag = "NewTagValue"} +Update-AzConnectedNetworkFunctionTag -NetworkFunctionName myNewVnf1 -ResourceGroupName myResources -Tag $tags .Example -PS C:\> $tags = @{ NewTag = "NewTagValue"} -PS C:\> $vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "00000000-0000-0000-0000-000000000000"} -PS C:\> Update-AzConnectedNetworkFunctionTag -InputObject $vnf -Tag $tags - -Location Name Etag ResourceGroupName --------- ---- ---- ----------------- -eastus2euap myNewVnf1 "0000f211-0000-3300-0000-61a9edc70000" myResources +$tags = @{ NewTag = "NewTagValue"} +$vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "00000000-0000-0000-0000-000000000000"} +Update-AzConnectedNetworkFunctionTag -InputObject $vnf -Tag $tags .Inputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity @@ -103,7 +95,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -153,20 +146,49 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + $mapping = @{ UpdateExpanded = 'Az.ConnectedNetwork.private\Update-AzConnectedNetworkFunctionTag_UpdateExpanded'; UpdateViaIdentityExpanded = 'Az.ConnectedNetwork.private\Update-AzConnectedNetworkFunctionTag_UpdateViaIdentityExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } } @@ -175,15 +197,32 @@ process { try { $steppablePipeline.Process($_) } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} end { try { $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generate-help.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generate-help.ps1 index ea94748c3ca1..4bf35b28d8be 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generate-help.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generate-help.ps1 @@ -66,8 +66,8 @@ foreach($directory in $directories) $docsPath = Join-Path $docsFolder $directory.Name $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue $examplesPath = Join-Path $examplesFolder $directory.Name - - Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo Write-Host -ForegroundColor Green "Created documentation in '$docsPath'" } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generate-portal-ux.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generate-portal-ux.ps1 new file mode 100644 index 000000000000..531e5d474e51 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generate-portal-ux.ps1 @@ -0,0 +1,375 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# +# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. +# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$moduleName = 'Az.ConnectedNetwork' +$rootModuleName = '' +if ($rootModuleName -eq "") +{ + $rootModuleName = $moduleName +} +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1") +$modulePath = $modulePsd1.FullName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll") +$instance = [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName +$parameterSetsInfo = Get-Module -Name "$moduleName.private" + +$buildinFunctions = @("Export-CmdletSurface", "Export-ExampleStub", "Export-FormatPs1xml", "Export-HelpMarkdown", "Export-ModelSurface", "Export-ProxyCmdlet", "Export-Psd1", "Export-TestStub", "Get-CommonParameter", "Get-ModuleGuid", "Get-ScriptCmdlet") + +function Test-FunctionSupported() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + If ($buildinfunctions.Contains($FunctionName)) { + return $false + } + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity")) { + return $false + } + If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { + return $false + } + + $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName] + foreach ($parameterInfo in $parameterSetInfo.Parameters.Values) + { + $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories + $invalideCategory = @('Query', 'Body') + if ($invalideCategory -contains $category) + { + return $false + } + } + + $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" + if ($customFiles.Length -ne 0) + { + return $false + } + + return $true +} + +function Get-MappedCmdletFromFunctionName() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + + return $cmdletName +} + +function Get-ParameterAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo, + [Parameter()] + [String] + $AttributeName + ) + return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $CmdletInfo, + [Parameter()] + [String] + $AttributeName + ) + + return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletDescription() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [String] + $CmdletName + ) + $helpInfo = Get-Help $CmdletName -Full + + $description = $helpInfo.Description.Text + if ($null -eq $description) + { + return "" + } + return $description +} + +# Test whether the parameter is from swagger http path +function Test-ParameterFromSwagger() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo + ) + $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories + $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute" + if ($null -ne $doNotExport) + { + return $false + } + + $valideCategory = @('Path') + if ($valideCategory -contains $category) + { + return $true + } + return $false +} + +function New-ExampleForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories + $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName + $name = $parameter.Name + $result += [ordered]@{ + name = "-$Name" + value = "[$category.$sourceName]" + } + } + + return $result +} + +function New-ParameterArrayInParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory + $parameterName = $parameter.Name + $parameterType = $parameter.ParameterType.ToString().Split('.')[1] + if ($parameter.SwitchParameter) + { + $parameterSignature = "-$parameterName" + } + else + { + $parameterSignature = "-$parameterName <$parameterType>" + } + if ($parameterName -eq "SubscriptionId") + { + $isMandatory = $false + } + if (-not $isMandatory) + { + $parameterSignature = "[$parameterSignature]" + } + $result += $parameterSignature + } + + return $result +} + +function New-MetadataForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute" + $httpPath = $httpAttribute.Path + $apiVersion = $httpAttribute.ApiVersion + $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value + $resourcePath = "/" + $httpPath.Split("$provider/")[1] + $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/" + $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name + $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description + [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo + [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo + + return @{ + Path = $httpPath + Provider = $provider + ResourceType = $resourceType + ApiVersion = $apiVersion + CmdletName = $cmdletName + Description = $description + Example = $example + Signature = @{ + parameters = $signature + } + } +} + +function Merge-WithExistCmdletMetadata() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Collections.Specialized.OrderedDictionary] + $ExistedCmdletInfo, + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature + $ExistedCmdletInfo.examples += [ordered]@{ + description = $ParameterSetMetadata.Description + parameters = $ParameterSetMetadata.Example + } + + return $ExistedCmdletInfo +} + +function New-MetadataForCmdlet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $cmdletName = $ParameterSetMetadata.CmdletName + $description = Get-CmdletDescription $cmdletName + $result = [ordered]@{ + name = $cmdletName + description = $description + path = $ParameterSetMetadata.Path + help = [ordered]@{ + learnMore = [ordered]@{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower() + } + parameterSets = @() + } + examples = @() + } + $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata + return $result +} + +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-functionSupported($_) } +$resourceTypes = @{} +foreach ($parameterSetName in $parameterSets) +{ + $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName] + $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo + $cmdletName = $parameterSetMetadata.CmdletName + if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName))) + { + continue + } + if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType)) + { + $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName } + if ($ExistedCmdletInfo) + { + $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo + } + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{ + resourceType = $parameterSetMetadata.ResourceType + apiVersion = $parameterSetMetadata.ApiVersion + learnMore = @{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower() + } + commands = @($cmdletInfo) + provider = $parameterSetMetadata.Provider + } + } +} + +$UXFolder = 'UX' +if (Test-Path $UXFolder) +{ + Remove-Item -Path $UXFolder -Recurse +} +$null = New-Item -ItemType Directory -Path $UXFolder + +foreach ($resourceType in $resourceTypes.Keys) +{ + $resourceTypeFileName = $resourceType -replace "/", "-" + if ($resourceTypeFileName -eq "") + { + continue + } + $resourceTypeInfo = $resourceTypes[$resourceType] + $provider = $resourceTypeInfo.provider + $providerFolder = "$UXFolder/$provider" + if (-not (Test-Path $providerFolder)) + { + $null = New-Item -ItemType Directory -Path $providerFolder + } + $resourceTypeInfo.Remove("provider") + $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" +} \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/Module.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/Module.cs index 23f9dce1f1f3..19738512d83f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/Module.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/Module.cs @@ -11,10 +11,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork using GetParameterDelegate = global::System.Func; using ModuleLoadPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; using ArgumentCompleterDelegate = global::System.Func; + using GetTelemetryIdDelegate = global::System.Func; + using TelemetryDelegate = global::System.Action; using NewRequestPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; 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 @@ -46,6 +50,12 @@ public partial class Module /// The delegate to call to get parameter data from a common module. public GetParameterDelegate GetParameterValue { get; set; } + /// The delegate to get the telemetry Id. + public GetTelemetryIdDelegate GetTelemetryId { get; set; } + + /// The delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } + /// Backing field for property. private static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module _instance; @@ -67,6 +77,12 @@ public partial class Module /// The ResourceID for this module (azure arm). public string ResourceId => @"Az.ConnectedNetwork"; + /// 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; } + /// The from the cmdlet /// The HttpPipeline for the request @@ -117,7 +133,7 @@ public void Init() /// Creates the module instance. private Module() { - /// constructor + // constructor ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork(); _handler.Proxy = _webProxy; _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient())); diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/ConnectedNetwork.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/ConnectedNetwork.cs index cfdfa67fc28a..045e3162fc3e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/ConnectedNetwork.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/ConnectedNetwork.cs @@ -234,6 +234,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -505,6 +506,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -2112,6 +2114,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -2389,6 +2392,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -3701,6 +3705,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -3982,6 +3987,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -4263,6 +4269,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -4553,6 +4560,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -5195,6 +5203,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -5472,6 +5481,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -6100,6 +6110,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -6373,6 +6384,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -6973,6 +6985,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -7234,6 +7247,7 @@ public partial class ConnectedNetwork // make the final call _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } break; } var _contentType = _response.Content.Headers.ContentType?.MediaType; diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.PowerShell.cs index f355b9b30fd5..1a11f4e1ec55 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.PowerShell.cs @@ -31,7 +31,8 @@ public partial class Any /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class Any /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -124,7 +126,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IAny De /// Creates a new instance of , deserializing the content from a json string. ///
  • /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.TypeConverter.cs index 0d6746137884..f4495595889b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class AnyTypeConverter : global::System.Management.Automation.PST { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.json.cs index 6e6d95712148..d8dcd48019c1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Any.json.cs @@ -20,7 +20,7 @@ public partial class Any partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class Any /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class Any /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs index 1a91c976c2c6..8d80b9327e5b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.PowerShell.cs @@ -31,7 +31,8 @@ public partial class ErrorAdditionalInfo /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class ErrorAdditionalInfo /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -140,7 +142,7 @@ internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject conte /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs index d97bc75bbb33..a1b887c72056 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ErrorAdditionalInfoTypeConverter : global::System.Managemen { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs index 1b2699b0a5f5..a26655f9ac9e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorAdditionalInfo.json.cs @@ -20,7 +20,7 @@ public partial class ErrorAdditionalInfo partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ErrorAdditionalInfo /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class ErrorAdditionalInfo /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs index a081dbee7c64..9c8b8a1ba23d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.PowerShell.cs @@ -31,7 +31,8 @@ public partial class ErrorDetail /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class ErrorDetail /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -164,7 +166,7 @@ internal ErrorDetail(global::System.Management.Automation.PSObject content) /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs index 26c4adb2933b..2c558b9a8e2e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ErrorDetailTypeConverter : global::System.Management.Automa { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs index 482bf0f4c128..30f18923c1b9 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorDetail.json.cs @@ -20,7 +20,7 @@ public partial class ErrorDetail partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ErrorDetail /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class ErrorDetail /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs index fc5d2e6f1167..d94384f86c57 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.PowerShell.cs @@ -34,7 +34,8 @@ public partial class ErrorResponse /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -46,7 +47,8 @@ public partial class ErrorResponse /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -175,7 +177,7 @@ internal ErrorResponse(global::System.Management.Automation.PSObject content) /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs index 1ab320f0ae93..40c715db6591 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ErrorResponseTypeConverter : global::System.Management.Auto { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs index 6731bd7c918f..dcac437bc22d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ErrorResponse.json.cs @@ -23,7 +23,7 @@ public partial class ErrorResponse partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -33,7 +33,8 @@ public partial class ErrorResponse /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -45,7 +46,8 @@ public partial class ErrorResponse /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.PowerShell.cs index 4937bfc876bd..b7ca477793a6 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.PowerShell.cs @@ -33,7 +33,8 @@ public partial class ProxyResource /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -45,7 +46,8 @@ public partial class ProxyResource /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.I /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.TypeConverter.cs index a418cd89e648..905842b08918 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ProxyResourceTypeConverter : global::System.Management.Auto { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.cs index 9e8ebd4c0add..3116b0a2f960 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.cs @@ -56,7 +56,7 @@ public ProxyResource() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener eventListener) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.json.cs index 5a9ef6b70539..21d280dc306c 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/ProxyResource.json.cs @@ -22,7 +22,7 @@ public partial class ProxyResource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class ProxyResource /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class ProxyResource /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.PowerShell.cs index 16831d88d624..f241f112ad10 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.PowerShell.cs @@ -33,7 +33,8 @@ public partial class Resource /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -45,7 +46,8 @@ public partial class Resource /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.I /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.TypeConverter.cs index 123c1c73f8ae..901bacfec757 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class ResourceTypeConverter : global::System.Management.Automatio { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.json.cs index fc3231bcd432..ed902067d849 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/Resource.json.cs @@ -22,7 +22,7 @@ public partial class Resource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class Resource /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class Resource /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.PowerShell.cs index 03770afceba3..25dbda20b550 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.PowerShell.cs @@ -31,7 +31,8 @@ public partial class SystemData /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class SystemData /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.I /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.TypeConverter.cs index 31fb7c9aab08..25f76f574a70 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class SystemDataTypeConverter : global::System.Management.Automat { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.json.cs index c7ee2b51fd50..2b706fe1aeb2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/SystemData.json.cs @@ -20,7 +20,7 @@ public partial class SystemData partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class SystemData /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class SystemData /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.PowerShell.cs index d85fe61db235..b43e20370f3c 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.PowerShell.cs @@ -33,7 +33,8 @@ public partial class TrackedResource /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -45,7 +46,8 @@ public partial class TrackedResource /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.I /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.TypeConverter.cs index 3a6eb9306058..9214702c98f5 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class TrackedResourceTypeConverter : global::System.Management.Au { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.cs index 5284086907f7..1f2cef1d4760 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.cs @@ -70,7 +70,7 @@ public TrackedResource() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener eventListener) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.json.cs index e6a57195451e..21834d2d78ba 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResource.json.cs @@ -22,7 +22,7 @@ public partial class TrackedResource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class TrackedResource /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class TrackedResource /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.PowerShell.cs index f8fcc83e2b31..5f1026b985e2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.PowerShell.cs @@ -31,7 +31,8 @@ public partial class TrackedResourceTags /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class TrackedResourceTags /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.I /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.TypeConverter.cs index c6b80a46a894..bc1c265ab00f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class TrackedResourceTagsTypeConverter : global::System.Managemen { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.json.cs index 69e7ffb084bc..027039837778 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20/TrackedResourceTags.json.cs @@ -20,7 +20,7 @@ public partial class TrackedResourceTags partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class TrackedResourceTags /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class TrackedResourceTags /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.PowerShell.cs index 2e7c47488991..05699e898e52 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.PowerShell.cs @@ -31,7 +31,8 @@ public partial class AzureStackEdgeFormat /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class AzureStackEdgeFormat /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -174,7 +176,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IAzureStackEdgeFormat FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.TypeConverter.cs index 8cf32026a808..f4fbd61b34b3 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class AzureStackEdgeFormatTypeConverter : global::System.Manageme { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.cs index b5e6a8a9179a..e89097e868f3 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.cs @@ -68,7 +68,7 @@ public AzureStackEdgeFormat() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener eventListener) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.json.cs index 34b56dbcb5d3..d250bed310fe 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/AzureStackEdgeFormat.json.cs @@ -20,7 +20,7 @@ public partial class AzureStackEdgeFormat partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class AzureStackEdgeFormat /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class AzureStackEdgeFormat /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.PowerShell.cs index bf64cf03ba8f..05211d0b1d87 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.PowerShell.cs @@ -31,7 +31,8 @@ public partial class CustomProfile /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class CustomProfile /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -132,7 +134,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ICustomProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.TypeConverter.cs index 04557741b8ef..d33672316359 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class CustomProfileTypeConverter : global::System.Management.Auto { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.json.cs index e113c7f29f81..8fc65a2de0c1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/CustomProfile.json.cs @@ -20,7 +20,7 @@ public partial class CustomProfile partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class CustomProfile /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class CustomProfile /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.PowerShell.cs index b9b426f82bbd..bdca31172edf 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.PowerShell.cs @@ -9,7 +9,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501 /// /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). ///
    [System.ComponentModel.TypeConverter(typeof(DataDiskTypeConverter))] public partial class DataDisk @@ -34,7 +34,8 @@ public partial class DataDisk /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -46,7 +47,8 @@ public partial class DataDisk /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -151,7 +153,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDataDisk FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -172,7 +174,7 @@ public override string ToString() } } /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). [System.ComponentModel.TypeConverter(typeof(DataDiskTypeConverter))] public partial interface IDataDisk diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.TypeConverter.cs index 1a6a6537d06a..c8994b17bbf2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class DataDiskTypeConverter : global::System.Management.Automatio { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.cs index 3946c3adc1c9..fa3d1d4cb6f1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.cs @@ -9,7 +9,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501 /// /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). ///
    public partial class DataDisk : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDataDisk, @@ -47,7 +47,7 @@ public DataDisk() } } /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). public partial interface IDataDisk : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IJsonSerializable { @@ -81,7 +81,7 @@ public partial interface IDataDisk : } /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). internal partial interface IDataDiskInternal { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.json.cs index 18ddc426a3bd..ddd9bdbcf459 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DataDisk.json.cs @@ -9,7 +9,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501 /// /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). ///
    public partial class DataDisk { @@ -23,7 +23,7 @@ public partial class DataDisk partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -33,7 +33,8 @@ public partial class DataDisk /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -45,7 +46,8 @@ public partial class DataDisk /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.PowerShell.cs index bbefb39ab87c..af87018700f8 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.PowerShell.cs @@ -31,7 +31,8 @@ public partial class Device /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class Device /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -180,7 +182,7 @@ internal Device(global::System.Management.Automation.PSObject content) /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.TypeConverter.cs index d426d811ac11..dfc7d382b4ce 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class DeviceTypeConverter : global::System.Management.Automation. { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.cs index f012776b9df5..f39058a901a3 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.cs @@ -83,7 +83,7 @@ public Device() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener eventListener) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.json.cs index f6bda46ce040..e7e55dd26a70 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Device.json.cs @@ -20,7 +20,7 @@ public partial class Device partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class Device /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class Device /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.PowerShell.cs index d68ff40bed7a..62ed30e827fb 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.PowerShell.cs @@ -31,7 +31,8 @@ public partial class DeviceListResult /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class DeviceListResult /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -140,7 +142,7 @@ internal DeviceListResult(global::System.Management.Automation.PSObject content) /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDeviceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.TypeConverter.cs index bc289b2ee058..74e5ed850c9b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class DeviceListResultTypeConverter : global::System.Management.A { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.json.cs index c201a91d5546..3d1549dbb887 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceListResult.json.cs @@ -20,7 +20,7 @@ public partial class DeviceListResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class DeviceListResult /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class DeviceListResult /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.PowerShell.cs index 9df2217b9b0b..60063cab40dc 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.PowerShell.cs @@ -31,7 +31,8 @@ public partial class DevicePropertiesFormat /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class DevicePropertiesFormat /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -158,7 +160,7 @@ internal DevicePropertiesFormat(global::System.Management.Automation.PSObject co /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevicePropertiesFormat FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.TypeConverter.cs index 07b764551137..f1022ff1666b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class DevicePropertiesFormatTypeConverter : global::System.Manage { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.json.cs index b8bfc2e3d910..7b01edcd20aa 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DevicePropertiesFormat.json.cs @@ -20,7 +20,7 @@ public partial class DevicePropertiesFormat partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class DevicePropertiesFormat /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class DevicePropertiesFormat /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.PowerShell.cs index 6afc27946625..9995e898f3a6 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.PowerShell.cs @@ -31,7 +31,8 @@ public partial class DeviceRegistrationKey /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class DeviceRegistrationKey /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -134,7 +136,7 @@ internal DeviceRegistrationKey(global::System.Management.Automation.PSObject con /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDeviceRegistrationKey FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.TypeConverter.cs index 20ba11ddc51c..3c50f28e5e22 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class DeviceRegistrationKeyTypeConverter : global::System.Managem { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.json.cs index 7a807928aa32..7b6566feeffb 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/DeviceRegistrationKey.json.cs @@ -20,7 +20,7 @@ public partial class DeviceRegistrationKey partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class DeviceRegistrationKey /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class DeviceRegistrationKey /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.PowerShell.cs index eca62d40fbfb..18c71d1e95da 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.PowerShell.cs @@ -31,7 +31,8 @@ public partial class ImageReference /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class ImageReference /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IImageReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.TypeConverter.cs index e0e6178e215d..dcfb43039606 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ImageReferenceTypeConverter : global::System.Management.Aut { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.json.cs index f0158adc3b21..4baee9ae1c3f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/ImageReference.json.cs @@ -20,7 +20,7 @@ public partial class ImageReference partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class ImageReference /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class ImageReference /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.PowerShell.cs index d00c2d62ead5..7d3ac4d6aece 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.PowerShell.cs @@ -31,7 +31,8 @@ public partial class LinuxConfiguration /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class LinuxConfiguration /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ILinuxConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.TypeConverter.cs index 3bdbc1025f62..2d682176ff77 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class LinuxConfigurationTypeConverter : global::System.Management { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.json.cs index 50dfd6bac851..05dda011d679 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/LinuxConfiguration.json.cs @@ -20,7 +20,7 @@ public partial class LinuxConfiguration partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class LinuxConfiguration /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class LinuxConfiguration /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.PowerShell.cs index 2a51b272d336..578b1f5ab26b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunction /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunction /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.TypeConverter.cs index 56761a14da87..304c731cfe3d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionTypeConverter : global::System.Management.Au { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.cs index aeaebecbfe1e..a64eaf34ab4b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.cs @@ -179,7 +179,7 @@ public NetworkFunction() /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener eventListener) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.json.cs index ff3bb85a2f91..e67f4e17ab07 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunction.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunction partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunction /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunction /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.PowerShell.cs index 4582b00db79f..e3eee48a0d04 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionListResult /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionListResult /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.TypeConverter.cs index 5647f5bd3be9..47127d6b1e54 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionListResultTypeConverter : global::System.Man { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.json.cs index 23ac9ae90508..815279934126 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionListResult.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionListResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionListResult /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionListResult /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.PowerShell.cs index 39fb3a4ca59d..380f702c01f9 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionPropertiesFormat /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionPropertiesFormat /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionPropertiesFormat FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.TypeConverter.cs index 6d19bc56a273..34e823f1faeb 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionPropertiesFormatTypeConverter : global::Syst { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.json.cs index 179138e4c9fc..ebbd1d91c86e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormat.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionPropertiesFormat partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionPropertiesFormat /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionPropertiesFormat /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.PowerShell.cs index 6398432b9ff8..260888740cc0 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionPropertiesFormatManagedApplicationParameters /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionPropertiesFormatManagedApplicationParameters /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,7 +95,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionPropertiesFormatManagedApplicationParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.TypeConverter.cs index c6328f4a0e70..d80e9256f571 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.TypeConverter.cs @@ -15,20 +15,20 @@ public partial class NetworkFunctionPropertiesFormatManagedApplicationParameters { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -102,8 +103,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.json.cs index 4084c035e0f6..242b7c24acbd 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatManagedApplicationParameters.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionPropertiesFormatManagedApplicationParameters partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionPropertiesFormatManagedApplicationParameters /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionPropertiesFormatManagedApplicationParameters /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.PowerShell.cs index df11e7ffe747..5836f981b028 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionPropertiesFormatNetworkFunctionContainerConf /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionPropertiesFormatNetworkFunctionContainerConf /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,7 +95,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.TypeConverter.cs index b7e06973c48c..f6d38f850df2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.TypeConverter.cs @@ -15,20 +15,20 @@ public partial class NetworkFunctionPropertiesFormatNetworkFunctionContainerConf { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -102,8 +103,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.json.cs index 6c2b6f7779bc..c15d9d5952e5 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionPropertiesFormatNetworkFunctionContainerConf partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionPropertiesFormatNetworkFunctionContainerConf /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionPropertiesFormatNetworkFunctionContainerConf /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.PowerShell.cs index e01b6d6205c7..d8eb018f38d5 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionRoleConfiguration /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionRoleConfiguration /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionRoleConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.TypeConverter.cs index d05ffc689495..e498fd5016a9 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionRoleConfigurationTypeConverter : global::Sys { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.cs index c7d508fb24d7..d1a552914da8 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.cs @@ -113,9 +113,9 @@ public partial class NetworkFunctionRoleConfiguration : /// "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", /// "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    /// **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to - /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • /// For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux - /// on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
  • [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PropertyOrigin.Inlined)] public string OSProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IOSProfileInternal)OSProfile).AdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IOSProfileInternal)OSProfile).AdminUsername = value ?? null; } @@ -125,7 +125,7 @@ public partial class NetworkFunctionRoleConfiguration : /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PropertyOrigin.Inlined)] public string OSProfileCustomData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IOSProfileInternal)OSProfile).CustomData; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IOSProfileInternal)OSProfile).CustomData = value ?? null; } @@ -299,14 +299,14 @@ public partial interface INetworkFunctionRoleConfiguration : /// "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", /// "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    /// **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to - /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • /// For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux - /// on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
  • [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot end in "".""

    **Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).", + Description = @"Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot end in "".""

    **Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).", SerializedName = @"adminUsername", PossibleTypes = new [] { typeof(string) })] string OSProfileAdminUsername { get; set; } @@ -315,12 +315,12 @@ public partial interface INetworkFunctionRoleConfiguration : /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
  • [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)", + Description = @"Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)", SerializedName = @"customData", PossibleTypes = new [] { typeof(string) })] string OSProfileCustomData { get; set; } @@ -454,9 +454,9 @@ internal partial interface INetworkFunctionRoleConfigurationInternal /// "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", /// "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    /// **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to - /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • /// For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux - /// on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
  • string OSProfileAdminUsername { get; set; } /// @@ -464,15 +464,15 @@ internal partial interface INetworkFunctionRoleConfigurationInternal /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    string OSProfileCustomData { get; set; } /// Indicates if custom data is required to deploy this role. bool? OSProfileCustomDataRequired { get; set; } /// /// Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, - /// see [Linux on Azure-Endorsed Distributions](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - ///

    For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
    Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ILinuxConfiguration OSProfileLinuxConfiguration { get; set; } /// The name of the network function role. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.json.cs index 26f591a704ef..655f7d703017 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleConfiguration.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionRoleConfiguration partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionRoleConfiguration /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionRoleConfiguration /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.PowerShell.cs index 2e2f6b9367fa..3fd7cbcc461a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionRoleInstanceListResult /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionRoleInstanceListResult /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,7 +95,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionRoleInstanceListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.TypeConverter.cs index 63376d3f5f63..fc2787dfcaf7 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.TypeConverter.cs @@ -15,20 +15,20 @@ public partial class NetworkFunctionRoleInstanceListResultTypeConverter : global { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,8 +102,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.json.cs index 19012e6479ad..bbe03c479f86 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionRoleInstanceListResult.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionRoleInstanceListResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionRoleInstanceListResult /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionRoleInstanceListResult /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.PowerShell.cs index 1127abd9134e..b2952f8fb3f2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionSkuDetails /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionSkuDetails /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionSkuDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.TypeConverter.cs index b7d963973a6b..112d002056dc 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionSkuDetailsTypeConverter : global::System.Man { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.json.cs index 7cb6550d6f8a..3e367d20d9a5 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuDetails.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionSkuDetails partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionSkuDetails /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionSkuDetails /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.PowerShell.cs index 24f883dac348..ba13fc12e3d1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionSkuListResult /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionSkuListResult /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionSkuListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.TypeConverter.cs index 3231958b6d57..c8d09970c826 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionSkuListResultTypeConverter : global::System. { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.json.cs index a8d6cba66757..ad8789a2bfe3 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuListResult.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionSkuListResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionSkuListResult /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionSkuListResult /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.PowerShell.cs index 913f14386fbb..b63cd072b626 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionSkuRoleDetails /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionSkuRoleDetails /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionSkuRoleDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.TypeConverter.cs index 3ba41688edfb..2e1ee17f16c4 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionSkuRoleDetailsTypeConverter : global::System { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.json.cs index 7e7f7611a422..29a0da5394b1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionSkuRoleDetails.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionSkuRoleDetails partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionSkuRoleDetails /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionSkuRoleDetails /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.PowerShell.cs index 97a46d9d388c..60b652671abb 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionTemplate /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionTemplate /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionTemplate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.TypeConverter.cs index 3c7abcde0f4f..a9d4a0d5803b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionTemplateTypeConverter : global::System.Manag { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.json.cs index 64a737b6c087..6f15f2e0194d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionTemplate.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionTemplate partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionTemplate /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionTemplate /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.PowerShell.cs index 2d218bb0be8d..598cc6d452f8 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionUserConfiguration /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionUserConfiguration /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionUserConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.TypeConverter.cs index 3bc246956ad5..30fe6acf9cd1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionUserConfigurationTypeConverter : global::Sys { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.cs index 9d905c95f84d..048343ba724e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.cs @@ -35,7 +35,7 @@ public partial class NetworkFunctionUserConfiguration : /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PropertyOrigin.Inlined)] public string OSProfileCustomData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionUserConfigurationOSProfileInternal)OSProfile).CustomData; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionUserConfigurationOSProfileInternal)OSProfile).CustomData = value ?? null; } @@ -77,12 +77,12 @@ public partial interface INetworkFunctionUserConfiguration : /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)", + Description = @"Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)", SerializedName = @"customData", PossibleTypes = new [] { typeof(string) })] string OSProfileCustomData { get; set; } @@ -117,7 +117,7 @@ internal partial interface INetworkFunctionUserConfigurationInternal /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    string OSProfileCustomData { get; set; } /// The name of the network function role. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.json.cs index 4beb2d73a40c..451cc7c432bb 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfiguration.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionUserConfiguration partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionUserConfiguration /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionUserConfiguration /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.PowerShell.cs index c88208df023b..26ce1ca13b09 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionUserConfigurationOSProfile /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionUserConfigurationOSProfile /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,7 +95,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionUserConfigurationOSProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.TypeConverter.cs index 220b9568feec..e5d3475e75df 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.TypeConverter.cs @@ -15,20 +15,20 @@ public partial class NetworkFunctionUserConfigurationOSProfileTypeConverter : gl { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,8 +102,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.cs index 18bda49c0a52..230da39d4f90 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.cs @@ -21,7 +21,7 @@ public partial class NetworkFunctionUserConfigurationOSProfile : /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PropertyOrigin.Owned)] public string CustomData { get => this._customData; set => this._customData = value; } @@ -43,12 +43,12 @@ public partial interface INetworkFunctionUserConfigurationOSProfile : /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)", + Description = @"Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)", SerializedName = @"customData", PossibleTypes = new [] { typeof(string) })] string CustomData { get; set; } @@ -63,7 +63,7 @@ internal partial interface INetworkFunctionUserConfigurationOSProfileInternal /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    string CustomData { get; set; } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.json.cs index 7f9cb945e1de..62d725fb4b71 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionUserConfigurationOSProfile.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionUserConfigurationOSProfile partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionUserConfigurationOSProfile /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionUserConfigurationOSProfile /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.PowerShell.cs index 671220270fbe..8a3020a78a3e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionVendor /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionVendor /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendor FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.TypeConverter.cs index 9d0ea4afec80..dd0188486dd6 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionVendorTypeConverter : global::System.Managem { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.json.cs index d93a63a1a97b..0f90f1690ca1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendor.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionVendor partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionVendor /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionVendor /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.PowerShell.cs index d0845db00488..cbf2d9813fbd 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionVendorConfiguration /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionVendorConfiguration /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendorConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.TypeConverter.cs index 86ad62c7b88b..e0a62c9a64dc 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionVendorConfigurationTypeConverter : global::S { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -76,19 +76,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -100,8 +101,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.cs index a06cafe9bb17..f7d2640853da 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.cs @@ -45,9 +45,9 @@ public partial class NetworkFunctionVendorConfiguration : /// "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", /// "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    /// **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to - /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • /// For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux - /// on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
  • [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PropertyOrigin.Inlined)] public string OSProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IOSProfileInternal)OSProfile).AdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IOSProfileInternal)OSProfile).AdminUsername = value ?? null; } @@ -57,7 +57,7 @@ public partial class NetworkFunctionVendorConfiguration : /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PropertyOrigin.Inlined)] public string OSProfileCustomData { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IOSProfileInternal)OSProfile).CustomData; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IOSProfileInternal)OSProfile).CustomData = value ?? null; } @@ -108,14 +108,14 @@ public partial interface INetworkFunctionVendorConfiguration : /// "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", /// "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    /// **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to - /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • /// For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux - /// on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
  • [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot end in "".""

    **Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).", + Description = @"Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot end in "".""

    **Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).", SerializedName = @"adminUsername", PossibleTypes = new [] { typeof(string) })] string OSProfileAdminUsername { get; set; } @@ -124,12 +124,12 @@ public partial interface INetworkFunctionVendorConfiguration : /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
  • [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)", + Description = @"Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)", SerializedName = @"customData", PossibleTypes = new [] { typeof(string) })] string OSProfileCustomData { get; set; } @@ -183,9 +183,9 @@ internal partial interface INetworkFunctionVendorConfigurationInternal /// "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", /// "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    /// **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to - /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • /// For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux - /// on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
  • string OSProfileAdminUsername { get; set; } /// @@ -193,15 +193,15 @@ internal partial interface INetworkFunctionVendorConfigurationInternal /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    string OSProfileCustomData { get; set; } /// Indicates if custom data is required to deploy this role. bool? OSProfileCustomDataRequired { get; set; } /// /// Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, - /// see [Linux on Azure-Endorsed Distributions](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - ///

    For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
    Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ILinuxConfiguration OSProfileLinuxConfiguration { get; set; } /// The name of the vendor network function role. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.json.cs index bf20cbb2fb98..49de8a612e79 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorConfiguration.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionVendorConfiguration partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionVendorConfiguration /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionVendorConfiguration /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.PowerShell.cs index d6d59094f58c..8f1aa6bbf536 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkFunctionVendorListResult /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkFunctionVendorListResult /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendorListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.TypeConverter.cs index 792a842b6568..8d3c2c9ba637 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkFunctionVendorListResultTypeConverter : global::Syst { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.json.cs index c0fca5988d21..f7056d00ab8f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkFunctionVendorListResult.json.cs @@ -20,7 +20,7 @@ public partial class NetworkFunctionVendorListResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkFunctionVendorListResult /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkFunctionVendorListResult /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.PowerShell.cs index 5de34cba8a0f..a0c03c18e7fd 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkInterface /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkInterface /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkInterface FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.TypeConverter.cs index f0f240264c39..e7929385b8df 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkInterfaceTypeConverter : global::System.Management.A { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.json.cs index 78e120c70cf2..a9a201a9f86b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterface.json.cs @@ -20,7 +20,7 @@ public partial class NetworkInterface partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkInterface /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkInterface /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.PowerShell.cs index c3a19d4889a7..34da5f89fdb3 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.PowerShell.cs @@ -31,7 +31,8 @@ public partial class NetworkInterfaceIPConfiguration /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class NetworkInterfaceIPConfiguration /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkInterfaceIPConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.TypeConverter.cs index ce2d7f0b8fbd..15d016fb4e8c 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class NetworkInterfaceIPConfigurationTypeConverter : global::Syst { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.json.cs index bceeb74ad38f..1f629266ee77 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/NetworkInterfaceIPConfiguration.json.cs @@ -20,7 +20,7 @@ public partial class NetworkInterfaceIPConfiguration partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class NetworkInterfaceIPConfiguration /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class NetworkInterfaceIPConfiguration /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.PowerShell.cs index 20c58f633297..66a1e77f129e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.PowerShell.cs @@ -9,7 +9,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501 /// /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). ///
    [System.ComponentModel.TypeConverter(typeof(OSDiskTypeConverter))] public partial class OSDisk @@ -34,7 +34,8 @@ public partial class OSDisk /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -46,7 +47,8 @@ public partial class OSDisk /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,7 +95,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IOSDisk FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// @@ -188,7 +190,7 @@ public override string ToString() } } /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). [System.ComponentModel.TypeConverter(typeof(OSDiskTypeConverter))] public partial interface IOSDisk diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.TypeConverter.cs index fd5a5ad1dadf..117d9ae727ab 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class OSDiskTypeConverter : global::System.Management.Automation. { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.cs index c50680c7854f..c94d9ff329c1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.cs @@ -9,7 +9,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501 /// /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). ///
    public partial class OSDisk : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IOSDisk, @@ -61,7 +61,7 @@ public OSDisk() } } /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). public partial interface IOSDisk : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IJsonSerializable { @@ -103,7 +103,7 @@ public partial interface IOSDisk : } /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). internal partial interface IOSDiskInternal { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.json.cs index 03113f338a24..b59e4017d7a2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSDisk.json.cs @@ -9,7 +9,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501 /// /// Specifies information about the operating system disk used by the virtual machine.

    For more information about - /// disks, see [About disks and VHDs for Azure virtual machines](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). + /// disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). ///
    public partial class OSDisk { @@ -23,7 +23,7 @@ public partial class OSDisk partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -33,7 +33,8 @@ public partial class OSDisk /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -45,7 +46,8 @@ public partial class OSDisk /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.PowerShell.cs index c0258b4498ab..b6251d53712b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.PowerShell.cs @@ -31,7 +31,8 @@ public partial class OSProfile /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class OSProfile /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IOSProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.TypeConverter.cs index d9e2d0d0364a..7724e9713155 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class OSProfileTypeConverter : global::System.Management.Automati { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.cs index 529029dd11de..a72b51a98061 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.cs @@ -22,9 +22,9 @@ public partial class OSProfile : /// "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", /// "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    /// **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to - /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • /// For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux - /// on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
  • [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PropertyOrigin.Owned)] public string AdminUsername { get => this._adminUsername; set => this._adminUsername = value; } @@ -37,7 +37,7 @@ public partial class OSProfile : /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PropertyOrigin.Owned)] public string CustomData { get => this._customData; set => this._customData = value; } @@ -54,8 +54,8 @@ public partial class OSProfile : /// /// Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, - /// see [Linux on Azure-Endorsed Distributions](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - ///

    For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
    [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PropertyOrigin.Owned)] internal Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ILinuxConfiguration LinuxConfiguration { get => (this._linuxConfiguration = this._linuxConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.LinuxConfiguration()); set => this._linuxConfiguration = value; } @@ -86,14 +86,14 @@ public partial interface IOSProfile : /// "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", /// "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    /// **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to - /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • /// For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux - /// on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
  • [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot end in "".""

    **Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).", + Description = @"Specifies the name of the administrator account.

    **Windows-only restriction:** Cannot end in "".""

    **Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

    **Minimum-length (Linux):** 1 character

    **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).", SerializedName = @"adminUsername", PossibleTypes = new [] { typeof(string) })] string AdminUsername { get; set; } @@ -102,12 +102,12 @@ public partial interface IOSProfile : /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
  • [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)", + Description = @"Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/)

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)", SerializedName = @"customData", PossibleTypes = new [] { typeof(string) })] string CustomData { get; set; } @@ -139,9 +139,9 @@ internal partial interface IOSProfileInternal /// "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", /// "support_388945a0", "sys", "test2", "test3", "user4", "user5".

    **Minimum-length (Linux):** 1 character

    /// **Max-length (Linux):** 64 characters

    **Max-length (Windows):** 20 characters

  • For root access to - /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • + /// the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
  • /// For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux - /// on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// on Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
  • string AdminUsername { get; set; } /// @@ -149,15 +149,15 @@ internal partial interface IOSProfileInternal /// as a file on the virtual machine. The maximum length of the binary array is 65535 bytes.

    **Note: Do not pass /// any secrets or passwords in customData property**

    This property cannot be updated after the VM is created.

    /// customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) ///
    string CustomData { get; set; } /// Indicates if custom data is required to deploy this role. bool? CustomDataRequired { get; set; } /// /// Specifies the Linux operating system settings on the virtual machine.

    For a list of supported Linux distributions, - /// see [Linux on Azure-Endorsed Distributions](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) - ///

    For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) + ///

    For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
    Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ILinuxConfiguration LinuxConfiguration { get; set; } /// Specifies the ssh key configuration for a Linux OS. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.json.cs index 65acfb675efe..ab4c688b9a27 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/OSProfile.json.cs @@ -20,7 +20,7 @@ public partial class OSProfile partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class OSProfile /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class OSProfile /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.PowerShell.cs index 3d2190a5da62..43f0122bec86 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.PowerShell.cs @@ -31,7 +31,8 @@ public partial class PreviewSubscription /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class PreviewSubscription /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.TypeConverter.cs index 0351c473a2b2..5d5fb99f8b44 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class PreviewSubscriptionTypeConverter : global::System.Managemen { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.json.cs index 49fb747e1e8d..6d438ef64d9c 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscription.json.cs @@ -20,7 +20,7 @@ public partial class PreviewSubscription partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class PreviewSubscription /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class PreviewSubscription /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.PowerShell.cs index ec0298379cc6..91720f400c49 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.PowerShell.cs @@ -31,7 +31,8 @@ public partial class PreviewSubscriptionProperties /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class PreviewSubscriptionProperties /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscriptionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.TypeConverter.cs index b8b1068ba215..82ea6137cb1e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class PreviewSubscriptionPropertiesTypeConverter : global::System { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.json.cs index c835f4e79d50..d3319eb1e8fd 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionProperties.json.cs @@ -20,7 +20,7 @@ public partial class PreviewSubscriptionProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class PreviewSubscriptionProperties /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class PreviewSubscriptionProperties /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.PowerShell.cs index e30abce8adbb..444d75698ec2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.PowerShell.cs @@ -31,7 +31,8 @@ public partial class PreviewSubscriptionsList /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class PreviewSubscriptionsList /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscriptionsList FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.TypeConverter.cs index 1288ee551dcd..88a7e25ea66a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class PreviewSubscriptionsListTypeConverter : global::System.Mana { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.json.cs index a695ff31974f..605f79b20865 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/PreviewSubscriptionsList.json.cs @@ -20,7 +20,7 @@ public partial class PreviewSubscriptionsList partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class PreviewSubscriptionsList /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class PreviewSubscriptionsList /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.PowerShell.cs index 1da0987bc19d..663767976c70 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.PowerShell.cs @@ -31,7 +31,8 @@ public partial class RoleInstance /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class RoleInstance /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IRoleInstance FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.TypeConverter.cs index 4799bc0d316d..26fcbf10b8af 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class RoleInstanceTypeConverter : global::System.Management.Autom { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.json.cs index 18af56ec77c1..ae9e493802c1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstance.json.cs @@ -20,7 +20,7 @@ public partial class RoleInstance partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class RoleInstance /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class RoleInstance /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.PowerShell.cs index 570cb4e6c311..056b899d0267 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.PowerShell.cs @@ -31,7 +31,8 @@ public partial class RoleInstanceProperties /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class RoleInstanceProperties /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IRoleInstanceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.TypeConverter.cs index fa18c2e87572..1f2527a4a749 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class RoleInstancePropertiesTypeConverter : global::System.Manage { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.json.cs index acd114102b15..6ab02c627f46 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/RoleInstanceProperties.json.cs @@ -20,7 +20,7 @@ public partial class RoleInstanceProperties partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class RoleInstanceProperties /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class RoleInstanceProperties /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.PowerShell.cs index 169476f9da32..4dc3c4da235a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.PowerShell.cs @@ -31,7 +31,8 @@ public partial class SkuOverview /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class SkuOverview /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ISkuOverview FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.TypeConverter.cs index 0e80b21431fc..8ac109c491e6 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class SkuOverviewTypeConverter : global::System.Management.Automa { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.json.cs index 5c50be3a7654..928329c3d25f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SkuOverview.json.cs @@ -20,7 +20,7 @@ public partial class SkuOverview partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class SkuOverview /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class SkuOverview /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.PowerShell.cs index 3d4505fdcc99..c9d1b3d32a17 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.PowerShell.cs @@ -31,7 +31,8 @@ public partial class SshConfiguration /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class SshConfiguration /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ISshConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.TypeConverter.cs index b3cfc6b5a4b0..3aaca5e677c3 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class SshConfigurationTypeConverter : global::System.Management.A { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.json.cs index 1f07b5bee914..d6ac07f11839 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshConfiguration.json.cs @@ -20,7 +20,7 @@ public partial class SshConfiguration partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class SshConfiguration /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class SshConfiguration /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.PowerShell.cs index 668681a844d0..f8f7077ac62e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.PowerShell.cs @@ -33,7 +33,8 @@ public partial class SshPublicKey /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -45,7 +46,8 @@ public partial class SshPublicKey /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ISshPublicKey FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.TypeConverter.cs index a3919a539e18..2df73cbde556 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class SshPublicKeyTypeConverter : global::System.Management.Autom { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.cs index 8affd519cf25..4ab2586b18cc 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.cs @@ -20,7 +20,7 @@ public partial class SshPublicKey : /// /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in - /// ssh-rsa format.

    For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// ssh-rsa format.

    For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
    [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.PropertyOrigin.Owned)] public string KeyData { get => this._keyData; set => this._keyData = value; } @@ -47,12 +47,12 @@ public partial interface ISshPublicKey : { /// /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in - /// ssh-rsa format.

    For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// ssh-rsa format.

    For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
    [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Info( Required = false, ReadOnly = false, - Description = @"SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format.

    For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).", + Description = @"SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format.

    For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).", SerializedName = @"keyData", PossibleTypes = new [] { typeof(string) })] string KeyData { get; set; } @@ -75,7 +75,7 @@ internal partial interface ISshPublicKeyInternal { /// /// SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in - /// ssh-rsa format.

    For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + /// ssh-rsa format.

    For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ///
    string KeyData { get; set; } /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.json.cs index cbe0d1cc1205..feb867cbb7cc 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SshPublicKey.json.cs @@ -22,7 +22,7 @@ public partial class SshPublicKey partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -32,7 +32,8 @@ public partial class SshPublicKey /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -44,7 +45,8 @@ public partial class SshPublicKey /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.PowerShell.cs index 2415f6d84f1a..2659b6533313 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.PowerShell.cs @@ -31,7 +31,8 @@ public partial class StorageProfile /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class StorageProfile /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IStorageProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.TypeConverter.cs index 4f1dd1804e58..6ca25e002e70 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class StorageProfileTypeConverter : global::System.Management.Aut { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.json.cs index 97f723dd7ce8..a43a55e9f912 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/StorageProfile.json.cs @@ -20,7 +20,7 @@ public partial class StorageProfile partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class StorageProfile /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class StorageProfile /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.PowerShell.cs index 62d8bf1cbf4e..7c76fae53dbf 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.PowerShell.cs @@ -31,7 +31,8 @@ public partial class SubResource /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class SubResource /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ISubResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.TypeConverter.cs index f1b20a739c48..4ae9db3c86ad 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class SubResourceTypeConverter : global::System.Management.Automa { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.json.cs index c76aae6c56d4..5da53b0df3eb 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/SubResource.json.cs @@ -20,7 +20,7 @@ public partial class SubResource partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class SubResource /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class SubResource /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.PowerShell.cs index ff460ff343ed..57bcf0f491f2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.PowerShell.cs @@ -31,7 +31,8 @@ public partial class TagsObject /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class TagsObject /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.TypeConverter.cs index 35c38e0aefd3..b135057fb6b0 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class TagsObjectTypeConverter : global::System.Management.Automat { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.json.cs index 84a1272faf6a..f51c0da81fbe 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObject.json.cs @@ -20,7 +20,7 @@ public partial class TagsObject partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class TagsObject /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class TagsObject /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.PowerShell.cs index 2f7d0d6f5b12..7d96fba73317 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.PowerShell.cs @@ -31,7 +31,8 @@ public partial class TagsObjectTags /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class TagsObjectTags /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.TypeConverter.cs index d7f106e56aad..0743c4981d0b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class TagsObjectTagsTypeConverter : global::System.Management.Aut { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.json.cs index c72d771cd083..95d22bb87e8d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/TagsObjectTags.json.cs @@ -20,7 +20,7 @@ public partial class TagsObjectTags partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class TagsObjectTags /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class TagsObjectTags /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.PowerShell.cs index aa04f2099f85..10309fa5e4e4 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.PowerShell.cs @@ -31,7 +31,8 @@ public partial class Vendor /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class Vendor /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.TypeConverter.cs index 1e01809a18e0..08eae89fe625 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class VendorTypeConverter : global::System.Management.Automation. { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.cs index 173b76c70c76..76810e70ac97 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.cs @@ -110,7 +110,7 @@ public partial class Vendor : /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener eventListener) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.json.cs index 3f1528afdfd0..ff539d03d4e7 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/Vendor.json.cs @@ -20,7 +20,7 @@ public partial class Vendor partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class Vendor /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class Vendor /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.PowerShell.cs index 351adf45b6e1..6d9879e112ef 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VendorDetails /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VendorDetails /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.TypeConverter.cs index ec28bb0ff377..05dbb2f2d09d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VendorDetailsTypeConverter : global::System.Management.Auto { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.json.cs index cc461b051e75..25c0b52157ce 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorDetails.json.cs @@ -20,7 +20,7 @@ public partial class VendorDetails partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VendorDetails /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VendorDetails /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.PowerShell.cs index c2a1620cbbe3..f5c23b9ff22d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VendorListResult /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VendorListResult /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.TypeConverter.cs index 36be5b2339e7..452fa165f5d1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VendorListResultTypeConverter : global::System.Management.A { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.json.cs index 26d5a2206592..077dff662123 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorListResult.json.cs @@ -20,7 +20,7 @@ public partial class VendorListResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VendorListResult /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VendorListResult /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.PowerShell.cs index 25a9a1329c0f..77f1ef57424f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VendorNetworkFunction /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VendorNetworkFunction /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.TypeConverter.cs index d95a4cdcd80a..c4ff02be40ee 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VendorNetworkFunctionTypeConverter : global::System.Managem { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.cs index 4dc7b0bbf4fb..4b6c98f1860d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.cs @@ -122,7 +122,7 @@ public partial class VendorNetworkFunction : /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener eventListener) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.json.cs index f1f14f14240f..7a216ff208d2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunction.json.cs @@ -20,7 +20,7 @@ public partial class VendorNetworkFunction partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VendorNetworkFunction /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VendorNetworkFunction /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.PowerShell.cs index 3fa0ab788b04..c70ef64a7b9f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VendorNetworkFunctionListResult /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VendorNetworkFunctionListResult /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunctionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.TypeConverter.cs index e0e69c10e411..8b4f649db9dd 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VendorNetworkFunctionListResultTypeConverter : global::Syst { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.json.cs index f7cabe0987b9..d92da1c1fa8a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionListResult.json.cs @@ -20,7 +20,7 @@ public partial class VendorNetworkFunctionListResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VendorNetworkFunctionListResult /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VendorNetworkFunctionListResult /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.PowerShell.cs index a786ae901a26..def0019c1ab6 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VendorNetworkFunctionPropertiesFormat /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VendorNetworkFunctionPropertiesFormat /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,7 +95,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunctionPropertiesFormat FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.TypeConverter.cs index 7b390141eae6..275aad25db00 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.TypeConverter.cs @@ -15,20 +15,20 @@ public partial class VendorNetworkFunctionPropertiesFormatTypeConverter : global { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -101,8 +102,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.json.cs index b546186a6a49..4109053d31d2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorNetworkFunctionPropertiesFormat.json.cs @@ -20,7 +20,7 @@ public partial class VendorNetworkFunctionPropertiesFormat partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VendorNetworkFunctionPropertiesFormat /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VendorNetworkFunctionPropertiesFormat /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.PowerShell.cs index ad1bddaf3854..cbb25e965012 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VendorPropertiesFormat /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VendorPropertiesFormat /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorPropertiesFormat FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.TypeConverter.cs index d01c9c2d184c..7eb65fdd7a93 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VendorPropertiesFormatTypeConverter : global::System.Manage { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.json.cs index 325cc57a4832..f97e9546719d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorPropertiesFormat.json.cs @@ -20,7 +20,7 @@ public partial class VendorPropertiesFormat partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VendorPropertiesFormat /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VendorPropertiesFormat /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.PowerShell.cs index 1c66017ea490..3a1758295d12 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VendorSku /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VendorSku /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.TypeConverter.cs index 923be9b82263..344b01fde4ec 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.TypeConverter.cs @@ -14,20 +14,19 @@ public partial class VendorSkuTypeConverter : global::System.Management.Automati { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +74,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +99,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.cs index f219a7f24e61..5e1fa02171f9 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.cs @@ -134,7 +134,7 @@ public partial class VendorSku : /// an instance that will receive validation /// events. /// - /// A < see cref = "global::System.Threading.Tasks.Task" /> that will be complete when validation is completed. + /// A that will be complete when validation is completed. /// public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener eventListener) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.json.cs index 1c5664e5a754..f9a3c2cbc80b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSku.json.cs @@ -20,7 +20,7 @@ public partial class VendorSku partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VendorSku /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VendorSku /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.PowerShell.cs index 982611c190ca..89ccecac0207 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VendorSkuListResult /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VendorSkuListResult /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.TypeConverter.cs index 33fad5411514..08e1c167c3d6 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VendorSkuListResultTypeConverter : global::System.Managemen { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.json.cs index 4e5e28983efb..30f6de030971 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuListResult.json.cs @@ -20,7 +20,7 @@ public partial class VendorSkuListResult partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VendorSkuListResult /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VendorSkuListResult /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.PowerShell.cs index 8cf701d3f62f..2f1055f49eb3 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VendorSkuPropertiesFormat /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VendorSkuPropertiesFormat /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -92,7 +94,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuPropertiesFormat FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.TypeConverter.cs index d0ccd20c8753..5cf0a42a420b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VendorSkuPropertiesFormatTypeConverter : global::System.Man { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.json.cs index 959c4a0f07b4..2f5cdcc8e61a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormat.json.cs @@ -20,7 +20,7 @@ public partial class VendorSkuPropertiesFormat partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VendorSkuPropertiesFormat /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VendorSkuPropertiesFormat /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.PowerShell.cs index ae86655ea872..723a368498e1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VendorSkuPropertiesFormatManagedApplicationParameters /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VendorSkuPropertiesFormatManagedApplicationParameters /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,7 +95,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuPropertiesFormatManagedApplicationParameters FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.TypeConverter.cs index f00df8b8474f..53f99096d916 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.TypeConverter.cs @@ -15,20 +15,20 @@ public partial class VendorSkuPropertiesFormatManagedApplicationParametersTypeCo { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -102,8 +103,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.json.cs index 2e007794c107..77df86ff9d41 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationParameters.json.cs @@ -20,7 +20,7 @@ public partial class VendorSkuPropertiesFormatManagedApplicationParameters partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VendorSkuPropertiesFormatManagedApplicationParameters /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VendorSkuPropertiesFormatManagedApplicationParameters /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.PowerShell.cs index 5af858c0ba0c..afe9fa2642dc 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VendorSkuPropertiesFormatManagedApplicationTemplate /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VendorSkuPropertiesFormatManagedApplicationTemplate /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -93,7 +95,9 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// + /// an instance of the model class. + /// public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuPropertiesFormatManagedApplicationTemplate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.TypeConverter.cs index e8253fa3c291..53ba1fbaed42 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.TypeConverter.cs @@ -15,20 +15,20 @@ public partial class VendorSkuPropertiesFormatManagedApplicationTemplateTypeConv { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -77,19 +77,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -102,8 +103,8 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.json.cs index cc3a91e3df35..0ea20b948d56 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VendorSkuPropertiesFormatManagedApplicationTemplate.json.cs @@ -20,7 +20,7 @@ public partial class VendorSkuPropertiesFormatManagedApplicationTemplate partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VendorSkuPropertiesFormatManagedApplicationTemplate /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VendorSkuPropertiesFormatManagedApplicationTemplate /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.PowerShell.cs index 53de29b4a848..a012c3b47f7e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.PowerShell.cs @@ -31,7 +31,8 @@ public partial class VirtualHardDisk /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -43,7 +44,8 @@ public partial class VirtualHardDisk /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -90,7 +92,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api2021 /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVirtualHardDisk FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.TypeConverter.cs index 450a38270f38..46c03e81d123 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class VirtualHardDiskTypeConverter : global::System.Management.Au { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -75,19 +75,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -99,8 +100,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.json.cs index e670daf85e5b..3bfc4a8327e8 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/Api20210501/VirtualHardDisk.json.cs @@ -20,7 +20,7 @@ public partial class VirtualHardDisk partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -30,7 +30,8 @@ public partial class VirtualHardDisk /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -42,7 +43,8 @@ public partial class VirtualHardDisk /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.PowerShell.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.PowerShell.cs index 8ace16c70ce8..578e3a87fedf 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.PowerShell.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.PowerShell.cs @@ -30,7 +30,8 @@ public partial class ConnectedNetworkIdentity /// /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Collections.IDictionary content that should be used. @@ -42,7 +43,8 @@ public partial class ConnectedNetworkIdentity /// /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -219,7 +221,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnec /// Creates a new instance of , deserializing the content from a json string. ///
    /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.TypeConverter.cs index 10171052d40f..b4a83329f591 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.TypeConverter.cs @@ -14,20 +14,20 @@ public partial class ConnectedNetworkIdentityTypeConverter : global::System.Mana { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the + /// type. /// /// the instance to check if it can be converted to the type. @@ -80,19 +80,20 @@ public static bool CanConvertFrom(dynamic sourceValue) } /// - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the + /// parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false + /// true if the converter can convert the parameter to the parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -104,8 +105,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.json.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.json.cs index aa18d7cffeb9..99169d518fb0 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.json.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Models/ConnectedNetworkIdentity.json.cs @@ -19,7 +19,7 @@ public partial class ConnectedNetworkIdentity partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonObject json); /// - /// AfterToJson will be called after the json erialization has finished, allowing customization of the AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior /// /// The JSON container that the serialization result will be placed in. @@ -29,7 +29,8 @@ public partial class ConnectedNetworkIdentity /// /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output parameter. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JsonNode that should be deserialized into this object. @@ -41,7 +42,8 @@ public partial class ConnectedNetworkIdentity /// /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output parameter. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. /// Implement this method in a partial class to enable this behavior. /// /// The JSON container that the serialization result will be placed in. diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs index 6b1a38a44ff1..996b35490e3e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class CreatedByTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/CreatedByType.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/CreatedByType.cs index 2713190cf9b3..8d2203e0696e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/CreatedByType.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/CreatedByType.cs @@ -28,7 +28,7 @@ internal static object CreateFrom(object value) return new CreatedByType(global::System.Convert.ToString(value)); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private CreatedByType(string underlyingValue) { @@ -82,8 +82,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum CreatedByType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.CreatedByType e2) { @@ -91,8 +91,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum CreatedByType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.CreatedByType e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DeviceType.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DeviceType.TypeConverter.cs index 8495a8cebd8a..9d3b2329a824 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DeviceType.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DeviceType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class DeviceTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DeviceType.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DeviceType.cs index 55137dba5f1b..62552518f318 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DeviceType.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DeviceType.cs @@ -24,7 +24,7 @@ internal static object CreateFrom(object value) return new DeviceType(global::System.Convert.ToString(value)); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private DeviceType(string underlyingValue) { @@ -78,8 +78,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum DeviceType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.DeviceType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.DeviceType e2) { @@ -87,8 +87,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum DeviceType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.DeviceType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.DeviceType e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DiskCreateOptionTypes.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DiskCreateOptionTypes.TypeConverter.cs index 2c1e5dd57e6b..704995204cbf 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DiskCreateOptionTypes.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DiskCreateOptionTypes.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class DiskCreateOptionTypesTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DiskCreateOptionTypes.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DiskCreateOptionTypes.cs index 7158808c100d..6f8dd82ecd0a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DiskCreateOptionTypes.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/DiskCreateOptionTypes.cs @@ -24,7 +24,7 @@ internal static object CreateFrom(object value) return new DiskCreateOptionTypes(global::System.Convert.ToString(value)); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private DiskCreateOptionTypes(string underlyingValue) { @@ -78,8 +78,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum DiskCreateOptionTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.DiskCreateOptionTypes e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.DiskCreateOptionTypes e2) { @@ -87,8 +87,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum DiskCreateOptionTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.DiskCreateOptionTypes e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.DiskCreateOptionTypes e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPAllocationMethod.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPAllocationMethod.TypeConverter.cs index 7ba64134f37c..9f2c6f3e0e86 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPAllocationMethod.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPAllocationMethod.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class IPAllocationMethodTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPAllocationMethod.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPAllocationMethod.cs index 23109ba426f9..ed2ac93654ec 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPAllocationMethod.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPAllocationMethod.cs @@ -49,7 +49,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private IPAllocationMethod(string underlyingValue) { @@ -80,8 +80,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum IPAllocationMethod - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.IPAllocationMethod e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.IPAllocationMethod e2) { @@ -89,8 +89,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum IPAllocationMethod - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.IPAllocationMethod e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.IPAllocationMethod e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPVersion.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPVersion.TypeConverter.cs index 4ea8f5ad011f..3baa93b6753c 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPVersion.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPVersion.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class IPVersionTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPVersion.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPVersion.cs index acc33be08dae..d6d32af198f7 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPVersion.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/IPVersion.cs @@ -47,7 +47,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private IPVersion(string underlyingValue) { @@ -78,8 +78,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum IPVersion - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.IPVersion e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.IPVersion e2) { @@ -87,8 +87,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum IPVersion - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.IPVersion e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.IPVersion e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionRoleConfigurationType.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionRoleConfigurationType.TypeConverter.cs index fa2d76dca858..95e993798cc9 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionRoleConfigurationType.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionRoleConfigurationType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class NetworkFunctionRoleConfigurationTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionRoleConfigurationType.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionRoleConfigurationType.cs index da881726c1a3..870ba06b8ae5 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionRoleConfigurationType.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionRoleConfigurationType.cs @@ -52,7 +52,7 @@ public override int GetHashCode() } /// - /// Creates an instance of the + /// Creates an instance of the Enum class. /// /// the value to create an instance for. private NetworkFunctionRoleConfigurationType(string underlyingValue) @@ -84,8 +84,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum NetworkFunctionRoleConfigurationType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionRoleConfigurationType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionRoleConfigurationType e2) { @@ -93,8 +93,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum NetworkFunctionRoleConfigurationType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionRoleConfigurationType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionRoleConfigurationType e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionType.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionType.TypeConverter.cs index 646503fb0a73..ae7a4a260174 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionType.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class NetworkFunctionTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionType.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionType.cs index 867795b8eea7..200d4aa35ac5 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionType.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/NetworkFunctionType.cs @@ -49,7 +49,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private NetworkFunctionType(string underlyingValue) { @@ -80,8 +80,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum NetworkFunctionType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionType e2) { @@ -89,8 +89,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum NetworkFunctionType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionType e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperatingSystemTypes.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperatingSystemTypes.TypeConverter.cs index 7c3dbbf5f440..111698afc45e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperatingSystemTypes.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperatingSystemTypes.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class OperatingSystemTypesTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperatingSystemTypes.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperatingSystemTypes.cs index 51f04e3fb9c9..608b3e5d9583 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperatingSystemTypes.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperatingSystemTypes.cs @@ -49,7 +49,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private OperatingSystemTypes(string underlyingValue) { @@ -80,8 +80,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum OperatingSystemTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.OperatingSystemTypes e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.OperatingSystemTypes e2) { @@ -89,8 +89,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum OperatingSystemTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.OperatingSystemTypes e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.OperatingSystemTypes e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperationalState.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperationalState.TypeConverter.cs index 444526b8f216..76a2c7f2af19 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperationalState.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperationalState.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class OperationalStateTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperationalState.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperationalState.cs index c76d67b510ee..8e4ed0fb3ffc 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperationalState.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/OperationalState.cs @@ -53,7 +53,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private OperationalState(string underlyingValue) { @@ -84,8 +84,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum OperationalState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.OperationalState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.OperationalState e2) { @@ -93,8 +93,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum OperationalState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.OperationalState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.OperationalState e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs index 77e7797613a2..d39014288fca 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/ProvisioningState.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class ProvisioningStateTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/ProvisioningState.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/ProvisioningState.cs index 0000d339b917..324665f2936a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/ProvisioningState.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/ProvisioningState.cs @@ -57,7 +57,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private ProvisioningState(string underlyingValue) { @@ -88,8 +88,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.ProvisioningState e2) { @@ -97,8 +97,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum ProvisioningState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.ProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.ProvisioningState e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuDeploymentMode.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuDeploymentMode.TypeConverter.cs index c8e4dc0e8658..fc2d22a9a655 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuDeploymentMode.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuDeploymentMode.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class SkuDeploymentModeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuDeploymentMode.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuDeploymentMode.cs index 57a11f33f64e..bfa301d982af 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuDeploymentMode.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuDeploymentMode.cs @@ -49,7 +49,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private SkuDeploymentMode(string underlyingValue) { @@ -80,8 +80,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum SkuDeploymentMode - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuDeploymentMode e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuDeploymentMode e2) { @@ -89,8 +89,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum SkuDeploymentMode - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuDeploymentMode e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuDeploymentMode e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuType.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuType.TypeConverter.cs index 16929e9a8106..80fd1b93bb64 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuType.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class SkuTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuType.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuType.cs index d3b5f67c4572..1073601dad28 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuType.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/SkuType.cs @@ -51,7 +51,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private SkuType(string underlyingValue) { @@ -82,8 +82,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum SkuType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType e2) { @@ -91,8 +91,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum SkuType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/Status.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/Status.TypeConverter.cs index cba0376d5f1f..b343326d3d23 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/Status.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/Status.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class StatusTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/Status.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/Status.cs index 0c16952581f4..fff456a039f3 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/Status.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/Status.cs @@ -51,7 +51,7 @@ public override int GetHashCode() return this._value.GetHashCode(); } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private Status(string underlyingValue) { @@ -82,8 +82,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum Status - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.Status e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.Status e2) { @@ -91,8 +91,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum Status - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.Status e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.Status e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VMSwitchType.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VMSwitchType.TypeConverter.cs index b07b9aed73db..6a91181e5d01 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VMSwitchType.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VMSwitchType.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class VMSwitchTypeTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VMSwitchType.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VMSwitchType.cs index a5b774f8b56b..1f94282c2bc4 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VMSwitchType.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VMSwitchType.cs @@ -58,7 +58,7 @@ public override string ToString() return this._value; } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private VMSwitchType(string underlyingValue) { @@ -82,8 +82,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum VMSwitchType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VMSwitchType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VMSwitchType e2) { @@ -91,8 +91,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum VMSwitchType - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VMSwitchType e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VMSwitchType e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VendorProvisioningState.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VendorProvisioningState.TypeConverter.cs index 4c983d58994e..f54ce36734d3 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VendorProvisioningState.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VendorProvisioningState.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class VendorProvisioningStateTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VendorProvisioningState.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VendorProvisioningState.cs index 5e1f0637b5b8..1eeff86e777a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VendorProvisioningState.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VendorProvisioningState.cs @@ -62,7 +62,7 @@ public override string ToString() return this._value; } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private VendorProvisioningState(string underlyingValue) { @@ -86,8 +86,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum VendorProvisioningState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VendorProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VendorProvisioningState e2) { @@ -95,8 +95,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum VendorProvisioningState - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VendorProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VendorProvisioningState e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VirtualMachineSizeTypes.TypeConverter.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VirtualMachineSizeTypes.TypeConverter.cs index da6751f181e8..3d6ebd820906 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VirtualMachineSizeTypes.TypeConverter.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VirtualMachineSizeTypes.TypeConverter.cs @@ -12,32 +12,32 @@ public partial class VirtualMachineSizeTypesTypeConverter : { /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; /// - /// Determines if the converter can convert the parameter to the - /// parameter. + /// Determines if the converter can convert the parameter to the parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the - /// parameter, otherwise false. + /// true if the converter can convert the parameter to the parameter, otherwise false. /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VirtualMachineSizeTypes.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VirtualMachineSizeTypes.cs index d6d6cab53c01..562b6bffd466 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VirtualMachineSizeTypes.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/api/Support/VirtualMachineSizeTypes.cs @@ -104,7 +104,7 @@ public override string ToString() return this._value; } - /// Creates an instance of the + /// Creates an instance of the Enum class. /// the value to create an instance for. private VirtualMachineSizeTypes(string underlyingValue) { @@ -128,8 +128,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding != operator for enum VirtualMachineSizeTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are not equal to the same value public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VirtualMachineSizeTypes e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VirtualMachineSizeTypes e2) { @@ -137,8 +137,8 @@ public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Connec } /// Overriding == operator for enum VirtualMachineSizeTypes - /// the value to compare against - /// the value to compare against + /// the value to compare against + /// the value to compare against /// true if the two instances are equal to the same value public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VirtualMachineSizeTypes e1, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VirtualMachineSizeTypes e2) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDeviceRegistrationKey_List.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDeviceRegistrationKey_List.cs index 3e1ac2a42ecf..281421552cd5 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDeviceRegistrationKey_List.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDeviceRegistrationKey_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(string))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"List the registration key for the device.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/devices/{deviceName}/listRegistrationKey", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkDeviceRegistrationKey_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkDeviceRegistrationKey_List : global::S public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -80,11 +82,11 @@ public partial class GetAzConnectedNetworkDeviceRegistrationKey_List : global::S public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -145,8 +147,8 @@ public partial class GetAzConnectedNetworkDeviceRegistrationKey_List : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -157,8 +159,8 @@ public partial class GetAzConnectedNetworkDeviceRegistrationKey_List : global::S /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDeviceRegistrationKey + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -169,6 +171,11 @@ public partial class GetAzConnectedNetworkDeviceRegistrationKey_List : global::S ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -180,7 +187,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -291,7 +315,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -333,12 +356,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -377,8 +415,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDeviceRegistrationKey + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_Get.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_Get.cs index 0f00c21a1d1d..57c81c359ab3 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_Get.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets information about the specified device.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/devices/{deviceName}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkDevice_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkDevice_Get : global::System.Management public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -66,11 +68,11 @@ public partial class GetAzConnectedNetworkDevice_Get : global::System.Management public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -146,8 +148,8 @@ public partial class GetAzConnectedNetworkDevice_Get : global::System.Management /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -158,8 +160,8 @@ public partial class GetAzConnectedNetworkDevice_Get : global::System.Management /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -170,6 +172,11 @@ public partial class GetAzConnectedNetworkDevice_Get : global::System.Management ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -181,7 +188,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -289,7 +313,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -331,12 +354,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -375,8 +413,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_GetViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_GetViaIdentity.cs index cc9c1cdeea68..9f652a6e5054 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_GetViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets information about the specified device.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/devices/{deviceName}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkDevice_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkDevice_GetViaIdentity : global::System public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -74,11 +76,11 @@ public partial class GetAzConnectedNetworkDevice_GetViaIdentity : global::System public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -107,8 +109,8 @@ public partial class GetAzConnectedNetworkDevice_GetViaIdentity : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -119,8 +121,8 @@ public partial class GetAzConnectedNetworkDevice_GetViaIdentity : global::System /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -131,6 +133,11 @@ public partial class GetAzConnectedNetworkDevice_GetViaIdentity : global::System ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -142,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -250,7 +274,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -309,12 +332,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -353,8 +391,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_List.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_List.cs index 97f7613475dc..b90e0769f56a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_List.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists all the devices in a subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/devices", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkDevice_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzConnectedNetworkDevice_List : global::System.Managemen public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -72,11 +74,11 @@ public partial class GetAzConnectedNetworkDevice_List : global::System.Managemen public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -123,8 +125,8 @@ public partial class GetAzConnectedNetworkDevice_List : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -135,8 +137,8 @@ public partial class GetAzConnectedNetworkDevice_List : global::System.Managemen /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDeviceListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -147,6 +149,11 @@ public partial class GetAzConnectedNetworkDevice_List : global::System.Managemen ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -158,7 +165,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -266,7 +290,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -308,12 +331,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -352,8 +390,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDeviceListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_List1.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_List1.cs index 6bda05aff9bb..23344858f912 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_List1.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkDevice_List1.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists all the device resource in a resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/devices", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkDevice_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzConnectedNetworkDevice_List1 : global::System.Manageme public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -72,11 +74,11 @@ public partial class GetAzConnectedNetworkDevice_List1 : global::System.Manageme public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -137,8 +139,8 @@ public partial class GetAzConnectedNetworkDevice_List1 : global::System.Manageme /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -149,8 +151,8 @@ public partial class GetAzConnectedNetworkDevice_List1 : global::System.Manageme /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDeviceListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -161,6 +163,11 @@ public partial class GetAzConnectedNetworkDevice_List1 : global::System.Manageme ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -172,7 +179,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -280,7 +304,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -322,12 +345,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -366,8 +404,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDeviceListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendorSku_List.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendorSku_List.cs index 3c791b121144..e7b12a0de32b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendorSku_List.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendorSku_List.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ISkuOverview))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists all network function vendor sku details in a vendor.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/networkFunctionVendors/{vendorName}/vendorSkus", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkFunctionVendorSku_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -49,9 +50,10 @@ public partial class GetAzConnectedNetworkFunctionVendorSku_List : global::Syste public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -73,11 +75,11 @@ public partial class GetAzConnectedNetworkFunctionVendorSku_List : global::Syste public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -138,8 +140,8 @@ public partial class GetAzConnectedNetworkFunctionVendorSku_List : global::Syste /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -150,8 +152,8 @@ public partial class GetAzConnectedNetworkFunctionVendorSku_List : global::Syste /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionSkuListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -162,6 +164,11 @@ public partial class GetAzConnectedNetworkFunctionVendorSku_List : global::Syste ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -173,7 +180,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -281,7 +305,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -323,12 +346,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -367,8 +405,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionSkuListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendorSku_List1.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendorSku_List1.cs index f17001fcc8fc..035e1ada65d2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendorSku_List1.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendorSku_List1.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionSkuRoleDetails))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists information about network function vendor sku details.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/networkFunctionVendors/{vendorName}/vendorSkus/{vendorSkuName}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkFunctionVendorSku_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -49,9 +50,10 @@ public partial class GetAzConnectedNetworkFunctionVendorSku_List1 : global::Syst public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -73,11 +75,11 @@ public partial class GetAzConnectedNetworkFunctionVendorSku_List1 : global::Syst public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -152,8 +154,8 @@ public partial class GetAzConnectedNetworkFunctionVendorSku_List1 : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -164,8 +166,8 @@ public partial class GetAzConnectedNetworkFunctionVendorSku_List1 : global::Syst /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionSkuDetails + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -176,6 +178,11 @@ public partial class GetAzConnectedNetworkFunctionVendorSku_List1 : global::Syst ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -187,7 +194,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -295,7 +319,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -337,12 +360,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -381,8 +419,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionSkuDetails + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendor_List.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendor_List.cs index 8a007cc582eb..72590db54a7c 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendor_List.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunctionVendor_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendor))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists all the available vendor and sku information.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/networkFunctionVendors", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkFunctionVendor_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzConnectedNetworkFunctionVendor_List : global::System.M public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -72,11 +74,11 @@ public partial class GetAzConnectedNetworkFunctionVendor_List : global::System.M public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -123,8 +125,8 @@ public partial class GetAzConnectedNetworkFunctionVendor_List : global::System.M /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -135,8 +137,8 @@ public partial class GetAzConnectedNetworkFunctionVendor_List : global::System.M /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendorListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -147,6 +149,11 @@ public partial class GetAzConnectedNetworkFunctionVendor_List : global::System.M ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -158,7 +165,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -266,7 +290,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -308,12 +331,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -352,8 +390,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendorListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_Get.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_Get.cs index a28e3f421eb8..e2c7bfd58161 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_Get.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets information about the specified network function resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/networkFunctions/{networkFunctionName}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkFunction_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkFunction_Get : global::System.Manageme public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -66,11 +68,11 @@ public partial class GetAzConnectedNetworkFunction_Get : global::System.Manageme public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -146,8 +148,8 @@ public partial class GetAzConnectedNetworkFunction_Get : global::System.Manageme /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -158,8 +160,8 @@ public partial class GetAzConnectedNetworkFunction_Get : global::System.Manageme /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -170,6 +172,11 @@ public partial class GetAzConnectedNetworkFunction_Get : global::System.Manageme ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -181,7 +188,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -289,7 +313,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -331,12 +354,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -375,8 +413,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_GetViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_GetViaIdentity.cs index 89bf1d2576dd..95d155a1bd4a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_GetViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets information about the specified network function resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/networkFunctions/{networkFunctionName}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkFunction_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkFunction_GetViaIdentity : global::Syst public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -74,11 +76,11 @@ public partial class GetAzConnectedNetworkFunction_GetViaIdentity : global::Syst public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -107,8 +109,8 @@ public partial class GetAzConnectedNetworkFunction_GetViaIdentity : global::Syst /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -119,8 +121,8 @@ public partial class GetAzConnectedNetworkFunction_GetViaIdentity : global::Syst /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -131,6 +133,11 @@ public partial class GetAzConnectedNetworkFunction_GetViaIdentity : global::Syst ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -142,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -250,7 +274,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -309,12 +332,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -353,8 +391,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_List.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_List.cs index bb65fa46f563..1a8ac15911b6 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_List.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists all the network functions in a subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/networkFunctions", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkFunction_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzConnectedNetworkFunction_List : global::System.Managem public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -72,11 +74,11 @@ public partial class GetAzConnectedNetworkFunction_List : global::System.Managem public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -123,8 +125,8 @@ public partial class GetAzConnectedNetworkFunction_List : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -135,8 +137,8 @@ public partial class GetAzConnectedNetworkFunction_List : global::System.Managem /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -147,6 +149,11 @@ public partial class GetAzConnectedNetworkFunction_List : global::System.Managem ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -158,7 +165,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -266,7 +290,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -308,12 +331,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -352,8 +390,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_List1.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_List1.cs index 7045ffe0fad3..fc108217cf2e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_List1.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkFunction_List1.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists all the network function resources in a resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/networkFunctions", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkFunction_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzConnectedNetworkFunction_List1 : global::System.Manage public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -72,11 +74,11 @@ public partial class GetAzConnectedNetworkFunction_List1 : global::System.Manage public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -137,8 +139,8 @@ public partial class GetAzConnectedNetworkFunction_List1 : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -149,8 +151,8 @@ public partial class GetAzConnectedNetworkFunction_List1 : global::System.Manage /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -161,6 +163,11 @@ public partial class GetAzConnectedNetworkFunction_List1 : global::System.Manage ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -172,7 +179,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -280,7 +304,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -322,12 +345,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -366,8 +404,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_Get.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_Get.cs index a1c0c2f3cc5a..b3d44f7fed83 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_Get.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IRoleInstance))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets the information of role instance of vendor network function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}/roleInstances/{roleInstanceName}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_Get : globa public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -80,11 +82,11 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_Get : globa public string LocationName { get => this._locationName; set => this._locationName = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -174,8 +176,8 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_Get : globa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -186,8 +188,8 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_Get : globa /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IRoleInstance + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -198,6 +200,11 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_Get : globa ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -209,7 +216,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -317,7 +341,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -359,12 +382,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -403,8 +441,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IRoleInstance + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_GetViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_GetViaIdentity.cs index 7ae4b65f4205..d39716156966 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_GetViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IRoleInstance))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets the information of role instance of vendor network function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}/roleInstances/{roleInstanceName}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_GetViaIdent public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -74,11 +76,11 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_GetViaIdent public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -107,8 +109,8 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_GetViaIdent /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -119,8 +121,8 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_GetViaIdent /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IRoleInstance + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -131,6 +133,11 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_GetViaIdent ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -142,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -251,7 +275,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -318,12 +341,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -362,8 +400,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IRoleInstance + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_List.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_List.cs index 4a5e822aa983..367d8b0711bc 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_List.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunctionRoleInstance_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IRoleInstance))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists the information of role instances of vendor network function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}/roleInstances", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_List : glob public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -86,11 +88,11 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_List : glob public string LocationName { get => this._locationName; set => this._locationName = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -165,8 +167,8 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_List : glob /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -177,8 +179,8 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_List : glob /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionRoleInstanceListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -189,6 +191,11 @@ public partial class GetAzConnectedNetworkVendorFunctionRoleInstance_List : glob ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -200,7 +207,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -308,7 +332,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -350,12 +373,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -394,8 +432,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionRoleInstanceListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_Get.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_Get.cs index 62183f436e09..ab8a89b0337f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_Get.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets information about the specified vendor network function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorFunction_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkVendorFunction_Get : global::System.Ma public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -82,11 +84,11 @@ public partial class GetAzConnectedNetworkVendorFunction_Get : global::System.Ma public string LocationName { get => this._locationName; set => this._locationName = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -161,8 +163,8 @@ public partial class GetAzConnectedNetworkVendorFunction_Get : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -173,8 +175,8 @@ public partial class GetAzConnectedNetworkVendorFunction_Get : global::System.Ma /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -185,6 +187,11 @@ public partial class GetAzConnectedNetworkVendorFunction_Get : global::System.Ma ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -196,7 +203,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -304,7 +328,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -346,12 +369,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -390,8 +428,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_GetViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_GetViaIdentity.cs index 8f1ea97077c8..b671195a13ed 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_GetViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets information about the specified vendor network function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorFunction_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkVendorFunction_GetViaIdentity : global public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -74,11 +76,11 @@ public partial class GetAzConnectedNetworkVendorFunction_GetViaIdentity : global public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -107,8 +109,8 @@ public partial class GetAzConnectedNetworkVendorFunction_GetViaIdentity : global /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -119,8 +121,8 @@ public partial class GetAzConnectedNetworkVendorFunction_GetViaIdentity : global /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -131,6 +133,11 @@ public partial class GetAzConnectedNetworkVendorFunction_GetViaIdentity : global ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -142,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -250,7 +274,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -313,12 +336,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -357,8 +395,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_List.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_List.cs index b49048e5e839..7b5ea505b9d0 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_List.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorFunction_List.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists all the vendor network function sub resources in an Azure region, filtered by skuType, skuName, vendorProvisioningState.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorFunction_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -50,9 +51,10 @@ public partial class GetAzConnectedNetworkVendorFunction_List : global::System.M public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -106,11 +108,11 @@ public partial class GetAzConnectedNetworkVendorFunction_List : global::System.M public string LocationName { get => this._locationName; set => this._locationName = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -171,8 +173,8 @@ public partial class GetAzConnectedNetworkVendorFunction_List : global::System.M /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -183,8 +185,8 @@ public partial class GetAzConnectedNetworkVendorFunction_List : global::System.M /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunctionListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -195,6 +197,11 @@ public partial class GetAzConnectedNetworkVendorFunction_List : global::System.M ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -206,7 +213,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -314,7 +338,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -356,12 +379,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -400,8 +438,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunctionListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_Get.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_Get.cs index 1890e907d16d..04728a87ce6b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_Get.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets the preview information of a vendor sku.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus/{skuName}/previewSubscriptions/{previewSubscription}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorSkuPreview_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_Get : global::System. public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -66,11 +68,11 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_Get : global::System. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -159,8 +161,8 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_Get : global::System. /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -171,8 +173,8 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_Get : global::System. /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -183,6 +185,11 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_Get : global::System. ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -194,7 +201,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -302,7 +326,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -344,12 +367,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -388,8 +426,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_GetViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_GetViaIdentity.cs index 09288fdf6260..e620cef91f6c 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_GetViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets the preview information of a vendor sku.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus/{skuName}/previewSubscriptions/{previewSubscription}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorSkuPreview_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_GetViaIdentity : glob public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -74,11 +76,11 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_GetViaIdentity : glob public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -107,8 +109,8 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_GetViaIdentity : glob /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -119,8 +121,8 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_GetViaIdentity : glob /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -131,6 +133,11 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_GetViaIdentity : glob ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -142,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -250,7 +274,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -313,12 +336,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -357,8 +395,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_List.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_List.cs index 23d76c5972b7..723d7674d2b2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_List.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSkuPreview_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists all the preview information of a vendor sku.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus/{skuName}/previewSubscriptions", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorSkuPreview_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_List : global::System public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -72,11 +74,11 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_List : global::System public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -151,8 +153,8 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_List : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -163,8 +165,8 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_List : global::System /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscriptionsList + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -175,6 +177,11 @@ public partial class GetAzConnectedNetworkVendorSkuPreview_List : global::System ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -186,7 +193,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -294,7 +318,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -336,12 +359,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -380,8 +418,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscriptionsList + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_Get.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_Get.cs index 3adb20f8be53..3f2c79d57727 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_Get.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets information about the specified sku.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus/{skuName}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorSku_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkVendorSku_Get : global::System.Managem public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -66,11 +68,11 @@ public partial class GetAzConnectedNetworkVendorSku_Get : global::System.Managem public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -145,8 +147,8 @@ public partial class GetAzConnectedNetworkVendorSku_Get : global::System.Managem /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -157,8 +159,8 @@ public partial class GetAzConnectedNetworkVendorSku_Get : global::System.Managem /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -169,6 +171,11 @@ public partial class GetAzConnectedNetworkVendorSku_Get : global::System.Managem ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -180,7 +187,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -288,7 +312,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -330,12 +353,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -374,8 +412,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_GetViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_GetViaIdentity.cs index c9677710ae7e..bb328b148c7c 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_GetViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets information about the specified sku.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus/{skuName}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorSku_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkVendorSku_GetViaIdentity : global::Sys public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -74,11 +76,11 @@ public partial class GetAzConnectedNetworkVendorSku_GetViaIdentity : global::Sys public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -107,8 +109,8 @@ public partial class GetAzConnectedNetworkVendorSku_GetViaIdentity : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -119,8 +121,8 @@ public partial class GetAzConnectedNetworkVendorSku_GetViaIdentity : global::Sys /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -131,6 +133,11 @@ public partial class GetAzConnectedNetworkVendorSku_GetViaIdentity : global::Sys ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -142,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -250,7 +274,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -309,12 +332,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -353,8 +391,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_List.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_List.cs index cb1d6b86ce6c..9af552bad5b0 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_List.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendorSku_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists all the skus of a vendor.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendorSku_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzConnectedNetworkVendorSku_List : global::System.Manage public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -72,11 +74,11 @@ public partial class GetAzConnectedNetworkVendorSku_List : global::System.Manage public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -137,8 +139,8 @@ public partial class GetAzConnectedNetworkVendorSku_List : global::System.Manage /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -149,8 +151,8 @@ public partial class GetAzConnectedNetworkVendorSku_List : global::System.Manage /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -161,6 +163,11 @@ public partial class GetAzConnectedNetworkVendorSku_List : global::System.Manage ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -172,7 +179,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -280,7 +304,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -322,12 +345,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -366,8 +404,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_Get.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_Get.cs index ad5eab5a4870..06c83d282667 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_Get.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets information about the specified vendor.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendor_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkVendor_Get : global::System.Management public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -66,11 +68,11 @@ public partial class GetAzConnectedNetworkVendor_Get : global::System.Management public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -132,8 +134,8 @@ public partial class GetAzConnectedNetworkVendor_Get : global::System.Management /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -144,8 +146,8 @@ public partial class GetAzConnectedNetworkVendor_Get : global::System.Management /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -156,6 +158,11 @@ public partial class GetAzConnectedNetworkVendor_Get : global::System.Management ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -167,7 +174,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -275,7 +299,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -317,12 +340,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -361,8 +399,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_GetViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_GetViaIdentity.cs index b21477f45a0a..f5d2e6c20544 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_GetViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Gets information about the specified vendor.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendor_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzConnectedNetworkVendor_GetViaIdentity : global::System public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -74,11 +76,11 @@ public partial class GetAzConnectedNetworkVendor_GetViaIdentity : global::System public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -107,8 +109,8 @@ public partial class GetAzConnectedNetworkVendor_GetViaIdentity : global::System /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -119,8 +121,8 @@ public partial class GetAzConnectedNetworkVendor_GetViaIdentity : global::System /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -131,6 +133,11 @@ public partial class GetAzConnectedNetworkVendor_GetViaIdentity : global::System ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -142,7 +149,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -250,7 +274,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -305,12 +328,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -349,8 +387,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_List.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_List.cs index dd819b22da7a..6cf57d94d092 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_List.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/GetAzConnectedNetworkVendor_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Lists all the vendors in a subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors", ApiVersion = "2021-05-01")] public partial class GetAzConnectedNetworkVendor_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -48,9 +49,10 @@ public partial class GetAzConnectedNetworkVendor_List : global::System.Managemen public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -72,11 +74,11 @@ public partial class GetAzConnectedNetworkVendor_List : global::System.Managemen public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -123,8 +125,8 @@ public partial class GetAzConnectedNetworkVendor_List : global::System.Managemen /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -135,8 +137,8 @@ public partial class GetAzConnectedNetworkVendor_List : global::System.Managemen /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorListResult + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -147,6 +149,11 @@ public partial class GetAzConnectedNetworkVendor_List : global::System.Managemen ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -158,7 +165,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -266,7 +290,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -308,12 +331,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -352,8 +390,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorListResult + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkDevice_CreateExpanded.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkDevice_CreateExpanded.cs index 1c5958952415..569093f5f6cc 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkDevice_CreateExpanded.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkDevice_CreateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Creates or updates a device.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/devices/{deviceName}", ApiVersion = "2021-05-01")] public partial class NewAzConnectedNetworkDevice_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -33,6 +34,9 @@ public partial class NewAzConnectedNetworkDevice_CreateExpanded : global::System /// private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Device resource. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.Device(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] @@ -47,9 +51,10 @@ public partial class NewAzConnectedNetworkDevice_CreateExpanded : global::System public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -79,14 +84,14 @@ public partial class NewAzConnectedNetworkDevice_CreateExpanded : global::System Description = @"The geo-location where the resource lives", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] - public string Location { get => ParametersBody.Location ?? null; set => ParametersBody.Location = value; } + public string Location { get => _parametersBody.Location ?? null; set => _parametersBody.Location = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -112,12 +117,6 @@ public partial class NewAzConnectedNetworkDevice_CreateExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice _parametersBody= new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.Device(); - - /// Device resource. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice ParametersBody { get => this._parametersBody; set => this._parametersBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -132,7 +131,7 @@ public partial class NewAzConnectedNetworkDevice_CreateExpanded : global::System Description = @"Device properties.", SerializedName = @"properties", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevicePropertiesFormat) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevicePropertiesFormat Property { get => ParametersBody.Property ?? null /* object */; set => ParametersBody.Property = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevicePropertiesFormat Property { get => _parametersBody.Property ?? null /* object */; set => _parametersBody.Property = value; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -192,15 +191,15 @@ public partial class NewAzConnectedNetworkDevice_CreateExpanded : global::System Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.ITrackedResourceTags Tag { get => ParametersBody.Tag ?? null /* object */; set => ParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.ITrackedResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -211,8 +210,8 @@ public partial class NewAzConnectedNetworkDevice_CreateExpanded : global::System /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -223,6 +222,11 @@ public partial class NewAzConnectedNetworkDevice_CreateExpanded : global::System ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -248,7 +252,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.ParametersBody = this.ParametersBody; + clone._parametersBody = this._parametersBody; clone.ResourceGroupName = this.ResourceGroupName; clone.Name = this.Name; clone.SubscriptionId = this.SubscriptionId; @@ -258,7 +262,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -399,7 +420,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -414,12 +434,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DevicesCreateOrUpdate(ResourceGroupName, Name, SubscriptionId, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.DevicesCreateOrUpdate(ResourceGroupName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId,body=ParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -438,12 +458,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -465,14 +500,14 @@ protected override void StopProcessing() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -482,8 +517,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkFunction_CreateExpanded.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkFunction_CreateExpanded.cs index cb75c16a6e87..905290f890ef 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkFunction_CreateExpanded.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkFunction_CreateExpanded.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Creates or updates a network function resource. This operation can take up to 6 hours to complete. This is expected service behavior.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/networkFunctions/{networkFunctionName}", ApiVersion = "2021-05-01")] public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -36,6 +37,9 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst ///
    private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Network function resource response. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunction(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] @@ -59,12 +63,13 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst Description = @"The network function container configurations from the user.", SerializedName = @"networkFunctionContainerConfigurations", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations ContainerConfiguration { get => ParametersBody.ContainerConfiguration ?? null /* object */; set => ParametersBody.ContainerConfiguration = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations ContainerConfiguration { get => _parametersBody.ContainerConfiguration ?? null /* object */; set => _parametersBody.ContainerConfiguration = value; } /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -79,7 +84,7 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst Description = @"Resource ID.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] - public string DeviceId { get => ParametersBody.DeviceId ?? null; set => ParametersBody.DeviceId = value; } + public string DeviceId { get => _parametersBody.DeviceId ?? null; set => _parametersBody.DeviceId = value; } /// A unique read-only string that changes whenever the resource is updated. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A unique read-only string that changes whenever the resource is updated.")] @@ -90,7 +95,7 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst Description = @"A unique read-only string that changes whenever the resource is updated.", SerializedName = @"etag", PossibleTypes = new [] { typeof(string) })] - public string Etag { get => ParametersBody.Etag ?? null; set => ParametersBody.Etag = value; } + public string Etag { get => _parametersBody.Etag ?? null; set => _parametersBody.Etag = value; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -116,7 +121,7 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst Description = @"The geo-location where the resource lives", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] - public string Location { get => ParametersBody.Location ?? null; set => ParametersBody.Location = value; } + public string Location { get => _parametersBody.Location ?? null; set => _parametersBody.Location = value; } /// The parameters for the managed application. [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -128,14 +133,14 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst Description = @"The parameters for the managed application.", SerializedName = @"managedApplicationParameters", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionPropertiesFormatManagedApplicationParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionPropertiesFormatManagedApplicationParameters ManagedApplicationParameter { get => ParametersBody.ManagedApplicationParameter ?? null /* object */; set => ParametersBody.ManagedApplicationParameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionPropertiesFormatManagedApplicationParameters ManagedApplicationParameter { get => _parametersBody.ManagedApplicationParameter ?? null /* object */; set => _parametersBody.ManagedApplicationParameter = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -161,12 +166,6 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction _parametersBody= new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunction(); - - /// Network function resource response. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction ParametersBody { get => this._parametersBody; set => this._parametersBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -211,7 +210,7 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst Description = @"The sku name for the network function. Once set, it cannot be updated.", SerializedName = @"skuName", PossibleTypes = new [] { typeof(string) })] - public string SkuName { get => ParametersBody.SkuName ?? null; set => ParametersBody.SkuName = value; } + public string SkuName { get => _parametersBody.SkuName ?? null; set => _parametersBody.SkuName = value; } /// Backing field for property. private string _subscriptionId; @@ -241,7 +240,7 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.ITrackedResourceTags Tag { get => ParametersBody.Tag ?? null /* object */; set => ParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.ITrackedResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } /// The network function configurations from the user. [global::System.Management.Automation.AllowEmptyCollection] @@ -253,7 +252,7 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst Description = @"The network function configurations from the user.", SerializedName = @"networkFunctionUserConfigurations", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionUserConfiguration) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionUserConfiguration[] UserConfiguration { get => ParametersBody.UserConfiguration ?? null /* arrayOf */; set => ParametersBody.UserConfiguration = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionUserConfiguration[] UserConfiguration { get => _parametersBody.UserConfiguration ?? null /* arrayOf */; set => _parametersBody.UserConfiguration = value; } /// The vendor name for the network function. Once set, it cannot be updated. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The vendor name for the network function. Once set, it cannot be updated.")] @@ -264,15 +263,15 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst Description = @"The vendor name for the network function. Once set, it cannot be updated.", SerializedName = @"vendorName", PossibleTypes = new [] { typeof(string) })] - public string VendorName { get => ParametersBody.VendorName ?? null; set => ParametersBody.VendorName = value; } + public string VendorName { get => _parametersBody.VendorName ?? null; set => _parametersBody.VendorName = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -283,8 +282,8 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -295,6 +294,11 @@ public partial class NewAzConnectedNetworkFunction_CreateExpanded : global::Syst ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -320,7 +324,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.ParametersBody = this.ParametersBody; + clone._parametersBody = this._parametersBody; clone.ResourceGroupName = this.ResourceGroupName; clone.Name = this.Name; clone.SubscriptionId = this.SubscriptionId; @@ -330,7 +334,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -471,7 +492,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -486,12 +506,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NetworkFunctionsCreateOrUpdate(ResourceGroupName, Name, SubscriptionId, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.NetworkFunctionsCreateOrUpdate(ResourceGroupName, Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId,body=ParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -510,12 +530,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -537,14 +572,14 @@ protected override void StopProcessing() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -554,8 +589,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorFunction_CreateExpanded.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorFunction_CreateExpanded.cs index 36b068148e36..98c6e32c1fdd 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorFunction_CreateExpanded.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorFunction_CreateExpanded.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Creates or updates a vendor network function. This operation can take up to 6 hours to complete. This is expected service behavior.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}", ApiVersion = "2021-05-01")] public partial class NewAzConnectedNetworkVendorFunction_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -36,6 +37,9 @@ public partial class NewAzConnectedNetworkVendorFunction_CreateExpanded : global ///
    private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Vendor network function sub resource. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorNetworkFunction(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] @@ -50,9 +54,10 @@ public partial class NewAzConnectedNetworkVendorFunction_CreateExpanded : global public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -90,11 +95,11 @@ public partial class NewAzConnectedNetworkVendorFunction_CreateExpanded : global public string LocationName { get => this._locationName; set => this._locationName = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -105,12 +110,6 @@ public partial class NewAzConnectedNetworkVendorFunction_CreateExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction _parametersBody= new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorNetworkFunction(); - - /// Vendor network function sub resource. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction ParametersBody { get => this._parametersBody; set => this._parametersBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -156,7 +155,7 @@ public partial class NewAzConnectedNetworkVendorFunction_CreateExpanded : global SerializedName = @"skuType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType) })] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType SkuType { get => ParametersBody.SkuType ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType)""); set => ParametersBody.SkuType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType SkuType { get => _parametersBody.SkuType ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType)""); set => _parametersBody.SkuType = value; } /// Backing field for property. private string _subscriptionId; @@ -186,7 +185,7 @@ public partial class NewAzConnectedNetworkVendorFunction_CreateExpanded : global Description = @"An array of network function vendor configurations.", SerializedName = @"networkFunctionVendorConfigurations", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendorConfiguration) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendorConfiguration[] VendorConfiguration { get => ParametersBody.NetworkFunctionVendorConfiguration ?? null /* arrayOf */; set => ParametersBody.NetworkFunctionVendorConfiguration = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendorConfiguration[] VendorConfiguration { get => _parametersBody.NetworkFunctionVendorConfiguration ?? null /* arrayOf */; set => _parametersBody.NetworkFunctionVendorConfiguration = value; } /// Backing field for property. private string _vendorName; @@ -212,15 +211,15 @@ public partial class NewAzConnectedNetworkVendorFunction_CreateExpanded : global SerializedName = @"vendorProvisioningState", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VendorProvisioningState) })] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VendorProvisioningState))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VendorProvisioningState VendorProvisioningState { get => ParametersBody.VendorProvisioningState ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VendorProvisioningState)""); set => ParametersBody.VendorProvisioningState = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VendorProvisioningState VendorProvisioningState { get => _parametersBody.VendorProvisioningState ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VendorProvisioningState)""); set => _parametersBody.VendorProvisioningState = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -231,8 +230,8 @@ public partial class NewAzConnectedNetworkVendorFunction_CreateExpanded : global /// on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -243,6 +242,11 @@ public partial class NewAzConnectedNetworkVendorFunction_CreateExpanded : global ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -268,7 +272,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.ParametersBody = this.ParametersBody; + clone._parametersBody = this._parametersBody; clone.LocationName = this.LocationName; clone.VendorName = this.VendorName; clone.ServiceKey = this.ServiceKey; @@ -279,7 +283,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -420,7 +441,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -435,12 +455,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.VendorNetworkFunctionsCreateOrUpdate(LocationName, VendorName, ServiceKey, SubscriptionId, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.VendorNetworkFunctionsCreateOrUpdate(LocationName, VendorName, ServiceKey, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { LocationName=LocationName,VendorName=VendorName,ServiceKey=ServiceKey,SubscriptionId=SubscriptionId,body=ParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { LocationName=LocationName,VendorName=VendorName,ServiceKey=ServiceKey,SubscriptionId=SubscriptionId,body=_parametersBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -459,12 +479,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -486,14 +521,14 @@ protected override void StopProcessing() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { LocationName=LocationName, VendorName=VendorName, ServiceKey=ServiceKey, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { LocationName=LocationName, VendorName=VendorName, ServiceKey=ServiceKey, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { LocationName=LocationName, VendorName=VendorName, ServiceKey=ServiceKey, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { LocationName=LocationName, VendorName=VendorName, ServiceKey=ServiceKey, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -503,8 +538,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorSkuPreview_CreateExpanded.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorSkuPreview_CreateExpanded.cs index a0ee072a80a9..288300eef2d0 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorSkuPreview_CreateExpanded.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorSkuPreview_CreateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Creates or updates preview information of a vendor sku.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus/{skuName}/previewSubscriptions/{previewSubscription}", ApiVersion = "2021-05-01")] public partial class NewAzConnectedNetworkVendorSkuPreview_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -33,6 +34,9 @@ public partial class NewAzConnectedNetworkVendorSkuPreview_CreateExpanded : glob ///
    private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Customer subscription which can use a sku. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.PreviewSubscription(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] @@ -47,9 +51,10 @@ public partial class NewAzConnectedNetworkVendorSkuPreview_CreateExpanded : glob public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -71,11 +76,11 @@ public partial class NewAzConnectedNetworkVendorSkuPreview_CreateExpanded : glob public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -86,12 +91,6 @@ public partial class NewAzConnectedNetworkVendorSkuPreview_CreateExpanded : glob [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription _parametersBody= new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.PreviewSubscription(); - - /// Customer subscription which can use a sku. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription ParametersBody { get => this._parametersBody; set => this._parametersBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -178,8 +177,8 @@ public partial class NewAzConnectedNetworkVendorSkuPreview_CreateExpanded : glob /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -190,8 +189,8 @@ public partial class NewAzConnectedNetworkVendorSkuPreview_CreateExpanded : glob /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -202,6 +201,11 @@ public partial class NewAzConnectedNetworkVendorSkuPreview_CreateExpanded : glob ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -227,7 +231,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.ParametersBody = this.ParametersBody; + clone._parametersBody = this._parametersBody; clone.VendorName = this.VendorName; clone.SkuName = this.SkuName; clone.PreviewSubscription = this.PreviewSubscription; @@ -238,7 +242,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -379,7 +400,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -394,12 +414,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.VendorSkuPreviewCreateOrUpdate(VendorName, SkuName, PreviewSubscription, SubscriptionId, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.VendorSkuPreviewCreateOrUpdate(VendorName, SkuName, PreviewSubscription, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName,SkuName=SkuName,PreviewSubscription=PreviewSubscription,SubscriptionId=SubscriptionId,body=ParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName,SkuName=SkuName,PreviewSubscription=PreviewSubscription,SubscriptionId=SubscriptionId,body=_parametersBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -418,12 +438,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -445,14 +480,14 @@ protected override void StopProcessing() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName, SkuName=SkuName, PreviewSubscription=PreviewSubscription, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName, SkuName=SkuName, PreviewSubscription=PreviewSubscription, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName, SkuName=SkuName, PreviewSubscription=PreviewSubscription, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName, SkuName=SkuName, PreviewSubscription=PreviewSubscription, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -462,8 +497,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorSku_CreateExpanded.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorSku_CreateExpanded.cs index 4a1e5fd445c6..ab59f4d35652 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorSku_CreateExpanded.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendorSku_CreateExpanded.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Creates or updates a sku. This operation can take up to 2 hours to complete. This is expected service behavior.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus/{skuName}", ApiVersion = "2021-05-01")] public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -35,6 +36,9 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys ///
    private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Sku sub resource. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSku(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] @@ -49,9 +53,10 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -67,7 +72,7 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys SerializedName = @"deploymentMode", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuDeploymentMode) })] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuDeploymentMode))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuDeploymentMode DeploymentMode { get => ParametersBody.DeploymentMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuDeploymentMode)""); set => ParametersBody.DeploymentMode = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuDeploymentMode DeploymentMode { get => _parametersBody.DeploymentMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuDeploymentMode)""); set => _parametersBody.DeploymentMode = value; } /// SendAsync Pipeline Steps to be appended to the front of the pipeline [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] @@ -94,7 +99,7 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys Description = @"The parameters for the managed application to be supplied by the vendor.", SerializedName = @"managedApplicationParameters", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuPropertiesFormatManagedApplicationParameters) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuPropertiesFormatManagedApplicationParameters ManagedApplicationParameter { get => ParametersBody.ManagedApplicationParameter ?? null /* object */; set => ParametersBody.ManagedApplicationParameter = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuPropertiesFormatManagedApplicationParameters ManagedApplicationParameter { get => _parametersBody.ManagedApplicationParameter ?? null /* object */; set => _parametersBody.ManagedApplicationParameter = value; } /// The template for the managed application deployment. [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ExportAs(typeof(global::System.Collections.Hashtable))] @@ -106,14 +111,14 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys Description = @"The template for the managed application deployment.", SerializedName = @"managedApplicationTemplate", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuPropertiesFormatManagedApplicationTemplate) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuPropertiesFormatManagedApplicationTemplate ManagedApplicationTemplate { get => ParametersBody.ManagedApplicationTemplate ?? null /* object */; set => ParametersBody.ManagedApplicationTemplate = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSkuPropertiesFormatManagedApplicationTemplate ManagedApplicationTemplate { get => _parametersBody.ManagedApplicationTemplate ?? null /* object */; set => _parametersBody.ManagedApplicationTemplate = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// An array of network function role definitions. @@ -126,7 +131,7 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys Description = @"An array of network function role definitions.", SerializedName = @"networkFunctionRoleConfigurations", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionRoleConfiguration) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionRoleConfiguration[] NetworkFunctionRoleConfigurationType { get => ParametersBody.NetworkFunctionTemplateNetworkFunctionRoleConfiguration ?? null /* arrayOf */; set => ParametersBody.NetworkFunctionTemplateNetworkFunctionRoleConfiguration = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionRoleConfiguration[] NetworkFunctionRoleConfigurationType { get => _parametersBody.NetworkFunctionTemplateNetworkFunctionRoleConfiguration ?? null /* arrayOf */; set => _parametersBody.NetworkFunctionTemplateNetworkFunctionRoleConfiguration = value; } /// The network function type. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The network function type.")] @@ -138,7 +143,7 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys SerializedName = @"networkFunctionType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionType) })] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionType))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionType NetworkFunctionType { get => ParametersBody.NetworkFunctionType ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionType)""); set => ParametersBody.NetworkFunctionType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionType NetworkFunctionType { get => _parametersBody.NetworkFunctionType ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionType)""); set => _parametersBody.NetworkFunctionType = value; } /// /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue @@ -148,12 +153,6 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku _parametersBody= new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSku(); - - /// Sku sub resource. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku ParametersBody { get => this._parametersBody; set => this._parametersBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -168,7 +167,7 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys Description = @"Indicates if the vendor sku is in preview mode.", SerializedName = @"preview", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter Preview { get => ParametersBody.Preview ?? default(global::System.Management.Automation.SwitchParameter); set => ParametersBody.Preview = value; } + public global::System.Management.Automation.SwitchParameter Preview { get => _parametersBody.Preview ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.Preview = value; } /// The URI for the proxy server to use [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] @@ -210,7 +209,7 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys SerializedName = @"skuType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType) })] [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType))] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType SkuType { get => ParametersBody.SkuType ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType)""); set => ParametersBody.SkuType = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType SkuType { get => _parametersBody.SkuType ?? ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType)""); set => _parametersBody.SkuType = value; } /// Backing field for property. private string _subscriptionId; @@ -249,8 +248,8 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -261,8 +260,8 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -273,6 +272,11 @@ public partial class NewAzConnectedNetworkVendorSku_CreateExpanded : global::Sys ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -298,7 +302,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.ParametersBody = this.ParametersBody; + clone._parametersBody = this._parametersBody; clone.VendorName = this.VendorName; clone.SkuName = this.SkuName; clone.SubscriptionId = this.SubscriptionId; @@ -308,7 +312,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -449,7 +470,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -464,12 +484,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.VendorSkusCreateOrUpdate(VendorName, SkuName, SubscriptionId, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.VendorSkusCreateOrUpdate(VendorName, SkuName, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName,SkuName=SkuName,SubscriptionId=SubscriptionId,body=ParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName,SkuName=SkuName,SubscriptionId=SubscriptionId,body=_parametersBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -488,12 +508,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -515,14 +550,14 @@ protected override void StopProcessing() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName, SkuName=SkuName, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName, SkuName=SkuName, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName, SkuName=SkuName, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { VendorName=VendorName, SkuName=SkuName, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -532,8 +567,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendor_CreateExpanded.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendor_CreateExpanded.cs index 6403b5709b49..c8b2eae6734d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendor_CreateExpanded.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/NewAzConnectedNetworkVendor_CreateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Creates or updates a vendor.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}", ApiVersion = "2021-05-01")] public partial class NewAzConnectedNetworkVendor_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -33,6 +34,9 @@ public partial class NewAzConnectedNetworkVendor_CreateExpanded : global::System ///
    private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Vendor resource. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.Vendor(); + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] @@ -47,9 +51,10 @@ public partial class NewAzConnectedNetworkVendor_CreateExpanded : global::System public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -71,11 +76,11 @@ public partial class NewAzConnectedNetworkVendor_CreateExpanded : global::System public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -101,12 +106,6 @@ public partial class NewAzConnectedNetworkVendor_CreateExpanded : global::System [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter NoWait { get; set; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor _parametersBody= new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.Vendor(); - - /// Vendor resource. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor ParametersBody { get => this._parametersBody; set => this._parametersBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -151,8 +150,8 @@ public partial class NewAzConnectedNetworkVendor_CreateExpanded : global::System /// happens on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -163,8 +162,8 @@ public partial class NewAzConnectedNetworkVendor_CreateExpanded : global::System /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -175,6 +174,11 @@ public partial class NewAzConnectedNetworkVendor_CreateExpanded : global::System ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -200,7 +204,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; clone.HttpPipelinePrepend = this.HttpPipelinePrepend; clone.HttpPipelineAppend = this.HttpPipelineAppend; - clone.ParametersBody = this.ParametersBody; + clone._parametersBody = this._parametersBody; clone.Name = this.Name; clone.SubscriptionId = this.SubscriptionId; return clone; @@ -209,7 +213,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.NewAzConnecte /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -350,7 +371,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -365,12 +385,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.VendorsCreateOrUpdate(Name, SubscriptionId, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.VendorsCreateOrUpdate(Name, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name,SubscriptionId=SubscriptionId,body=ParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name,SubscriptionId=SubscriptionId,body=_parametersBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -389,12 +409,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -416,14 +451,14 @@ protected override void StopProcessing() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -433,8 +468,8 @@ protected override void StopProcessing() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkDevice_Delete.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkDevice_Delete.cs index 35edb8a4f11e..91e0132e8e68 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkDevice_Delete.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkDevice_Delete.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Deletes the specified device.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/devices/{deviceName}", ApiVersion = "2021-05-01")] public partial class RemoveAzConnectedNetworkDevice_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class RemoveAzConnectedNetworkDevice_Delete : global::System.Mana public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -71,11 +73,11 @@ public partial class RemoveAzConnectedNetworkDevice_Delete : global::System.Mana public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -166,8 +168,8 @@ public partial class RemoveAzConnectedNetworkDevice_Delete : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -198,6 +200,11 @@ public partial class RemoveAzConnectedNetworkDevice_Delete : global::System.Mana ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -232,7 +239,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RemoveAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -365,7 +389,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -412,12 +435,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkDevice_DeleteViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkDevice_DeleteViaIdentity.cs index 3d9031001440..94559997c1e7 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkDevice_DeleteViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkDevice_DeleteViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Deletes the specified device.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/devices/{deviceName}", ApiVersion = "2021-05-01")] public partial class RemoveAzConnectedNetworkDevice_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class RemoveAzConnectedNetworkDevice_DeleteViaIdentity : global:: public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -79,11 +81,11 @@ public partial class RemoveAzConnectedNetworkDevice_DeleteViaIdentity : global:: public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -127,8 +129,8 @@ public partial class RemoveAzConnectedNetworkDevice_DeleteViaIdentity : global:: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -159,6 +161,11 @@ public partial class RemoveAzConnectedNetworkDevice_DeleteViaIdentity : global:: ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -190,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RemoveAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -323,7 +347,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -390,12 +413,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkFunction_Delete.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkFunction_Delete.cs index 02496b081236..0bbb60ac8bf5 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkFunction_Delete.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkFunction_Delete.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Deletes the specified network function resource. This operation can take up to 1 hour to complete. This is expected service behavior.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/networkFunctions/{networkFunctionName}", ApiVersion = "2021-05-01")] public partial class RemoveAzConnectedNetworkFunction_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -50,9 +51,10 @@ public partial class RemoveAzConnectedNetworkFunction_Delete : global::System.Ma public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -74,11 +76,11 @@ public partial class RemoveAzConnectedNetworkFunction_Delete : global::System.Ma public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -169,8 +171,8 @@ public partial class RemoveAzConnectedNetworkFunction_Delete : global::System.Ma /// happens on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -201,6 +203,11 @@ public partial class RemoveAzConnectedNetworkFunction_Delete : global::System.Ma ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -235,7 +242,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RemoveAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -368,7 +392,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -415,12 +438,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkFunction_DeleteViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkFunction_DeleteViaIdentity.cs index 1ed4815ba205..eec52291ba36 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkFunction_DeleteViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkFunction_DeleteViaIdentity.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Deletes the specified network function resource. This operation can take up to 1 hour to complete. This is expected service behavior.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/networkFunctions/{networkFunctionName}", ApiVersion = "2021-05-01")] public partial class RemoveAzConnectedNetworkFunction_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -50,9 +51,10 @@ public partial class RemoveAzConnectedNetworkFunction_DeleteViaIdentity : global public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -82,11 +84,11 @@ public partial class RemoveAzConnectedNetworkFunction_DeleteViaIdentity : global public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -130,8 +132,8 @@ public partial class RemoveAzConnectedNetworkFunction_DeleteViaIdentity : global /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -162,6 +164,11 @@ public partial class RemoveAzConnectedNetworkFunction_DeleteViaIdentity : global ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -193,7 +200,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RemoveAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -326,7 +350,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -393,12 +416,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSkuPreview_Delete.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSkuPreview_Delete.cs index 4f9150f2c3ca..e38158206c17 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSkuPreview_Delete.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSkuPreview_Delete.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Deletes the preview information of a vendor sku.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus/{skuName}/previewSubscriptions/{previewSubscription}", ApiVersion = "2021-05-01")] public partial class RemoveAzConnectedNetworkVendorSkuPreview_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class RemoveAzConnectedNetworkVendorSkuPreview_Delete : global::S public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -71,11 +73,11 @@ public partial class RemoveAzConnectedNetworkVendorSkuPreview_Delete : global::S public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -179,8 +181,8 @@ public partial class RemoveAzConnectedNetworkVendorSkuPreview_Delete : global::S /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -211,6 +213,11 @@ public partial class RemoveAzConnectedNetworkVendorSkuPreview_Delete : global::S ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -246,7 +253,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RemoveAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -379,7 +403,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -426,12 +449,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSkuPreview_DeleteViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSkuPreview_DeleteViaIdentity.cs index d1d2e52219da..d0f99a16277d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSkuPreview_DeleteViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSkuPreview_DeleteViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Deletes the preview information of a vendor sku.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus/{skuName}/previewSubscriptions/{previewSubscription}", ApiVersion = "2021-05-01")] public partial class RemoveAzConnectedNetworkVendorSkuPreview_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class RemoveAzConnectedNetworkVendorSkuPreview_DeleteViaIdentity public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -79,11 +81,11 @@ public partial class RemoveAzConnectedNetworkVendorSkuPreview_DeleteViaIdentity public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -127,8 +129,8 @@ public partial class RemoveAzConnectedNetworkVendorSkuPreview_DeleteViaIdentity /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -159,6 +161,11 @@ public partial class RemoveAzConnectedNetworkVendorSkuPreview_DeleteViaIdentity ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -192,7 +199,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RemoveAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -325,7 +349,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -396,12 +419,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSku_Delete.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSku_Delete.cs index 40ce339b34cf..f852044eb50f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSku_Delete.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSku_Delete.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Deletes the specified sku. This operation can take up to 2 hours to complete. This is expected service behavior.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus/{skuName}", ApiVersion = "2021-05-01")] public partial class RemoveAzConnectedNetworkVendorSku_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -49,9 +50,10 @@ public partial class RemoveAzConnectedNetworkVendorSku_Delete : global::System.M public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -73,11 +75,11 @@ public partial class RemoveAzConnectedNetworkVendorSku_Delete : global::System.M public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -167,8 +169,8 @@ public partial class RemoveAzConnectedNetworkVendorSku_Delete : global::System.M /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -199,6 +201,11 @@ public partial class RemoveAzConnectedNetworkVendorSku_Delete : global::System.M ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -233,7 +240,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RemoveAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -366,7 +390,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -413,12 +436,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSku_DeleteViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSku_DeleteViaIdentity.cs index 8f5307abf324..f62b21df4013 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSku_DeleteViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendorSku_DeleteViaIdentity.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Deletes the specified sku. This operation can take up to 2 hours to complete. This is expected service behavior.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}/vendorSkus/{skuName}", ApiVersion = "2021-05-01")] public partial class RemoveAzConnectedNetworkVendorSku_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -49,9 +50,10 @@ public partial class RemoveAzConnectedNetworkVendorSku_DeleteViaIdentity : globa public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -81,11 +83,11 @@ public partial class RemoveAzConnectedNetworkVendorSku_DeleteViaIdentity : globa public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -129,8 +131,8 @@ public partial class RemoveAzConnectedNetworkVendorSku_DeleteViaIdentity : globa /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -161,6 +163,11 @@ public partial class RemoveAzConnectedNetworkVendorSku_DeleteViaIdentity : globa ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -192,7 +199,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RemoveAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -325,7 +349,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -392,12 +415,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendor_Delete.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendor_Delete.cs index b6e83b36f5fc..ae4f0d0f553d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendor_Delete.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendor_Delete.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Deletes the specified vendor.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}", ApiVersion = "2021-05-01")] public partial class RemoveAzConnectedNetworkVendor_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class RemoveAzConnectedNetworkVendor_Delete : global::System.Mana public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -71,11 +73,11 @@ public partial class RemoveAzConnectedNetworkVendor_Delete : global::System.Mana public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -152,8 +154,8 @@ public partial class RemoveAzConnectedNetworkVendor_Delete : global::System.Mana /// happens on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -184,6 +186,11 @@ public partial class RemoveAzConnectedNetworkVendor_Delete : global::System.Mana ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -217,7 +224,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RemoveAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -350,7 +374,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -397,12 +420,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendor_DeleteViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendor_DeleteViaIdentity.cs index d2b651d7c7c8..575605fcc83d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendor_DeleteViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RemoveAzConnectedNetworkVendor_DeleteViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Deletes the specified vendor.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/vendors/{vendorName}", ApiVersion = "2021-05-01")] public partial class RemoveAzConnectedNetworkVendor_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class RemoveAzConnectedNetworkVendor_DeleteViaIdentity : global:: public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -79,11 +81,11 @@ public partial class RemoveAzConnectedNetworkVendor_DeleteViaIdentity : global:: public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -127,8 +129,8 @@ public partial class RemoveAzConnectedNetworkVendor_DeleteViaIdentity : global:: /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -159,6 +161,11 @@ public partial class RemoveAzConnectedNetworkVendor_DeleteViaIdentity : global:: ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -190,7 +197,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RemoveAzConne /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -323,7 +347,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -386,12 +409,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart.cs index 705890cb0104..24aceda1e840 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Restarts a role instance of a vendor network function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}/roleInstances/{roleInstanceName}/restart", ApiVersion = "2021-05-01")] public partial class RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -85,11 +87,11 @@ public partial class RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart public string LocationName { get => this._locationName; set => this._locationName = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -194,8 +196,8 @@ public partial class RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart /// happens on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -216,6 +218,11 @@ public partial class RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -254,7 +261,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RestartAzConn /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -387,7 +411,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -434,12 +457,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RestartAzConnectedNetworkVendorFunctionRoleInstance_RestartViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RestartAzConnectedNetworkVendorFunctionRoleInstance_RestartViaIdentity.cs index 1b41141be3fa..c6c83122c5b2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RestartAzConnectedNetworkVendorFunctionRoleInstance_RestartViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/RestartAzConnectedNetworkVendorFunctionRoleInstance_RestartViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Restarts a role instance of a vendor network function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}/roleInstances/{roleInstanceName}/restart", ApiVersion = "2021-05-01")] public partial class RestartAzConnectedNetworkVendorFunctionRoleInstance_RestartViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -79,11 +81,11 @@ public partial class RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -127,8 +129,8 @@ public partial class RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -149,6 +151,11 @@ public partial class RestartAzConnectedNetworkVendorFunctionRoleInstance_Restart ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -182,7 +189,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.RestartAzConn /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -315,7 +339,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -391,12 +414,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StartAzConnectedNetworkVendorFunctionRoleInstance_Start.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StartAzConnectedNetworkVendorFunctionRoleInstance_Start.cs index c807ae9df67e..047e93b44cba 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StartAzConnectedNetworkVendorFunctionRoleInstance_Start.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StartAzConnectedNetworkVendorFunctionRoleInstance_Start.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Starts a role instance of a vendor network function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}/roleInstances/{roleInstanceName}/start", ApiVersion = "2021-05-01")] public partial class StartAzConnectedNetworkVendorFunctionRoleInstance_Start : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class StartAzConnectedNetworkVendorFunctionRoleInstance_Start : g public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -85,11 +87,11 @@ public partial class StartAzConnectedNetworkVendorFunctionRoleInstance_Start : g public string LocationName { get => this._locationName; set => this._locationName = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -194,8 +196,8 @@ public partial class StartAzConnectedNetworkVendorFunctionRoleInstance_Start : g /// happens on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -216,6 +218,11 @@ public partial class StartAzConnectedNetworkVendorFunctionRoleInstance_Start : g ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -252,7 +259,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.StartAzConnec /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -385,7 +409,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -432,12 +455,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StartAzConnectedNetworkVendorFunctionRoleInstance_StartViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StartAzConnectedNetworkVendorFunctionRoleInstance_StartViaIdentity.cs index 1b17cb3d6e39..4fa63c7b63b8 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StartAzConnectedNetworkVendorFunctionRoleInstance_StartViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StartAzConnectedNetworkVendorFunctionRoleInstance_StartViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Starts a role instance of a vendor network function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}/roleInstances/{roleInstanceName}/start", ApiVersion = "2021-05-01")] public partial class StartAzConnectedNetworkVendorFunctionRoleInstance_StartViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class StartAzConnectedNetworkVendorFunctionRoleInstance_StartViaI public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -79,11 +81,11 @@ public partial class StartAzConnectedNetworkVendorFunctionRoleInstance_StartViaI public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -127,8 +129,8 @@ public partial class StartAzConnectedNetworkVendorFunctionRoleInstance_StartViaI /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -149,6 +151,11 @@ public partial class StartAzConnectedNetworkVendorFunctionRoleInstance_StartViaI ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -182,7 +189,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.StartAzConnec /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -315,7 +339,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -391,12 +414,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StopAzConnectedNetworkVendorFunctionRoleInstance_Stop.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StopAzConnectedNetworkVendorFunctionRoleInstance_Stop.cs index e5370d585464..ae3998485111 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StopAzConnectedNetworkVendorFunctionRoleInstance_Stop.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StopAzConnectedNetworkVendorFunctionRoleInstance_Stop.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Powers off (stop) a role instance of a vendor network function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}/roleInstances/{roleInstanceName}/stop", ApiVersion = "2021-05-01")] public partial class StopAzConnectedNetworkVendorFunctionRoleInstance_Stop : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class StopAzConnectedNetworkVendorFunctionRoleInstance_Stop : glo public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -85,11 +87,11 @@ public partial class StopAzConnectedNetworkVendorFunctionRoleInstance_Stop : glo public string LocationName { get => this._locationName; set => this._locationName = value; } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -194,8 +196,8 @@ public partial class StopAzConnectedNetworkVendorFunctionRoleInstance_Stop : glo /// happens on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -216,6 +218,11 @@ public partial class StopAzConnectedNetworkVendorFunctionRoleInstance_Stop : glo ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -252,7 +259,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.StopAzConnect /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -385,7 +409,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -432,12 +455,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StopAzConnectedNetworkVendorFunctionRoleInstance_StopViaIdentity.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StopAzConnectedNetworkVendorFunctionRoleInstance_StopViaIdentity.cs index 08e6d7f2461d..1c9ef35937eb 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StopAzConnectedNetworkVendorFunctionRoleInstance_StopViaIdentity.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/StopAzConnectedNetworkVendorFunctionRoleInstance_StopViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Powers off (stop) a role instance of a vendor network function.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.HybridNetwork/locations/{locationName}/vendors/{vendorName}/networkFunctions/{serviceKey}/roleInstances/{roleInstanceName}/stop", ApiVersion = "2021-05-01")] public partial class StopAzConnectedNetworkVendorFunctionRoleInstance_StopViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -47,9 +48,10 @@ public partial class StopAzConnectedNetworkVendorFunctionRoleInstance_StopViaIde public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -79,11 +81,11 @@ public partial class StopAzConnectedNetworkVendorFunctionRoleInstance_StopViaIde public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// @@ -127,8 +129,8 @@ public partial class StopAzConnectedNetworkVendorFunctionRoleInstance_StopViaIde /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -149,6 +151,11 @@ public partial class StopAzConnectedNetworkVendorFunctionRoleInstance_StopViaIde ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -182,7 +189,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets.StopAzConnect /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -315,7 +339,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -391,12 +414,27 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkDeviceTag_UpdateExpanded.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkDeviceTag_UpdateExpanded.cs index 9ae761701eae..4e659b9d9539 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkDeviceTag_UpdateExpanded.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkDeviceTag_UpdateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Updates device tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/devices/{deviceName}", ApiVersion = "2021-05-01")] public partial class UpdateAzConnectedNetworkDeviceTag_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -33,6 +34,9 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateExpanded : global:: ///
    private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Tags object for patch operations. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.TagsObject(); + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] @@ -42,9 +46,10 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateExpanded : global:: public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -80,19 +85,13 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateExpanded : global:: public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject _parametersBody= new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.TagsObject(); - - /// Tags object for patch operations. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject ParametersBody { get => this._parametersBody; set => this._parametersBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -156,15 +155,15 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateExpanded : global:: Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags Tag { get => ParametersBody.Tag ?? null /* object */; set => ParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -175,8 +174,8 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateExpanded : global:: /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -187,6 +186,11 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateExpanded : global:: ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -198,7 +202,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -301,7 +322,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -316,12 +336,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.DevicesUpdateTags(ResourceGroupName, DeviceName, SubscriptionId, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.DevicesUpdateTags(ResourceGroupName, DeviceName, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,DeviceName=DeviceName,SubscriptionId=SubscriptionId,body=ParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,DeviceName=DeviceName,SubscriptionId=SubscriptionId,body=_parametersBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -348,12 +368,27 @@ public UpdateAzConnectedNetworkDeviceTag_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -375,14 +410,14 @@ public UpdateAzConnectedNetworkDeviceTag_UpdateExpanded() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, DeviceName=DeviceName, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, DeviceName=DeviceName, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, DeviceName=DeviceName, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, DeviceName=DeviceName, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -392,8 +427,8 @@ public UpdateAzConnectedNetworkDeviceTag_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded.cs index d77b751527c0..891a0e8155ea 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Updates device tags.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/devices/{deviceName}", ApiVersion = "2021-05-01")] public partial class UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -33,6 +34,9 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded ///
    private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Tags object for patch operations. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.TagsObject(); + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] @@ -42,9 +46,10 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -74,19 +79,13 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject _parametersBody= new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.TagsObject(); - - /// Tags object for patch operations. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject ParametersBody { get => this._parametersBody; set => this._parametersBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -118,15 +117,15 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags Tag { get => ParametersBody.Tag ?? null /* object */; set => ParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -137,8 +136,8 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -149,6 +148,11 @@ public partial class UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -160,7 +164,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -263,7 +284,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -280,7 +300,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.DevicesUpdateTagsViaIdentity(InputObject.Id, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.DevicesUpdateTagsViaIdentity(InputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); } else { @@ -297,13 +317,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.DevicesUpdateTags(InputObject.ResourceGroupName ?? null, InputObject.DeviceName ?? null, InputObject.SubscriptionId ?? null, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.DevicesUpdateTags(InputObject.ResourceGroupName ?? null, InputObject.DeviceName ?? null, InputObject.SubscriptionId ?? null, _parametersBody, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -330,12 +350,27 @@ public UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -357,14 +392,14 @@ public UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -374,8 +409,8 @@ public UpdateAzConnectedNetworkDeviceTag_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkFunctionTag_UpdateExpanded.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkFunctionTag_UpdateExpanded.cs index 1d7f182e94d0..54cecf5fe22e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkFunctionTag_UpdateExpanded.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkFunctionTag_UpdateExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Updates the tags for the network function resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/networkFunctions/{networkFunctionName}", ApiVersion = "2021-05-01")] public partial class UpdateAzConnectedNetworkFunctionTag_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -33,6 +34,9 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateExpanded : global ///
    private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Tags object for patch operations. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.TagsObject(); + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] @@ -42,9 +46,10 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateExpanded : global public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -66,11 +71,11 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateExpanded : global public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; /// Backing field for property. @@ -87,12 +92,6 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateExpanded : global [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Path)] public string NetworkFunctionName { get => this._networkFunctionName; set => this._networkFunctionName = value; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject _parametersBody= new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.TagsObject(); - - /// Tags object for patch operations. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject ParametersBody { get => this._parametersBody; set => this._parametersBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -156,15 +155,15 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateExpanded : global Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags Tag { get => ParametersBody.Tag ?? null /* object */; set => ParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -175,8 +174,8 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateExpanded : global /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -187,6 +186,11 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateExpanded : global ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -198,7 +202,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -301,7 +322,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -316,12 +336,12 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.NetworkFunctionsUpdateTags(ResourceGroupName, NetworkFunctionName, SubscriptionId, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.NetworkFunctionsUpdateTags(ResourceGroupName, NetworkFunctionName, SubscriptionId, _parametersBody, onOk, onDefault, this, Pipeline); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NetworkFunctionName=NetworkFunctionName,SubscriptionId=SubscriptionId,body=ParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName,NetworkFunctionName=NetworkFunctionName,SubscriptionId=SubscriptionId,body=_parametersBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -348,12 +368,27 @@ public UpdateAzConnectedNetworkFunctionTag_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -375,14 +410,14 @@ public UpdateAzConnectedNetworkFunctionTag_UpdateExpanded() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NetworkFunctionName=NetworkFunctionName, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NetworkFunctionName=NetworkFunctionName, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NetworkFunctionName=NetworkFunctionName, SubscriptionId=SubscriptionId, body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ResourceGroupName=ResourceGroupName, NetworkFunctionName=NetworkFunctionName, SubscriptionId=SubscriptionId, body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -392,8 +427,8 @@ public UpdateAzConnectedNetworkFunctionTag_UpdateExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpanded.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpanded.cs index e66dfc1d0163..d92c5fb2cb3d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpanded.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/cmdlets/UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpanded.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction))] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Description(@"Updates the tags for the network function resource.")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridNetwork/networkFunctions/{networkFunctionName}", ApiVersion = "2021-05-01")] public partial class UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener { @@ -33,6 +34,9 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpand ///
    private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + /// Tags object for patch operations. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.TagsObject(); + /// Wait for .NET debugger to attach [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Runtime)] @@ -42,9 +46,10 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpand public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ConnectedNetwork Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.ParameterCategory.Azure)] @@ -74,19 +79,13 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpand public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } /// - /// cancellation delegate. Stops the cmdlet when called. + /// cancellation delegate. Stops the cmdlet when called. /// global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - /// cancellation token. + /// cancellation token. global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject _parametersBody= new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.TagsObject(); - - /// Tags object for patch operations. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObject ParametersBody { get => this._parametersBody; set => this._parametersBody = value; } - /// /// The instance of the that the remote call will use. /// @@ -118,15 +117,15 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpand Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags Tag { get => ParametersBody.Tag ?? null /* object */; set => ParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ITagsObjectTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// Determines if the rest of the onDefault method should be processed, or if the method should /// return immediately (set to true to skip further processing ) @@ -137,8 +136,8 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpand /// on that response. Implement this method in a partial class to enable this behavior ///
    /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + /// from the remote call /// /// Determines if the rest of the onOk method should be processed, or if the method should return /// immediately (set to true to skip further processing ) @@ -149,6 +148,11 @@ public partial class UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpand ///
    protected override void BeginProcessing() { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); if (Break) { @@ -160,7 +164,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -263,7 +284,6 @@ protected override void ProcessRecord() { using( NoSynchronizationContext ) { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); if (null != HttpPipelinePrepend) @@ -280,7 +300,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { - await this.Client.NetworkFunctionsUpdateTagsViaIdentity(InputObject.Id, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.NetworkFunctionsUpdateTagsViaIdentity(InputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline); } else { @@ -297,13 +317,13 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } - await this.Client.NetworkFunctionsUpdateTags(InputObject.ResourceGroupName ?? null, InputObject.NetworkFunctionName ?? null, InputObject.SubscriptionId ?? null, ParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.NetworkFunctionsUpdateTags(InputObject.ResourceGroupName ?? null, InputObject.NetworkFunctionName ?? null, InputObject.SubscriptionId ?? null, _parametersBody, onOk, onDefault, this, Pipeline); } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.UndeclaredResponseException urexception) { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ParametersBody}) + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody}) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } }); @@ -330,12 +350,27 @@ public UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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). /// /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.IErrorResponse + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// @@ -357,14 +392,14 @@ public UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpanded() { // Unrecognized Response. Create an error record based on what we have. var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } }); } else { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=ParametersBody }) + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_parametersBody }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } }); @@ -374,8 +409,8 @@ public UpdateAzConnectedNetworkFunctionTag_UpdateViaIdentityExpanded() /// a delegate that is called when the remote service returns 200 (OK). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a from the remote call + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + /// from the remote call /// /// A that will be complete when handling of the method is completed. /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/AsyncOperationResponse.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/AsyncOperationResponse.cs index 4a7b18d955fa..543801539a63 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/AsyncOperationResponse.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/AsyncOperationResponse.cs @@ -31,10 +31,10 @@ public static AsyncOperationResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets /// - /// Creates a new instance of , deserializing the content from a json string. + /// Creates a new instance of , deserializing the content from a json string. /// /// a string containing a JSON serialized instance of this model. - /// an instance of the model class. + /// an instance of the model class. public static AsyncOperationResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.Json.JsonNode.Parse(jsonText)); } @@ -43,19 +43,19 @@ public partial class AsyncOperationResponseTypeConverter : System.Management.Aut { /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// parameter. /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the + /// true if the converter can convert the parameter to the /// parameter, otherwise false. /// public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to a type /// parameter. /// /// the instance to check if it can be converted to the - /// Determines if the parameter can be converted to the parameter + /// Determines if the parameter can be converted to the parameter /// /// the to convert from /// the to convert to /// - /// true if the converter can convert the parameter to the + /// true if the converter can convert the parameter to the /// parameter, otherwise false /// public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; /// - /// Converts the parameter to the parameter using and + /// Converts the parameter to the parameter using and /// /// the to convert from /// the to convert to @@ -128,8 +128,7 @@ public static bool CanConvertFrom(dynamic sourceValue) public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); /// - /// Converts the parameter to the parameter using and + /// Converts the parameter into an instance of /// /// the value to convert into an instance of . /// diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs index 7a56fd049adc..ea9af922264a 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs @@ -33,6 +33,9 @@ public class ExportHelpMarkdown : PSCmdlet [ValidateNotNullOrEmpty] public string ExamplesFolder { get; set; } + [Parameter()] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -41,7 +44,7 @@ protected override void ProcessRecord() var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast() .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi)) .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty)); - WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder); + WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder, AddComplexInterfaceInfo.IsPresent); } catch (Exception ee) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index 9b2d67314064..5dfd339c2aaf 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -52,6 +52,9 @@ public class ExportProxyCmdlet : PSCmdlet [Parameter(Mandatory = true, ParameterSetName = "NoDocs")] public SwitchParameter ExcludeDocs { get; set; } + [Parameter(ParameterSetName = "Docs")] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -163,7 +166,7 @@ protected override void ProcessRecord() var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles; var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder; var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder; - WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder); + WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder, AddComplexInterfaceInfo.IsPresent); } } } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs index aa0f6cb001da..e6cd75d872f2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -163,7 +163,7 @@ protected override void ProcessRecord() if (previewVersion != null) { - sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = {previewVersion}"); + sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = '{previewVersion}'"); } sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule ConnectedNetwork".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index 0e738d4119df..2fcc3c70591d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.PowerShell { internal static class MarkdownRenderer { - public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder) + public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder, bool AddComplexInterfaceInfo = true) { Directory.CreateDirectory(docsFolder); var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray(); @@ -69,18 +69,26 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod } sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}"); - sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); - foreach (var alias in markdownInfo.Aliases) + if (markdownInfo.Aliases.Any()) { - sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); } - if (markdownInfo.ComplexInterfaceInfos.Any()) + foreach (var alias in markdownInfo.Aliases) { - sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); } - foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + + if (AddComplexInterfaceInfo) { - sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + if (markdownInfo.ComplexInterfaceInfos.Any()) + { + sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + } + foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + { + sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + } + } sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs index b04ca5d7e291..322adf3b53e7 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs @@ -52,6 +52,17 @@ public override string ToString() internal class HelpExampleOutput { + private string ExampleTemplate = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + Environment.NewLine; + + private string ExampleTemplateWithOutput = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + "{6}" + Environment.NewLine + "{7}" + Environment.NewLine + Environment.NewLine + + "{8}" + Environment.NewLine + Environment.NewLine; + public MarkdownExampleHelpInfo ExampleInfo { get; } public HelpExampleOutput(MarkdownExampleHelpInfo exampleInfo) @@ -59,17 +70,26 @@ public HelpExampleOutput(MarkdownExampleHelpInfo exampleInfo) ExampleInfo = exampleInfo; } - public override string ToString() => $@"{ExampleNameHeader}{ExampleInfo.Name} -{ExampleCodeHeader} -{ExampleInfo.Code} -{ExampleCodeFooter} - -{ExampleInfo.Description.ToDescriptionFormat()} - -"; + public override string ToString() + { + if (string.IsNullOrEmpty(ExampleInfo.Output)) + { + return string.Format(ExampleTemplate, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleInfo.Description.ToDescriptionFormat()); + } + else + { + return string.Format(ExampleTemplateWithOutput, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleOutputHeader, ExampleInfo.Output, ExampleOutputFooter, + ExampleInfo.Description.ToDescriptionFormat()); ; + } + } } - - + internal class HelpParameterOutput { public MarkdownParameterHelpInfo ParameterInfo { get; } @@ -161,6 +181,8 @@ public static string ToDescriptionFormat(this string text, bool escapeAngleBrack public const string ExampleNameHeader = "### "; public const string ExampleCodeHeader = "```powershell"; public const string ExampleCodeFooter = "```"; + public const string ExampleOutputHeader = "```output"; + public const string ExampleOutputFooter = "```"; public static HelpMetadataOutput ToHelpMetadataOutput(this MarkdownHelpInfo helpInfo) => new HelpMetadataOutput(helpInfo); diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs index d20dd3974bba..096c5d8b2b2c 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -109,18 +109,21 @@ internal class PsHelpExampleInfo { public string Title { get; } public string Code { get; } + public string Output { get; } public string Remarks { get; } public PsHelpExampleInfo(PSObject exampleObject) { Title = exampleObject.GetProperty("title"); Code = exampleObject.GetProperty("code"); + Output = exampleObject.GetProperty("output"); Remarks = exampleObject.GetProperty("remarks").EmptyIfNull().ToDescriptionText(); } public PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) { Title = markdownExample.Name; Code = markdownExample.Code; + Output = markdownExample.Output; Remarks = markdownExample.Description; } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs index e10996f60e48..0079d62fb292 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -91,12 +91,17 @@ private MarkdownExampleHelpInfo[] GetExamplesFromMarkdown(string examplesFolder) var code = codeStartIndex.HasValue && codeEndIndex.HasValue ? String.Join(Environment.NewLine, eg.Skip(codeStartIndex.Value + 1).Take(codeEndIndex.Value - (codeStartIndex.Value + 1))) : String.Empty; - var descriptionStartIndex = (codeEndIndex ?? 0) + 1; + var outputStartIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var outputEndIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i > outputStartIndex); + var output = outputStartIndex.HasValue && outputEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(outputStartIndex.Value + 1).Take(outputEndIndex.Value - (outputStartIndex.Value + 1))) + : String.Empty; + var descriptionStartIndex = (outputEndIndex ?? (codeEndIndex ?? 0)) + 1; descriptionStartIndex = String.IsNullOrWhiteSpace(eg[descriptionStartIndex]) ? descriptionStartIndex + 1 : descriptionStartIndex; var descriptionEndIndex = eg.Length - 1; descriptionEndIndex = String.IsNullOrWhiteSpace(eg[descriptionEndIndex]) ? descriptionEndIndex - 1 : descriptionEndIndex; var description = String.Join(Environment.NewLine, eg.Skip(descriptionStartIndex).Take((descriptionEndIndex + 1) - descriptionStartIndex)); - return new MarkdownExampleHelpInfo(name, code, description); + return new MarkdownExampleHelpInfo(name, code, output, description); }).ToArray(); } } @@ -154,12 +159,14 @@ internal class MarkdownExampleHelpInfo { public string Name { get; } public string Code { get; } + public string Output { get; } public string Description { get; } - public MarkdownExampleHelpInfo(string name, string code, string description) + public MarkdownExampleHelpInfo(string name, string code, string output, string description) { Name = name; Code = code; + Output = output; Description = description; } } @@ -213,12 +220,12 @@ public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, Param internal static class MarkdownTypesExtensions { - public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Remarks); + public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = { - new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"PS C:\> {{{{ Add code here }}}}{Environment.NewLine}{Environment.NewLine}{{{{ Add output here }}}}", @"{{ Add description here }}"), - new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"PS C:\> {{{{ Add code here }}}}{Environment.NewLine}{Environment.NewLine}{{{{ Add output here }}}}", @"{{ Add description here }}") + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), }; public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 21cec6d6ef61..3c067201c406 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -168,18 +168,62 @@ public ParameterNameOutput(string parameterName, bool isLast) public override string ToString() => $"{Indent}${{{ParameterName}}}{(IsLast ? String.Empty : $",{Environment.NewLine}")}{Environment.NewLine}"; } - internal class BeginOutput + internal class BaseOutput { public VariantGroup VariantGroup { get; } - public BeginOutput(VariantGroup variantGroup) + protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) { VariantGroup = variantGroup; } + public string ClearTelemetryContext() + { + return (!VariantGroup.IsInternal && IsAzure) ? $@"{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()" : ""; + } + } + + internal class BeginOutput : BaseOutput + { + public BeginOutput(VariantGroup variantGroup) : base(variantGroup) + { + } public string GetProcessCustomAttributesAtRuntime() { - return VariantGroup.IsInternal ? "" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; + return VariantGroup.IsInternal ? "" : IsAzure ? $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) +{Indent}{Indent}}}" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() +{Indent}{Indent}}} +{Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}{Indent}if ($internalCalledCmdlets -eq '') {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' +{Indent}{Indent}}} +"; + } + return ""; } public override string ToString() => $@"begin {{ {Indent}try {{ @@ -188,6 +232,7 @@ public override string ToString() => $@"begin {{ {Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 {Indent}{Indent}}} {Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName +{GetTelemetry()} {GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} {GetProcessCustomAttributesAtRuntime()} {Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -195,6 +240,7 @@ public override string ToString() => $@"begin {{ {Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) {Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) {Indent}}} catch {{ +{ClearTelemetryContext()} {Indent}{Indent}throw {Indent}}} }} @@ -223,36 +269,94 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); - 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}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } } return sb.ToString(); } } - internal class ProcessOutput + internal class ProcessOutput : BaseOutput { + public ProcessOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetFinally() + { + if (IsAzure && !VariantGroup.IsInternal) + { + return $@" +{Indent}finally {{ +{Indent}{Indent}$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}}} +"; + } + return ""; + } public override string ToString() => $@"process {{ {Indent}try {{ {Indent}{Indent}$steppablePipeline.Process($_) {Indent}}} catch {{ +{ClearTelemetryContext()} {Indent}{Indent}throw {Indent}}} +{GetFinally()} }} - "; } - internal class EndOutput + internal class EndOutput : BaseOutput { + public EndOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}{Indent}}} +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId +"; + } + return ""; + } public override string ToString() => $@"end {{ {Indent}try {{ {Indent}{Indent}$steppablePipeline.End() +{GetTelemetry()} {Indent}}} catch {{ +{ClearTelemetryContext()} {Indent}{Indent}throw {Indent}}} -}} +}} "; } @@ -493,9 +597,9 @@ public static string ToSyntaxTypeName(this Type type) public static BeginOutput ToBeginOutput(this VariantGroup variantGroup) => new BeginOutput(variantGroup); - public static ProcessOutput ToProcessOutput(this VariantGroup variantGroup) => new ProcessOutput(); + public static ProcessOutput ToProcessOutput(this VariantGroup variantGroup) => new ProcessOutput(variantGroup); - public static EndOutput ToEndOutput(this VariantGroup variantGroup) => new EndOutput(); + public static EndOutput ToEndOutput(this VariantGroup variantGroup) => new EndOutput(variantGroup); public static HelpCommentOutput ToHelpCommentOutput(this VariantGroup variantGroup) => new HelpCommentOutput(variantGroup); @@ -524,7 +628,7 @@ string RenderProperty(ComplexInterfaceInfo info, string indent, bool dash, bool return ni.IsComplexInterface ? ni.ToNoteOutput(nestedIndent, includeDashes, includeBackticks, false) : RenderProperty(ni, nestedIndent, includeDashes, includeBackticks); - }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, !isFirst && includeBackticks)); + }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, includeBackticks)); return String.Join(Environment.NewLine, nested); } } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/PsAttributes.cs index c6fe0d529393..b9dd8d5daa89 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -48,6 +48,13 @@ public ProfileAttribute(params string[] profiles) } } + [AttributeUsage(AttributeTargets.Class)] + public class HttpPathAttribute : Attribute + { + public string Path { get; set; } + public string ApiVersion { get; set; } + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/PsHelpers.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/PsHelpers.cs index 9c1eb2fcd9e7..b95750a82a40 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/PsHelpers.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/BuildTime/PsHelpers.cs @@ -39,9 +39,10 @@ public static IEnumerable GetModuleCmdlets(params string[] modulePa public static IEnumerable GetScriptCmdlets(PSCmdlet cmdlet, string scriptFolder) { // https://stackoverflow.com/a/40969712/294804 + var wrappedFolder = scriptFolder.Contains("'") ? $@"""{scriptFolder}""" : $@"'{scriptFolder}'"; var getCmdletsCommand = $@" $currentFunctions = Get-ChildItem function: -Get-ChildItem -Path '{scriptFolder}' -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }} +Get-ChildItem -Path {wrappedFolder} -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }} Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} "; return cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand); diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Customizations/IJsonSerializable.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Customizations/IJsonSerializable.cs index eb8dc9d37bf9..39691e66744e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Customizations/IJsonSerializable.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Customizations/IJsonSerializable.cs @@ -129,7 +129,7 @@ private static JsonNode TryToJsonValue(dynamic oValue) /// /// Serialize an object by using a variety of methods. /// - /// the object to be serialized. + /// the object to be serialized. /// the serialized JsonNode (if successful), otherwise, null internal static JsonNode ToJsonValue(object value) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/EventDataExtensions.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/EventDataExtensions.cs index 7481ca564a94..37727a72978e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/EventDataExtensions.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/EventDataExtensions.cs @@ -7,7 +7,6 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime { using System; - [System.ComponentModel.TypeConverter(typeof(EventDataConverter))] /// /// PowerShell-specific data on top of the llc# EventData /// @@ -16,6 +15,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime /// Obviously, this code would need to be duplcated on both modules. /// This is preferable to sharing a common library, as versioning makes that problematic. /// + [System.ComponentModel.TypeConverter(typeof(EventDataConverter))] public partial class EventData : EventArgs { } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/ISendAsync.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/ISendAsync.cs index 250406f10619..a63df91dea2d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/ISendAsync.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/ISendAsync.cs @@ -238,6 +238,8 @@ internal static Task CloneWithContentAndDispose(this HttpReq /// Clones an HttpRequestMessage (without the content) /// /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// /// A clone of the HttpRequestMessage internal static HttpRequestMessage Clone(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) { @@ -252,9 +254,9 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage original, Syste { clone.Properties.Add(prop); } - + foreach (KeyValuePair> header in original.Headers) - { + { /* **temporarily skip cloning telemetry related headers** clone.Headers.TryAddWithoutValidation(header.Key, header.Value); @@ -264,7 +266,7 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage original, Syste clone.Headers.TryAddWithoutValidation(header.Key, header.Value); } } - + return clone; } @@ -272,6 +274,8 @@ internal static HttpRequestMessage Clone(this HttpRequestMessage original, Syste /// Clones an HttpRequestMessage (including the content stream and content headers) /// /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// /// A clone of the HttpRequestMessage internal static async Task CloneWithContent(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) { diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/MessageAttribute.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/MessageAttribute.cs index 706200d584f4..27f77387d095 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/MessageAttribute.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/MessageAttribute.cs @@ -21,7 +21,7 @@ public class GenericBreakingChangeAttribute : Attribute //The version the change is effective from, non mandatory public string DeprecateByVersion { get; } - public bool DeprecateByVersionSet { get; } = false; + public string DeprecateByAzVersion { get; } //The date on which the change comes in effect public DateTime ChangeInEfectByDate { get; } @@ -32,23 +32,18 @@ public class GenericBreakingChangeAttribute : Attribute //New way fo calling the cmdlet public string NewWay { get; set; } - public GenericBreakingChangeAttribute(string message) - { - _message = message; - } - - public GenericBreakingChangeAttribute(string message, string deprecateByVersion) + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion) { _message = message; + this.DeprecateByAzVersion = deprecateByAzVersion; this.DeprecateByVersion = deprecateByVersion; - this.DeprecateByVersionSet = true; } - public GenericBreakingChangeAttribute(string message, string deprecateByVersion, string changeInEfectByDate) + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) { _message = message; this.DeprecateByVersion = deprecateByVersion; - this.DeprecateByVersionSet = true; + this.DeprecateByAzVersion = deprecateByAzVersion; if (DateTime.TryParse(changeInEfectByDate, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) { @@ -86,10 +81,8 @@ public void PrintCustomAttributeInfo(Action writeOutput) writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByDateMessage, this.ChangeInEfectByDate.ToString("d"))); } - if (DeprecateByVersionSet) - { - writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); - } + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); if (OldWay != null && NewWay != null) { @@ -114,18 +107,13 @@ public class CmdletBreakingChangeAttribute : GenericBreakingChangeAttribute public string ReplacementCmdletName { get; set; } - public CmdletBreakingChangeAttribute() : - base(string.Empty) + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { } - public CmdletBreakingChangeAttribute(string deprecateByVersione) : - base(string.Empty, deprecateByVersione) - { - } - - public CmdletBreakingChangeAttribute(string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { } @@ -146,20 +134,15 @@ protected override string GetAttributeSpecificMessage() public class ParameterSetBreakingChangeAttribute : GenericBreakingChangeAttribute { public string[] ChangedParameterSet { set; get; } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet) : - base(string.Empty) - { - ChangedParameterSet = changedParameterSet; - } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersione) : - base(string.Empty, deprecateByVersione) + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { ChangedParameterSet = changedParameterSet; } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { ChangedParameterSet = changedParameterSet; } @@ -185,6 +168,11 @@ public class PreviewMessageAttribute : Attribute { public string _message; + public DateTime EstimatedGaDate { get; } + + public bool IsEstimatedGaDateSet { get; } = false; + + public PreviewMessageAttribute() { this._message = Resources.PreviewCmdletMessage; @@ -192,12 +180,26 @@ public PreviewMessageAttribute() public PreviewMessageAttribute(string message) { - this._message = message; + this._message = string.IsNullOrEmpty(message) ? Resources.PreviewCmdletMessage : message; } - public void PrintCustomAttributeInfo(System.Management.Automation.PSCmdlet psCmdlet) + public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(message) { - psCmdlet.WriteWarning(this._message); + if (DateTime.TryParse(estimatedDateOfGa, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.EstimatedGaDate = result; + this.IsEstimatedGaDateSet = true; + } + } + + public void PrintCustomAttributeInfo(Action writeOutput) + { + writeOutput(this._message); + + if (IsEstimatedGaDateSet) + { + writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); + } } public virtual bool IsApplicableToInvocation(InvocationInfo invocation) @@ -219,20 +221,14 @@ public class ParameterBreakingChangeAttribute : GenericBreakingChangeAttribute public String NewParameterType { get; set; } - public ParameterBreakingChangeAttribute(string nameOfParameterChanging) : - base(string.Empty) + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { this.NameOfParameterChanging = nameOfParameterChanging; } - public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion) : - base(string.Empty, deprecateByVersion) - { - this.NameOfParameterChanging = nameOfParameterChanging; - } - - public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { this.NameOfParameterChanging = nameOfParameterChanging; } @@ -276,7 +272,7 @@ protected override string GetAttributeSpecificMessage() /// then the attribbute is applicable /// If the invocationInfo is null we return true /// - /// + /// /// bool public override bool IsApplicableToInvocation(InvocationInfo invocationInfo) { @@ -298,20 +294,14 @@ public class OutputBreakingChangeAttribute : GenericBreakingChangeAttribute public string[] NewOutputProperties { get; set; } - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType) : - base(string.Empty) - { - this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; - } - - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion) : - base(string.Empty, deprecateByVersion) + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; } - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/MessageAttributeHelper.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/MessageAttributeHelper.cs index b3429694a95d..88d335dd78f4 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/MessageAttributeHelper.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/MessageAttributeHelper.cs @@ -23,6 +23,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Runtime using System.Threading.Tasks; public class MessageAttributeHelper { + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); public const string BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK = "https://aka.ms/azps-changewarnings"; public const string SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME = "SuppressAzurePowerShellBreakingChangeWarnings"; @@ -34,7 +35,7 @@ public class MessageAttributeHelper * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, * We only process the Parameter beaking change attributes attached only params listed in this list (if present) * */ - public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet, bool showPreviewMessage = true) { bool supressWarningOrError = false; @@ -52,37 +53,53 @@ public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, Inv //Do not process the attributes at runtime... The env variable to override the warning messages is set return; } + if (IsAzure && invocationInfo.BoundParameters.ContainsKey("DefaultProfile")) + { + psCmdlet.WriteWarning("The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription."); + } + + ProcessBreakingChangeAttributesAtRuntime(commandInfo, invocationInfo, parameterSet, psCmdlet); + + } + private static void ProcessBreakingChangeAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { List attributes = new List(GetAllBreakingChangeAttributesInType(commandInfo, invocationInfo, parameterSet)); StringBuilder sb = new StringBuilder(); - Action appendBreakingChangeInfo = (string s) => sb.Append(s); + Action appendAttributeMessage = (string s) => sb.Append(s); if (attributes != null && attributes.Count > 0) { - appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); foreach (GenericBreakingChangeAttribute attribute in attributes) { - attribute.PrintCustomAttributeInfo(appendBreakingChangeInfo); + attribute.PrintCustomAttributeInfo(appendAttributeMessage); } - appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); psCmdlet.WriteWarning(sb.ToString()); } + } + + public static void ProcessPreviewMessageAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { List previewAttributes = new List(GetAllPreviewAttributesInType(commandInfo, invocationInfo)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); if (previewAttributes != null && previewAttributes.Count > 0) { foreach (PreviewMessageAttribute attribute in previewAttributes) { - attribute.PrintCustomAttributeInfo(psCmdlet); + attribute.PrintCustomAttributeInfo(appendAttributeMessage); } + psCmdlet.WriteWarning(sb.ToString()); } } - /** * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) * And returns all the deprecation attributes attached to it @@ -124,6 +141,12 @@ private static IEnumerable GetAllBreakingChangeA } return invocationInfo == null ? attributeList : attributeList.Where(e => e.GetType() == typeof(ParameterSetBreakingChangeAttribute) ? ((ParameterSetBreakingChangeAttribute)e).IsApplicableToInvocation(invocationInfo, parameterSet) : e.IsApplicableToInvocation(invocationInfo)); } + + public static bool ContainsPreviewAttribute(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + return GetAllPreviewAttributesInType(commandInfo, invocationInfo)?.Count() > 0; + } + private static IEnumerable GetAllPreviewAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo) { List attributeList = new List(); diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/PipelineMocking.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/PipelineMocking.cs index 8fa7d82efc18..d7ec5c77a51e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/PipelineMocking.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/PipelineMocking.cs @@ -259,4 +259,4 @@ public async Task SendAsync(HttpRequestMessage request, IEv } } } -} \ No newline at end of file +} diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Properties/Resources.Designer.cs b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Properties/Resources.Designer.cs index 1592aab3b767..4eefa22bdda0 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Properties/Resources.Designer.cs +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Properties/Resources.Designer.cs @@ -734,7 +734,7 @@ public static string BreakingChangesAttributesInEffectByDateMessage } /// - /// Looks up a localized string similar to Note :The change is expected to take effect from the version : '{0}' + /// Looks up a localized string similar to Note :The change is expected to take effect from version : '{0}' /// ///. /// @@ -746,6 +746,19 @@ public static string BreakingChangesAttributesInEffectByVersion } } + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from az version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByAzVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByAzVersion", resourceCulture); + } + } + /// /// Looks up a localized string similar to ```powershell ///# Old @@ -3122,7 +3135,16 @@ public static string PortalInstructionsGit } /// - /// Looks up a localized string similar to This cmdlet is in preview. The functionality may not be available in the selected subscription. + /// Looks up a localized string similar to The estimated generally available date is '{0}'.. + /// + public static string PreviewCmdletETAMessage { + get { + return ResourceManager.GetString("PreviewCmdletETAMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet is in preview. Its behavior is subject to change based on customer feedback.. /// public static string PreviewCmdletMessage { @@ -5630,4 +5652,4 @@ public static string YesHint } } } -} +} \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Properties/Resources.resx b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Properties/Resources.resx index 598cd53e958a..a08a2e50172b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Properties/Resources.resx +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/generated/runtime/Properties/Resources.resx @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can -- The change is expected to take effect from the version : '{0}' +- The change is expected to take effect from version : '{0}' ```powershell @@ -1736,6 +1736,12 @@ The type of the parameter is changing from '{0}' to '{1}'. Note : Go to {0} for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell. - This cmdlet is in preview. The functionality may not be available in the selected subscription. + This cmdlet is in preview. Its behavior is subject to change based on customer feedback. + + + The estimated generally available date is '{0}'. + + + - The change is expected to take effect from Az version : '{0}' \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Az.ConnectedNetwork.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Az.ConnectedNetwork.md new file mode 100644 index 000000000000..ba333a3dba1f --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Az.ConnectedNetwork.md @@ -0,0 +1,116 @@ +--- +Module Name: Az.ConnectedNetwork +Module Guid: 86910398-1fa6-447a-8b10-54e0ac5a2a6a +Download Help Link: https://learn.microsoft.com/powershell/module/az.connectednetwork +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.ConnectedNetwork Module +## Description +Microsoft Azure PowerShell: ConnectedNetwork cmdlets + +## Az.ConnectedNetwork Cmdlets +### [Get-AzConnectedNetworkDevice](Get-AzConnectedNetworkDevice.md) +Gets information about the specified device. + +### [Get-AzConnectedNetworkDeviceRegistrationKey](Get-AzConnectedNetworkDeviceRegistrationKey.md) +List the registration key for the device. + +### [Get-AzConnectedNetworkFunction](Get-AzConnectedNetworkFunction.md) +Gets information about the specified network function resource. + +### [Get-AzConnectedNetworkFunctionVendor](Get-AzConnectedNetworkFunctionVendor.md) +Lists all the available vendor and sku information. + +### [Get-AzConnectedNetworkVendor](Get-AzConnectedNetworkVendor.md) +Gets information about the specified vendor. + +### [Get-AzConnectedNetworkVendorFunction](Get-AzConnectedNetworkVendorFunction.md) +Gets information about the specified vendor network function. + +### [Get-AzConnectedNetworkVendorFunctionRoleInstance](Get-AzConnectedNetworkVendorFunctionRoleInstance.md) +Gets the information of role instance of vendor network function. + +### [Get-AzConnectedNetworkVendorSku](Get-AzConnectedNetworkVendorSku.md) +Gets information about the specified sku. + +### [Get-AzConnectedNetworkVendorSkuPreview](Get-AzConnectedNetworkVendorSkuPreview.md) +Gets the preview information of a vendor sku. + +### [New-AzConnectedNetworkAzureStackEdgeObject](New-AzConnectedNetworkAzureStackEdgeObject.md) +Create a in-memory object for AzureStackEdgeFormat + +### [New-AzConnectedNetworkDevice](New-AzConnectedNetworkDevice.md) +Creates or updates a device. + +### [New-AzConnectedNetworkFunction](New-AzConnectedNetworkFunction.md) +Creates or updates a network function resource. +This operation can take up to 6 hours to complete. +This is expected service behavior. + +### [New-AzConnectedNetworkFunctionRoleConfigurationObject](New-AzConnectedNetworkFunctionRoleConfigurationObject.md) +Create a in-memory object for NetworkFunctionRoleConfiguration + +### [New-AzConnectedNetworkFunctionUserConfigurationObject](New-AzConnectedNetworkFunctionUserConfigurationObject.md) +Create a in-memory object for NetworkFunctionUserConfiguration + +### [New-AzConnectedNetworkFunctionVendorConfigurationObject](New-AzConnectedNetworkFunctionVendorConfigurationObject.md) +Create a in-memory object for NetworkFunctionVendorConfiguration + +### [New-AzConnectedNetworkInterfaceIPConfigurationObject](New-AzConnectedNetworkInterfaceIPConfigurationObject.md) +Create a in-memory object for NetworkInterfaceIPConfiguration + +### [New-AzConnectedNetworkInterfaceObject](New-AzConnectedNetworkInterfaceObject.md) +Create a in-memory object for NetworkInterface + +### [New-AzConnectedNetworkVendor](New-AzConnectedNetworkVendor.md) +Creates or updates a vendor. + +### [New-AzConnectedNetworkVendorFunction](New-AzConnectedNetworkVendorFunction.md) +Creates or updates a vendor network function. +This operation can take up to 6 hours to complete. +This is expected service behavior. + +### [New-AzConnectedNetworkVendorSku](New-AzConnectedNetworkVendorSku.md) +Creates or updates a sku. +This operation can take up to 2 hours to complete. +This is expected service behavior. + +### [New-AzConnectedNetworkVendorSkuPreview](New-AzConnectedNetworkVendorSkuPreview.md) +Creates or updates preview information of a vendor sku. + +### [Remove-AzConnectedNetworkDevice](Remove-AzConnectedNetworkDevice.md) +Deletes the specified device. + +### [Remove-AzConnectedNetworkFunction](Remove-AzConnectedNetworkFunction.md) +Deletes the specified network function resource. +This operation can take up to 1 hour to complete. +This is expected service behavior. + +### [Remove-AzConnectedNetworkVendor](Remove-AzConnectedNetworkVendor.md) +Deletes the specified vendor. + +### [Remove-AzConnectedNetworkVendorSku](Remove-AzConnectedNetworkVendorSku.md) +Deletes the specified sku. +This operation can take up to 2 hours to complete. +This is expected service behavior. + +### [Remove-AzConnectedNetworkVendorSkuPreview](Remove-AzConnectedNetworkVendorSkuPreview.md) +Deletes the preview information of a vendor sku. + +### [Restart-AzConnectedNetworkVendorFunctionRoleInstance](Restart-AzConnectedNetworkVendorFunctionRoleInstance.md) +Restarts a role instance of a vendor network function. + +### [Start-AzConnectedNetworkVendorFunctionRoleInstance](Start-AzConnectedNetworkVendorFunctionRoleInstance.md) +Starts a role instance of a vendor network function. + +### [Stop-AzConnectedNetworkVendorFunctionRoleInstance](Stop-AzConnectedNetworkVendorFunctionRoleInstance.md) +Powers off (stop) a role instance of a vendor network function. + +### [Update-AzConnectedNetworkDeviceTag](Update-AzConnectedNetworkDeviceTag.md) +Updates device tags. + +### [Update-AzConnectedNetworkFunctionTag](Update-AzConnectedNetworkFunctionTag.md) +Updates the tags for the network function resource. + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkDevice.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkDevice.md new file mode 100644 index 000000000000..560808601eac --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkDevice.md @@ -0,0 +1,193 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkdevice +schema: 2.0.0 +--- + +# Get-AzConnectedNetworkDevice + +## SYNOPSIS +Gets information about the specified device. + +## SYNTAX + +### List (Default) +``` +Get-AzConnectedNetworkDevice [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzConnectedNetworkDevice -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzConnectedNetworkDevice -InputObject [-DefaultProfile ] + [] +``` + +### List1 +``` +Get-AzConnectedNetworkDevice -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets information about the specified device. + +## EXAMPLES + +### Example 1: Get-AzConnectedNetworkDevice via Resource Group and Resource name +```powershell +Get-AzConnectedNetworkDevice -ResourceGroupName myResources -Name myMecDevice +``` + +```output +DeviceType : AzureStackEdge +Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice +Location : westcentralus +Name : myMecDevice +NetworkFunction : {/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.HybridNetwork/networkFunctions/myVnf1} +ProvisioningState : Succeeded +ResourceGroupName : myResources +Status : Registered +SystemDataCreatedAt : 11/25/2020 5:34:49 AM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 11/25/2020 5:58:38 AM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags +Type : Microsoft.HybridNetwork/devices + +``` + +Getting information about the NFM device in resource group myResources with name myMecDevice. + +### Example 2: Get-AzConnectedNetworkDevice via Identity +```powershell +$mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkDevice -InputObject $mecDevice +``` + +```output +DeviceType : AzureStackEdge +Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice1 +Location : eastus +Name : myMecDevice1 +NetworkFunction : {/subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/mrg-vmware_sdwan_edge_zones-20211124063650/providers/Microsoft.HybridNetwork/networkFunctions/myEdge1} +ProvisioningState : Succeeded +ResourceGroupName : myResources +Status : Registered +SystemDataCreatedAt : 11/23/2021 10:27:13 PM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 11/24/2021 7:42:41 AM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags +Type : microsoft.hybridnetwork/devices + +``` + +Creating an identity with device name myMecDevice1, resource group myResources and the given subscription. +Getting the information about the device using this identity. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the device resource. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: DeviceName + +Required: True +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: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkDeviceRegistrationKey.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkDeviceRegistrationKey.md new file mode 100644 index 000000000000..ef62dbf9aca0 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkDeviceRegistrationKey.md @@ -0,0 +1,156 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkdeviceregistrationkey +schema: 2.0.0 +--- + +# Get-AzConnectedNetworkDeviceRegistrationKey + +## SYNOPSIS +List the registration key for the device. + +## SYNTAX + +``` +Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +List the registration key for the device. + +## EXAMPLES + +### Example 1: Get-AzConnectedNetworkDeviceRegistrationKey using Resource Group, Resource name +```powershell +Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources +``` + +```output +eyJNZWNEZXZpY2VUcmFuc2llbnRBdXRoS2V5IjoiMTIzNCIsIk1lY0RldmljZUF1dGhLZXlTdGFydFRpbWUiOiIyMDIxLTExLTIyVDA5OjQ2OjQwLjY0ODExOTFaIiwiU2VydmljZUJ1c1F1ZXVlTmFtZSI6ImFiY2QtMTIzNCIsIkFBREVuZHBvaW50IjpudWxsLCJBQURBdWRpZW5jZSI6bnVsbCwiQXJtUmVzb3VyY2VJZCI6bnVsbCwiTWVjQ29udHJvbGxlckVuZHBvaW50IjoiaHR0cHM6Ly93ZXN0Y2VudHJhbHVzLXByb2QubWVjZGV2aWNlLmF6dXJlLmNvbTo0NDMiLCJEYmVEZXZpY2VJZCI6bnVsbCwiUmVzb3VyY2VVbmlxdWVJZCI6IjEyMy1hYmMtMTIzIiwiU3Vic2NyaXB0aW9uSWQiOiJ4eHh4LTEyMzQteHh4eC0xMjM0IiwiUmVzb3VyY2VHcm91cE5hbWUiOiJzYW1wbGVSR25hbWUiLCJQcm92aWRlck5hbWVzcGFjZSI6Ik1pY3Jvc29mdC5IeWJyaWROZXR3b3JrIiwiUmVzb3VyY2VUeXBlIjoiRGV2aWNlcyIsIlJlc291cmNlVHlwZU5hbWUiOiJJREMtRGV2aWNlNC1XZXN0Q2VudHJhbCJ9 +``` + +Getting the registration key for NFM device in resource group myResources with resource name myMecDevice. +To register the device, use the commandlet Invoke-MecRegister with the registration key in the minishell session. + +### Example 2: Get-AzConnectedNetworkDeviceRegistrationKey using Resource Group, Resource name and Subscription Id +```powershell +Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName myMecDevice -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 +``` + +```output +eyJNZWNEZXZpY2VUcmFuc2llbnRBdXRoS2V5IjoiMTIzNCIsIk1lY0RldmljZUF1dGhLZXlTdGFydFRpbWUiOiIyMDIxLTExLTIyVDA5OjQ2OjQwLjY0ODExOTFaIiwiU2VydmljZUJ1c1F1ZXVlTmFtZSI6ImFiY2QtMTIzNCIsIkFBREVuZHBvaW50IjpudWxsLCJBQURBdWRpZW5jZSI6bnVsbCwiQXJtUmVzb3VyY2VJZCI6bnVsbCwiTWVjQ29udHJvbGxlckVuZHBvaW50IjoiaHR0cHM6Ly93ZXN0Y2VudHJhbHVzLXByb2QubWVjZGV2aWNlLmF6dXJlLmNvbTo0NDMiLCJEYmVEZXZpY2VJZCI6bnVsbCwiUmVzb3VyY2VVbmlxdWVJZCI6IjEyMy1hYmMtMTIzIiwiU3Vic2NyaXB0aW9uSWQiOiJ4eHh4LTEyMzQteHh4eC0xMjM0IiwiUmVzb3VyY2VHcm91cE5hbWUiOiJzYW1wbGVSR25hbWUiLCJQcm92aWRlck5hbWVzcGFjZSI6Ik1pY3Jvc29mdC5IeWJyaWROZXR3b3JrIiwiUmVzb3VyY2VUeXBlIjoiRGV2aWNlcyIsIlJlc291cmNlVHlwZU5hbWUiOiJJREMtRGV2aWNlNC1XZXN0Q2VudHJhbCJ9 +``` + +Getting the registration key for NFM device in resource group myResources with resource name myMecDevice. +To register the device, use the commandlet Invoke-MecRegister with the registration key in the minishell session. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceName +The name of the device resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +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: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### System.String + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkFunction.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkFunction.md new file mode 100644 index 000000000000..af0d36323db9 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkFunction.md @@ -0,0 +1,209 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkfunction +schema: 2.0.0 +--- + +# Get-AzConnectedNetworkFunction + +## SYNOPSIS +Gets information about the specified network function resource. + +## SYNTAX + +### List (Default) +``` +Get-AzConnectedNetworkFunction [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzConnectedNetworkFunction -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzConnectedNetworkFunction -InputObject [-DefaultProfile ] + [] +``` + +### List1 +``` +Get-AzConnectedNetworkFunction -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets information about the specified network function resource. + +## EXAMPLES + +### Example 1: Get-AzConnectedNetworkFunction via Resource group and Resource name +```powershell +Get-AzConnectedNetworkFunction -Name myVnf -ResourceGroupName myResources +``` + +```output +ContainerConfiguration : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations +DeviceId : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMec +Etag : "0000a530-0000-3400-0000-615c10fa0000" +Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/networkFunctions/myVnf +Location : centraluseuap +ManagedApplicationId : +ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatManagedApplicationParameters +Name : myVnf +ProvisioningState : Failed +ResourceGroupName : myResources +ServiceKey : 397a7415-ec52-46b5-892b-f840ba491aab +SkuName : mySku1 +SkuType : EvolvedPacketCore +SystemDataCreatedAt : 10/5/2021 8:45:49 AM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 10/5/2021 8:46:49 AM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags +Type : microsoft.hybridnetwork/networkfunctions +UserConfiguration : {hpehss} +VendorName : AffirmedVendor +VendorProvisioningState : NotProvisioned + +``` + +Getting information about the network function in resource group myResources with resource name myVnf. + +### Example 2: Get-AzConnectedNetworkFunction via Identity +```powershell +$vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkFunction -InputObject $vnf +``` + +```output +ContainerConfiguration : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatNetworkFunctionContainerConfigurations +DeviceId : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMec1 +Etag : "sampleEtagValue" +Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/networkFunctions/myVnf1 +Location : eastus +ManagedApplicationId : +ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionPropertiesFormatManagedApplicationParameters +Name : myVnf1 +ProvisioningState : Succeeded +ResourceGroupName : myResources +ServiceKey : aa11-bb22-cc33-dd44 +SkuName : mySku +SkuType : EvolvedPacketCore +SystemDataCreatedAt : 11/1/2021 11:13:57 AM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 11/15/2021 4:53:08 AM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags +Type : microsoft.hybridnetwork/networkfunctions +UserConfiguration : {hpehss} +VendorName : AffirmedVendor +VendorProvisioningState : Provisioned + +``` + +Creating an identity with NetworkFunctionName myVnf1, ResourceGroupName myResources and subscription. +Getting information about the network function using this identity. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the network function resource. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: NetworkFunctionName + +Required: True +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: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkFunctionVendor.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkFunctionVendor.md new file mode 100644 index 000000000000..9ed67c4f152e --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkFunctionVendor.md @@ -0,0 +1,99 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkfunctionvendor +schema: 2.0.0 +--- + +# Get-AzConnectedNetworkFunctionVendor + +## SYNOPSIS +Lists all the available vendor and sku information. + +## SYNTAX + +``` +Get-AzConnectedNetworkFunctionVendor [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Lists all the available vendor and sku information. + +## EXAMPLES + +### Example 1: Get-AzConnectedNetworkFunctionVendor +```powershell +Get-AzConnectedNetworkFunctionVendor +``` + +```output +SkuList VendorName +------- ---------- +{vendor-sku, vendor-sku1, vendor-sku2, vendor-sku3, vendor-sku4, vendor-sku4, vendor-sku5...} myVendor +{vendor1-sku, vendor1-sku2} myVendor1 +{vendor2-sku1} myVendor2 +``` + +Getting information about the vendors and their skus + +### Example 2: Get-AzConnectedNetworkFunctionVendor via Subscription Id +```powershell +Get-AzConnectedNetworkFunctionVendor -SubscriptionId "xxxxx-00000-xxxxx-00000" +``` + +```output +SkuList VendorName +------- ---------- +{vendor1-sku, vendor1-sku2} myVendor1 +{vendor2-sku1} myVendor2 +``` + +Gets information about the vendors and their skus in the given subscription. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendor + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendor.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendor.md new file mode 100644 index 000000000000..954e279dd0b9 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendor.md @@ -0,0 +1,163 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkvendor +schema: 2.0.0 +--- + +# Get-AzConnectedNetworkVendor + +## SYNOPSIS +Gets information about the specified vendor. + +## SYNTAX + +### List (Default) +``` +Get-AzConnectedNetworkVendor [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzConnectedNetworkVendor -Name [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzConnectedNetworkVendor -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets information about the specified vendor. + +## EXAMPLES + +### Example 1: Get-AzConnectedNetworkVendor using vendor name +```powershell +Get-AzConnectedNetworkVendor -Name myVendor +``` + +```output +Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor +Name : myVendor +ProvisioningState : Succeeded +ResourceGroupName : +Sku : +SystemDataCreatedAt : 9/7/2021 3:02:02 AM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 9/7/2021 3:02:03 AM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Type : microsoft.hybridnetwork/vendors + +``` + +Getting information about the vendor with vendor name myVendor. + +### Example 2: Get-AzConnectedNetworkVendor using Identity +```powershell +$vendor = @{ VendorName = "myVendor1"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkVendor -InputObject $vendor +``` + +```output +Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor1 +Name : myVendor1 +ProvisioningState : Succeeded +ResourceGroupName : +Sku : +SystemDataCreatedAt : 9/7/2021 3:02:02 AM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 9/7/2021 3:02:03 AM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Type : microsoft.hybridnetwork/vendors + +``` + +Creating an identity with VendorName myVendor1 and the given subscription. +Getting information about the vendor using this identity. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: VendorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorFunction.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorFunction.md new file mode 100644 index 000000000000..a3f276181ad3 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorFunction.md @@ -0,0 +1,219 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkvendorfunction +schema: 2.0.0 +--- + +# Get-AzConnectedNetworkVendorFunction + +## SYNOPSIS +Gets information about the specified vendor network function. + +## SYNTAX + +### List (Default) +``` +Get-AzConnectedNetworkVendorFunction -LocationName -VendorName [-SubscriptionId ] + [-Filter ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzConnectedNetworkVendorFunction -LocationName -ServiceKey -VendorName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzConnectedNetworkVendorFunction -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets information about the specified vendor network function. + +## EXAMPLES + +### Example 1: Get-AzConnectedNetworkVendorFunction via Location Name, Service Key and Subscription +```powershell +Get-AzConnectedNetworkVendorFunction -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor +``` + +```output +Id : /subscriptions/xxxx-3333-xxxx-3333/providers/Microsoft.HybridNetwork/locations/centraluseuap/vendors/myVendor/networkfunctions/1b69005b-9168-4d74-a371-d4c4f6a521d + 0 +Name : 1234-abcd-4321-dcba +NetworkFunctionVendorConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} +ProvisioningState : Succeeded +ResourceGroupName : +SkuName : mySku +SkuType : EvolvedPacketCore +SystemDataCreatedAt : 11/25/2021 2:04:28 PM +SystemDataCreatedBy : xxxxx-11111-xxxxx-11111 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 11/25/2021 2:04:28 PM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Type : microsoft.hybridnetwork/locations/vendors/networkfunctions +VendorProvisioningState : NotProvisioned + +``` + +Getting the information of a vendor network function with service key 1234-abcd-4321-dcba, vendor name myVendor, location centraluseuap and subscription. +Service key can be obtained when getting details of network funcrtion or when creating a network function. + +### Example 2: Get-AzConnectedNetworkVendorFunction via Identity +```powershell +$vendorNF = @{ ServiceKey = "1234-abcd-4321-dcba"; VendorName = "myVendor"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"} +Get-AzConnectedNetworkVendorFunction -InputObject $vendorNF +``` + +```output +Id : /subscriptions/xxxx-3333-xxxx-3333/providers/Microsoft.HybridNetwork/locations/centraluseuap/vendors/myVendor/networkfunctions/1b69005b-9168-4d74-a371-d4c4f6a521d + 0 +Name : 1234-abcd-4321-dcba +NetworkFunctionVendorConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} +ProvisioningState : Succeeded +ResourceGroupName : +SkuName : mySku +SkuType : EvolvedPacketCore +SystemDataCreatedAt : 11/25/2021 2:04:44 PM +SystemDataCreatedBy : xxxxx-11111-xxxxx-11111 +SystemDataCreatedByType : Application +SystemDataLastModifiedAt : 11/25/2021 2:36:28 PM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Type : microsoft.hybridnetwork/locations/vendors/networkfunctions +VendorProvisioningState : Provisioned + +``` + +Creating a identity with service key 1234-abcd-4321-dcba, vendor name myVendor, location centraluseuap and subscription. +Getting the information of a vendor network function using this identity. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +The filter to apply on the operation. +The properties you can use for eq (equals) are: skuType, skuName and vendorProvisioningState. + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -LocationName +The Azure region where the network function resource was created by the customer. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceKey +The GUID for the vendor network function. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorFunctionRoleInstance.md new file mode 100644 index 000000000000..d51f8bf03ac1 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -0,0 +1,208 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkvendorfunctionroleinstance +schema: 2.0.0 +--- + +# Get-AzConnectedNetworkVendorFunctionRoleInstance + +## SYNOPSIS +Gets the information of role instance of vendor network function. + +## SYNTAX + +### List (Default) +``` +Get-AzConnectedNetworkVendorFunctionRoleInstance -LocationName -ServiceKey + -VendorName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzConnectedNetworkVendorFunctionRoleInstance -LocationName -Name -ServiceKey + -VendorName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzConnectedNetworkVendorFunctionRoleInstance -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets the information of role instance of vendor network function. + +## EXAMPLES + +### Example 1: Get-AzConnectedNetworkVendorFunctionRoleInstance via Location, Service key, vendor name and role name +```powershell +Get-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name hpehss +``` + +```output +Id : +Name : hpehss +OperationalState : Running +ProvisioningState : +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : + +``` + +Getting the role instance information of role hpehss with Location centraluseuap, Service key 1234-abcd-4321-dcba and vendor name myVendor. + +### Example 2: Get-AzConnectedNetworkVendorFunctionRoleInstance via Identity +```powershell +$role = @{ RoleInstanceName = "hpehss"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Get-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role +``` + +```output +Id : +Name : hpehss +OperationalState : Stopped +ProvisioningState : +ResourceGroupName : +SystemDataCreatedAt : +SystemDataCreatedBy : +SystemDataCreatedByType : +SystemDataLastModifiedAt : +SystemDataLastModifiedBy : +SystemDataLastModifiedByType : +Type : + +``` + +Getting the role instance information of role hpehss with Location centraluseuap, Service key 1234-abcd-4321-dcba, vendor name myVendor and the given subscription. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -LocationName +The Azure region where the network function resource was created by customer. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the role instance of the vendor network function. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: RoleInstanceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceKey +The GUID for the vendor network function. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IRoleInstance + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorSku.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorSku.md new file mode 100644 index 000000000000..9f6612a968fb --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorSku.md @@ -0,0 +1,178 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkvendorsku +schema: 2.0.0 +--- + +# Get-AzConnectedNetworkVendorSku + +## SYNOPSIS +Gets information about the specified sku. + +## SYNTAX + +### List (Default) +``` +Get-AzConnectedNetworkVendorSku -VendorName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzConnectedNetworkVendorSku -SkuName -VendorName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzConnectedNetworkVendorSku -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets information about the specified sku. + +## EXAMPLES + +### Example 1: Get-AzConnectedNetworkVendorSku using Vendor name and Subscription Id +```powershell +Get-AzConnectedNetworkVendorSku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 +``` + +```output +DeploymentMode : PrivateEdgeZone +Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor/VendorSkus/mySku +ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationParameters +ManagedApplicationTemplate : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationTemplate +Name : mySku +NetworkFunctionTemplateNetworkFunctionRoleConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} +NetworkFunctionType : +Preview : True +ProvisioningState : Succeeded +ResourceGroupName : +SkuType : EvolvedPacketCore +SystemDataCreatedAt : 11/4/2020 3:35:33 PM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 11/4/2020 3:43:58 PM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Type : Microsoft.HybridNetwork/vendors/VendorSkus + +DeploymentMode : PrivateEdgeZone +Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorskus/mySku_1 +ManagedApplicationParameter : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationParameters +ManagedApplicationTemplate : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.VendorSkuPropertiesFormatManagedApplicationTemplate +Name : mySku_1 +NetworkFunctionTemplateNetworkFunctionRoleConfiguration : {Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.SshPublicKey} +NetworkFunctionType : +Preview : True +ProvisioningState : Failed +ResourceGroupName : +SkuType : EvolvedPacketCore +SystemDataCreatedAt : 11/11/2020 2:25:32 PM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 11/11/2020 2:25:32 PM +SystemDataLastModifiedBy : user@microsoft.com +SystemDataLastModifiedByType : User +Type : Microsoft.HybridNetwork/vendors/vendorskus +``` + +Fetching all the sku of vendor myVendor in the given subscription. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SkuName +The name of the sku. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorSkuPreview.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorSkuPreview.md new file mode 100644 index 000000000000..37d05ab55178 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Get-AzConnectedNetworkVendorSkuPreview.md @@ -0,0 +1,192 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkvendorskupreview +schema: 2.0.0 +--- + +# Get-AzConnectedNetworkVendorSkuPreview + +## SYNOPSIS +Gets the preview information of a vendor sku. + +## SYNTAX + +### List (Default) +``` +Get-AzConnectedNetworkVendorSkuPreview -SkuName -VendorName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzConnectedNetworkVendorSkuPreview -PreviewSubscription -SkuName -VendorName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzConnectedNetworkVendorSkuPreview -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets the preview information of a vendor sku. + +## EXAMPLES + +### Example 1: Get-AzConnectedNetworkVendorSkuPreview using sku name, vendor name and preview subscription +```powershell +Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 +``` + +```output +Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-22222-xxxxx-22222 +Name : xxxxx-22222-xxxxx-22222 +ProvisioningState : Succeeded +ResourceGroupName : +SystemDataCreatedAt : 11/24/2021 4:41:22 AM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 11/24/2021 4:41:22 AM +SystemDataLastModifiedBy : user@microsoft.com +SystemDataLastModifiedByType : User +Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions + +``` + +Getting the preview information of a vendor sku mySku with vendor myVendor for the specified subscription. + +### Example 2: Get-AzConnectedNetworkVendorSkuPreview via Identity +```powershell +$skuPreview = @{ SkuName = "mySku"; VendorName = "myVendor"; PreviewSubscription = "xxxxx-22222-xxxxx-22222"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Get-AzConnectedNetworkVendorSkuPreview -InputObject $skuPreview +``` + +```output +Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-22222-xxxxx-22222 +Name : xxxxx-22222-xxxxx-22222 +ProvisioningState : Succeeded +ResourceGroupName : +SystemDataCreatedAt : 11/24/2021 4:41:22 AM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 11/24/2021 4:41:22 AM +SystemDataLastModifiedBy : user@microsoft.com +SystemDataLastModifiedByType : User +Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions + +``` + +Creating a identity with SkuName mySku, VendorName myVendor, preview subscription and subscription id. +Getting the preview information of this vendor sku using this identity. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PreviewSubscription +Preview subscription ID. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuName +The name of the vendor sku. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkAzureStackEdgeObject.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkAzureStackEdgeObject.md new file mode 100644 index 000000000000..5cb87a9cd5b0 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkAzureStackEdgeObject.md @@ -0,0 +1,66 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkAzureStackEdgeObject +schema: 2.0.0 +--- + +# New-AzConnectedNetworkAzureStackEdgeObject + +## SYNOPSIS +Create a in-memory object for AzureStackEdgeFormat + +## SYNTAX + +``` +New-AzConnectedNetworkAzureStackEdgeObject [-AzureStackEdgeId ] [] +``` + +## DESCRIPTION +Create a in-memory object for AzureStackEdgeFormat + +## EXAMPLES + +### Example 1: Create a in-memory stored AzureStackEdgeFormat object for creating the device +```powershell +New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" +``` + +```output +eviceType ProvisioningState Status +---------- ----------------- ------ +AzureStackEdge +``` + +Create a in-memory stored AzureStackEdgeFormat object for creating the device + +## PARAMETERS + +### -AzureStackEdgeId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.AzureStackEdgeFormat + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkDevice.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkDevice.md new file mode 100644 index 000000000000..77feb253d839 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkDevice.md @@ -0,0 +1,265 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkdevice +schema: 2.0.0 +--- + +# New-AzConnectedNetworkDevice + +## SYNOPSIS +Creates or updates a device. + +## SYNTAX + +``` +New-AzConnectedNetworkDevice -Name -ResourceGroupName -Location + [-SubscriptionId ] [-Property ] [-Tag ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a device. + +## EXAMPLES + +### Example 1: New-AzConnectedNetworkDevice +```powershell +$ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse" +New-AzConnectedNetworkDevice -Name "myMecDevice" -ResourceGroupName "myResources" -Location "eastus" -Property $ase +``` + +```output +DeviceType : AzureStackEdge +Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice +Location : eastus +Name : myMecDevice +NetworkFunction : +ProvisioningState : Succeeded +ResourceGroupName : myResources +Status : NotRegistered +SystemDataCreatedAt : 11/25/2021 4:47:45 AM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : myVendor +SystemDataLastModifiedAt : 11/25/2021 4:47:47 AM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags +Type : microsoft.hybridnetwork/devices + +``` + +Create a device with Device Name with resource myMecDevice name in Resource Group myResources, Location eastus with Ase Device Id /subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse. + +### Example 2: New-AzConnectedNetworkDevice +```powershell +$ase = New-AzConnectedNetworkAzureStackEdgeObject -AzureStackEdgeId "/subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1" +New-AzConnectedNetworkDevice -Name "myMecDevice1" -ResourceGroupName "myResources" -Location "eastus2euap" -Property $ase -SubscriptionId xxxxx-00000-xxxxx-00000 +``` + +```output +DeviceType : AzureStackEdge +Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice1 +Location : eastus +Name : myMecDevice1 +NetworkFunction : +ProvisioningState : Succeeded +ResourceGroupName : myResources +Status : Registered +SystemDataCreatedAt : 11/25/2021 4:49:34 AM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : myVendor +SystemDataLastModifiedAt : 11/25/2021 4:57:47 AM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags +Type : microsoft.hybridnetwork/devices + +``` + +Create a device with Device Name myMecDevice1 in Resource Group myResources, Location eastus2euap, SubscriptionId and Ase Device Id /subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Resource name for the device resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: DeviceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Property +Device properties. +To construct, see NOTES section for PROPERTY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevicePropertiesFormat +Parameter Sets: (All) +Aliases: + +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: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunction.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunction.md new file mode 100644 index 000000000000..b7e91af2129e --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunction.md @@ -0,0 +1,347 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkfunction +schema: 2.0.0 +--- + +# New-AzConnectedNetworkFunction + +## SYNOPSIS +Creates or updates a network function resource. +This operation can take up to 6 hours to complete. +This is expected service behavior. + +## SYNTAX + +``` +New-AzConnectedNetworkFunction -Name -ResourceGroupName -Location + [-SubscriptionId ] [-ContainerConfiguration ] [-DeviceId ] [-Etag ] + [-ManagedApplicationParameter ] [-SkuName ] [-Tag ] + [-UserConfiguration ] [-VendorName ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a network function resource. +This operation can take up to 6 hours to complete. +This is expected service behavior. + +## EXAMPLES + +### Example 1: 1-step VNF deployment +```powershell +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$customData = "I2Nsb3VkLWNvbmZpZwp3cml0ZV9maWxlczoKLSBwYXRoOiAvdmFyL2xpYi9jbG91ZC9paHNzY29uZmlnLmpzb24KICBwZXJtaXNzaW9uczogJzA2NDQnCiAgb3duZXI6IHJvb3Q6cm9vdAogIGNvbnRlbnQ6IHwKICAgIHsKICAgICAgICAgICAiRGlhbWV0ZXJHVyI6ewogICAgICAgICAgICAgICAgICAiSE9TVElQQUREUkVTUyI6IjEyOC4wLjAuMSIsCiAgICAgICAgICAgICAgICAgICJGUUROIjoiaHNzLmF5VmVuZG9yLmNvbSIsCiAgICAgICAgICAgICAgICAgICJSRUFMTSI6Imhzcy5lcGMubXlWZW5kb3I5OS5teVZlbmRvci4zZ3BwbmV0d29yay5vcmciCiAgICAgICAgICAgfSwKICAgICAgICAgICAiREdXQmluZEFkZHIiOnsKICAgICAgICAgICAgICAgICAgIkFERFJFU1MiOiIxMjguMC4wLjIiLAogICAgICAgICAgICAgICAgICAiVFJBTlNQT1JUIjoiU0NUUCIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjozODY4CiAgICAgICAgICAgfSwKICAgICAgICAgICAiU05NUFRhcmdldCI6ewogICAgICAgICAgICAgICAgICAiSE9TVCI6IjEyOC4wLjAuMyIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjoiMTYyIiwKICAgICAgICAgICAgICAgICAgIlRSSUdHRVJfTEVWRUwiOiIzIgogICAgICAgICAgIH0sCiAgICAgICAgICAgIk1hbmFnZW1lbnQiOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNCIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjEvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAogICAgICAgICAgICJMYW4iOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNSIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjAvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAoKICAgIH0JCSAgCg==" +$userconf = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -OSProfileCustomData $customData -RoleName "hpehss" +New-AzConnectedNetworkFunction -Name vnf_Test1 -ResourceGroupName myResources -Location "eastus" -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_2111_020 -SkuName Affirmed-HSS-0527 -UserConfiguration $userconf -VendorName "AffirmedVendor" +``` + +```output +Location Name Etag ResourceGroupName +-------- ---- ---- ----------------- +eastus vnf_Test1 "SampleEtagvalue" myResources +``` + +Creating network interfaces with dynamic method allocation and ip version to IPv4. +And using these to create two network configuration objects with vm switch type. +Then using that to create user configuration object with role name hpehss, custom data and network interface array. +Then creating NF using userconfiguration, vendor name, sku name, device name etc. + +### Example 2: 2-step VNF deployment +```powershell +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$userconfig2 = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName "hpehss" +$vnf1 = New-AzConnectedNetworkFunction -Name vnftest11 -DeviceId /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_autotest_01 -ResourceGroupName myResources -SubscriptionId xxxxx-00000-xxxxx-00000 -Location eastus2euap -SkuName staticSku -VendorName hssvendor01 -UserConfiguration $userconfig2 -verbose +$v2.ServiceKey +``` + +```output +abcd-sample-service-key-val-1234 +``` + +Same as 1 step workflow other than no custom data field in User Configuration object. +Creating a NF and will be using the service key obtained here to deploy vendor NF. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContainerConfiguration +The network function container configurations from the user. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceId +Resource ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Etag +A unique read-only string that changes whenever the resource is updated. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ManagedApplicationParameter +The parameters for the managed application. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Resource name for the network function resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: NetworkFunctionName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +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: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuName +The sku name for the network function. +Once set, it cannot be updated. + +```yaml +Type: System.String +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. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserConfiguration +The network function configurations from the user. +To construct, see NOTES section for USERCONFIGURATION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionUserConfiguration[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The vendor name for the network function. +Once set, it cannot be updated. + +```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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunctionRoleConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunctionRoleConfigurationObject.md new file mode 100644 index 000000000000..7428aacc124e --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunctionRoleConfigurationObject.md @@ -0,0 +1,422 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkFunctionRoleConfigurationObject +schema: 2.0.0 +--- + +# New-AzConnectedNetworkFunctionRoleConfigurationObject + +## SYNOPSIS +Create a in-memory object for NetworkFunctionRoleConfiguration + +## SYNTAX + +``` +New-AzConnectedNetworkFunctionRoleConfigurationObject [-CustomProfileMetadataConfigurationPath ] + [-ImageReferenceExactVersion ] [-ImageReferenceOffer ] [-ImageReferencePublisher ] + [-ImageReferenceSku ] [-ImageReferenceVersion ] [-NetworkInterface ] + [-OSDiskName ] [-OSDiskOstype ] [-OSDiskSizeGb ] + [-OSProfileAdminUsername ] [-OSProfileCustomData ] [-OSProfileCustomDataRequired ] + [-RoleName ] [-RoleType ] [-SshPublicKey ] + [-StorageProfileDataDisk ] [-UserDataParameter ] [-UserDataTemplate ] + [-VhdUri ] [-VirtualMachineSize ] [] +``` + +## DESCRIPTION +Create a in-memory object for NetworkFunctionRoleConfiguration + +## EXAMPLES + +### Example 1: New-AzConnectedNetworkFunctionUserConfigurationObject +```powershell +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$keyData = @{keyData = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb"; path = $Null} +$key = @( $keyData) +$role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName Disk1 -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" +``` + +```output +RoleName RoleType VirtualMachineSize +-------- -------- ------------------ +hpehss VirtualMachine Standard_D3_v2 + +``` + +Creating 2 ip configuration objects (ipconf1 and ipconf2) with dynamic allocation method and IPv4. +Using these to create network interface objects with ipconfiguration $ipconf1 and $ipconf2, interface name as mrmmanagementnic1 and mrmlannic1 and switch type as management and lan, respectively. +Storing the os profile key Data in key array. +And creating network function user configuration object from the network interface objects, key data and role name hpehss. + +## PARAMETERS + +### -CustomProfileMetadataConfigurationPath +Path for metadata configuration. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImageReferenceExactVersion +Specifies in decimal numbers, the exact version of image used to create the virtual machine. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImageReferenceOffer +Specifies the offer of the image used to create the virtual machine. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImageReferencePublisher +The image publisher. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImageReferenceSku +The image SKU. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ImageReferenceVersion +Specifies the version of the image used to create the virtual machine. +The allowed formats are Major.Minor.Build or 'latest'. +Major, Minor, and Build are decimal numbers. +Specify 'latest' to use the latest version of an image available at deploy time. +Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NetworkInterface +The network interface configurations. +To construct, see NOTES section for NETWORKINTERFACE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkInterface[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSDiskName +The VHD name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSDiskOstype +The OS type. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.OperatingSystemTypes +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSDiskSizeGb +Specifies the size of os disk in gigabytes. +This is the fully expanded disk size needed of the VHD image on the ASE. +This disk size should be greater than the size of the VHD provided in vhdUri. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSProfileAdminUsername +Specifies the name of the administrator account. + + + **Windows-only restriction:** Cannot end in "." + + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". + + + **Minimum-length (Linux):** 1 character + + **Max-length (Linux):** 64 characters + + **Max-length (Windows):** 20 characters + +\ For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +\ For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSProfileCustomData +Specifies a base-64 encoded string of custom data. +The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. +The maximum length of the binary array is 65535 bytes. + + + **Note: Do not pass any secrets or passwords in customData property** + + This property cannot be updated after the VM is created. + + + customData is passed to the VM to be saved as a file. +For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) + + For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSProfileCustomDataRequired +Indicates if custom data is required to deploy this role. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleName +The name of the network function role. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleType +Role type. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionRoleConfigurationType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SshPublicKey +The list of SSH public keys used to authenticate with linux based VMs. +To construct, see NOTES section for SSHPUBLICKEY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ISshPublicKey[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageProfileDataDisk +Specifies the parameters that are used to add a data disk to a virtual machine. +To construct, see NOTES section for STORAGEPROFILEDATADISK properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDataDisk[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserDataParameter +The user parameters for customers. +The format of user data parameters has to be matched with the provided user data template. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IAny +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserDataTemplate +The user data template for customers. +This is a json schema template describing the format and data type of user data parameters. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IAny +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VhdUri +Specifies the virtual hard disk's uri. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VirtualMachineSize +The size of the virtual machine. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VirtualMachineSizeTypes +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionRoleConfiguration + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunctionUserConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunctionUserConfigurationObject.md new file mode 100644 index 000000000000..f15e42e299fa --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunctionUserConfigurationObject.md @@ -0,0 +1,127 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkFunctionUserConfigurationObject +schema: 2.0.0 +--- + +# New-AzConnectedNetworkFunctionUserConfigurationObject + +## SYNOPSIS +Create a in-memory object for NetworkFunctionUserConfiguration + +## SYNTAX + +``` +New-AzConnectedNetworkFunctionUserConfigurationObject [-NetworkInterface ] + [-OSProfileCustomData ] [-RoleName ] [-UserDataParameter ] [] +``` + +## DESCRIPTION +Create a in-memory object for NetworkFunctionUserConfiguration + +## EXAMPLES + +### Example 1: New-AzConnectedNetworkFunction +```powershell +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "LAN" +$customData = "I2Nsb3VkLWNvbmZpZwp3cml0ZV9maWxlczoKLSBwYXRoOiAvdmFyL2xpYi9jbG91ZC9paHNzY29uZmlnLmpzb24KICBwZXJtaXNzaW9uczogJzA2NDQnCiAgb3duZXI6IHJvb3Q6cm9vdAogIGNvbnRlbnQ6IHwKICAgIHsKICAgICAgICAgICAiRGlhbWV0ZXJHVyI6ewogICAgICAgICAgICAgICAgICAiSE9TVElQQUREUkVTUyI6IjEyOC4wLjAuMSIsCiAgICAgICAgICAgICAgICAgICJGUUROIjoiaHNzLmF5VmVuZG9yLmNvbSIsCiAgICAgICAgICAgICAgICAgICJSRUFMTSI6Imhzcy5lcGMubXlWZW5kb3I5OS5teVZlbmRvci4zZ3BwbmV0d29yay5vcmciCiAgICAgICAgICAgfSwKICAgICAgICAgICAiREdXQmluZEFkZHIiOnsKICAgICAgICAgICAgICAgICAgIkFERFJFU1MiOiIxMjguMC4wLjIiLAogICAgICAgICAgICAgICAgICAiVFJBTlNQT1JUIjoiU0NUUCIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjozODY4CiAgICAgICAgICAgfSwKICAgICAgICAgICAiU05NUFRhcmdldCI6ewogICAgICAgICAgICAgICAgICAiSE9TVCI6IjEyOC4wLjAuMyIsCiAgICAgICAgICAgICAgICAgICJQT1JUIjoiMTYyIiwKICAgICAgICAgICAgICAgICAgIlRSSUdHRVJfTEVWRUwiOiIzIgogICAgICAgICAgIH0sCiAgICAgICAgICAgIk1hbmFnZW1lbnQiOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNCIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjEvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAogICAgICAgICAgICJMYW4iOnsKICAgICAgICAgICAgICAgICAgImlwQWRkcmVzcyI6IjEyOC4wLjAuNSIsCiAgICAgICAgICAgICAgICAgICJzdWJuZXQiOiIxMjguMC4wLjAvMjQiLAogICAgICAgICAgICAgICAgICAiZ2F0ZXdheSI6IjEyOC4wLjAuMCIKICAgICAgICAgICB9LAoKICAgIH0JCSAgCg==" +$userconf = New-AzConnectedNetworkFunctionUserConfigurationObject -NetworkInterface $ip1,$ip2 -OSProfileCustomData $customData -RoleName "hpehss" +``` + +Creating network interfaces with dynamic method allocation and ip version to IPv4. +And using these to create two network configuration objects with vm switch type. +Then using that to create user configuration object with role name hpehss, custom data and network interface array. + +## PARAMETERS + +### -NetworkInterface +The network interface configuration. +To construct, see NOTES section for NETWORKINTERFACE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkInterface[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSProfileCustomData +Specifies a base-64 encoded string of custom data. +The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. +The maximum length of the binary array is 65535 bytes. + + + **Note: Do not pass any secrets or passwords in customData property** + + This property cannot be updated after the VM is created. + + + customData is passed to the VM to be saved as a file. +For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) + + For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleName +The name of the network function role. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -UserDataParameter +The user data parameters from the customer. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IAny +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionUserConfiguration + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunctionVendorConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunctionVendorConfigurationObject.md new file mode 100644 index 000000000000..56670fdc201e --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkFunctionVendorConfigurationObject.md @@ -0,0 +1,176 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkFunctionVendorConfigurationObject +schema: 2.0.0 +--- + +# New-AzConnectedNetworkFunctionVendorConfigurationObject + +## SYNOPSIS +Create a in-memory object for NetworkFunctionVendorConfiguration + +## SYNTAX + +``` +New-AzConnectedNetworkFunctionVendorConfigurationObject [-NetworkInterface ] + [-OSProfileAdminUsername ] [-OSProfileCustomData ] [-OSProfileCustomDataRequired ] + [-RoleName ] [-SshPublicKey ] [] +``` + +## DESCRIPTION +Create a in-memory object for NetworkFunctionVendorConfiguration + +## EXAMPLES + +### Example 1: New-AzConnectedNetworkFunctionVendorConfigurationObject +```powershell +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$keyData = @{keyData = "ssh-rsa\AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb redmond\userk@n1-azuredev1"; path = $Null} +$keys = @{ } +$key += $keyData +$vendorconf = New-AzConnectedNetworkFunctionVendorConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName hpehss -OSProfileAdminUsername MecUser -OSProfileCustomData $customData -OSProfileCustomDataRequired $True -SshPublicKey $key +``` + +Creating network interfaces with dynamic method allocation and ip version to IPv4. +And using these to create two network configuration objects with vm switch type. +Creating a ssh key identity, Then using those to create vendor configuration object with role name hpehss, custom data, keyData and network interface array, which will be used in vendor NF creation. + +## PARAMETERS + +### -NetworkInterface +The network interface configurations. +To construct, see NOTES section for NETWORKINTERFACE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkInterface[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSProfileAdminUsername +Specifies the name of the administrator account. + + + **Windows-only restriction:** Cannot end in "." + + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". + + + **Minimum-length (Linux):** 1 character + + **Max-length (Linux):** 64 characters + + **Max-length (Windows):** 20 characters + +\ For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +\ For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSProfileCustomData +Specifies a base-64 encoded string of custom data. +The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. +The maximum length of the binary array is 65535 bytes. + + + **Note: Do not pass any secrets or passwords in customData property** + + This property cannot be updated after the VM is created. + + + customData is passed to the VM to be saved as a file. +For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) + + For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OSProfileCustomDataRequired +Indicates if custom data is required to deploy this role. + +```yaml +Type: System.Boolean +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RoleName +The name of the vendor network function role. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SshPublicKey +The list of SSH public keys used to authenticate with linux based VMs. +To construct, see NOTES section for SSHPUBLICKEY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.ISshPublicKey[] +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkFunctionVendorConfiguration + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkInterfaceIPConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkInterfaceIPConfigurationObject.md new file mode 100644 index 000000000000..7c4293c93b01 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkInterfaceIPConfigurationObject.md @@ -0,0 +1,143 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkInterfaceIPConfigurationObject +schema: 2.0.0 +--- + +# New-AzConnectedNetworkInterfaceIPConfigurationObject + +## SYNOPSIS +Create a in-memory object for NetworkInterfaceIPConfiguration + +## SYNTAX + +``` +New-AzConnectedNetworkInterfaceIPConfigurationObject [-DnsServer ] [-Gateway ] + [-IPAddress ] [-IPAllocationMethod ] [-IPVersion ] [-Subnet ] + [] +``` + +## DESCRIPTION +Create a in-memory object for NetworkInterfaceIPConfiguration + +## EXAMPLES + +### Example 1: Create a in-memory object for NetworkInterfaceIPConfiguration +```powershell +New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +``` + +```output +DnsServer Gateway IPAddress IPAllocationMethod IPVersion Subnet +--------- ------- --------- ------------------ --------- ------ + Dynamic IPv4 +``` + +Create a in-memory object for NetworkInterfaceIPConfiguration + +## PARAMETERS + +### -DnsServer +The list of DNS servers IP addresses. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Gateway +The value of the gateway. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IPAddress +The value of the IP address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IPAllocationMethod +IP address allocation method. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.IPAllocationMethod +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IPVersion +IP address version. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.IPVersion +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Subnet +The value of the subnet. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkInterfaceIPConfiguration + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkInterfaceObject.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkInterfaceObject.md new file mode 100644 index 000000000000..bb2e898f14bc --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkInterfaceObject.md @@ -0,0 +1,113 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkInterfaceObject +schema: 2.0.0 +--- + +# New-AzConnectedNetworkInterfaceObject + +## SYNOPSIS +Create a in-memory object for NetworkInterface + +## SYNTAX + +``` +New-AzConnectedNetworkInterfaceObject [-IPConfiguration ] + [-MacAddress ] [-Name ] [-VMSwitchType ] [] +``` + +## DESCRIPTION +Create a in-memory object for NetworkInterface + +## EXAMPLES + +### Example 1: Create a in-memory object for NetworkInterface +```powershell +New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +``` + +```output +MacAddress Name VMSwitchType +---------- ---- ------------ + mrmmanagementnic1 Management +``` + +Create a in-memory object for NetworkInterface + +## PARAMETERS + +### -IPConfiguration +A list of IP configurations of the network interface. +To construct, see NOTES section for IPCONFIGURATION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkInterfaceIPConfiguration[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MacAddress +The MAC address of the network interface. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the network interface. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VMSwitchType +The type of the VM switch. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VMSwitchType +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.NetworkInterface + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendor.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendor.md new file mode 100644 index 000000000000..d0a56446d083 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendor.md @@ -0,0 +1,190 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkvendor +schema: 2.0.0 +--- + +# New-AzConnectedNetworkVendor + +## SYNOPSIS +Creates or updates a vendor. + +## SYNTAX + +``` +New-AzConnectedNetworkVendor -Name [-SubscriptionId ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a vendor. + +## EXAMPLES + +### Example 1: New-AzConnectedNetworkVendor +```powershell +New-AzConnectedNetworkVendor -Name myVendor +``` + +```output +Id : /subscriptions/xxxxx-00000-xxxxx-00000/providers/Microsoft.HybridNetwork/vendors/myVendor +Name : myVendor +ProvisioningState : Succeeded +ResourceGroupName : +Sku : +SystemDataCreatedAt : 11/23/2021 6:18:55 PM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 11/23/2021 6:19:08 PM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Type : microsoft.hybridnetwork/vendors +``` + +Creating a vendor with name myVendor. + +### Example 2: New-AzConnectedNetworkVendor with SubscriptionId +```powershell +New-AzConnectedNetworkVendor -Name myVendor2 -SubscriptionId xxxxx-22222-xxxxx-22222 +``` + +```output +Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor2 +Name : myVendor2 +ProvisioningState : Succeeded +ResourceGroupName : +Sku : +SystemDataCreatedAt : 11/23/2021 6:20:28 PM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 11/23/2021 6:20:32 PM +SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 +SystemDataLastModifiedByType : Application +Type : microsoft.hybridnetwork/vendors +``` + +Creating a vendor with name myVendor2 in xxxxx-22222-xxxxx-22222 subscription. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: VendorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +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. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendor + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendorFunction.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendorFunction.md new file mode 100644 index 000000000000..01ead36ec60c --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendorFunction.md @@ -0,0 +1,247 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkvendorfunction +schema: 2.0.0 +--- + +# New-AzConnectedNetworkVendorFunction + +## SYNOPSIS +Creates or updates a vendor network function. +This operation can take up to 6 hours to complete. +This is expected service behavior. + +## SYNTAX + +``` +New-AzConnectedNetworkVendorFunction -LocationName -ServiceKey -VendorName + [-SubscriptionId ] [-SkuType ] + [-VendorConfiguration ] + [-VendorProvisioningState ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a vendor network function. +This operation can take up to 6 hours to complete. +This is expected service behavior. + +## EXAMPLES + +### Example 1: New-AzConnectedNetworkVendorFunction +```powershell +$ipconf1 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ipconf2 = New-AzConnectedNetworkInterfaceIPConfigurationObject -IPAllocationMethod "Dynamic" -IPVersion "IPv4" +$ip1 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf1 -Name "mrmmanagementnic1" -VMSwitchType "Management" +$ip2 = New-AzConnectedNetworkInterfaceObject -IPConfiguration $ipconf2 -Name "mrmlannic1" -VMSwitchType "Lan" +$keyData = @{keyData = "ssh-rsa\AAAAB3NzaC1yc2EAAAADAQABAAABAQCyMpVbBgu0kftv1k+z1c3NtcB5CVDoo/X9X1LE2JUjlLlo0luEkFGJk61i53BhiTSTeRmQXN8hAZ7sn4MDUmZK7fWcHouZ2fsJo+ehses3wQPLubWBFw2L/hoSTyXifXMbEBu9SxHgqf1CEKQcvdNiWf4U7npXwjweXW9DtsF5E7h4kxhKJKFI4sNFTIX0IwUB15QEVHoBs92kDwH3fBH3kZZCMBJE/u6kT+XB22crRKkIGlp3a9gcogtOCvP+3xmsP7hjw5+nHxMUwkc/6kYyfTeLwvfI4xrTWpnB5xufts5LW5/U5GOXVg97ix9EXgiV0czThowG5K2xQ649UlJb redmond\user@n1-azuredev1"; path = $Null} +$keys = @{ } +$key += $keyData +$vendorconf = New-AzConnectedNetworkFunctionVendorConfigurationObject -NetworkInterface $ip1,$ip2 -RoleName hpehss -OSProfileAdminUsername MecUser -OSProfileCustomData $customData -OSProfileCustomDataRequired $True -SshPublicKey $key +$vendorvnf1 = New-AzConnectedNetworkVendorFunction -LocationName eastus2euap -ServiceKey b78d39-xxxx-xxxx-00946c5 -SubscriptionId xxxx-4444-xxxx-4444 -VendorName myVendor -VendorConfiguration $vendorconf -SkuType EvolvedPacketCore -VendorProvisioningState Provisioning +``` + +Creating network interfaces with dynamic method allocation and ip version to IPv4. +And using these to create two network configuration objects with vm switch type. +Creating a ssh key identity, Then using those to create vendor configuration object with role name hpehss, custom data, keyData and network interface array. +Using this to create vendor NF with the specified service key, vendor subscription, location eastus2euap, vendor name myVendor, sku type EvolvedPacketCore, vendor provisioning state Provisioning. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocationName +The Azure region where the network function resource was created by the customer. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceKey +The GUID for the vendor network function. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuType +The sku type. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType +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. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorConfiguration +An array of network function vendor configurations. +To construct, see NOTES section for VENDORCONFIGURATION properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionVendorConfiguration[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorProvisioningState +The vendor controlled provisioning state of the vendor network function. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.VendorProvisioningState +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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorNetworkFunction + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendorSku.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendorSku.md new file mode 100644 index 000000000000..ae335902ea28 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendorSku.md @@ -0,0 +1,284 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkvendorsku +schema: 2.0.0 +--- + +# New-AzConnectedNetworkVendorSku + +## SYNOPSIS +Creates or updates a sku. +This operation can take up to 2 hours to complete. +This is expected service behavior. + +## SYNTAX + +``` +New-AzConnectedNetworkVendorSku -SkuName -VendorName [-SubscriptionId ] + [-DeploymentMode ] [-ManagedApplicationParameter ] + [-ManagedApplicationTemplate ] + [-NetworkFunctionRoleConfigurationType ] + [-NetworkFunctionType ] [-Preview] [-SkuType ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a sku. +This operation can take up to 2 hours to complete. +This is expected service behavior. + +## EXAMPLES + +### Example 1: New-AzConnectedNetworkVendorSku +```powershell +$role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface $ip1,$ip2 -OSDiskName NetFoundry -OSDiskOstype Linux -OSDiskSizeGb 40 -OSProfileCustomDataRequired $False -OSProfileAdminUsername MecUser -RoleName hpehss -RoleType VirtualMachine -VirtualMachineSize "Standard_D3_v2" -SshPublicKey $key -StorageProfileDataDisk $storage -VhdUri "https://mecvdrvhd.blob.core.windows/myvhd.vhd" +New-AzConnectedNetworkVendorSku -SkuName sku1 -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 -SkuType VirtualMachine -DeploymentMode PrivateEdgeZone -NetworkFunctionRoleConfigurationType @($role) +``` + +Creating NF role configuration object wuth the specified details. +Using this to create sku with sku name sku1, vendor name myVendor, sku type VirtualMachine, deployment type PrivateEdgeZone. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeploymentMode +The sku deployment mode. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuDeploymentMode +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ManagedApplicationParameter +The parameters for the managed application to be supplied by the vendor. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ManagedApplicationTemplate +The template for the managed application deployment. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NetworkFunctionRoleConfigurationType +An array of network function role definitions. +To construct, see NOTES section for NETWORKFUNCTIONROLECONFIGURATIONTYPE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionRoleConfiguration[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NetworkFunctionType +The network function type. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.NetworkFunctionType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Preview +Indicates if the vendor sku is in preview mode. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuName +The name of the sku. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuType +The sku type. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Support.SkuType +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. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IVendorSku + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendorSkuPreview.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendorSkuPreview.md new file mode 100644 index 000000000000..2be1a50a7bac --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/New-AzConnectedNetworkVendorSkuPreview.md @@ -0,0 +1,199 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkvendorskupreview +schema: 2.0.0 +--- + +# New-AzConnectedNetworkVendorSkuPreview + +## SYNOPSIS +Creates or updates preview information of a vendor sku. + +## SYNTAX + +``` +New-AzConnectedNetworkVendorSkuPreview -PreviewSubscription -SkuName -VendorName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Creates or updates preview information of a vendor sku. + +## EXAMPLES + +### Example 1: New-AzConnectedNetworkVendorSkuPreview using preview subscription, sku name, vendor name and subscription +```powershell +New-AzConnectedNetworkVendorSkuPreview -PreviewSubscription xxxxx-00000-xxxxx-00000 -SkuName mySku -VendorName myVendor -SubscriptionId xxxxx-22222-xxxxx-22222 +``` + +```output +Id : /subscriptions/xxxxx-22222-xxxxx-22222/providers/Microsoft.HybridNetwork/vendors/myVendor/vendorSkus/mySku/previewSubscriptions/xxxxx-00000-xxxxx-00000 +Name : xxxxx-00000-xxxxx-00000 +ProvisioningState : Succeeded +ResourceGroupName : +SystemDataCreatedAt : 12/6/2021 5:37:35 AM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 12/6/2021 5:37:35 AM +SystemDataLastModifiedBy : user@microsoft.com +SystemDataLastModifiedByType : User +Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions + +``` + +Creating preview subscription for subscription xxxxx-00000-xxxxx-00000 of a vendor sku mySku with vendor name myVendor, which is allowed to deploy network function. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreviewSubscription +Preview subscription ID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuName +The name of the vendor sku. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IPreviewSubscription + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/README.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/README.md new file mode 100644 index 000000000000..b66f6125ab43 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.ConnectedNetwork` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.ConnectedNetwork` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkDevice.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkDevice.md new file mode 100644 index 000000000000..fa0ee279b1ad --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkDevice.md @@ -0,0 +1,218 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/remove-azconnectednetworkdevice +schema: 2.0.0 +--- + +# Remove-AzConnectedNetworkDevice + +## SYNOPSIS +Deletes the specified device. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzConnectedNetworkDevice -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzConnectedNetworkDevice -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the specified device. + +## EXAMPLES + +### Example 1: Remove-AzConnectedNetworkDevice via resource name and resource group +```powershell +Remove-AzConnectedNetworkDevice -Name myMecDevice -ResourceGroupName myResources +``` + +Deleting the NFM device with device name myMecDevice in resource group myResources. + +### Example 2: Remove-AzConnectedNetworkDevice via Identity +```powershell +$mecDevice = Get-AzConnectedNetworkDevice -Name myMecDevice2 -ResourceGroupName myResources +Remove-AzConnectedNetworkDevice -InputObject $mecDevice +``` + +Creating an identity with name myMecDevice2 and resource group name myResources. +Deleting the NFM device with the given identity. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the device resource. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: DeviceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +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: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkFunction.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkFunction.md new file mode 100644 index 000000000000..9018f0a34585 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkFunction.md @@ -0,0 +1,222 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/remove-azconnectednetworkfunction +schema: 2.0.0 +--- + +# Remove-AzConnectedNetworkFunction + +## SYNOPSIS +Deletes the specified network function resource. +This operation can take up to 1 hour to complete. +This is expected service behavior. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzConnectedNetworkFunction -Name -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzConnectedNetworkFunction -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the specified network function resource. +This operation can take up to 1 hour to complete. +This is expected service behavior. + +## EXAMPLES + +### Example 1: Remove-AzConnectedNetworkFunction via Resource Group and Resource name +```powershell +Remove-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf +``` + +Deleting the Network Function in Resource Group myResources with name myVnf. + +### Example 2: Remove-AzConnectedNetworkFunction via Identity +```powershell +$vnf = Get-AzConnectedNetworkFunction -ResourceGroupName myResources -Name myVnf1 +Remove-AzConnectedNetworkFunction -InputObject $vnf +``` + +Creating an identity with name myVnf1 and resource group name myResources. +Deleting the Network Function with the given Identity. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the network function. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: NetworkFunctionName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +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: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkVendor.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkVendor.md new file mode 100644 index 000000000000..7867ed8c277b --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkVendor.md @@ -0,0 +1,201 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/remove-azconnectednetworkvendor +schema: 2.0.0 +--- + +# Remove-AzConnectedNetworkVendor + +## SYNOPSIS +Deletes the specified vendor. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzConnectedNetworkVendor -Name [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzConnectedNetworkVendor -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the specified vendor. + +## EXAMPLES + +### Example 1: Remove-AzConnectedNetworkVendor via vendor name +```powershell +Remove-AzConnectedNetworkVendor -Name MyVendor +``` + +Deleting the vendor with name MyVendor + +### Example 2: Remove-AzConnectedNetworkVendor via InputObject +```powershell +$vendor = Get-AzConnectedNetworkVendor -Name MyVendor1 +Remove-AzConnectedNetworkVendor -InputObject $vendor +``` + +Deleting the vendor with name MyVendor1 + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: VendorName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +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. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkVendorSku.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkVendorSku.md new file mode 100644 index 000000000000..a17cf76cb457 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkVendorSku.md @@ -0,0 +1,221 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/remove-azconnectednetworkvendorsku +schema: 2.0.0 +--- + +# Remove-AzConnectedNetworkVendorSku + +## SYNOPSIS +Deletes the specified sku. +This operation can take up to 2 hours to complete. +This is expected service behavior. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzConnectedNetworkVendorSku -SkuName -VendorName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzConnectedNetworkVendorSku -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the specified sku. +This operation can take up to 2 hours to complete. +This is expected service behavior. + +## EXAMPLES + +### Example 1: Remove-AzConnectedNetworkVendorSku via Sku name and Vendor name +```powershell +Remove-AzConnectedNetworkVendorSku -SkuName MySku -VendorName MyVendor +``` + +Deleting the sku MySku with Vendor name MyVendor. + +### Example 2: Remove-AzConnectedNetworkVendorSku via Identity +```powershell +$sku = Get-AzConnectedNetworkVendorSku -SkuName MySku1 -VendorName MyVendor +Remove-AzConnectedNetworkVendorSku -InputObject $sku +``` + +Creating an identity with sku name MySku1 and vendor name MyVendor. +Deleting the sku with the given Identity. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuName +The name of the sku. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkVendorSkuPreview.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkVendorSkuPreview.md new file mode 100644 index 000000000000..637512aaac39 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Remove-AzConnectedNetworkVendorSkuPreview.md @@ -0,0 +1,233 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/remove-azconnectednetworkvendorskupreview +schema: 2.0.0 +--- + +# Remove-AzConnectedNetworkVendorSkuPreview + +## SYNOPSIS +Deletes the preview information of a vendor sku. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzConnectedNetworkVendorSkuPreview -PreviewSubscription -SkuName -VendorName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzConnectedNetworkVendorSkuPreview -InputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes the preview information of a vendor sku. + +## EXAMPLES + +### Example 1: Remove-AzConnectedNetworkVendorSkuPreview via sku name, vendor name and preview subscription +```powershell +Remove-AzConnectedNetworkVendorSkuPreview -SkuName mySku -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 +``` + +Deleting the preview information of sku mySku with vendor name myVendor for the given preview subscription. + +### Example 2: Remove-AzConnectedNetworkVendorSkuPreview via Identity +```powershell +$sku = Get-AzConnectedNetworkVendorSkuPreview -SkuName mySku1 -VendorName myVendor -PreviewSubscription xxxxx-22222-xxxxx-22222 +Remove-AzConnectedNetworkVendorSkuPreview -InputObject $sku +``` + +Creating an identity with skuname mySku1, vendor name myVendor and preview subscription. +Deleting the preview information using the given identity. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PreviewSubscription +Preview subscription ID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SkuName +The name of the vendor sku. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Restart-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Restart-AzConnectedNetworkVendorFunctionRoleInstance.md new file mode 100644 index 000000000000..a052fb109ca1 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Restart-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -0,0 +1,248 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/restart-azconnectednetworkvendorfunctionroleinstance +schema: 2.0.0 +--- + +# Restart-AzConnectedNetworkVendorFunctionRoleInstance + +## SYNOPSIS +Restarts a role instance of a vendor network function. + +## SYNTAX + +### Restart (Default) +``` +Restart-AzConnectedNetworkVendorFunctionRoleInstance -LocationName -Name + -ServiceKey -VendorName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### RestartViaIdentity +``` +Restart-AzConnectedNetworkVendorFunctionRoleInstance -InputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Restarts a role instance of a vendor network function. + +## EXAMPLES + +### Example 1: Restart-AzConnectedNetworkVendorFunctionRoleInstance via location, serviceKey, vendor name and role instance name +```powershell +Restart-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 +``` + +Restarting a role instance of a vendor network function with the specified serviceKey, location centraluseuap, vendor name myVendor and role instance name role1. + +### Example 2: Restart-AzConnectedNetworkVendorFunctionRoleInstance via Identity +```powershell +$role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Restart-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role +``` + +Creating an identity with role instance name role1, location centraluseuap, vendor name myVendor specified subscription, serviceKey. +Restarting a role instance with the given identity. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: RestartViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -LocationName +The Azure region where the network function resource was created by customer. + +```yaml +Type: System.String +Parameter Sets: Restart +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the role instance of the vendor network function. + +```yaml +Type: System.String +Parameter Sets: Restart +Aliases: RoleInstanceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceKey +The GUID for the vendor network function. + +```yaml +Type: System.String +Parameter Sets: Restart +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Restart +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: Restart +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Start-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Start-AzConnectedNetworkVendorFunctionRoleInstance.md new file mode 100644 index 000000000000..25ea2e3bbaca --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Start-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -0,0 +1,248 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/start-azconnectednetworkvendorfunctionroleinstance +schema: 2.0.0 +--- + +# Start-AzConnectedNetworkVendorFunctionRoleInstance + +## SYNOPSIS +Starts a role instance of a vendor network function. + +## SYNTAX + +### Start (Default) +``` +Start-AzConnectedNetworkVendorFunctionRoleInstance -LocationName -Name -ServiceKey + -VendorName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +### StartViaIdentity +``` +Start-AzConnectedNetworkVendorFunctionRoleInstance -InputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Starts a role instance of a vendor network function. + +## EXAMPLES + +### Example 1: Start-AzConnectedNetworkVendorFunctionRoleInstance via location, serviceKey, vendor name and role instance name +```powershell +Start-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 +``` + +Starting a role instance of a vendor network function with the specified serviceKey, location centraluseuap, vendor name myVendor and role instance name role1. + +### Example 2: Start-AzConnectedNetworkVendorFunctionRoleInstance via Identity +```powershell +$role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Start-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role +``` + +Creating an identity with role instance name role1, location centraluseuap, vendor name myVendor specified subscription, serviceKey. +Starting a role instance with the given identity. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: StartViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -LocationName +The Azure region where the network function resource was created by customer. + +```yaml +Type: System.String +Parameter Sets: Start +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the role instance of the vendor network function. + +```yaml +Type: System.String +Parameter Sets: Start +Aliases: RoleInstanceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceKey +The GUID for the vendor network function. + +```yaml +Type: System.String +Parameter Sets: Start +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Start +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: Start +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Stop-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Stop-AzConnectedNetworkVendorFunctionRoleInstance.md new file mode 100644 index 000000000000..35b1d87233ab --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Stop-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -0,0 +1,248 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/stop-azconnectednetworkvendorfunctionroleinstance +schema: 2.0.0 +--- + +# Stop-AzConnectedNetworkVendorFunctionRoleInstance + +## SYNOPSIS +Powers off (stop) a role instance of a vendor network function. + +## SYNTAX + +### Stop (Default) +``` +Stop-AzConnectedNetworkVendorFunctionRoleInstance -LocationName -Name -ServiceKey + -VendorName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +### StopViaIdentity +``` +Stop-AzConnectedNetworkVendorFunctionRoleInstance -InputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Powers off (stop) a role instance of a vendor network function. + +## EXAMPLES + +### Example 1: Stop-AzConnectedNetworkVendorFunctionRoleInstance via location, serviceKey, vendor name and role instance name +```powershell +Stop-AzConnectedNetworkVendorFunctionRoleInstance -LocationName centraluseuap -ServiceKey 1234-abcd-4321-dcba -SubscriptionId xxxx-3333-xxxx-3333 -VendorName myVendor -Name role1 +``` + +Stoping a role instance of a vendor network function with the specified serviceKey, location centraluseuap, vendor name myVendor and role instance name role1. + +### Example 2: Stop-AzConnectedNetworkVendorFunctionRoleInstance via Identity +```powershell +$role = @{ RoleInstanceName = "role1"; LocationName = "centraluseuap"; SubscriptionId = "xxxx-3333-xxxx-3333"; VendorName = "myVendor"; serviceKey = "1234-abcd-4321-dcba"} +Stop-AzConnectedNetworkVendorFunctionRoleInstance -InputObject $role +``` + +Creating an identity with role instance name role1, location centraluseuap, vendor name myVendor specified subscription, serviceKey. +Stopping a role instance with the given identity. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: StopViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -LocationName +The Azure region where the network function resource was created by customer. + +```yaml +Type: System.String +Parameter Sets: Stop +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the role instance of the vendor network function. + +```yaml +Type: System.String +Parameter Sets: Stop +Aliases: RoleInstanceName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServiceKey +The GUID for the vendor network function. + +```yaml +Type: System.String +Parameter Sets: Stop +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Stop +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VendorName +The name of the vendor. + +```yaml +Type: System.String +Parameter Sets: Stop +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Update-AzConnectedNetworkDeviceTag.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Update-AzConnectedNetworkDeviceTag.md new file mode 100644 index 000000000000..6faa63cf42f9 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Update-AzConnectedNetworkDeviceTag.md @@ -0,0 +1,231 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/update-azconnectednetworkdevicetag +schema: 2.0.0 +--- + +# Update-AzConnectedNetworkDeviceTag + +## SYNOPSIS +Updates device tags. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzConnectedNetworkDeviceTag -DeviceName -ResourceGroupName [-SubscriptionId ] + [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzConnectedNetworkDeviceTag -InputObject [-Tag ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates device tags. + +## EXAMPLES + +### Example 1: Update-AzConnectedNetworkDeviceTag via Resource name and Device name +```powershell +$tags = @{ NewTag = "NewTagValue"} +Update-AzConnectedNetworkDeviceTag -DeviceName "myMecDevice" -ResourceGroupName "myResources" -Tag $tags +``` + +```output +DeviceType : AzureStackEdge +Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/myMecDevice +Location : eastus +Name : myMecDevice +NetworkFunction : +ProvisioningState : Succeeded +ResourceGroupName : myResources +Status : NotRegistered +SystemDataCreatedAt : 11/25/2021 4:47:45 AM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 11/25/2021 5:22:57 AM +SystemDataLastModifiedBy : user@microsoft.com +SystemDataLastModifiedByType : User +Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags +Type : microsoft.hybridnetwork/devices +``` + +Creating an identity with field NewTag and value NewTagValue. +Updating the tag of device with resource name myMecDevice in resource group myResources. + +### Example 2: Update-AzConnectedNetworkDeviceTag via Identity +```powershell +$tags = @{ NewTag1 = "NewTagValue1"} +$mecDevice = @{ DeviceName = "myMecDevice1"; Location = "eastus"; ResourceGroupName = "myResources"; SubscriptionId = "xxxxx-00000-xxxxx-00000"} +Update-AzConnectedNetworkDeviceTag -InputObject $mecDevice -Tag $tags +``` + +```output +DeviceType : AzureStackEdge +Id : /subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/myResources/providers/Microsoft.HybridNetwork/devices/mec_2111_09 +Location : eastus +Name : mec_2111_09 +NetworkFunction : {/subscriptions/xxxxx-00000-xxxxx-00000/resourceGroups/mrg-vmware_sdwan_edge_zones-20211124063650/providers/Microsoft.HybridNetwork/networkFunctions/Edge101} +ProvisioningState : Succeeded +ResourceGroupName : myResources +Status : Registered +SystemDataCreatedAt : 11/23/2021 10:27:13 PM +SystemDataCreatedBy : user@microsoft.com +SystemDataCreatedByType : User +SystemDataLastModifiedAt : 11/25/2021 5:53:12 AM +SystemDataLastModifiedBy : user@microsoft.com +SystemDataLastModifiedByType : User +Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags +Type : microsoft.hybridnetwork/devices + +``` + +Creating an identity with field NewTag1 and value NewTagValue1. +Creating another identity with device name myMecDevice1, resource group myResources, location eastus and specified subscription. +Updating the tag of device using identity. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeviceName +The name of the device resource. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.IDevice + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Update-AzConnectedNetworkFunctionTag.md b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Update-AzConnectedNetworkFunctionTag.md new file mode 100644 index 000000000000..375a1986fa53 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/help/Update-AzConnectedNetworkFunctionTag.md @@ -0,0 +1,204 @@ +--- +external help file: +Module Name: Az.ConnectedNetwork +online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/update-azconnectednetworkfunctiontag +schema: 2.0.0 +--- + +# Update-AzConnectedNetworkFunctionTag + +## SYNOPSIS +Updates the tags for the network function resource. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzConnectedNetworkFunctionTag -NetworkFunctionName -ResourceGroupName + [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzConnectedNetworkFunctionTag -InputObject [-Tag ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Updates the tags for the network function resource. + +## EXAMPLES + +### Example 1: Update-AzConnectedNetworkFunctionTag +```powershell +$tags = @{ NewTag = "NewTagValue"} +Update-AzConnectedNetworkFunctionTag -NetworkFunctionName myNewVnf1 -ResourceGroupName myResources -Tag $tags +``` + +```output +Location Name Etag ResourceGroupName +-------- ---- ---- ----------------- +eastus2euap myNewVnf1 "sampleEtagValue" myResources +``` + +Creating an identity with field NewTag and value NewTagValue. +Updating the tag of NF with resource name myNewVnf1 in resource group myResources. + +### Example 2: Update-AzConnectedNetworkFunctionTag +```powershell +$tags = @{ NewTag = "NewTagValue"} +$vnf = @{ NetworkFunctionName = "myVnf1"; ResourceGroupName = "myResources"; SubscriptionId = "00000000-0000-0000-0000-000000000000"} +Update-AzConnectedNetworkFunctionTag -InputObject $vnf -Tag $tags +``` + +```output +Location Name Etag ResourceGroupName +-------- ---- ---- ----------------- +eastus2euap myNewVnf1 "0000f211-0000-3300-0000-61a9edc70000" myResources +``` + +Creating an identity with field NewTag and value NewTagValue. +Creating an identity with NetworkFunctionName myVnf1, ResourceGroupName myResources and subscription.Updating the tag of NF specified in identity with the tags. + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NetworkFunctionName +Resource name for the network function resource. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +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 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.IConnectedNetworkIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunction + +## NOTES + +## RELATED LINKS + diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/internal/Az.ConnectedNetwork.internal.psm1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/internal/Az.ConnectedNetwork.internal.psm1 index d1590d853a48..6a5aa0350319 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/internal/Az.ConnectedNetwork.internal.psm1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/internal/Az.ConnectedNetwork.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/ConnectedNetwork/ConnectedNetwork.Autorest/internal/Get-AzConnectedNetworkFunctionVendorSku.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/internal/Get-AzConnectedNetworkFunctionVendorSku.ps1 index 4ad0580ce1f3..27c4ba7ddcba 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/internal/Get-AzConnectedNetworkFunctionVendorSku.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/internal/Get-AzConnectedNetworkFunctionVendorSku.ps1 @@ -20,13 +20,9 @@ Lists all network function vendor sku details in a vendor. .Description Lists all network function vendor sku details in a vendor. .Example -PS C:\> {{ Add code here }} - -{{ Add output here }} +{{ Add code here }} .Example -PS C:\> {{ Add code here }} - -{{ Add output here }} +{{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionSkuRoleDetails @@ -63,7 +59,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -113,12 +110,19 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunctionVendorSku_List'; List1 = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunctionVendorSku_List1'; } if (('List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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 + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -126,6 +130,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -134,15 +139,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/internal/ProxyCmdletDefinitions.ps1 index 4ad0580ce1f3..27c4ba7ddcba 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -20,13 +20,9 @@ Lists all network function vendor sku details in a vendor. .Description Lists all network function vendor sku details in a vendor. .Example -PS C:\> {{ Add code here }} - -{{ Add output here }} +{{ Add code here }} .Example -PS C:\> {{ Add code here }} - -{{ Add output here }} +{{ Add code here }} .Outputs Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20210501.INetworkFunctionSkuRoleDetails @@ -63,7 +59,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -113,12 +110,19 @@ begin { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName + $mapping = @{ List = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunctionVendorSku_List'; List1 = 'Az.ConnectedNetwork.private\Get-AzConnectedNetworkFunctionVendorSku_List1'; } if (('List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.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 + } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) @@ -126,6 +130,7 @@ begin { $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { + throw } } @@ -134,15 +139,18 @@ process { try { $steppablePipeline.Process($_) } catch { + throw } -} +} end { try { $steppablePipeline.End() + } catch { + throw } -} +} } diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/test-module.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/test-module.ps1 index 80512d0b3243..88159e63fefa 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/test-module.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.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-------------' \ No newline at end of file diff --git a/src/ConnectedNetwork/ConnectedNetwork.Autorest/test/loadEnv.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/test/loadEnv.ps1 index 5f079e89615e..6a7c385c6b7d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork.Autorest/test/loadEnv.ps1 +++ b/src/ConnectedNetwork/ConnectedNetwork.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/ConnectedNetwork/ConnectedNetwork.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 b/src/ConnectedNetwork/ConnectedNetwork.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/src/ConnectedNetwork/ConnectedNetwork.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/ConnectedNetwork/ConnectedNetwork/Az.ConnectedNetwork.psd1 b/src/ConnectedNetwork/ConnectedNetwork/Az.ConnectedNetwork.psd1 index 66c50c23e62b..ee5882fa4325 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/Az.ConnectedNetwork.psd1 +++ b/src/ConnectedNetwork/ConnectedNetwork/Az.ConnectedNetwork.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 12/5/2023 +# Generated on: 4/23/2024 # @{ @@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.7.4'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.17.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'ConnectedNetwork.Autorest/bin/Az.ConnectedNetwork.private.dll' @@ -63,7 +63,7 @@ ScriptsToProcess = @() TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = 'ConnectedNetwork.Autorest/Az.ConnectedNetwork.format.ps1xml' +FormatsToProcess = 'ConnectedNetwork.Autorest\Az.ConnectedNetwork.format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @('ConnectedNetwork.Autorest/Az.ConnectedNetwork.psm1') diff --git a/src/ConnectedNetwork/ConnectedNetwork/ChangeLog.md b/src/ConnectedNetwork/ConnectedNetwork/ChangeLog.md index 12d599ec490f..acc357fd65e6 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/ChangeLog.md +++ b/src/ConnectedNetwork/ConnectedNetwork/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.ConnectedNetwork diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkDevice.md b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkDevice.md index efe60cc8799c..8b57cef1fbc5 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkDevice.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkDevice.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkdevice schema: 2.0.0 @@ -14,25 +14,26 @@ Gets information about the specified device. ### List (Default) ``` -Get-AzConnectedNetworkDevice [-SubscriptionId ] [-DefaultProfile ] [] +Get-AzConnectedNetworkDevice [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### Get ``` Get-AzConnectedNetworkDevice -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` -### GetViaIdentity +### List1 ``` -Get-AzConnectedNetworkDevice -InputObject [-DefaultProfile ] - [] +Get-AzConnectedNetworkDevice -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] ``` -### List1 +### GetViaIdentity ``` -Get-AzConnectedNetworkDevice -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] +Get-AzConnectedNetworkDevice -InputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -62,7 +63,6 @@ SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 SystemDataLastModifiedByType : Application Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags Type : Microsoft.HybridNetwork/devices - ``` Getting information about the NFM device in resource group myResources with name myMecDevice. @@ -90,7 +90,6 @@ SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 SystemDataLastModifiedByType : Application Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags Type : microsoft.hybridnetwork/devices - ``` Creating an identity with device name myMecDevice1, resource group myResources and the given subscription. @@ -99,7 +98,8 @@ Getting the information about the device using this identity. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -144,6 +144,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. @@ -165,7 +180,7 @@ The ID of the target subscription. ```yaml Type: System.String[] -Parameter Sets: Get, List, List1 +Parameter Sets: List, Get, List1 Aliases: Required: False @@ -188,26 +203,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkDeviceRegistrationKey.md b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkDeviceRegistrationKey.md index 57e2925717b7..fa2557edc429 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkDeviceRegistrationKey.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkDeviceRegistrationKey.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkdeviceregistrationkey schema: 2.0.0 @@ -14,7 +14,8 @@ List the registration key for the device. ``` Get-AzConnectedNetworkDeviceRegistrationKey -DeviceName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -49,7 +50,8 @@ To register the device, use the commandlet Invoke-MecRegister with the registrat ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -78,6 +80,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. @@ -151,7 +168,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkFunction.md b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkFunction.md index b70ef61e2e94..23ca72202032 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkFunction.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkFunction.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkfunction schema: 2.0.0 @@ -14,25 +14,26 @@ Gets information about the specified network function resource. ### List (Default) ``` -Get-AzConnectedNetworkFunction [-SubscriptionId ] [-DefaultProfile ] [] +Get-AzConnectedNetworkFunction [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### Get ``` Get-AzConnectedNetworkFunction -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` -### GetViaIdentity +### List1 ``` -Get-AzConnectedNetworkFunction -InputObject [-DefaultProfile ] - [] +Get-AzConnectedNetworkFunction -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-ProgressAction ] [] ``` -### List1 +### GetViaIdentity ``` -Get-AzConnectedNetworkFunction -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] +Get-AzConnectedNetworkFunction -InputObject [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -70,7 +71,6 @@ Type : microsoft.hybridnetwork/networkfunctions UserConfiguration : {hpehss} VendorName : AffirmedVendor VendorProvisioningState : NotProvisioned - ``` Getting information about the network function in resource group myResources with resource name myVnf. @@ -106,7 +106,6 @@ Type : microsoft.hybridnetwork/networkfunctions UserConfiguration : {hpehss} VendorName : AffirmedVendor VendorProvisioningState : Provisioned - ``` Creating an identity with NetworkFunctionName myVnf1, ResourceGroupName myResources and subscription. @@ -115,7 +114,8 @@ Getting information about the network function using this identity. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -160,6 +160,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. @@ -181,7 +196,7 @@ The ID of the target subscription. ```yaml Type: System.String[] -Parameter Sets: Get, List, List1 +Parameter Sets: List, Get, List1 Aliases: Required: False @@ -204,26 +219,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkFunctionVendor.md b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkFunctionVendor.md index 54e293a1fd6c..991d65318296 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkFunctionVendor.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkFunctionVendor.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkfunctionvendor schema: 2.0.0 @@ -14,7 +14,7 @@ Lists all the available vendor and sku information. ``` Get-AzConnectedNetworkFunctionVendor [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -54,7 +54,8 @@ Gets information about the vendors and their skus in the given subscription. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -68,6 +69,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 +``` + ### -SubscriptionId The ID of the target subscription. @@ -94,7 +110,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendor.md b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendor.md index 6aecf0720d6b..4b1aa37b2bef 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendor.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendor.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkvendor schema: 2.0.0 @@ -14,19 +14,20 @@ Gets information about the specified vendor. ### List (Default) ``` -Get-AzConnectedNetworkVendor [-SubscriptionId ] [-DefaultProfile ] [] +Get-AzConnectedNetworkVendor [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### Get ``` Get-AzConnectedNetworkVendor -Name [-SubscriptionId ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzConnectedNetworkVendor -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -52,7 +53,6 @@ SystemDataLastModifiedAt : 9/7/2021 3:02:03 AM SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 SystemDataLastModifiedByType : Application Type : microsoft.hybridnetwork/vendors - ``` Getting information about the vendor with vendor name myVendor. @@ -76,7 +76,6 @@ SystemDataLastModifiedAt : 9/7/2021 3:02:03 AM SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 SystemDataLastModifiedByType : Application Type : microsoft.hybridnetwork/vendors - ``` Creating an identity with VendorName myVendor1 and the given subscription. @@ -85,7 +84,8 @@ Getting information about the vendor using this identity. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -130,12 +130,27 @@ 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 +``` + ### -SubscriptionId The ID of the target subscription. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -158,26 +173,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorFunction.md b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorFunction.md index 8cb232f17672..9508b9db9bcc 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorFunction.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorFunction.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkvendorfunction schema: 2.0.0 @@ -14,20 +14,20 @@ Gets information about the specified vendor network function. ### List (Default) ``` -Get-AzConnectedNetworkVendorFunction -LocationName -VendorName [-SubscriptionId ] - [-Filter ] [-DefaultProfile ] [] +Get-AzConnectedNetworkVendorFunction -LocationName [-SubscriptionId ] -VendorName + [-Filter ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` -Get-AzConnectedNetworkVendorFunction -LocationName -ServiceKey -VendorName - [-SubscriptionId ] [-DefaultProfile ] [] +Get-AzConnectedNetworkVendorFunction -LocationName -ServiceKey [-SubscriptionId ] + -VendorName [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzConnectedNetworkVendorFunction -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -57,7 +57,6 @@ SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 SystemDataLastModifiedByType : Application Type : microsoft.hybridnetwork/locations/vendors/networkfunctions VendorProvisioningState : NotProvisioned - ``` Getting the information of a vendor network function with service key 1234-abcd-4321-dcba, vendor name myVendor, location centraluseuap and subscription. @@ -86,7 +85,6 @@ SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 SystemDataLastModifiedByType : Application Type : microsoft.hybridnetwork/locations/vendors/networkfunctions VendorProvisioningState : Provisioned - ``` Creating a identity with service key 1234-abcd-4321-dcba, vendor name myVendor, location centraluseuap and subscription. @@ -95,7 +93,8 @@ Getting the information of a vendor network function using this identity. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -146,7 +145,7 @@ The Azure region where the network function resource was created by the customer ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -156,6 +155,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 +``` + ### -ServiceKey The GUID for the vendor network function. @@ -176,7 +190,7 @@ The ID of the target subscription. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -191,7 +205,7 @@ The name of the vendor. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -214,26 +228,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorFunctionRoleInstance.md index 6e22aa7432c7..c74c18e85b98 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorFunctionRoleInstance.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkvendorfunctionroleinstance schema: 2.0.0 @@ -15,19 +15,21 @@ Gets the information of role instance of vendor network function. ### List (Default) ``` Get-AzConnectedNetworkVendorFunctionRoleInstance -LocationName -ServiceKey - -VendorName [-SubscriptionId ] [-DefaultProfile ] [] + [-SubscriptionId ] -VendorName [-DefaultProfile ] + [-ProgressAction ] [] ``` ### Get ``` Get-AzConnectedNetworkVendorFunctionRoleInstance -LocationName -Name -ServiceKey - -VendorName [-SubscriptionId ] [-DefaultProfile ] [] + [-SubscriptionId ] -VendorName [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzConnectedNetworkVendorFunctionRoleInstance -InputObject - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -53,7 +55,6 @@ SystemDataLastModifiedAt : SystemDataLastModifiedBy : SystemDataLastModifiedByType : Type : - ``` Getting the role instance information of role hpehss with Location centraluseuap, Service key 1234-abcd-4321-dcba and vendor name myVendor. @@ -77,7 +78,6 @@ SystemDataLastModifiedAt : SystemDataLastModifiedBy : SystemDataLastModifiedByType : Type : - ``` Getting the role instance information of role hpehss with Location centraluseuap, Service key 1234-abcd-4321-dcba, vendor name myVendor and the given subscription. @@ -85,7 +85,8 @@ Getting the role instance information of role hpehss with Location centraluseuap ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -120,7 +121,7 @@ The Azure region where the network function resource was created by customer. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -145,12 +146,27 @@ 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 +``` + ### -ServiceKey The GUID for the vendor network function. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -165,7 +181,7 @@ The ID of the target subscription. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -180,7 +196,7 @@ The name of the vendor. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -203,26 +219,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorSku.md b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorSku.md index 3dcf68c9edb3..6e1b7226de3b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorSku.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorSku.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkvendorsku schema: 2.0.0 @@ -14,20 +14,20 @@ Gets information about the specified sku. ### List (Default) ``` -Get-AzConnectedNetworkVendorSku -VendorName [-SubscriptionId ] [-DefaultProfile ] - [] +Get-AzConnectedNetworkVendorSku [-SubscriptionId ] -VendorName [-DefaultProfile ] + [-ProgressAction ] [] ``` ### Get ``` -Get-AzConnectedNetworkVendorSku -SkuName -VendorName [-SubscriptionId ] - [-DefaultProfile ] [] +Get-AzConnectedNetworkVendorSku -SkuName [-SubscriptionId ] -VendorName + [-DefaultProfile ] [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzConnectedNetworkVendorSku -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -85,7 +85,8 @@ Fetching all the sku of vendor myVendor in the given subscription. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -115,6 +116,21 @@ Accept pipeline input: True (ByValue) 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 +``` + ### -SkuName The name of the sku. @@ -135,7 +151,7 @@ The ID of the target subscription. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -150,7 +166,7 @@ The name of the vendor. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -173,26 +189,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorSkuPreview.md b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorSkuPreview.md index 21dfe9662436..faaa96f4b469 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorSkuPreview.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Get-AzConnectedNetworkVendorSkuPreview.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/get-azconnectednetworkvendorskupreview schema: 2.0.0 @@ -14,20 +14,21 @@ Gets the preview information of a vendor sku. ### List (Default) ``` -Get-AzConnectedNetworkVendorSkuPreview -SkuName -VendorName [-SubscriptionId ] - [-DefaultProfile ] [] +Get-AzConnectedNetworkVendorSkuPreview -SkuName [-SubscriptionId ] -VendorName + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` -Get-AzConnectedNetworkVendorSkuPreview -PreviewSubscription -SkuName -VendorName - [-SubscriptionId ] [-DefaultProfile ] [] +Get-AzConnectedNetworkVendorSkuPreview -PreviewSubscription -SkuName + [-SubscriptionId ] -VendorName [-DefaultProfile ] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzConnectedNetworkVendorSkuPreview -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -52,7 +53,6 @@ SystemDataLastModifiedAt : 11/24/2021 4:41:22 AM SystemDataLastModifiedBy : user@microsoft.com SystemDataLastModifiedByType : User Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions - ``` Getting the preview information of a vendor sku mySku with vendor myVendor for the specified subscription. @@ -75,7 +75,6 @@ SystemDataLastModifiedAt : 11/24/2021 4:41:22 AM SystemDataLastModifiedBy : user@microsoft.com SystemDataLastModifiedByType : User Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions - ``` Creating a identity with SkuName mySku, VendorName myVendor, preview subscription and subscription id. @@ -84,7 +83,8 @@ Getting the preview information of this vendor sku using this identity. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -129,12 +129,27 @@ 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 +``` + ### -SkuName The name of the vendor sku. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -149,7 +164,7 @@ The ID of the target subscription. ```yaml Type: System.String[] -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: False @@ -164,7 +179,7 @@ The name of the vendor. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -187,26 +202,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkAzureStackEdgeObject.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkAzureStackEdgeObject.md index 15268bc727dc..986c391d08ca 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkAzureStackEdgeObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkAzureStackEdgeObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkAzureStackEdgeObject schema: 2.0.0 @@ -13,7 +13,8 @@ Create a in-memory object for AzureStackEdgeFormat ## SYNTAX ``` -New-AzConnectedNetworkAzureStackEdgeObject [-AzureStackEdgeId ] [] +New-AzConnectedNetworkAzureStackEdgeObject [-AzureStackEdgeId ] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -51,6 +52,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). @@ -62,7 +78,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkDevice.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkDevice.md index 20365472008d..86d77e47ae8f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkDevice.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkDevice.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkdevice schema: 2.0.0 @@ -13,9 +13,9 @@ Creates or updates a device. ## SYNTAX ``` -New-AzConnectedNetworkDevice -Name -ResourceGroupName -Location - [-SubscriptionId ] [-Property ] [-Tag ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +New-AzConnectedNetworkDevice -Name -ResourceGroupName [-SubscriptionId ] + -Location [-Property ] [-Tag ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -46,7 +46,6 @@ SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 SystemDataLastModifiedByType : Application Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags Type : microsoft.hybridnetwork/devices - ``` Create a device with Device Name with resource myMecDevice name in Resource Group myResources, Location eastus with Ase Device Id /subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse. @@ -74,7 +73,6 @@ SystemDataLastModifiedBy : xxxxx-11111-xxxxx-11111 SystemDataLastModifiedByType : Application Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags Type : microsoft.hybridnetwork/devices - ``` Create a device with Device Name myMecDevice1 in Resource Group myResources, Location eastus2euap, SubscriptionId and Ase Device Id /subscriptions/xxxxx-00000-xxxxx-00000/resourcegroups/myResources/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/myAse1. @@ -97,7 +95,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -156,6 +155,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 +``` + ### -Property Device properties. To construct, see NOTES section for PROPERTY properties and create a hash table. @@ -260,15 +274,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -PROPERTY ``: Device properties. - - `DeviceType `: The type of the device. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunction.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunction.md index 42631b348c70..09a180c2cf67 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunction.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunction.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkfunction schema: 2.0.0 @@ -15,11 +15,11 @@ This is expected service behavior. ## SYNTAX ``` -New-AzConnectedNetworkFunction -Name -ResourceGroupName -Location - [-SubscriptionId ] [-ContainerConfiguration ] [-DeviceId ] [-Etag ] +New-AzConnectedNetworkFunction -Name -ResourceGroupName [-SubscriptionId ] + -Location [-ContainerConfiguration ] [-DeviceId ] [-Etag ] [-ManagedApplicationParameter ] [-SkuName ] [-Tag ] - [-UserConfiguration ] [-VendorName ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-UserConfiguration ] [-VendorName ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -102,7 +102,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -206,6 +207,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. @@ -342,28 +358,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -USERCONFIGURATION : The network function configurations from the user. - - `[NetworkInterface ]`: The network interface configuration. - - `[IPConfiguration ]`: A list of IP configurations of the network interface. - - `[DnsServer ]`: The list of DNS servers IP addresses. - - `[Gateway ]`: The value of the gateway. - - `[IPAddress ]`: The value of the IP address. - - `[IPAllocationMethod ]`: IP address allocation method. - - `[IPVersion ]`: IP address version. - - `[Subnet ]`: The value of the subnet. - - `[MacAddress ]`: The MAC address of the network interface. - - `[Name ]`: The name of the network interface. - - `[VMSwitchType ]`: The type of the VM switch. - - `[OSProfileCustomData ]`: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](/azure/virtual-machines/linux/using-cloud-init) - - `[RoleName ]`: The name of the network function role. - - `[UserDataParameter ]`: The user data parameters from the customer. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionRoleConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionRoleConfigurationObject.md index 11c57c0869e5..5d2dca096616 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionRoleConfigurationObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionRoleConfigurationObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkFunctionRoleConfigurationObject schema: 2.0.0 @@ -20,7 +20,8 @@ New-AzConnectedNetworkFunctionRoleConfigurationObject [-CustomProfileMetadataCon [-OSProfileAdminUsername ] [-OSProfileCustomData ] [-OSProfileCustomDataRequired ] [-RoleName ] [-RoleType ] [-SshPublicKey ] [-StorageProfileDataDisk ] [-UserDataParameter ] [-UserDataTemplate ] - [-VhdUri ] [-VirtualMachineSize ] [] + [-VhdUri ] [-VirtualMachineSize ] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -43,7 +44,6 @@ $role = New-AzConnectedNetworkFunctionRoleConfigurationObject -NetworkInterface RoleName RoleType VirtualMachineSize -------- -------- ------------------ hpehss VirtualMachine Standard_D3_v2 - ``` Creating 2 ip configuration objects (ipconf1 and ipconf2) with dynamic allocation method and IPv4. @@ -214,19 +214,19 @@ Accept wildcard characters: False Specifies the name of the administrator account. - **Windows-only restriction:** Cannot end in "." + **Windows-only restriction:** Cannot end in "." **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". - **Minimum-length (Linux):** 1 character + **Minimum-length (Linux):** 1 character - **Max-length (Linux):** 64 characters + **Max-length (Linux):** 64 characters - **Max-length (Windows):** 20 characters + **Max-length (Windows):** 20 characters -\ For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) -\ For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/linux/usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). +\ For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +\ For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ```yaml Type: System.String @@ -246,15 +246,15 @@ The base-64 encoded string is decoded to a binary array that is saved as a file The maximum length of the binary array is 65535 bytes. - **Note: Do not pass any secrets or passwords in customData property** + **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. -For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) +For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/linux/using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). + For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ```yaml Type: System.String @@ -283,6 +283,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 +``` + ### -RoleName The name of the network function role. @@ -418,33 +433,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -NETWORKINTERFACE : The network interface configurations. - - `[IPConfiguration ]`: A list of IP configurations of the network interface. - - `[DnsServer ]`: The list of DNS servers IP addresses. - - `[Gateway ]`: The value of the gateway. - - `[IPAddress ]`: The value of the IP address. - - `[IPAllocationMethod ]`: IP address allocation method. - - `[IPVersion ]`: IP address version. - - `[Subnet ]`: The value of the subnet. - - `[MacAddress ]`: The MAC address of the network interface. - - `[Name ]`: The name of the network interface. - - `[VMSwitchType ]`: The type of the VM switch. - -SSHPUBLICKEY : The list of SSH public keys used to authenticate with linux based VMs. - - `[KeyData ]`: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](https://learn.microsoft.com/azure/virtual-machines/linux/mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). - - `[Path ]`: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys - -STORAGEPROFILEDATADISK : Specifies the parameters that are used to add a data disk to a virtual machine. - - `[CreateOption ]`: Specifies how the virtual machine should be created. - - `[DiskSizeGb ]`: Specifies the size of an empty disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. - - `[Name ]`: The name of data disk. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionUserConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionUserConfigurationObject.md index 945a88fe7654..ea1bf79a7b4b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionUserConfigurationObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionUserConfigurationObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkFunctionUserConfigurationObject schema: 2.0.0 @@ -14,7 +14,8 @@ Create a in-memory object for NetworkFunctionUserConfiguration ``` New-AzConnectedNetworkFunctionUserConfigurationObject [-NetworkInterface ] - [-OSProfileCustomData ] [-RoleName ] [-UserDataParameter ] [] + [-OSProfileCustomData ] [-RoleName ] [-UserDataParameter ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -68,7 +69,7 @@ The maximum length of the binary array is 65535 bytes. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](/azure/virtual-machines/linux/using-cloud-init). + For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ```yaml Type: System.String @@ -82,6 +83,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 +``` + ### -RoleName The name of the network function role. @@ -123,24 +139,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -NETWORKINTERFACE : The network interface configuration. - - `[IPConfiguration ]`: A list of IP configurations of the network interface. - - `[DnsServer ]`: The list of DNS servers IP addresses. - - `[Gateway ]`: The value of the gateway. - - `[IPAddress ]`: The value of the IP address. - - `[IPAllocationMethod ]`: IP address allocation method. - - `[IPVersion ]`: IP address version. - - `[Subnet ]`: The value of the subnet. - - `[MacAddress ]`: The MAC address of the network interface. - - `[Name ]`: The name of the network interface. - - `[VMSwitchType ]`: The type of the VM switch. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionVendorConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionVendorConfigurationObject.md index f6d497462a95..d06ecbba008e 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionVendorConfigurationObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkFunctionVendorConfigurationObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkFunctionVendorConfigurationObject schema: 2.0.0 @@ -15,7 +15,8 @@ Create a in-memory object for NetworkFunctionVendorConfiguration ``` New-AzConnectedNetworkFunctionVendorConfigurationObject [-NetworkInterface ] [-OSProfileAdminUsername ] [-OSProfileCustomData ] [-OSProfileCustomDataRequired ] - [-RoleName ] [-SshPublicKey ] [] + [-RoleName ] [-SshPublicKey ] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -72,8 +73,8 @@ Specifies the name of the administrator account. **Max-length (Windows):** 20 characters -\ For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](/azure/virtual-machines/linux/use-root-privileges) -\ For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](/azure/virtual-machines/linux/usernames). +\ For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-use-root-privileges?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +\ For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-usernames?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ```yaml Type: System.String @@ -101,7 +102,7 @@ The maximum length of the binary array is 65535 bytes. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) - For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](/azure/virtual-machines/linux/using-cloud-init). + For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](https://learn.microsoft.com/azure/virtual-machines/virtual-machines-linux-using-cloud-init?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). ```yaml Type: System.String @@ -130,6 +131,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 +``` + ### -RoleName The name of the vendor network function role. @@ -172,28 +188,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -NETWORKINTERFACE : The network interface configurations. - - `[IPConfiguration ]`: A list of IP configurations of the network interface. - - `[DnsServer ]`: The list of DNS servers IP addresses. - - `[Gateway ]`: The value of the gateway. - - `[IPAddress ]`: The value of the IP address. - - `[IPAllocationMethod ]`: IP address allocation method. - - `[IPVersion ]`: IP address version. - - `[Subnet ]`: The value of the subnet. - - `[MacAddress ]`: The MAC address of the network interface. - - `[Name ]`: The name of the network interface. - - `[VMSwitchType ]`: The type of the VM switch. - -SSHPUBLICKEY : The list of SSH public keys used to authenticate with linux based VMs. - - `[KeyData ]`: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](/azure/virtual-machines/linux/mac-create-ssh-keys). - - `[Path ]`: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkInterfaceIPConfigurationObject.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkInterfaceIPConfigurationObject.md index 1bf99620f26b..501eca4ab307 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkInterfaceIPConfigurationObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkInterfaceIPConfigurationObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkInterfaceIPConfigurationObject schema: 2.0.0 @@ -15,7 +15,7 @@ Create a in-memory object for NetworkInterfaceIPConfiguration ``` New-AzConnectedNetworkInterfaceIPConfigurationObject [-DnsServer ] [-Gateway ] [-IPAddress ] [-IPAllocationMethod ] [-IPVersion ] [-Subnet ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -113,6 +113,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 +``` + ### -Subnet The value of the subnet. @@ -139,7 +154,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkInterfaceObject.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkInterfaceObject.md index e79419555de4..29e2d48aa546 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkInterfaceObject.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkInterfaceObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.ConnectedNetwork/new-AzConnectedNetworkInterfaceObject schema: 2.0.0 @@ -14,7 +14,8 @@ Create a in-memory object for NetworkInterface ``` New-AzConnectedNetworkInterfaceObject [-IPConfiguration ] - [-MacAddress ] [-Name ] [-VMSwitchType ] [] + [-MacAddress ] [-Name ] [-VMSwitchType ] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -83,6 +84,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 +``` + ### -VMSwitchType The type of the VM switch. @@ -109,20 +125,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -IPCONFIGURATION : A list of IP configurations of the network interface. - - `[DnsServer ]`: The list of DNS servers IP addresses. - - `[Gateway ]`: The value of the gateway. - - `[IPAddress ]`: The value of the IP address. - - `[IPAllocationMethod ]`: IP address allocation method. - - `[IPVersion ]`: IP address version. - - `[Subnet ]`: The value of the subnet. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendor.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendor.md index 0e0a67d388eb..fb045e8338d5 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendor.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendor.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkvendor schema: 2.0.0 @@ -14,7 +14,7 @@ Creates or updates a vendor. ``` New-AzConnectedNetworkVendor -Name [-SubscriptionId ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-Confirm] [-WhatIf] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -44,7 +44,7 @@ Type : microsoft.hybridnetwork/vendors Creating a vendor with name myVendor. -### Example 2: New-AzConnectedNetworkVendor with SubscriptionId +### Example 2: New-AzConnectedNetworkVendor with SubscriptionId ```powershell New-AzConnectedNetworkVendor -Name myVendor2 -SubscriptionId xxxxx-22222-xxxxx-22222 ``` @@ -84,7 +84,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -128,6 +129,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 +``` + ### -SubscriptionId The ID of the target subscription. @@ -185,7 +201,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorFunction.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorFunction.md index 4b38c0cb0a7d..c5f9afa5dbb6 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorFunction.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorFunction.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkvendorfunction schema: 2.0.0 @@ -16,10 +16,9 @@ This is expected service behavior. ``` New-AzConnectedNetworkVendorFunction -LocationName -ServiceKey -VendorName - [-SubscriptionId ] [-SkuType ] - [-VendorConfiguration ] + [-SubscriptionId ] [-SkuType ] [-VendorConfiguration ] [-VendorProvisioningState ] [-DefaultProfile ] [-AsJob] [-NoWait] - [-Confirm] [-WhatIf] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -65,7 +64,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -109,6 +109,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 +``` + ### -ServiceKey The GUID for the vendor network function. @@ -242,32 +257,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -VENDORCONFIGURATION : An array of network function vendor configurations. - - `[NetworkInterface ]`: The network interface configurations. - - `[IPConfiguration ]`: A list of IP configurations of the network interface. - - `[DnsServer ]`: The list of DNS servers IP addresses. - - `[Gateway ]`: The value of the gateway. - - `[IPAddress ]`: The value of the IP address. - - `[IPAllocationMethod ]`: IP address allocation method. - - `[IPVersion ]`: IP address version. - - `[Subnet ]`: The value of the subnet. - - `[MacAddress ]`: The MAC address of the network interface. - - `[Name ]`: The name of the network interface. - - `[VMSwitchType ]`: The type of the VM switch. - - `[OSProfileAdminUsername ]`: Specifies the name of the administrator account. **Windows-only restriction:** Cannot end in "." **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". **Minimum-length (Linux):** 1 character **Max-length (Linux):** 64 characters **Max-length (Windows):** 20 characters
  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](/azure/virtual-machines/linux/use-root-privileges)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](/azure/virtual-machines/linux/usernames). - - `[OSProfileCustomData ]`: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](/azure/virtual-machines/linux/using-cloud-init) - - `[OSProfileCustomDataRequired ]`: Indicates if custom data is required to deploy this role. - - `[RoleName ]`: The name of the vendor network function role. - - `[SshPublicKey ]`: The list of SSH public keys used to authenticate with linux based VMs. - - `[KeyData ]`: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](/azure/virtual-machines/linux/mac-create-ssh-keys). - - `[Path ]`: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorSku.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorSku.md index 0a3bdb6c9ed1..3fac184dbeb2 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorSku.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorSku.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkvendorsku schema: 2.0.0 @@ -20,7 +20,7 @@ New-AzConnectedNetworkVendorSku -SkuName -VendorName [-Subscri [-ManagedApplicationTemplate ] [-NetworkFunctionRoleConfigurationType ] [-NetworkFunctionType ] [-Preview] [-SkuType ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -57,7 +57,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -177,6 +178,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 +``` + ### -SkuName The name of the sku. @@ -279,50 +295,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -NETWORKFUNCTIONROLECONFIGURATIONTYPE : An array of network function role definitions. - - `[CustomProfileMetadataConfigurationPath ]`: Path for metadata configuration. - - `[ImageReferenceExactVersion ]`: Specifies in decimal numbers, the exact version of image used to create the virtual machine. - - `[ImageReferenceOffer ]`: Specifies the offer of the image used to create the virtual machine. - - `[ImageReferencePublisher ]`: The image publisher. - - `[ImageReferenceSku ]`: The image SKU. - - `[ImageReferenceVersion ]`: Specifies the version of the image used to create the virtual machine. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available. - - `[NetworkInterface ]`: The network interface configurations. - - `[IPConfiguration ]`: A list of IP configurations of the network interface. - - `[DnsServer ]`: The list of DNS servers IP addresses. - - `[Gateway ]`: The value of the gateway. - - `[IPAddress ]`: The value of the IP address. - - `[IPAllocationMethod ]`: IP address allocation method. - - `[IPVersion ]`: IP address version. - - `[Subnet ]`: The value of the subnet. - - `[MacAddress ]`: The MAC address of the network interface. - - `[Name ]`: The name of the network interface. - - `[VMSwitchType ]`: The type of the VM switch. - - `[OSDiskName ]`: The VHD name. - - `[OSDiskOstype ]`: The OS type. - - `[OSDiskSizeGb ]`: Specifies the size of os disk in gigabytes. This is the fully expanded disk size needed of the VHD image on the ASE. This disk size should be greater than the size of the VHD provided in vhdUri. - - `[OSProfileAdminUsername ]`: Specifies the name of the administrator account. **Windows-only restriction:** Cannot end in "." **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", "sys", "test2", "test3", "user4", "user5". **Minimum-length (Linux):** 1 character **Max-length (Linux):** 64 characters **Max-length (Windows):** 20 characters
  • For root access to the Linux VM, see [Using root privileges on Linux virtual machines in Azure](/azure/virtual-machines/linux/use-root-privileges)
  • For a list of built-in system users on Linux that should not be used in this field, see [Selecting User Names for Linux on Azure](/azure/virtual-machines/linux/usernames). - - `[OSProfileCustomData ]`: Specifies a base-64 encoded string of custom data. The base-64 encoded string is decoded to a binary array that is saved as a file on the virtual machine. The maximum length of the binary array is 65535 bytes. **Note: Do not pass any secrets or passwords in customData property** This property cannot be updated after the VM is created. customData is passed to the VM to be saved as a file. For more information see [Custom Data on Azure VMs](https://azure.microsoft.com/en-us/blog/custom-data-and-cloud-init-on-windows-azure/) For using cloud-init for your Linux VM, see [Using cloud-init to customize a Linux VM during creation](/azure/virtual-machines/linux/using-cloud-init) - - `[OSProfileCustomDataRequired ]`: Indicates if custom data is required to deploy this role. - - `[RoleName ]`: The name of the network function role. - - `[RoleType ]`: Role type. - - `[SshPublicKey ]`: The list of SSH public keys used to authenticate with linux based VMs. - - `[KeyData ]`: SSH public key certificate used to authenticate with the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format. For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](/azure/virtual-machines/linux/mac-create-ssh-keys). - - `[Path ]`: Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys - - `[StorageProfileDataDisk ]`: Specifies the parameters that are used to add a data disk to a virtual machine. - - `[CreateOption ]`: Specifies how the virtual machine should be created. - - `[DiskSizeGb ]`: Specifies the size of an empty disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. - - `[Name ]`: The name of data disk. - - `[UserDataParameter ]`: The user parameters for customers. The format of user data parameters has to be matched with the provided user data template. - - `[UserDataTemplate ]`: The user data template for customers. This is a json schema template describing the format and data type of user data parameters. - - `[VhdUri ]`: Specifies the virtual hard disk's uri. - - `[VirtualMachineSize ]`: The size of the virtual machine. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorSkuPreview.md b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorSkuPreview.md index 1f1c04db2667..7af74280330f 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorSkuPreview.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/New-AzConnectedNetworkVendorSkuPreview.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/new-azconnectednetworkvendorskupreview schema: 2.0.0 @@ -14,8 +14,8 @@ Creates or updates preview information of a vendor sku. ``` New-AzConnectedNetworkVendorSkuPreview -PreviewSubscription -SkuName -VendorName - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -40,7 +40,6 @@ SystemDataLastModifiedAt : 12/6/2021 5:37:35 AM SystemDataLastModifiedBy : user@microsoft.com SystemDataLastModifiedByType : User Type : microsoft.hybridnetwork/vendors/vendorskus/previewsubscriptions - ``` Creating preview subscription for subscription xxxxx-00000-xxxxx-00000 of a vendor sku mySku with vendor name myVendor, which is allowed to deploy network function. @@ -63,7 +62,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -107,6 +107,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 +``` + ### -SkuName The name of the vendor sku. @@ -194,7 +209,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkDevice.md b/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkDevice.md index 3534abff4b69..7a83de718123 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkDevice.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkDevice.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/remove-azconnectednetworkdevice schema: 2.0.0 @@ -15,13 +15,14 @@ Deletes the specified device. ### Delete (Default) ``` Remove-AzConnectedNetworkDevice -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzConnectedNetworkDevice -InputObject [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -63,7 +64,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -138,6 +140,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. @@ -213,26 +230,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkFunction.md b/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkFunction.md index bf24ff4253cb..fb782414b454 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkFunction.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkFunction.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/remove-azconnectednetworkfunction schema: 2.0.0 @@ -17,13 +17,14 @@ This is expected service behavior. ### Delete (Default) ``` Remove-AzConnectedNetworkFunction -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzConnectedNetworkFunction -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -67,7 +68,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -142,6 +144,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. @@ -217,26 +234,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendor.md b/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendor.md index 458e6c3ff79e..e8f19b18fbd1 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendor.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendor.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/remove-azconnectednetworkvendor schema: 2.0.0 @@ -14,14 +14,14 @@ Deletes the specified vendor. ### Delete (Default) ``` -Remove-AzConnectedNetworkVendor -Name [-SubscriptionId ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +Remove-AzConnectedNetworkVendor -Name [-SubscriptionId ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzConnectedNetworkVendor -InputObject [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -62,7 +62,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -137,6 +138,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 +``` + ### -SubscriptionId The ID of the target subscription. @@ -196,26 +212,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendorSku.md b/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendorSku.md index 89a65888aba1..97eced70db70 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendorSku.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendorSku.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/remove-azconnectednetworkvendorsku schema: 2.0.0 @@ -16,14 +16,15 @@ This is expected service behavior. ### Delete (Default) ``` -Remove-AzConnectedNetworkVendorSku -SkuName -VendorName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +Remove-AzConnectedNetworkVendorSku -SkuName [-SubscriptionId ] -VendorName + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzConnectedNetworkVendorSku -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -67,7 +68,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -127,6 +129,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 +``` + ### -SkuName The name of the sku. @@ -216,26 +233,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendorSkuPreview.md b/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendorSkuPreview.md index 26244f4d35bc..7bd972a3b2dd 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendorSkuPreview.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Remove-AzConnectedNetworkVendorSkuPreview.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/remove-azconnectednetworkvendorskupreview schema: 2.0.0 @@ -14,15 +14,15 @@ Deletes the preview information of a vendor sku. ### Delete (Default) ``` -Remove-AzConnectedNetworkVendorSkuPreview -PreviewSubscription -SkuName -VendorName - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] - [] +Remove-AzConnectedNetworkVendorSkuPreview -PreviewSubscription -SkuName + [-SubscriptionId ] -VendorName [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` -Remove-AzConnectedNetworkVendorSkuPreview -InputObject - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +Remove-AzConnectedNetworkVendorSkuPreview -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -64,7 +64,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -139,6 +140,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 +``` + ### -SkuName The name of the vendor sku. @@ -228,26 +244,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Restart-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork/help/Restart-AzConnectedNetworkVendorFunctionRoleInstance.md index ff817c438f11..ba4e10e48c31 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Restart-AzConnectedNetworkVendorFunctionRoleInstance.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Restart-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/restart-azconnectednetworkvendorfunctionroleinstance schema: 2.0.0 @@ -14,15 +14,16 @@ Restarts a role instance of a vendor network function. ### Restart (Default) ``` -Restart-AzConnectedNetworkVendorFunctionRoleInstance -LocationName -Name - -ServiceKey -VendorName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] - [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +Restart-AzConnectedNetworkVendorFunctionRoleInstance -LocationName -Name -ServiceKey + [-SubscriptionId ] -VendorName [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### RestartViaIdentity ``` Restart-AzConnectedNetworkVendorFunctionRoleInstance -InputObject - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -64,7 +65,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -154,6 +156,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 +``` + ### -ServiceKey The GUID for the vendor network function. @@ -243,26 +260,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Start-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork/help/Start-AzConnectedNetworkVendorFunctionRoleInstance.md index 0626857238ba..10f72addd4e7 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Start-AzConnectedNetworkVendorFunctionRoleInstance.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Start-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/start-azconnectednetworkvendorfunctionroleinstance schema: 2.0.0 @@ -15,14 +15,15 @@ Starts a role instance of a vendor network function. ### Start (Default) ``` Start-AzConnectedNetworkVendorFunctionRoleInstance -LocationName -Name -ServiceKey - -VendorName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-Confirm] [-WhatIf] [] + [-SubscriptionId ] -VendorName [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### StartViaIdentity ``` Start-AzConnectedNetworkVendorFunctionRoleInstance -InputObject - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -64,7 +65,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -154,6 +156,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 +``` + ### -ServiceKey The GUID for the vendor network function. @@ -243,26 +260,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Stop-AzConnectedNetworkVendorFunctionRoleInstance.md b/src/ConnectedNetwork/ConnectedNetwork/help/Stop-AzConnectedNetworkVendorFunctionRoleInstance.md index c937d9d84560..c4ad45e1883b 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Stop-AzConnectedNetworkVendorFunctionRoleInstance.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Stop-AzConnectedNetworkVendorFunctionRoleInstance.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/stop-azconnectednetworkvendorfunctionroleinstance schema: 2.0.0 @@ -15,14 +15,15 @@ Powers off (stop) a role instance of a vendor network function. ### Stop (Default) ``` Stop-AzConnectedNetworkVendorFunctionRoleInstance -LocationName -Name -ServiceKey - -VendorName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] - [-Confirm] [-WhatIf] [] + [-SubscriptionId ] -VendorName [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### StopViaIdentity ``` Stop-AzConnectedNetworkVendorFunctionRoleInstance -InputObject - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -64,7 +65,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -154,6 +156,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 +``` + ### -ServiceKey The GUID for the vendor network function. @@ -243,26 +260,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Update-AzConnectedNetworkDeviceTag.md b/src/ConnectedNetwork/ConnectedNetwork/help/Update-AzConnectedNetworkDeviceTag.md index 0bd591fd20d6..ee7d1dc7a827 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Update-AzConnectedNetworkDeviceTag.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Update-AzConnectedNetworkDeviceTag.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/update-azconnectednetworkdevicetag schema: 2.0.0 @@ -15,13 +15,14 @@ Updates device tags. ### UpdateExpanded (Default) ``` Update-AzConnectedNetworkDeviceTag -DeviceName -ResourceGroupName [-SubscriptionId ] - [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-Tag ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### UpdateViaIdentityExpanded ``` Update-AzConnectedNetworkDeviceTag -InputObject [-Tag ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -81,7 +82,6 @@ SystemDataLastModifiedBy : user@microsoft.com SystemDataLastModifiedByType : User Tag : Microsoft.Azure.PowerShell.Cmdlets.ConnectedNetwork.Models.Api20.TrackedResourceTags Type : microsoft.hybridnetwork/devices - ``` Creating an identity with field NewTag1 and value NewTagValue1. @@ -91,7 +91,8 @@ Updating the tag of device using identity. ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -136,6 +137,21 @@ Accept pipeline input: True (ByValue) 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. @@ -226,26 +242,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/ConnectedNetwork/ConnectedNetwork/help/Update-AzConnectedNetworkFunctionTag.md b/src/ConnectedNetwork/ConnectedNetwork/help/Update-AzConnectedNetworkFunctionTag.md index 18999b00c064..eb3b3663501d 100644 --- a/src/ConnectedNetwork/ConnectedNetwork/help/Update-AzConnectedNetworkFunctionTag.md +++ b/src/ConnectedNetwork/ConnectedNetwork/help/Update-AzConnectedNetworkFunctionTag.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.ConnectedNetwork-help.xml Module Name: Az.ConnectedNetwork online version: https://learn.microsoft.com/powershell/module/az.connectednetwork/update-azconnectednetworkfunctiontag schema: 2.0.0 @@ -15,14 +15,14 @@ Updates the tags for the network function resource. ### UpdateExpanded (Default) ``` Update-AzConnectedNetworkFunctionTag -NetworkFunctionName -ResourceGroupName - [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] - [] + [-SubscriptionId ] [-Tag ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzConnectedNetworkFunctionTag -InputObject [-Tag ] - [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -64,7 +64,8 @@ Creating an identity with NetworkFunctionName myVnf1, ResourceGroupName myResour ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -109,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 +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. @@ -199,26 +215,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -INPUTOBJECT ``: Identity Parameter - - `[DeviceName ]`: The name of the device resource. - - `[Id ]`: Resource identity path - - `[LocationName ]`: The Azure region where the network function resource was created by the customer. - - `[NetworkFunctionName ]`: The name of the network function. - - `[PreviewSubscription ]`: Preview subscription ID. - - `[ResourceGroupName ]`: The name of the resource group. The name is case insensitive. - - `[RoleInstanceName ]`: The name of the role instance of the vendor network function. - - `[ServiceKey ]`: The GUID for the vendor network function. - - `[SkuName ]`: The name of the sku. - - `[SubscriptionId ]`: The ID of the target subscription. - - `[VendorName ]`: The name of the vendor. - - `[VendorSkuName ]`: The name of the network function sku. - ## RELATED LINKS - diff --git a/src/CostManagement/CostManagement.Autorest/Az.CostManagement.format.ps1xml b/src/CostManagement/CostManagement.Autorest/Az.CostManagement.format.ps1xml index 283fe60d9e13..67ba9e8afdae 100644 --- a/src/CostManagement/CostManagement.Autorest/Az.CostManagement.format.ps1xml +++ b/src/CostManagement/CostManagement.Autorest/Az.CostManagement.format.ps1xml @@ -71,90 +71,6 @@ - - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders - - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders - - - - - - - - - - - - - - - Location - - - RetryAfter - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders - - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders - - - - - - - - - - - - - - - Location - - - RetryAfter - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders - - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders - - - - - - - - - - - - - - - Location - - - RetryAfter - - - - - - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.BlobInfo diff --git a/src/CostManagement/CostManagement.Autorest/Az.CostManagement.psd1 b/src/CostManagement/CostManagement.Autorest/Az.CostManagement.psd1 index 329d4491b789..5f283c22562d 100644 --- a/src/CostManagement/CostManagement.Autorest/Az.CostManagement.psd1 +++ b/src/CostManagement/CostManagement.Autorest/Az.CostManagement.psd1 @@ -1,140 +1,24 @@ -# -# Module manifest for module 'Az.CostManagement' -# -# Generated by: Microsoft Corporation -# -# Generated on: 3/30/2023 -# - @{ - -# Script module or binary module file associated with this manifest. -RootModule = './Az.CostManagement.psm1' - -# Version number of this module. -ModuleVersion = '0.3.1' - -# Supported PSEditions -CompatiblePSEditions = 'Core', 'Desktop' - -# ID used to uniquely identify this module -GUID = '4cd9af10-559e-4fb9-8dcd-d3e8eb9e03b7' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = 'Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = 'Microsoft Azure PowerShell: Cost cmdlets' - -# Minimum version of the PowerShell engine required by this module -PowerShellVersion = '5.1' - -# Name of the PowerShell host required by this module -# PowerShellHostName = '' - -# Minimum version of the PowerShell host required by this module -# PowerShellHostVersion = '' - -# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -DotNetFrameworkVersion = '4.7.2' - -# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. -# ClrVersion = '' - -# Processor architecture (None, X86, Amd64) required by this module -# ProcessorArchitecture = '' - -# Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.12.1'; }) - -# Assemblies that must be loaded prior to importing this module -RequiredAssemblies = './bin/Az.CostManagement.private.dll' - -# Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() - -# Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = './Az.CostManagement.format.ps1xml' - -# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -# NestedModules = @() - -# Functions 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 functions to export. -FunctionsToExport = 'Get-AzCostManagementExport', - 'Get-AzCostManagementExportExecutionHistory', - 'Invoke-AzCostManagementExecuteExport', - 'Invoke-AzCostManagementQuery', - 'Invoke-AzCostManagementReservationDetailReport', - 'New-AzCostManagementDetailReport', 'New-AzCostManagementExport', - 'New-AzCostManagementQueryComparisonExpressionObject', - 'New-AzCostManagementQueryFilterObject', - 'Remove-AzCostManagementExport', 'Update-AzCostManagementExport' - -# Cmdlets 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 cmdlets to export. -CmdletsToExport = @() - -# Variables to export from this module -# 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 = '*' - -# DSC resources to export from this module -# DscResourcesToExport = @() - -# List of all modules packaged with this module -# ModuleList = @() - -# List of all files packaged with this module -# FileList = @() - -# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. -PrivateData = @{ - + GUID = '4cd9af10-559e-4fb9-8dcd-d3e8eb9e03b7' + RootModule = './Az.CostManagement.psm1' + ModuleVersion = '0.3.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: Cost cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.CostManagement.private.dll' + FormatsToProcess = './Az.CostManagement.format.ps1xml' + FunctionsToExport = 'Get-AzCostManagementExport', 'Get-AzCostManagementExportExecutionHistory', 'Invoke-AzCostManagementExecuteExport', 'Invoke-AzCostManagementQuery', 'Invoke-AzCostManagementReservationDetailReport', 'New-AzCostManagementDetailReport', 'New-AzCostManagementExport', 'New-AzCostManagementQueryComparisonExpressionObject', 'New-AzCostManagementQueryFilterObject', 'Remove-AzCostManagementExport', 'Update-AzCostManagementExport', '*' + AliasesToExport = '*' + PrivateData = @{ PSData = @{ - - # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','Cost' - - # A URL to the license for this module. - LicenseUri = 'https://aka.ms/azps-license' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/Azure/azure-powershell' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = '* Fixed an error that values in row could be null when grouping by the value of TagKey in Invoke-AzCostManagementQuery cmdlet.' - - # Prerelease string of this module - # Prerelease = '' - - # Flag to indicate whether the module requires explicit user acceptance for install/update/save - # RequireLicenseAcceptance = $false - - # External dependent modules of this module - # ExternalModuleDependencies = @() - - } # End of PSData hashtable - - } # End of PrivateData hashtable - -# HelpInfo URI of this module -# HelpInfoURI = '' - -# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. -# DefaultCommandPrefix = '' - + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'Cost' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } } - diff --git a/src/CostManagement/CostManagement.Autorest/Az.CostManagement.psm1 b/src/CostManagement/CostManagement.Autorest/Az.CostManagement.psm1 index f15aa7d8bbd7..d6838c568c29 100644 --- a/src/CostManagement/CostManagement.Autorest/Az.CostManagement.psm1 +++ b/src/CostManagement/CostManagement.Autorest/Az.CostManagement.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.CostManagement.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/CostManagement/CostManagement.Autorest/README.md b/src/CostManagement/CostManagement.Autorest/README.md index 470dbb9880d2..a69418ac9b05 100644 --- a/src/CostManagement/CostManagement.Autorest/README.md +++ b/src/CostManagement/CostManagement.Autorest/README.md @@ -3,7 +3,6 @@ This directory contains the PowerShell module for the Cost service. --- - ## Info - Modifiable: yes - Generated: all @@ -43,12 +42,13 @@ In this directory, run AutoRest: > see https://aka.ms/autorest ``` yaml +commit: 14f29e62df4563d9bf4b9d98ae0688420df12053 require: - - $(this-folder)/../readme.azure.noprofile.md + - $(this-folder)/../../readme.azure.noprofile.md input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/6080bb1fc0e219b72ed3c85966b54334e22e9980/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2021-10-01/costmanagement.json - - https://github.com/Azure/azure-rest-api-specs/blob/14f29e62df4563d9bf4b9d98ae0688420df12053/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2021-10-01/costmanagement.exports.json - - https://github.com/Azure/azure-rest-api-specs/blob/fbb4e2c74897a67a75116d2a3157bd146262def4/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-05-01/costmanagement.generatecostdetailsreport.json + - $(repo)/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2021-10-01/costmanagement.json + - $(repo)/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2021-10-01/costmanagement.exports.json + - $(repo)/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2022-05-01/costmanagement.generatecostdetailsreport.json title: CostManagement module-version: 0.3.0 @@ -56,6 +56,10 @@ service-name: CostManagement identity-correction-for-post: true +# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option +use-extension: + "@autorest/powershell": "3.x" + directive: - where: variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$ diff --git a/src/CostManagement/CostManagement.Autorest/build-module.ps1 b/src/CostManagement/CostManagement.Autorest/build-module.ps1 index 56a0bc10cda8..3f6451351f30 100644 --- a/src/CostManagement/CostManagement.Autorest/build-module.ps1 +++ b/src/CostManagement/CostManagement.Autorest/build-module.ps1 @@ -123,6 +123,10 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' $modelCmdlets = @() +$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets' +if (Test-Path $modelCmdletFolder) { + $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder +} if ($modelCmdlets.Count -gt 0) { . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') CreateModelCmdlet($modelCmdlets) @@ -139,7 +143,8 @@ if($NoDocs) { $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue } $null = New-Item -ItemType Directory -Force -Path $docsFolder - Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo } Write-Host -ForegroundColor Green 'Creating format.ps1xml...' @@ -158,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol Write-Host -ForegroundColor Green 'Creating example stubs...' Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder +if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) +{ + Write-Host -ForegroundColor Green 'Creating ux metadata...' + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') +} + Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/CostManagement/CostManagement.Autorest/create-model-cmdlets.ps1 b/src/CostManagement/CostManagement.Autorest/create-model-cmdlets.ps1 index a818e944512f..30849289d1be 100644 --- a/src/CostManagement/CostManagement.Autorest/create-model-cmdlets.ps1 +++ b/src/CostManagement/CostManagement.Autorest/create-model-cmdlets.ps1 @@ -23,9 +23,13 @@ function CreateModelCmdlet { } $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' - $ModuleName = 'CostManagement' $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' $null = New-Item -ItemType Directory -Force -Path $OutputDir + if (''.length -gt 0) { + $ModuleName = '' + } else { + $ModuleName = 'Az.CostManagement' + } $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs $Content = '' @@ -64,10 +68,10 @@ function CreateModelCmdlet { $ObjectType = $Model $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" # remove duplicated module name - if ($ObjectType.StartsWith($ModuleName)) { + if ($ObjectType.StartsWith('CostManagement')) { $ModulePrefix = '' } else { - $ModulePrefix = $ModuleName + $ModulePrefix = 'CostManagement' } $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir @@ -158,7 +162,7 @@ Create an in-memory object for ${ObjectType}. .Outputs ${ObjectTypeWithNamespace} .Link -https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object +https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object #> function New-Az${ModulePrefix}${ObjectType}Object { [OutputType('${ObjectTypeWithNamespace}')] diff --git a/src/CostManagement/CostManagement.Autorest/custom/Invoke-AzCostManagementQuery.ps1 b/src/CostManagement/CostManagement.Autorest/custom/Invoke-AzCostManagementQuery.ps1 index fd6de5aed020..db4ed600a2c0 100644 --- a/src/CostManagement/CostManagement.Autorest/custom/Invoke-AzCostManagementQuery.ps1 +++ b/src/CostManagement/CostManagement.Autorest/custom/Invoke-AzCostManagementQuery.ps1 @@ -265,11 +265,7 @@ function Invoke-AzCostManagementUsageQueryInternal { foreach ($Row in $ResponseContent.Properties.Rows) { $QueryRow = New-Object System.Collections.Generic.List[string] foreach ($Item in $Row) { - if ($null -eq $Item) { - $QueryRow.Add($Item) - } else { - $QueryRow.Add($Item.ToString()) - } + $QueryRow.Add($Item.ToString()) } $RowList.Add($QueryRow) } diff --git a/src/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExport.ps1 b/src/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExport.ps1 index f7ce056c5373..f3622d3de60f 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExport.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExport.ps1 @@ -84,7 +84,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -136,7 +137,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -159,6 +160,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExportExecutionHistory.ps1 b/src/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExportExecutionHistory.ps1 index 0b08621b706c..d9d17ec4f625 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExportExecutionHistory.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/Get-AzCostManagementExportExecutionHistory.ps1 @@ -76,7 +76,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -128,7 +129,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -150,6 +151,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementExecuteExport.ps1 b/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementExecuteExport.ps1 index 572eee0b4222..ad54da1f58a7 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementExecuteExport.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementExecuteExport.ps1 @@ -76,7 +76,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -134,7 +135,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -156,6 +157,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementQuery.ps1 b/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementQuery.ps1 index 94ae0989b65a..e99f3be82874 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementQuery.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementQuery.ps1 @@ -188,7 +188,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -210,6 +210,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementReservationDetailReport.ps1 b/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementReservationDetailReport.ps1 index 407a97f92274..9d2262eab524 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementReservationDetailReport.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/Invoke-AzCostManagementReservationDetailReport.ps1 @@ -18,11 +18,11 @@ .Synopsis Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. -For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role +For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role .Description Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. -For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role +For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role .Example Invoke-AzCostManagementReservationDetailReport -BillingAccountId "00000000-0000-0000-0000-0000000000" -StartDate "2022-10-01" -EndDate "2022-10-20" @@ -64,7 +64,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -128,7 +129,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -150,6 +151,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementDetailReport.ps1 b/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementDetailReport.ps1 index 497c14eb9b07..2c05e55a83f9 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementDetailReport.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementDetailReport.ps1 @@ -99,7 +99,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -163,7 +164,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -184,6 +185,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementExport.ps1 b/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementExport.ps1 index e51cfbcb6c19..b61cdc1254d3 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementExport.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementExport.ps1 @@ -204,7 +204,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -225,6 +225,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryComparisonExpressionObject.ps1 b/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryComparisonExpressionObject.ps1 index 20b956a687a8..8300d637a0c4 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryComparisonExpressionObject.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryComparisonExpressionObject.ps1 @@ -59,7 +59,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -80,6 +80,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryFilterObject.ps1 b/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryFilterObject.ps1 index 5b2e268048e3..96435712eab3 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryFilterObject.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/New-AzCostManagementQueryFilterObject.ps1 @@ -119,7 +119,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -140,6 +140,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/CostManagement/CostManagement.Autorest/exports/ProxyCmdletDefinitions.ps1 index 835b5acf65a2..ae89920ce601 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -76,7 +76,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -128,7 +129,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -150,6 +151,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -264,7 +269,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -316,7 +322,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -339,6 +345,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -445,7 +455,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -503,7 +514,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -525,6 +536,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -573,11 +588,11 @@ end { .Synopsis Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. -For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role +For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role .Description Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. -For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role +For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role .Example Invoke-AzCostManagementReservationDetailReport -BillingAccountId "00000000-0000-0000-0000-0000000000" -StartDate "2022-10-01" -EndDate "2022-10-20" @@ -619,7 +634,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -683,7 +699,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -705,6 +721,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -834,7 +854,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -898,7 +919,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -919,6 +940,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1026,7 +1051,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -1084,7 +1110,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -1106,6 +1132,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1324,7 +1354,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -1346,6 +1376,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1580,7 +1614,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -1601,6 +1635,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1690,7 +1728,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -1711,6 +1749,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -1860,7 +1902,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -1881,6 +1923,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) @@ -2150,7 +2196,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -2172,6 +2218,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/exports/Remove-AzCostManagementExport.ps1 b/src/CostManagement/CostManagement.Autorest/exports/Remove-AzCostManagementExport.ps1 index a1582e77e1cd..b82d9c0343b2 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/Remove-AzCostManagementExport.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/Remove-AzCostManagementExport.ps1 @@ -77,7 +77,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -135,7 +136,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -157,6 +158,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/exports/Update-AzCostManagementExport.ps1 b/src/CostManagement/CostManagement.Autorest/exports/Update-AzCostManagementExport.ps1 index a8e5a188191e..d3b3a9a7d52c 100644 --- a/src/CostManagement/CostManagement.Autorest/exports/Update-AzCostManagementExport.ps1 +++ b/src/CostManagement/CostManagement.Autorest/exports/Update-AzCostManagementExport.ps1 @@ -239,7 +239,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -261,6 +261,10 @@ begin { } $cmdInfo = Get-Command -Name $mapping[$parameterSet] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) diff --git a/src/CostManagement/CostManagement.Autorest/generate-help.ps1 b/src/CostManagement/CostManagement.Autorest/generate-help.ps1 index 2bcd28be80a5..bb41231f57fc 100644 --- a/src/CostManagement/CostManagement.Autorest/generate-help.ps1 +++ b/src/CostManagement/CostManagement.Autorest/generate-help.ps1 @@ -66,8 +66,8 @@ foreach($directory in $directories) $docsPath = Join-Path $docsFolder $directory.Name $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue $examplesPath = Join-Path $examplesFolder $directory.Name - - Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo Write-Host -ForegroundColor Green "Created documentation in '$docsPath'" } diff --git a/src/CostManagement/CostManagement.Autorest/generate-portal-ux.ps1 b/src/CostManagement/CostManagement.Autorest/generate-portal-ux.ps1 new file mode 100644 index 000000000000..aaf065d34db9 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/generate-portal-ux.ps1 @@ -0,0 +1,375 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# +# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. +# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$moduleName = 'Az.CostManagement' +$rootModuleName = '' +if ($rootModuleName -eq "") +{ + $rootModuleName = $moduleName +} +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1") +$modulePath = $modulePsd1.FullName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll") +$instance = [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName +$parameterSetsInfo = Get-Module -Name "$moduleName.private" + +$buildinFunctions = @("Export-CmdletSurface", "Export-ExampleStub", "Export-FormatPs1xml", "Export-HelpMarkdown", "Export-ModelSurface", "Export-ProxyCmdlet", "Export-Psd1", "Export-TestStub", "Get-CommonParameter", "Get-ModuleGuid", "Get-ScriptCmdlet") + +function Test-FunctionSupported() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + If ($buildinfunctions.Contains($FunctionName)) { + return $false + } + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity")) { + return $false + } + If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { + return $false + } + + $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName] + foreach ($parameterInfo in $parameterSetInfo.Parameters.Values) + { + $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories + $invalideCategory = @('Query', 'Body') + if ($invalideCategory -contains $category) + { + return $false + } + } + + $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" + if ($customFiles.Length -ne 0) + { + return $false + } + + return $true +} + +function Get-MappedCmdletFromFunctionName() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + + return $cmdletName +} + +function Get-ParameterAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo, + [Parameter()] + [String] + $AttributeName + ) + return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $CmdletInfo, + [Parameter()] + [String] + $AttributeName + ) + + return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletDescription() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [String] + $CmdletName + ) + $helpInfo = Get-Help $CmdletName -Full + + $description = $helpInfo.Description.Text + if ($null -eq $description) + { + return "" + } + return $description +} + +# Test whether the parameter is from swagger http path +function Test-ParameterFromSwagger() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo + ) + $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories + $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute" + if ($null -ne $doNotExport) + { + return $false + } + + $valideCategory = @('Path') + if ($valideCategory -contains $category) + { + return $true + } + return $false +} + +function New-ExampleForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories + $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName + $name = $parameter.Name + $result += [ordered]@{ + name = "-$Name" + value = "[$category.$sourceName]" + } + } + + return $result +} + +function New-ParameterArrayInParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory + $parameterName = $parameter.Name + $parameterType = $parameter.ParameterType.ToString().Split('.')[1] + if ($parameter.SwitchParameter) + { + $parameterSignature = "-$parameterName" + } + else + { + $parameterSignature = "-$parameterName <$parameterType>" + } + if ($parameterName -eq "SubscriptionId") + { + $isMandatory = $false + } + if (-not $isMandatory) + { + $parameterSignature = "[$parameterSignature]" + } + $result += $parameterSignature + } + + return $result +} + +function New-MetadataForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute" + $httpPath = $httpAttribute.Path + $apiVersion = $httpAttribute.ApiVersion + $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value + $resourcePath = "/" + $httpPath.Split("$provider/")[1] + $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/" + $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name + $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description + [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo + [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo + + return @{ + Path = $httpPath + Provider = $provider + ResourceType = $resourceType + ApiVersion = $apiVersion + CmdletName = $cmdletName + Description = $description + Example = $example + Signature = @{ + parameters = $signature + } + } +} + +function Merge-WithExistCmdletMetadata() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Collections.Specialized.OrderedDictionary] + $ExistedCmdletInfo, + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature + $ExistedCmdletInfo.examples += [ordered]@{ + description = $ParameterSetMetadata.Description + parameters = $ParameterSetMetadata.Example + } + + return $ExistedCmdletInfo +} + +function New-MetadataForCmdlet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $cmdletName = $ParameterSetMetadata.CmdletName + $description = Get-CmdletDescription $cmdletName + $result = [ordered]@{ + name = $cmdletName + description = $description + path = $ParameterSetMetadata.Path + help = [ordered]@{ + learnMore = [ordered]@{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower() + } + parameterSets = @() + } + examples = @() + } + $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata + return $result +} + +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-functionSupported($_) } +$resourceTypes = @{} +foreach ($parameterSetName in $parameterSets) +{ + $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName] + $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo + $cmdletName = $parameterSetMetadata.CmdletName + if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName))) + { + continue + } + if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType)) + { + $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName } + if ($ExistedCmdletInfo) + { + $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo + } + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{ + resourceType = $parameterSetMetadata.ResourceType + apiVersion = $parameterSetMetadata.ApiVersion + learnMore = @{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower() + } + commands = @($cmdletInfo) + provider = $parameterSetMetadata.Provider + } + } +} + +$UXFolder = 'UX' +if (Test-Path $UXFolder) +{ + Remove-Item -Path $UXFolder -Recurse +} +$null = New-Item -ItemType Directory -Path $UXFolder + +foreach ($resourceType in $resourceTypes.Keys) +{ + $resourceTypeFileName = $resourceType -replace "/", "-" + if ($resourceTypeFileName -eq "") + { + continue + } + $resourceTypeInfo = $resourceTypes[$resourceType] + $provider = $resourceTypeInfo.provider + $providerFolder = "$UXFolder/$provider" + if (-not (Test-Path $providerFolder)) + { + $null = New-Item -ItemType Directory -Path $providerFolder + } + $resourceTypeInfo.Remove("provider") + $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" +} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/Module.cs b/src/CostManagement/CostManagement.Autorest/generated/Module.cs index 81df0627d7be..b0ed5665a14d 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/Module.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/Module.cs @@ -17,6 +17,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement 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 @@ -51,6 +53,9 @@ public partial class Module /// The delegate to get the telemetry Id. public GetTelemetryIdDelegate GetTelemetryId { get; set; } + /// The delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } + /// Backing field for property. private static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module _instance; @@ -72,6 +77,9 @@ public partial class Module /// The ResourceID for this module (azure arm). public string ResourceId => @"Az.CostManagement"; + /// 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; } diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/CostManagement.cs b/src/CostManagement/CostManagement.Autorest/generated/api/CostManagement.cs index bcf14da034cb..5f846761a99d 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/api/CostManagement.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/api/CostManagement.cs @@ -3202,7 +3202,7 @@ public partial class CostManagement /// /// Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation - /// usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role + /// usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role /// /// Enrollment ID (Legacy BillingAccount ID) /// Start Date @@ -3249,7 +3249,7 @@ public partial class CostManagement /// /// Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation - /// usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role + /// usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role /// /// /// Start Date @@ -3475,7 +3475,7 @@ public partial class CostManagement /// /// Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage - /// details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access + /// details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access /// /// BillingAccount ID /// BillingProfile ID @@ -3525,7 +3525,7 @@ public partial class CostManagement /// /// Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage - /// details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access + /// details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access /// /// /// Start Date diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.PowerShell.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.PowerShell.cs index dfe7db546fdc..f376cfafd600 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.PowerShell.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.PowerShell.cs @@ -12,12 +12,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001 /// the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This /// requires a one-time registration of the account's subscription with the Microsoft.CostManagementExports resource provider /// in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration - /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services + /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services /// ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who /// are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, /// can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage /// account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types - /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key + /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key /// ). ///
  • [System.ComponentModel.TypeConverter(typeof(ExportDeliveryDestinationTypeConverter))] @@ -184,12 +184,12 @@ internal ExportDeliveryDestination(global::System.Management.Automation.PSObject /// the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This /// requires a one-time registration of the account's subscription with the Microsoft.CostManagementExports resource provider /// in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration - /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services + /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services /// ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who /// are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, /// can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage /// account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types - /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key + /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key /// ). [System.ComponentModel.TypeConverter(typeof(ExportDeliveryDestinationTypeConverter))] public partial interface IExportDeliveryDestination diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.cs index 7a6d54582ac3..5537ebc34a75 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.cs @@ -12,12 +12,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001 /// the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This /// requires a one-time registration of the account's subscription with the Microsoft.CostManagementExports resource provider /// in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration - /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services + /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services /// ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who /// are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, /// can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage /// account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types - /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key + /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key /// ). /// public partial class ExportDeliveryDestination : @@ -83,12 +83,12 @@ public ExportDeliveryDestination() /// the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This /// requires a one-time registration of the account's subscription with the Microsoft.CostManagementExports resource provider /// in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration - /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services + /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services /// ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who /// are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, /// can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage /// account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types - /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key + /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key /// ). public partial interface IExportDeliveryDestination : Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IJsonSerializable @@ -152,12 +152,12 @@ public partial interface IExportDeliveryDestination : /// the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This /// requires a one-time registration of the account's subscription with the Microsoft.CostManagementExports resource provider /// in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration - /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services + /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services /// ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who /// are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, /// can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage /// account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types - /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key + /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key /// ). public partial interface IExportDeliveryDestinationInternal diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.json.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.json.cs index 5ecd66ff15d1..79f016253dd9 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.json.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/api/Models/Api20211001/ExportDeliveryDestination.json.cs @@ -12,12 +12,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001 /// the destination. The approach recommended for most customers is to specify the resourceId of the storage account. This /// requires a one-time registration of the account's subscription with the Microsoft.CostManagementExports resource provider /// in order to give Cost Management services access to the storage. When creating an export in the Azure portal this registration - /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services + /// is performed automatically but API users may need to register the subscription explicitly (for more information see https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-supported-services /// ). Another way to configure the destination is available ONLY to Partners with a Microsoft Partner Agreement plan who /// are global admins of their billing account. These Partners, instead of specifying the resourceId of a storage account, /// can specify the storage account name along with a SAS token for the account. This allows exports of costs to a storage /// account in any tenant. The SAS token should be created for the blob service with Service/Container/Object resource types - /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key + /// and with Read/Write/Delete/List/Add/Create permissions (for more information see https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key /// ). /// public partial class ExportDeliveryDestination diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.PowerShell.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.PowerShell.cs deleted file mode 100644 index 9cb2a3d62856..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.PowerShell.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PowerShell; - - [System.ComponentModel.TypeConverter(typeof(GenerateCostDetailsReportCreateOperationAcceptedResponseHeadersTypeConverter))] - public partial class GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders(content); - } - - /// - /// Creates a new instance of , deserializing - /// the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - [System.ComponentModel.TypeConverter(typeof(GenerateCostDetailsReportCreateOperationAcceptedResponseHeadersTypeConverter))] - public partial interface IGenerateCostDetailsReportCreateOperationAcceptedResponseHeaders - - { - - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.TypeConverter.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.TypeConverter.cs deleted file mode 100644 index 274b06dc0731..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.TypeConverter.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class GenerateCostDetailsReportCreateOperationAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null if there - /// is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null if there - /// is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeaders).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.cs deleted file mode 100644 index fa11ed3c2747..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Extensions; - - public partial class GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders : - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeaders, - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal, - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IHeaderSerializable - { - - /// Backing field for property. - private string _location; - - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Origin(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PropertyOrigin.Owned)] - public string Location { get => this._location; set => this._location = value; } - - /// Backing field for property. - private int? _retryAfter; - - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Origin(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PropertyOrigin.Owned)] - public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } - - /// - /// Creates an new instance. - /// - public GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders() - { - - } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("Location", out var __locationHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; - } - if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); - } - } - } - public partial interface IGenerateCostDetailsReportCreateOperationAcceptedResponseHeaders - - { - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Retry-After", - PossibleTypes = new [] { typeof(int) })] - int? RetryAfter { get; set; } - - } - public partial interface IGenerateCostDetailsReportCreateOperationAcceptedResponseHeadersInternal - - { - string Location { get; set; } - - int? RetryAfter { get; set; } - - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.json.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.json.cs deleted file mode 100644 index c9872679657e..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders.json.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Extensions; - - public partial class GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeaders. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeaders. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateCostDetailsReportCreateOperationAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json ? new GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from. - internal GenerateCostDetailsReportCreateOperationAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - AfterFromJson(json); - } - - /// - /// Serializes this instance of into a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a . - /// - public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.PowerShell.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.PowerShell.cs deleted file mode 100644 index 95bb3839905e..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.PowerShell.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PowerShell; - - [System.ComponentModel.TypeConverter(typeof(GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersTypeConverter))] - public partial class GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders(content); - } - - /// - /// Creates a new instance of , deserializing - /// the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - [System.ComponentModel.TypeConverter(typeof(GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersTypeConverter))] - public partial interface IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders - - { - - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.TypeConverter.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.TypeConverter.cs deleted file mode 100644 index 6a91070a6ca7..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.TypeConverter.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null - /// if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null - /// if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.cs deleted file mode 100644 index 19e8a1f16965..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Extensions; - - public partial class GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders : - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders, - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal, - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IHeaderSerializable - { - - /// Backing field for property. - private string _location; - - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Origin(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PropertyOrigin.Owned)] - public string Location { get => this._location; set => this._location = value; } - - /// Backing field for property. - private int? _retryAfter; - - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Origin(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PropertyOrigin.Owned)] - public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } - - /// - /// Creates an new instance. - /// - public GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders() - { - - } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("Location", out var __locationHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; - } - if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); - } - } - } - public partial interface IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders - - { - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Retry-After", - PossibleTypes = new [] { typeof(int) })] - int? RetryAfter { get; set; } - - } - public partial interface IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeadersInternal - - { - string Location { get; set; } - - int? RetryAfter { get; set; } - - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.json.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.json.cs deleted file mode 100644 index 86638389083c..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders.json.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Extensions; - - public partial class GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json ? new GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from. - internal GenerateReservationDetailsReportByBillingAccountIdAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - AfterFromJson(json); - } - - /// - /// Serializes this instance of into - /// a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a - /// . - /// - public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.PowerShell.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.PowerShell.cs deleted file mode 100644 index b68e5d33750d..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.PowerShell.cs +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PowerShell; - - [System.ComponentModel.TypeConverter(typeof(GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersTypeConverter))] - public partial class GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders - { - - /// - /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the - /// object before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Collections.IDictionary content that should be used. - - partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); - - /// - /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The global::System.Management.Automation.PSObject content that should be used. - - partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); - - /// - /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Collections.IDictionary content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); - - /// - /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization - /// of the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders(content); - } - - /// - /// Deserializes a into an instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - /// - /// an instance of . - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders(content); - } - - /// - /// Creates a new instance of , deserializing - /// the content from a json string. - /// - /// a string containing a JSON serialized instance of this model. - /// - /// an instance of the model class. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode.Parse(jsonText)); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("RetryAfter")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - AfterDeserializePSObject(content); - } - - /// Serializes this instance to a json string. - - /// a containing this model serialized to JSON text. - public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.SerializationMode.IncludeAll)?.ToString(); - } - [System.ComponentModel.TypeConverter(typeof(GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersTypeConverter))] - public partial interface IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders - - { - - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.TypeConverter.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.TypeConverter.cs deleted file mode 100644 index dd51b61996fd..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.TypeConverter.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PowerShell; - - /// - /// A PowerShell PSTypeConverter to support converting to an instance of - /// - public partial class GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter - { - - /// - /// Determines if the converter can convert the parameter to the parameter. - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false. - /// - public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); - - /// - /// Determines if the converter can convert the parameter to the - /// type. - /// - /// the instance to check if it can be converted to the type. - /// - /// true if the instance could be converted to a type, otherwise false - /// - public static bool CanConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return true; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - // we say yest to PSObjects - return true; - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - // we say yest to Hashtables/dictionaries - return true; - } - try - { - if (null != sourceValue.ToJsonString()) - { - return true; - } - } - catch - { - // Not one of our objects - } - try - { - string text = sourceValue.ToString()?.Trim(); - return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonType.Object; - } - catch - { - // Doesn't look like it can be treated as JSON - } - return false; - } - - /// - /// Determines if the parameter can be converted to the - /// parameter - /// - /// the to convert from - /// the to convert to - /// - /// true if the converter can convert the parameter to the parameter, otherwise false - /// - public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; - - /// - /// Converts the parameter to the parameter using and - /// - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// - /// an instance of , or null - /// if there is no suitable conversion. - /// - public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); - - /// - /// Converts the parameter into an instance of - /// - /// the value to convert into an instance of . - /// - /// an instance of , or null - /// if there is no suitable conversion. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) - { - if (null == sourceValue) - { - return null; - } - global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders).IsAssignableFrom(type)) - { - return sourceValue; - } - try - { - return GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; - } - catch - { - // Unable to use JSON pattern - } - if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) - { - return GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); - } - if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) - { - return GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); - } - return null; - } - - /// NotImplemented -- this will return null - /// the to convert from - /// the to convert to - /// not used by this TypeConverter. - /// when set to true, will ignore the case when converting. - /// will always return null. - public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.cs deleted file mode 100644 index 8b789e941408..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Extensions; - - public partial class GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders : - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders, - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal, - Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IHeaderSerializable - { - - /// Backing field for property. - private string _location; - - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Origin(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PropertyOrigin.Owned)] - public string Location { get => this._location; set => this._location = value; } - - /// Backing field for property. - private int? _retryAfter; - - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Origin(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.PropertyOrigin.Owned)] - public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } - - /// - /// Creates an new instance. - /// - public GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders() - { - - } - - /// - void Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) - { - if (headers.TryGetValues("Location", out var __locationHeader0)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; - } - if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) - { - ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); - } - } - } - public partial interface IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders - - { - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"Retry-After", - PossibleTypes = new [] { typeof(int) })] - int? RetryAfter { get; set; } - - } - public partial interface IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeadersInternal - - { - string Location { get; set; } - - int? RetryAfter { get; set; } - - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.json.cs b/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.json.cs deleted file mode 100644 index 778475120dcb..000000000000 --- a/src/CostManagement/CostManagement.Autorest/generated/api/Models/GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders.json.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models -{ - using static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Extensions; - - public partial class GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders - { - - /// - /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object - /// before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JsonNode that should be deserialized into this object. - - partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json); - - /// - /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior - /// - /// The JSON container that the serialization result will be placed in. - - partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container); - - /// - /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of - /// the object before it is deserialized. - /// If you wish to disable the default deserialization entirely, return true in the - /// output parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JsonNode that should be deserialized into this object. - /// Determines if the rest of the deserialization should be processed, or if the method should return - /// instantly. - - partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json, ref bool returnNow); - - /// - /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the - /// object before it is serialized. - /// If you wish to disable the default serialization entirely, return true in the output - /// parameter. - /// Implement this method in a partial class to enable this behavior. - /// - /// The JSON container that the serialization result will be placed in. - /// Determines if the rest of the serialization should be processed, or if the method should return - /// instantly. - - partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container, ref bool returnNow); - - /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.IGenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json ? new GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders(json) : null; - } - - /// - /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject into a new instance of . - /// - /// A Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject instance to deserialize from. - internal GenerateReservationDetailsReportByBillingProfileIdAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject json) - { - bool returnNow = false; - BeforeFromJson(json, ref returnNow); - if (returnNow) - { - return; - } - AfterFromJson(json); - } - - /// - /// Serializes this instance of into - /// a . - /// - /// The container to serialize this object into. If the caller - /// passes in null, a new instance will be created and returned to the caller. - /// Allows the caller to choose the depth of the serialization. See . - /// - /// a serialized instance of as a - /// . - /// - public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.SerializationMode serializationMode) - { - container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.Json.JsonObject(); - - bool returnNow = false; - BeforeToJson(ref container, ref returnNow); - if (returnNow) - { - return container; - } - AfterToJson(ref container); - return container; - } - } -} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExportExecutionHistory_Get.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExportExecutionHistory_Get.cs index 133a138f37b7..d5bcaf70c525 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExportExecutionHistory_Get.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExportExecutionHistory_Get.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExportExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to get the execution history of an export for the defined scope and export name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory", ApiVersion = "2021-10-01")] public partial class GetAzCostManagementExportExecutionHistory_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -44,9 +45,10 @@ public partial class GetAzCostManagementExportExecutionHistory_Get : global::Sys public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -172,7 +174,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -318,6 +337,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExportExecutionHistory_GetViaIdentity.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExportExecutionHistory_GetViaIdentity.cs index aa9dbb7869ab..f7aa4162ebfe 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExportExecutionHistory_GetViaIdentity.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExportExecutionHistory_GetViaIdentity.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExportExecution))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to get the execution history of an export for the defined scope and export name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/runHistory", ApiVersion = "2021-10-01")] public partial class GetAzCostManagementExportExecutionHistory_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -44,9 +45,10 @@ public partial class GetAzCostManagementExportExecutionHistory_GetViaIdentity : public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -149,7 +151,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -311,6 +330,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_Get.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_Get.cs index 4318f56bddb8..3997d6ebe328 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_Get.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_Get.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to get the export for the defined scope by export name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}", ApiVersion = "2021-10-01")] public partial class GetAzCostManagementExport_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzCostManagementExport_Get : global::System.Management.A public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -188,7 +190,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -334,6 +353,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_GetViaIdentity.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_GetViaIdentity.cs index 58e53ddbb0c7..48e882fedbcf 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_GetViaIdentity.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_GetViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to get the export for the defined scope by export name.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}", ApiVersion = "2021-10-01")] public partial class GetAzCostManagementExport_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzCostManagementExport_GetViaIdentity : global::System.M public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -164,7 +166,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -326,6 +345,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_List.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_List.cs index 29c4e6006c5e..b250a31dd38f 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_List.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementExport_List.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to list all exports at the given scope.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports", ApiVersion = "2021-10-01")] public partial class GetAzCostManagementExport_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class GetAzCostManagementExport_List : global::System.Management. public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -173,7 +175,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -319,6 +338,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementOperation_List.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementOperation_List.cs index 7ef88b19c081..7cceceeafa5f 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementOperation_List.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/GetAzCostManagementOperation_List.cs @@ -17,6 +17,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IOperation))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"Lists all of the available cost management REST API operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/providers/Microsoft.CostManagement/operations", ApiVersion = "2021-10-01")] public partial class GetAzCostManagementOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -49,9 +50,10 @@ public partial class GetAzCostManagementOperation_List : global::System.Manageme public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -146,7 +148,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -292,6 +311,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementExecuteExport_Execute.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementExecuteExport_Execute.cs index a0d29e515a44..ab53187f17d9 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementExecuteExport_Execute.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementExecuteExport_Execute.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to execute an export.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run", ApiVersion = "2021-10-01")] public partial class InvokeAzCostManagementExecuteExport_Execute : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class InvokeAzCostManagementExecuteExport_Execute : global::Syste public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -175,7 +177,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -324,6 +343,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementExecuteExport_ExecuteViaIdentity.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementExecuteExport_ExecuteViaIdentity.cs index c57c4fb7c61e..dd74bdafe565 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementExecuteExport_ExecuteViaIdentity.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementExecuteExport_ExecuteViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to execute an export.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}/run", ApiVersion = "2021-10-01")] public partial class InvokeAzCostManagementExecuteExport_ExecuteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class InvokeAzCostManagementExecuteExport_ExecuteViaIdentity : gl public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -152,7 +154,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -317,6 +336,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementReservationDetailReport_By.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementReservationDetailReport_By.cs index ce104a79f3d1..045fc99389d1 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementReservationDetailReport_By.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementReservationDetailReport_By.cs @@ -10,15 +10,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets /// /// Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation - /// usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role + /// usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role /// /// /// [OpenAPI] ByBillingAccountId=>POST:"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzCostManagementReservationDetailReport_By", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IOperationStatus))] - [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role")] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateReservationDetailsReport", ApiVersion = "2021-10-01")] public partial class InvokeAzCostManagementReservationDetailReport_By : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -64,9 +65,10 @@ public partial class InvokeAzCostManagementReservationDetailReport_By : global:: public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -220,7 +222,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets.InvokeAzCostMan /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -399,6 +418,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementReservationDetailReport_By1.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementReservationDetailReport_By1.cs index 6250430bf8b9..40101e7d76b6 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementReservationDetailReport_By1.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/InvokeAzCostManagementReservationDetailReport_By1.cs @@ -10,15 +10,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets /// /// Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage - /// details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access + /// details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access /// /// /// [OpenAPI] ByBillingProfileId=>POST:"/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzCostManagementReservationDetailReport_By1", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IOperationStatus))] - [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access")] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport", ApiVersion = "2021-10-01")] public partial class InvokeAzCostManagementReservationDetailReport_By1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -78,9 +79,10 @@ public partial class InvokeAzCostManagementReservationDetailReport_By1 : global: public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -235,7 +237,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets.InvokeAzCostMan /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } } /// @@ -414,6 +433,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/NewAzCostManagementDetailReport_CreateExpanded.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/NewAzCostManagementDetailReport_CreateExpanded.cs index 1e34cb10c91d..fdad0f1e7572 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/NewAzCostManagementDetailReport_CreateExpanded.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/NewAzCostManagementDetailReport_CreateExpanded.cs @@ -25,6 +25,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.ICostDetailsOperationResults))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"This API is the replacement for all previously release Usage Details APIs. Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope. The initial call to request a report will return a 202 with a 'Location' and 'Retry-After' header. The 'Location' header will provide the endpoint to poll to get the result of the report generation. The 'Retry-After' provides the duration to wait before polling for the generated report. A call to poll the report operation will provide a 202 response with a 'Location' header if the operation is still in progress. Once the report generation operation completes, the polling endpoint will provide a 200 response along with details on the report blob(s) that are available for download. The details on the file(s) available for download will be available in the polling response body.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport", ApiVersion = "2022-05-01")] public partial class NewAzCostManagementDetailReport_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -74,9 +75,10 @@ public partial class NewAzCostManagementDetailReport_CreateExpanded : global::Sy public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -274,7 +276,24 @@ public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets.NewAzCostManage /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -453,6 +472,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/NewAzCostManagementExport_CreateExpanded.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/NewAzCostManagementExport_CreateExpanded.cs index cb6c99ee3fba..c220e5c8f06e 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/NewAzCostManagementExport_CreateExpanded.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/NewAzCostManagementExport_CreateExpanded.cs @@ -20,6 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to create or update an export. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given export, perform a get operation prior to your put operation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}", ApiVersion = "2021-10-01")] public partial class NewAzCostManagementExport_CreateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -76,9 +77,10 @@ public partial class NewAzCostManagementExport_CreateExpanded : global::System.M public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType DataSetGranularity { get => _parametersBody.DataSetGranularity ?? ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType)""); set => _parametersBody.DataSetGranularity = value; } /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -424,7 +426,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -573,6 +592,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport diff --git a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/RemoveAzCostManagementExport_Delete.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/RemoveAzCostManagementExport_Delete.cs index da9e1c2e5924..8672e48e57aa 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/RemoveAzCostManagementExport_Delete.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/RemoveAzCostManagementExport_Delete.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to delete a export.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}", ApiVersion = "2021-10-01")] public partial class RemoveAzCostManagementExport_Delete : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class RemoveAzCostManagementExport_Delete : global::System.Manage public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -176,7 +178,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -325,6 +344,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/RemoveAzCostManagementExport_DeleteViaIdentity.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/RemoveAzCostManagementExport_DeleteViaIdentity.cs index aec83b6cae38..a8c445e6983d 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/RemoveAzCostManagementExport_DeleteViaIdentity.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/RemoveAzCostManagementExport_DeleteViaIdentity.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to delete a export.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}", ApiVersion = "2021-10-01")] public partial class RemoveAzCostManagementExport_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -42,9 +43,10 @@ public partial class RemoveAzCostManagementExport_DeleteViaIdentity : global::Sy public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.CostManagement Client => Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -152,7 +154,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -317,6 +336,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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/CostManagement/CostManagement.Autorest/generated/cmdlets/UpdateAzCostManagementExport_UpdateExpanded.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/UpdateAzCostManagementExport_UpdateExpanded.cs index 3cd570837407..19badd1c8fbc 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/UpdateAzCostManagementExport_UpdateExpanded.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/UpdateAzCostManagementExport_UpdateExpanded.cs @@ -20,6 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to create or update an export. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given export, perform a get operation prior to your put operation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}", ApiVersion = "2021-10-01")] public partial class UpdateAzCostManagementExport_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -76,9 +77,10 @@ public partial class UpdateAzCostManagementExport_UpdateExpanded : global::Syste public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType DataSetGranularity { get => _parametersBody.DataSetGranularity ?? ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType)""); set => _parametersBody.DataSetGranularity = value; } /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -424,7 +426,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -573,6 +592,21 @@ public UpdateAzCostManagementExport_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport diff --git a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/UpdateAzCostManagementExport_UpdateViaIdentityExpanded.cs b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/UpdateAzCostManagementExport_UpdateViaIdentityExpanded.cs index e0ddee83b9ab..59ed20423dc3 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/cmdlets/UpdateAzCostManagementExport_UpdateViaIdentityExpanded.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/cmdlets/UpdateAzCostManagementExport_UpdateViaIdentityExpanded.cs @@ -20,6 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport))] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Description(@"The operation to create or update an export. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given export, perform a get operation prior to your put operation.")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.HttpPath(Path = "/{scope}/providers/Microsoft.CostManagement/exports/{exportName}", ApiVersion = "2021-10-01")] public partial class UpdateAzCostManagementExport_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.IEventListener { @@ -76,9 +77,10 @@ public partial class UpdateAzCostManagementExport_UpdateViaIdentityExpanded : gl public Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType DataSetGranularity { get => _parametersBody.DataSetGranularity ?? ((Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType)""); set => _parametersBody.DataSetGranularity = value; } /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The credentials, account, tenant, and subscription used for communication with Azure.")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] [global::System.Management.Automation.ValidateNotNull] [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] [global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category(global::Microsoft.Azure.PowerShell.Cmdlets.CostManagement.ParameterCategory.Azure)] @@ -400,7 +402,24 @@ protected override void BeginProcessing() /// Performs clean-up after the command execution protected override void EndProcessing() { - + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} 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. @@ -565,6 +584,21 @@ public UpdateAzCostManagementExport_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// a delegate that is called when the remote service returns 201 (Created). /// the raw response message as an global::System.Net.Http.HttpResponseMessage. /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport diff --git a/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs b/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs index 63941ac08f03..397c8eaaaae6 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs @@ -33,6 +33,9 @@ public class ExportHelpMarkdown : PSCmdlet [ValidateNotNullOrEmpty] public string ExamplesFolder { get; set; } + [Parameter()] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -41,7 +44,7 @@ protected override void ProcessRecord() var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast() .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi)) .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty)); - WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder); + WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder, AddComplexInterfaceInfo.IsPresent); } catch (Exception ee) { diff --git a/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index a454a1120d2e..bf2a4d0d9be9 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -52,6 +52,9 @@ public class ExportProxyCmdlet : PSCmdlet [Parameter(Mandatory = true, ParameterSetName = "NoDocs")] public SwitchParameter ExcludeDocs { get; set; } + [Parameter(ParameterSetName = "Docs")] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + protected override void ProcessRecord() { try @@ -163,7 +166,7 @@ protected override void ProcessRecord() var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles; var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder; var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder; - WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder); + WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder, AddComplexInterfaceInfo.IsPresent); } } } diff --git a/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index 372a1059d6db..69f3c8adadc1 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.PowerShell { internal static class MarkdownRenderer { - public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder) + public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder, bool AddComplexInterfaceInfo = true) { Directory.CreateDirectory(docsFolder); var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray(); @@ -69,18 +69,26 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod } sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}"); - sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); - foreach (var alias in markdownInfo.Aliases) + if (markdownInfo.Aliases.Any()) { - sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); } - if (markdownInfo.ComplexInterfaceInfos.Any()) + foreach (var alias in markdownInfo.Aliases) { - sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); } - foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + + if (AddComplexInterfaceInfo) { - sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + if (markdownInfo.ComplexInterfaceInfos.Any()) + { + sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + } + foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + { + sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + } + } sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); diff --git a/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 70f99d5182fd..1d41c06cb0db 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -191,15 +191,22 @@ public BeginOutput(VariantGroup variantGroup) : base(variantGroup) public string GetProcessCustomAttributesAtRuntime() { - return VariantGroup.IsInternal ? "" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; + return VariantGroup.IsInternal ? "" : IsAzure ? $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) +{Indent}{Indent}}}" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; } + private string GetTelemetry() { if (!VariantGroup.IsInternal && IsAzure) { return $@" {Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{ -{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() {Indent}{Indent}}} {Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId {Indent}{Indent}if ($preTelemetryId -eq '') {{ @@ -262,9 +269,26 @@ private string GetDefaultValuesStatements() var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); var parameterName = defaultInfo.ParameterGroup.ParameterName; sb.AppendLine(); - sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); - 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}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.CostManagement.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}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } } return sb.ToString(); } diff --git a/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/PsAttributes.cs b/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/PsAttributes.cs index 6b7f8741531c..2c3babd762e1 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/PsAttributes.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/runtime/BuildTime/PsAttributes.cs @@ -48,6 +48,13 @@ public ProfileAttribute(params string[] profiles) } } + [AttributeUsage(AttributeTargets.Class)] + public class HttpPathAttribute : Attribute + { + public string Path { get; set; } + public string ApiVersion { get; set; } + } + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] public class CategoryAttribute : Attribute { diff --git a/src/CostManagement/CostManagement.Autorest/generated/runtime/MessageAttribute.cs b/src/CostManagement/CostManagement.Autorest/generated/runtime/MessageAttribute.cs index 64dcbf315c82..d389fd54714c 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/runtime/MessageAttribute.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/runtime/MessageAttribute.cs @@ -21,7 +21,7 @@ public class GenericBreakingChangeAttribute : Attribute //The version the change is effective from, non mandatory public string DeprecateByVersion { get; } - public bool DeprecateByVersionSet { get; } = false; + public string DeprecateByAzVersion { get; } //The date on which the change comes in effect public DateTime ChangeInEfectByDate { get; } @@ -32,23 +32,18 @@ public class GenericBreakingChangeAttribute : Attribute //New way fo calling the cmdlet public string NewWay { get; set; } - public GenericBreakingChangeAttribute(string message) - { - _message = message; - } - - public GenericBreakingChangeAttribute(string message, string deprecateByVersion) + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion) { _message = message; + this.DeprecateByAzVersion = deprecateByAzVersion; this.DeprecateByVersion = deprecateByVersion; - this.DeprecateByVersionSet = true; } - public GenericBreakingChangeAttribute(string message, string deprecateByVersion, string changeInEfectByDate) + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) { _message = message; this.DeprecateByVersion = deprecateByVersion; - this.DeprecateByVersionSet = true; + this.DeprecateByAzVersion = deprecateByAzVersion; if (DateTime.TryParse(changeInEfectByDate, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) { @@ -86,10 +81,8 @@ public void PrintCustomAttributeInfo(Action writeOutput) writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByDateMessage, this.ChangeInEfectByDate.ToString("d"))); } - if (DeprecateByVersionSet) - { - writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); - } + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); if (OldWay != null && NewWay != null) { @@ -114,18 +107,13 @@ public class CmdletBreakingChangeAttribute : GenericBreakingChangeAttribute public string ReplacementCmdletName { get; set; } - public CmdletBreakingChangeAttribute() : - base(string.Empty) + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { } - public CmdletBreakingChangeAttribute(string deprecateByVersione) : - base(string.Empty, deprecateByVersione) - { - } - - public CmdletBreakingChangeAttribute(string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { } @@ -146,20 +134,15 @@ protected override string GetAttributeSpecificMessage() public class ParameterSetBreakingChangeAttribute : GenericBreakingChangeAttribute { public string[] ChangedParameterSet { set; get; } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet) : - base(string.Empty) - { - ChangedParameterSet = changedParameterSet; - } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersione) : - base(string.Empty, deprecateByVersione) + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { ChangedParameterSet = changedParameterSet; } - public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { ChangedParameterSet = changedParameterSet; } @@ -185,6 +168,11 @@ public class PreviewMessageAttribute : Attribute { public string _message; + public DateTime EstimatedGaDate { get; } + + public bool IsEstimatedGaDateSet { get; } = false; + + public PreviewMessageAttribute() { this._message = Resources.PreviewCmdletMessage; @@ -192,12 +180,26 @@ public PreviewMessageAttribute() public PreviewMessageAttribute(string message) { - this._message = message; + this._message = string.IsNullOrEmpty(message) ? Resources.PreviewCmdletMessage : message; } - public void PrintCustomAttributeInfo(System.Management.Automation.PSCmdlet psCmdlet) + public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(message) { - psCmdlet.WriteWarning(this._message); + if (DateTime.TryParse(estimatedDateOfGa, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.EstimatedGaDate = result; + this.IsEstimatedGaDateSet = true; + } + } + + public void PrintCustomAttributeInfo(Action writeOutput) + { + writeOutput(this._message); + + if (IsEstimatedGaDateSet) + { + writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); + } } public virtual bool IsApplicableToInvocation(InvocationInfo invocation) @@ -219,20 +221,14 @@ public class ParameterBreakingChangeAttribute : GenericBreakingChangeAttribute public String NewParameterType { get; set; } - public ParameterBreakingChangeAttribute(string nameOfParameterChanging) : - base(string.Empty) + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { this.NameOfParameterChanging = nameOfParameterChanging; } - public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion) : - base(string.Empty, deprecateByVersion) - { - this.NameOfParameterChanging = nameOfParameterChanging; - } - - public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { this.NameOfParameterChanging = nameOfParameterChanging; } @@ -298,20 +294,14 @@ public class OutputBreakingChangeAttribute : GenericBreakingChangeAttribute public string[] NewOutputProperties { get; set; } - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType) : - base(string.Empty) - { - this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; - } - - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion) : - base(string.Empty, deprecateByVersion) + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) { this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; } - public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByVersion, string changeInEfectByDate) : - base(string.Empty, deprecateByVersion, changeInEfectByDate) + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) { this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; } diff --git a/src/CostManagement/CostManagement.Autorest/generated/runtime/MessageAttributeHelper.cs b/src/CostManagement/CostManagement.Autorest/generated/runtime/MessageAttributeHelper.cs index 7278432fdfd8..a250828097f1 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/runtime/MessageAttributeHelper.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/runtime/MessageAttributeHelper.cs @@ -23,6 +23,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Runtime using System.Threading.Tasks; public class MessageAttributeHelper { + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); public const string BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK = "https://aka.ms/azps-changewarnings"; public const string SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME = "SuppressAzurePowerShellBreakingChangeWarnings"; @@ -34,7 +35,7 @@ public class MessageAttributeHelper * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, * We only process the Parameter beaking change attributes attached only params listed in this list (if present) * */ - public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet, bool showPreviewMessage = true) { bool supressWarningOrError = false; @@ -52,37 +53,53 @@ public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, Inv //Do not process the attributes at runtime... The env variable to override the warning messages is set return; } + if (IsAzure && invocationInfo.BoundParameters.ContainsKey("DefaultProfile")) + { + psCmdlet.WriteWarning("The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription."); + } + + ProcessBreakingChangeAttributesAtRuntime(commandInfo, invocationInfo, parameterSet, psCmdlet); + + } + private static void ProcessBreakingChangeAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { List attributes = new List(GetAllBreakingChangeAttributesInType(commandInfo, invocationInfo, parameterSet)); StringBuilder sb = new StringBuilder(); - Action appendBreakingChangeInfo = (string s) => sb.Append(s); + Action appendAttributeMessage = (string s) => sb.Append(s); if (attributes != null && attributes.Count > 0) { - appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); foreach (GenericBreakingChangeAttribute attribute in attributes) { - attribute.PrintCustomAttributeInfo(appendBreakingChangeInfo); + attribute.PrintCustomAttributeInfo(appendAttributeMessage); } - appendBreakingChangeInfo(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); psCmdlet.WriteWarning(sb.ToString()); } + } + + public static void ProcessPreviewMessageAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { List previewAttributes = new List(GetAllPreviewAttributesInType(commandInfo, invocationInfo)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); if (previewAttributes != null && previewAttributes.Count > 0) { foreach (PreviewMessageAttribute attribute in previewAttributes) { - attribute.PrintCustomAttributeInfo(psCmdlet); + attribute.PrintCustomAttributeInfo(appendAttributeMessage); } + psCmdlet.WriteWarning(sb.ToString()); } } - /** * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) * And returns all the deprecation attributes attached to it @@ -124,6 +141,12 @@ private static IEnumerable GetAllBreakingChangeA } return invocationInfo == null ? attributeList : attributeList.Where(e => e.GetType() == typeof(ParameterSetBreakingChangeAttribute) ? ((ParameterSetBreakingChangeAttribute)e).IsApplicableToInvocation(invocationInfo, parameterSet) : e.IsApplicableToInvocation(invocationInfo)); } + + public static bool ContainsPreviewAttribute(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + return GetAllPreviewAttributesInType(commandInfo, invocationInfo)?.Count() > 0; + } + private static IEnumerable GetAllPreviewAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo) { List attributeList = new List(); diff --git a/src/CostManagement/CostManagement.Autorest/generated/runtime/Properties/Resources.Designer.cs b/src/CostManagement/CostManagement.Autorest/generated/runtime/Properties/Resources.Designer.cs index 4c4a1259efc1..406f99712de5 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/runtime/Properties/Resources.Designer.cs +++ b/src/CostManagement/CostManagement.Autorest/generated/runtime/Properties/Resources.Designer.cs @@ -734,7 +734,7 @@ public static string BreakingChangesAttributesInEffectByDateMessage } /// - /// Looks up a localized string similar to Note :The change is expected to take effect from the version : '{0}' + /// Looks up a localized string similar to Note :The change is expected to take effect from version : '{0}' /// ///. /// @@ -746,6 +746,19 @@ public static string BreakingChangesAttributesInEffectByVersion } } + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from az version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByAzVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByAzVersion", resourceCulture); + } + } + /// /// Looks up a localized string similar to ```powershell ///# Old @@ -3122,7 +3135,16 @@ public static string PortalInstructionsGit } /// - /// Looks up a localized string similar to This cmdlet is in preview. The functionality may not be available in the selected subscription. + /// Looks up a localized string similar to The estimated generally available date is '{0}'.. + /// + public static string PreviewCmdletETAMessage { + get { + return ResourceManager.GetString("PreviewCmdletETAMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet is in preview. Its behavior is subject to change based on customer feedback.. /// public static string PreviewCmdletMessage { @@ -5630,4 +5652,4 @@ public static string YesHint } } } -} +} \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/generated/runtime/Properties/Resources.resx b/src/CostManagement/CostManagement.Autorest/generated/runtime/Properties/Resources.resx index 598cd53e958a..a08a2e50172b 100644 --- a/src/CostManagement/CostManagement.Autorest/generated/runtime/Properties/Resources.resx +++ b/src/CostManagement/CostManagement.Autorest/generated/runtime/Properties/Resources.resx @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can -- The change is expected to take effect from the version : '{0}' +- The change is expected to take effect from version : '{0}' ```powershell @@ -1736,6 +1736,12 @@ The type of the parameter is changing from '{0}' to '{1}'. Note : Go to {0} for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell. - This cmdlet is in preview. The functionality may not be available in the selected subscription. + This cmdlet is in preview. Its behavior is subject to change based on customer feedback. + + + The estimated generally available date is '{0}'. + + + - The change is expected to take effect from Az version : '{0}' \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/help/Az.CostManagement.md b/src/CostManagement/CostManagement.Autorest/help/Az.CostManagement.md new file mode 100644 index 000000000000..bfab6addd547 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/Az.CostManagement.md @@ -0,0 +1,61 @@ +--- +Module Name: Az.CostManagement +Module Guid: 4cd9af10-559e-4fb9-8dcd-d3e8eb9e03b7 +Download Help Link: https://learn.microsoft.com/powershell/module/az.costmanagement +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.CostManagement Module +## Description +Microsoft Azure PowerShell: Cost cmdlets + +## Az.CostManagement Cmdlets +### [Get-AzCostManagementExport](Get-AzCostManagementExport.md) +The operation to get the export for the defined scope by export name. + +### [Get-AzCostManagementExportExecutionHistory](Get-AzCostManagementExportExecutionHistory.md) +The operation to get the execution history of an export for the defined scope and export name. + +### [Invoke-AzCostManagementExecuteExport](Invoke-AzCostManagementExecuteExport.md) +The operation to execute an export. + +### [Invoke-AzCostManagementQuery](Invoke-AzCostManagementQuery.md) +Query the usage data for scope defined. + +### [Invoke-AzCostManagementReservationDetailReport](Invoke-AzCostManagementReservationDetailReport.md) +Generates the reservations details report for provided date range asynchronously based on enrollment id. +The Reservation usage details can be viewed only by certain enterprise roles. +For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role + +### [New-AzCostManagementDetailReport](New-AzCostManagementDetailReport.md) +This API is the replacement for all previously release Usage Details APIs. +Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope. +The initial call to request a report will return a 202 with a 'Location' and 'Retry-After' header. +The 'Location' header will provide the endpoint to poll to get the result of the report generation. +The 'Retry-After' provides the duration to wait before polling for the generated report. +A call to poll the report operation will provide a 202 response with a 'Location' header if the operation is still in progress. +Once the report generation operation completes, the polling endpoint will provide a 200 response along with details on the report blob(s) that are available for download. +The details on the file(s) available for download will be available in the polling response body. + +### [New-AzCostManagementExport](New-AzCostManagementExport.md) +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + +### [New-AzCostManagementQueryComparisonExpressionObject](New-AzCostManagementQueryComparisonExpressionObject.md) +Create a in-memory object for QueryComparisonExpression + +### [New-AzCostManagementQueryFilterObject](New-AzCostManagementQueryFilterObject.md) +Create a in-memory object for QueryFilter + +### [Remove-AzCostManagementExport](Remove-AzCostManagementExport.md) +The operation to delete a export. + +### [Update-AzCostManagementExport](Update-AzCostManagementExport.md) +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + diff --git a/src/CostManagement/CostManagement.Autorest/help/Get-AzCostManagementExport.md b/src/CostManagement/CostManagement.Autorest/help/Get-AzCostManagementExport.md new file mode 100644 index 000000000000..5481b3c04ebb --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/Get-AzCostManagementExport.md @@ -0,0 +1,160 @@ +--- +external help file: +Module Name: Az.CostManagement +online version: https://learn.microsoft.com/powershell/module/az.costmanagement/get-azcostmanagementexport +schema: 2.0.0 +--- + +# Get-AzCostManagementExport + +## SYNOPSIS +The operation to get the export for the defined scope by export name. + +## SYNTAX + +### List (Default) +``` +Get-AzCostManagementExport -Scope [-Expand ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzCostManagementExport -Name -Scope [-Expand ] [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzCostManagementExport -InputObject [-Expand ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +The operation to get the export for the defined scope by export name. + +## EXAMPLES + +### Example 1: Get all AzCostManagementExports by scope +```powershell +Get-AzCostManagementExport -Scope 'subscriptions/**********' +``` + +```output +ETag Name Type +---- ---- ---- +"************" TestExport Microsoft.CostManagement/exports +"************" TestExport1 Microsoft.CostManagement/exports +"************" TestExport2 Microsoft.CostManagement/exports +``` + +Get all AzCostManagementExports by Scope + +### Example 2: Get AzCostManagementExport by Name and scope +```powershell +Get-AzCostManagementExport -Name 'TestExport' -Scope 'subscriptions/**********' +``` + +```output +ETag Name Type +---- ---- ---- +"************" TestExport Microsoft.CostManagement/exports +``` + +Get AzCostManagementExport by Name and scope + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Expand +May be used to expand the properties within an export. +Currently only 'runHistory' is supported and will return information for the last 10 executions of the export. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Export Name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ExportName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport + +## NOTES + +## RELATED LINKS + diff --git a/src/CostManagement/CostManagement.Autorest/help/Get-AzCostManagementExportExecutionHistory.md b/src/CostManagement/CostManagement.Autorest/help/Get-AzCostManagementExportExecutionHistory.md new file mode 100644 index 000000000000..c5fb3cfbb08e --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/Get-AzCostManagementExportExecutionHistory.md @@ -0,0 +1,139 @@ +--- +external help file: +Module Name: Az.CostManagement +online version: https://learn.microsoft.com/powershell/module/az.costmanagement/get-azcostmanagementexportexecutionhistory +schema: 2.0.0 +--- + +# Get-AzCostManagementExportExecutionHistory + +## SYNOPSIS +The operation to get the execution history of an export for the defined scope and export name. + +## SYNTAX + +### Get (Default) +``` +Get-AzCostManagementExportExecutionHistory -ExportName -Scope [-DefaultProfile ] + [] +``` + +### GetViaIdentity +``` +Get-AzCostManagementExportExecutionHistory -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +The operation to get the execution history of an export for the defined scope and export name. + +## EXAMPLES + +### Example 1: Get AzCostManagementExportExecutionHistory +```powershell +Get-AzCostManagementExportExecutionHistory -ExportName 'TestExport' -Scope 'subscriptions/**********' +``` + +```output +ExecutionType ProcessingStartTime ProcessingEndTime Status FileName +------------- ------------------- ----------------- ------ -------- +Scheduled 2020/6/11 12:03:20 2020/6/11 12:03:43 Completed ad-hoc/TestExport/20200601-20200630/TestExport_00000000-0000-0000-0000-000000000000.csv +Scheduled 2020/6/12 12:03:37 2020/6/12 12:03:48 Completed ad-hoc/TestExport/20200601-20200630/TestExport_00000000-0000-0000-0000-000000000000.csv +``` + +Get AzCostManagementExportExecutionHistory By ExportName and Scope + +### Example 2: Get AzCostManagementExportExecutionHistory by InputObject +```powershell +$getExport = Get-AzCostManagementExport -Name 'TestExport' -Scope 'subscriptions/**********' +Get-AzCostManagementExportExecutionHistory -InputObject $getExport +``` + +```output +ExecutionType ProcessingStartTime ProcessingEndTime Status FileName +------------- ------------------- ----------------- ------ -------- +Scheduled 2020/6/11 12:03:20 2020/6/11 12:03:43 Completed ad-hoc/TestExport/20200601-20200630/TestExport_00000000-0000-0000-0000-000000000000.csv +Scheduled 2020/6/12 12:03:37 2020/6/12 12:03:48 Completed ad-hoc/TestExport/20200601-20200630/ +``` + +Get AzCostManagementExportExecutionHistory By InputObject + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExportName +Export Name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Scope +This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExportExecution + +## NOTES + +## RELATED LINKS + diff --git a/src/CostManagement/CostManagement.Autorest/help/Invoke-AzCostManagementExecuteExport.md b/src/CostManagement/CostManagement.Autorest/help/Invoke-AzCostManagementExecuteExport.md new file mode 100644 index 000000000000..affba6de69a7 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/Invoke-AzCostManagementExecuteExport.md @@ -0,0 +1,171 @@ +--- +external help file: +Module Name: Az.CostManagement +online version: https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementexecuteexport +schema: 2.0.0 +--- + +# Invoke-AzCostManagementExecuteExport + +## SYNOPSIS +The operation to execute an export. + +## SYNTAX + +### Execute (Default) +``` +Invoke-AzCostManagementExecuteExport -ExportName -Scope [-DefaultProfile ] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### ExecuteViaIdentity +``` +Invoke-AzCostManagementExecuteExport -InputObject [-DefaultProfile ] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The operation to execute an export. + +## EXAMPLES + +### Example 1: Invoke Export by ExportName and Scope +```powershell +Invoke-AzCostManagementExecuteExport -ExportName 'TestExport' -Scope 'subscriptions/**********' +``` + +Invoke Export by ExportName and Scope + +### Example 2: Invoke Export by InputObject +```powershell +$getExport = Get-AzCostManagementExport -Name 'TestExport' -Scope 'subscriptions/**********' +Invoke-AzCostManagementExecuteExport -InputObject $getExport +``` + +Invoke Export by InputObject + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExportName +Export Name. + +```yaml +Type: System.String +Parameter Sets: Execute +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity +Parameter Sets: ExecuteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'. + +```yaml +Type: System.String +Parameter Sets: Execute +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CostManagement/CostManagement.Autorest/help/Invoke-AzCostManagementQuery.md b/src/CostManagement/CostManagement.Autorest/help/Invoke-AzCostManagementQuery.md new file mode 100644 index 000000000000..ee3b59b1c107 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/Invoke-AzCostManagementQuery.md @@ -0,0 +1,307 @@ +--- +external help file: +Module Name: Az.CostManagement +online version: https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementquery +schema: 2.0.0 +--- + +# Invoke-AzCostManagementQuery + +## SYNOPSIS +Query the usage data for scope defined. + +## SYNTAX + +### UsageExpanded (Default) +``` +Invoke-AzCostManagementQuery -Scope -Timeframe -Type + [-ConfigurationColumn ] [-DatasetAggregation ] [-DatasetFilter ] + [-DatasetGranularity ] [-DatasetGrouping ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UsageExpanded1 +``` +Invoke-AzCostManagementQuery -ExternalCloudProviderId + -ExternalCloudProviderType -Timeframe -Type + [-ConfigurationColumn ] [-DatasetAggregation ] [-DatasetFilter ] + [-DatasetGranularity ] [-DatasetGrouping ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Query the usage data for scope defined. + +## EXAMPLES + +### Example 1: Invoke AzCostManagementQuery by Scope +```powershell +Invoke-AzCostManagementQuery -Scope "/subscriptions/***********" -Timeframe MonthToDate -Type Usage -DatasetGranularity 'Daily' +``` + +```output +Column Row +------ --- +{UsageDate, Currency} {20201101 USD, 20201102 USD, 20201103 USD, 20201104 USD…} +``` + +Invoke AzCostManagementQuery by Scope + +### Example 2: Invoke AzCostManagementQuery by Scope with Dimensions +```powershell +$dimensions = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceGroup' -Value 'API' +$filter = New-AzCostManagementQueryFilterObject -Dimensions $dimensions +Invoke-AzCostManagementQuery -Type Usage -Scope "subscriptions/***********" -DatasetGranularity 'Monthly' -DatasetFilter $filter -Timeframe MonthToDate -Debug +``` + +```output +Column Row +------ --- +{BillingMonth, Currency} {} +``` + +Invoke AzCostManagementQuery by Scope with Dimensions + +## PARAMETERS + +### -ConfigurationColumn +Array of column names to be included in the query. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetAggregation +Dictionary of aggregation expression to use in the query. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetFilter +Has filter expression to use in the query. +To construct, see NOTES section for DATASETFILTER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetGranularity +The granularity of rows in the query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasetGrouping +Array of group by expression to use in the query. +To construct, see NOTES section for DATASETGROUPING properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryGrouping[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExternalCloudProviderId +This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. + +```yaml +Type: System.String +Parameter Sets: UsageExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExternalCloudProviderType +The external cloud provider type associated with dimension/query operations. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExternalCloudProviderType +Parameter Sets: UsageExpanded1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +This includes 'subscriptions/{subscriptionId}/' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. + +```yaml +Type: System.String +Parameter Sets: UsageExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Timeframe +The time frame for pulling data for the query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodFrom +The start date to pull data from. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodTo +The end date to pull data to. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +The type of the query. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryResult + +## NOTES + +## RELATED LINKS + diff --git a/src/CostManagement/CostManagement.Autorest/help/Invoke-AzCostManagementReservationDetailReport.md b/src/CostManagement/CostManagement.Autorest/help/Invoke-AzCostManagementReservationDetailReport.md new file mode 100644 index 000000000000..0e3bbf91d997 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/Invoke-AzCostManagementReservationDetailReport.md @@ -0,0 +1,195 @@ +--- +external help file: +Module Name: Az.CostManagement +online version: https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementreservationdetailreport +schema: 2.0.0 +--- + +# Invoke-AzCostManagementReservationDetailReport + +## SYNOPSIS +Generates the reservations details report for provided date range asynchronously based on enrollment id. +The Reservation usage details can be viewed only by certain enterprise roles. +For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role + +## SYNTAX + +### By (Default) +``` +Invoke-AzCostManagementReservationDetailReport -BillingAccountId -EndDate + -StartDate [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### By1 +``` +Invoke-AzCostManagementReservationDetailReport -BillingAccountId -BillingProfileId + -EndDate -StartDate [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Generates the reservations details report for provided date range asynchronously based on enrollment id. +The Reservation usage details can be viewed only by certain enterprise roles. +For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role + +## EXAMPLES + +### Example 1: Generates the reservations details report for provided date range asynchronously based on billing account id +```powershell +Invoke-AzCostManagementReservationDetailReport -BillingAccountId "00000000-0000-0000-0000-0000000000" -StartDate "2022-10-01" -EndDate "2022-10-20" +``` + +This command generates the reservations details report for provided date range asynchronously based on billing account id. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BillingAccountId +Enrollment ID (Legacy BillingAccount ID) + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BillingProfileId +BillingProfile ID + +```yaml +Type: System.String +Parameter Sets: By1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EndDate +End Date + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StartDate +Start Date + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IOperationStatus + +## NOTES + +## RELATED LINKS + diff --git a/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementDetailReport.md b/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementDetailReport.md new file mode 100644 index 000000000000..2f07e1d41053 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementDetailReport.md @@ -0,0 +1,240 @@ +--- +external help file: +Module Name: Az.CostManagement +online version: https://learn.microsoft.com/powershell/module/az.costmanagement/new-azcostmanagementdetailreport +schema: 2.0.0 +--- + +# New-AzCostManagementDetailReport + +## SYNOPSIS +This API is the replacement for all previously release Usage Details APIs. +Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope. +The initial call to request a report will return a 202 with a 'Location' and 'Retry-After' header. +The 'Location' header will provide the endpoint to poll to get the result of the report generation. +The 'Retry-After' provides the duration to wait before polling for the generated report. +A call to poll the report operation will provide a 202 response with a 'Location' header if the operation is still in progress. +Once the report generation operation completes, the polling endpoint will provide a 200 response along with details on the report blob(s) that are available for download. +The details on the file(s) available for download will be available in the polling response body. + +## SYNTAX + +``` +New-AzCostManagementDetailReport -Scope [-BillingPeriod ] [-InvoiceId ] + [-Metric ] [-TimePeriodEnd ] [-TimePeriodStart ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +This API is the replacement for all previously release Usage Details APIs. +Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope. +The initial call to request a report will return a 202 with a 'Location' and 'Retry-After' header. +The 'Location' header will provide the endpoint to poll to get the result of the report generation. +The 'Retry-After' provides the duration to wait before polling for the generated report. +A call to poll the report operation will provide a 202 response with a 'Location' header if the operation is still in progress. +Once the report generation operation completes, the polling endpoint will provide a 200 response along with details on the report blob(s) that are available for download. +The details on the file(s) available for download will be available in the polling response body. + +## EXAMPLES + +### Example 1: Request to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope +```powershell +New-AzCostManagementDetailReport -Scope "/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f" -Metric 'ActualCost' -TimePeriodStart "2022-10-01" -TimePeriodEnd "2022-10-20" +``` + +This command requests to generate a cost details report for the provided date range, billing period (Only enterprise customers) or Invoice Id asynchronously at a certain scope. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BillingPeriod +This parameter can be used only by Enterprise Agreement customers. +Use the YearMonth(e.g. +202008) format. +This parameter cannot be used alongside either the invoiceId or timePeriod parameters. +If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month's cost. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InvoiceId +This parameter can only be used by Microsoft Customer Agreement customers. +Additionally, it can only be used at the Billing Profile or Customer scope. +This parameter cannot be used alongside either the billingPeriod or timePeriod parameters. +If a timePeriod, invoiceId or billingPeriod parameter is not provided in the request body the API will return the current month's cost. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Metric +The type of the detailed report. +By default ActualCost is provided + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.CostDetailsMetricType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +The scope associated with usage details operations. +This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope. +Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodEnd +The end date to pull data to. +example format 2020-03-15 + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodStart +The start date to pull data from. +example format 2020-03-15 + +```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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20220501.ICostDetailsOperationResults + +## NOTES + +## RELATED LINKS + diff --git a/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementExport.md b/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementExport.md new file mode 100644 index 000000000000..8b2a0490d275 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementExport.md @@ -0,0 +1,355 @@ +--- +external help file: +Module Name: Az.CostManagement +online version: https://learn.microsoft.com/powershell/module/az.costmanagement/new-azcostmanagementexport +schema: 2.0.0 +--- + +# New-AzCostManagementExport + +## SYNOPSIS +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + +## SYNTAX + +``` +New-AzCostManagementExport -Name -Scope [-ConfigurationColumn ] + [-DataSetGranularity ] [-DefinitionTimeframe ] [-DefinitionType ] + [-DestinationContainer ] [-DestinationResourceId ] [-DestinationRootFolderPath ] + [-Format ] [-RecurrencePeriodFrom ] [-RecurrencePeriodTo ] + [-ScheduleRecurrence ] [-ScheduleStatus ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + +## EXAMPLES + +### Example 1: Create an AzCostManagementExport +```powershell +New-AzCostManagementExport -Scope "subscriptions/***********" -Name "CostManagementExportTest" -ScheduleStatus "Active" -ScheduleRecurrence "Daily" -RecurrencePeriodFrom "2020-10-31T20:00:00Z" -RecurrencePeriodTo "2020-11-30T00:00:00Z" -Format "Csv" -DestinationResourceId "/subscriptions/*************/resourceGroups/ResourceGroupTest/providers/Microsoft.Storage/storageAccounts/storageAccountTest" ` -DestinationContainer "exports" -DestinationRootFolderPath "ad-hoc" -DefinitionType "Usage" -DefinitionTimeframe "MonthToDate" -DatasetGranularity "Daily" +``` + +```output +ETag Name Type +---- ---- ---- +"********" TestExportDatasetAggregationInfosagdhaghj Microsoft.CostManagement/exports +``` + +Create an AzCostManagementExport + +## PARAMETERS + +### -ConfigurationColumn +Array of column names to be included in the export. +If not provided then the export will include all available columns. +The available columns can vary by customer channel (see examples). + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataSetGranularity +The granularity of rows in the export. +Currently only 'Daily' is supported. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefinitionTimeframe +The time frame for pulling data for the export. +If custom, then a specific time period must be provided. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefinitionType +The type of the export. +Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationContainer +The name of the container where exports will be uploaded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationResourceId +The resource id of the storage account where exports will be delivered. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationRootFolderPath +The name of the directory where exports will be uploaded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Format +The format of the export being delivered. +Currently only 'Csv' is supported. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.FormatType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Export Name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ExportName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RecurrencePeriodFrom +The start date of recurrence. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RecurrencePeriodTo +The end date of recurrence. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduleRecurrence +The schedule recurrence. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.RecurrenceType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduleStatus +The status of the export's schedule. +If 'Inactive', the export's schedule is paused. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.StatusType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodFrom +The start date for export data. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodTo +The end date for export data. + +```yaml +Type: System.DateTime +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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport + +## NOTES + +## RELATED LINKS + diff --git a/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementQueryComparisonExpressionObject.md b/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementQueryComparisonExpressionObject.md new file mode 100644 index 000000000000..0b8da26b71b5 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementQueryComparisonExpressionObject.md @@ -0,0 +1,97 @@ +--- +external help file: +Module Name: Az.CostManagement +online version: https://learn.microsoft.com/powershell/module/az.CostManagement/new-AzCostManagementQueryComparisonExpressionObject +schema: 2.0.0 +--- + +# New-AzCostManagementQueryComparisonExpressionObject + +## SYNOPSIS +Create a in-memory object for QueryComparisonExpression + +## SYNTAX + +``` +New-AzCostManagementQueryComparisonExpressionObject -Name -Operator -Value + [] +``` + +## DESCRIPTION +Create a in-memory object for QueryComparisonExpression + +## EXAMPLES + +### Example 1: Create a comparison expression object of query for cost management export +```powershell +New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Value @('East US', 'West Europe') +``` + +```output +Name Operator Value +---- -------- ----- +ResourceLocation In {East US, West Europe} +``` + +This command creates a comparison expression object of query for cost management export. + +## PARAMETERS + +### -Name +The name of the column to use in comparison. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Operator +The operator to use for comparison. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.OperatorType +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Value +Array of values to use for comparison. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryComparisonExpression + +## NOTES + +## RELATED LINKS + diff --git a/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementQueryFilterObject.md b/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementQueryFilterObject.md new file mode 100644 index 000000000000..9391206cd5d6 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/New-AzCostManagementQueryFilterObject.md @@ -0,0 +1,138 @@ +--- +external help file: +Module Name: Az.CostManagement +online version: https://learn.microsoft.com/powershell/module/az.CostManagement/new-AzCostManagementQueryFilterObject +schema: 2.0.0 +--- + +# New-AzCostManagementQueryFilterObject + +## SYNOPSIS +Create a in-memory object for QueryFilter + +## SYNTAX + +``` +New-AzCostManagementQueryFilterObject [-And ] [-Dimensions ] + [-Not ] [-Or ] [-Tag ] [] +``` + +## DESCRIPTION +Create a in-memory object for QueryFilter + +## EXAMPLES + +### Example 1: Create a filter object of query for cost management export +```powershell +$orDimension = New-AzCostManagementQueryComparisonExpressionObject -Name 'ResourceLocation' -Value @('East US', 'West Europe') +$orTag = New-AzCostManagementQueryComparisonExpressionObject -Name 'Environment' -Value @('UAT', 'Prod') +New-AzCostManagementQueryFilterObject -or @((New-AzCostManagementQueryFilterObject -Dimensions $orDimension), (New-AzCostManagementQueryFilterObject -Tag $orTag)) +``` + +```output +And : +Dimension : Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20211001.QueryComparisonExpression +Not : Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20211001.QueryFilter +Or : {Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20211001.QueryFilter, Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20211001.QueryFilter} +Tag : Microsoft.Azure.PowerShell.Cmdlets.Cost.Models.Api20211001.QueryComparisonExpression +``` + +this command creates a filter object of query for cost management export. + +## PARAMETERS + +### -And +The logical "AND" expression. +Must have at least 2 items. +To construct, see NOTES section for AND properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Dimensions +Has comparison expression for a dimensions. +To construct, see NOTES section for DIMENSIONS properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryComparisonExpression +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Not +The logical "NOT" expression. +To construct, see NOTES section for NOT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Or +The logical "OR" expression. +Must have at least 2 items. +To construct, see NOTES section for OR properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryFilter[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Has comparison expression for a tag. +To construct, see NOTES section for TAG properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IQueryComparisonExpression +Parameter Sets: (All) +Aliases: + +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). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.QueryFilter + +## NOTES + +## RELATED LINKS + diff --git a/src/CostManagement/CostManagement.Autorest/help/README.md b/src/CostManagement/CostManagement.Autorest/help/README.md new file mode 100644 index 000000000000..9dcd06eea2e2 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.CostManagement` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.CostManagement` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/help/Remove-AzCostManagementExport.md b/src/CostManagement/CostManagement.Autorest/help/Remove-AzCostManagementExport.md new file mode 100644 index 000000000000..b6dbcb246c87 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/Remove-AzCostManagementExport.md @@ -0,0 +1,171 @@ +--- +external help file: +Module Name: Az.CostManagement +online version: https://learn.microsoft.com/powershell/module/az.costmanagement/remove-azcostmanagementexport +schema: 2.0.0 +--- + +# Remove-AzCostManagementExport + +## SYNOPSIS +The operation to delete a export. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzCostManagementExport -Name -Scope [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzCostManagementExport -InputObject [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The operation to delete a export. + +## EXAMPLES + +### Example 1: Delete the AzCostManagementExport by Scope and Name +```powershell +Remove-AzCostManagementExport -Scope 'subscriptions/********' -name 'TestExportDatasetAggregationInfoYouri' +``` + +Delete the AzCostManagementExport By Scope and ExportName + +### Example 2: Delete the AzCostManagementExport by Export Object +```powershell +$getExport = Get-AzCostManagementExport -Scope 'subscriptions/*********' -name 'TestExportDatasetAggregationYouori' +Remove-AzCostManagementExport -InputObject $getExport +``` + +Delete the AzCostManagementExport By InputObject + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Export Name. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: ExportName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/src/CostManagement/CostManagement.Autorest/help/Update-AzCostManagementExport.md b/src/CostManagement/CostManagement.Autorest/help/Update-AzCostManagementExport.md new file mode 100644 index 000000000000..9b8658670024 --- /dev/null +++ b/src/CostManagement/CostManagement.Autorest/help/Update-AzCostManagementExport.md @@ -0,0 +1,414 @@ +--- +external help file: +Module Name: Az.CostManagement +online version: https://learn.microsoft.com/powershell/module/az.costmanagement/update-azcostmanagementexport +schema: 2.0.0 +--- + +# Update-AzCostManagementExport + +## SYNOPSIS +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzCostManagementExport -Name -Scope [-ConfigurationColumn ] + [-DataSetGranularity ] [-DefinitionTimeframe ] [-DefinitionType ] + [-DestinationContainer ] [-DestinationResourceId ] [-DestinationRootFolderPath ] + [-ETag ] [-Format ] [-RecurrencePeriodFrom ] [-RecurrencePeriodTo ] + [-ScheduleRecurrence ] [-ScheduleStatus ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzCostManagementExport -InputObject [-ConfigurationColumn ] + [-DataSetGranularity ] [-DefinitionTimeframe ] [-DefinitionType ] + [-DestinationContainer ] [-DestinationResourceId ] [-DestinationRootFolderPath ] + [-ETag ] [-Format ] [-RecurrencePeriodFrom ] [-RecurrencePeriodTo ] + [-ScheduleRecurrence ] [-ScheduleStatus ] [-TimePeriodFrom ] + [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +The operation to create or update a export. +Update operation requires latest eTag to be set in the request. +You may obtain the latest eTag by performing a get operation. +Create operation does not require eTag. + +## EXAMPLES + +### Example 1: Update AzCostManagementExport by scope and name +```powershell +Update-AzCostManagementExport -Scope "subscriptions//*********" -Name "TestExport" -ScheduleRecurrence 'Weekly' +``` + +```output +ETag Name Type +---- ---- ---- +"********" TestExportDatasetAggregationInfo Microsoft.CostManagement/exports +``` + +Update AzCostManagementExport by Scope and name + +### Example 2: Update AzCostManagementExport by InputObject +```powershell +$oldExport = Get-AzCostManagementExport -Scope "subscriptions/*********" -Name "TestExport" +Update-AzCostManagementExport -InputObject $oldExport -ScheduleRecurrence 'Weekly' +``` + +```output +ETag Name Type +---- ---- ---- +"********" TestExportDatasetAggregationInfo Microsoft.CostManagement/exports +``` + +Update AzCostManagementExport by InputObject + +## PARAMETERS + +### -ConfigurationColumn +Array of column names to be included in the export. +If not provided then the export will include all available columns. +The available columns can vary by customer channel (see examples). + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataSetGranularity +The granularity of rows in the export. +Currently only 'Daily' is supported. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.GranularityType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The credentials, account, tenant, and subscription used for communication with Azure. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefinitionTimeframe +The time frame for pulling data for the export. +If custom, then a specific time period must be provided. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.TimeframeType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefinitionType +The type of the export. +Note that 'Usage' is equivalent to 'ActualCost' and is applicable to exports that do not yet provide data for charges or amortization for service reservations. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.ExportType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationContainer +The name of the container where exports will be uploaded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationResourceId +The resource id of the storage account where exports will be delivered. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DestinationRootFolderPath +The name of the directory where exports will be uploaded. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ETag +eTag of the resource. +To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Format +The format of the export being delivered. +Currently only 'Csv' is supported. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.FormatType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Export Name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: ExportName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RecurrencePeriodFrom +The start date of recurrence. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RecurrencePeriodTo +The end date of recurrence. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduleRecurrence +The schedule recurrence. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.RecurrenceType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduleStatus +The status of the export's schedule. +If 'Inactive', the export's schedule is paused. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Support.StatusType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Scope +This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodFrom +The start date for export data. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimePeriodTo +The end date for export data. + +```yaml +Type: System.DateTime +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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +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). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.ICostManagementIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Models.Api20211001.IExport + +## NOTES + +## RELATED LINKS + diff --git a/src/CostManagement/CostManagement.Autorest/internal/Az.CostManagement.internal.psm1 b/src/CostManagement/CostManagement.Autorest/internal/Az.CostManagement.internal.psm1 index 3422b1a9e074..f898440bcbb4 100644 --- a/src/CostManagement/CostManagement.Autorest/internal/Az.CostManagement.internal.psm1 +++ b/src/CostManagement/CostManagement.Autorest/internal/Az.CostManagement.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/CostManagement/CostManagement.Autorest/internal/Get-AzCostManagementOperation.ps1 b/src/CostManagement/CostManagement.Autorest/internal/Get-AzCostManagementOperation.ps1 index 63d2771380e2..4afeb5185eee 100644 --- a/src/CostManagement/CostManagement.Autorest/internal/Get-AzCostManagementOperation.ps1 +++ b/src/CostManagement/CostManagement.Autorest/internal/Get-AzCostManagementOperation.ps1 @@ -38,7 +38,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] diff --git a/src/CostManagement/CostManagement.Autorest/internal/New-AzCostManagementExport.ps1 b/src/CostManagement/CostManagement.Autorest/internal/New-AzCostManagementExport.ps1 index 00639d61e5f8..277610a1e75a 100644 --- a/src/CostManagement/CostManagement.Autorest/internal/New-AzCostManagementExport.ps1 +++ b/src/CostManagement/CostManagement.Autorest/internal/New-AzCostManagementExport.ps1 @@ -184,7 +184,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] diff --git a/src/CostManagement/CostManagement.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/CostManagement/CostManagement.Autorest/internal/ProxyCmdletDefinitions.ps1 index d56b64052642..30d2e0a7f036 100644 --- a/src/CostManagement/CostManagement.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/CostManagement/CostManagement.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -38,7 +38,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -293,7 +294,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -576,7 +578,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] diff --git a/src/CostManagement/CostManagement.Autorest/internal/Update-AzCostManagementExport.ps1 b/src/CostManagement/CostManagement.Autorest/internal/Update-AzCostManagementExport.ps1 index 38052a57443e..9b6c901a3538 100644 --- a/src/CostManagement/CostManagement.Autorest/internal/Update-AzCostManagementExport.ps1 +++ b/src/CostManagement/CostManagement.Autorest/internal/Update-AzCostManagementExport.ps1 @@ -212,7 +212,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.CostManagement.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] diff --git a/src/CostManagement/CostManagement.Autorest/test-module.ps1 b/src/CostManagement/CostManagement.Autorest/test-module.ps1 index 2d9365c85c14..59e7b5dad6fd 100644 --- a/src/CostManagement/CostManagement.Autorest/test-module.ps1 +++ b/src/CostManagement/CostManagement.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-------------' \ No newline at end of file diff --git a/src/CostManagement/CostManagement.Autorest/test/loadEnv.ps1 b/src/CostManagement/CostManagement.Autorest/test/loadEnv.ps1 index 5f079e89615e..6a7c385c6b7d 100644 --- a/src/CostManagement/CostManagement.Autorest/test/loadEnv.ps1 +++ b/src/CostManagement/CostManagement.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/CostManagement/CostManagement.Autorest/test/utils.ps1 b/src/CostManagement/CostManagement.Autorest/test/utils.ps1 index cd9afa405b5a..9b923aa5eec3 100644 --- a/src/CostManagement/CostManagement.Autorest/test/utils.ps1 +++ b/src/CostManagement/CostManagement.Autorest/test/utils.ps1 @@ -78,7 +78,7 @@ function setupEnv() { New-AzDeployment -Mode Incremental -TemplateFile .\test\deployment-templates\storage-account\template.json -TemplateParameterFile .\test\deployment-templates\storage-account\parameters.json -ResourceGroupName $env.resourceGroup $staaccountName = 'staaccountjshubiu' # Value in template.json $env.storageAccountId = "/subscriptions/$($env.SubscriptionId)/resourceGroups/$($env.resourceGroup)/providers/Microsoft.Storage/storageAccounts/$($staaccountName)" - Start-TestSleep -Seconds 60 # Waiting storage account create complete. + Start-Sleep -s 60 # Waiting storage account create complete. Write-Host -ForegroundColor Green "The storage account deployed successfully." Write-Host -ForegroundColor Green "Create cost management export for test..." diff --git a/src/CostManagement/CostManagement.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 b/src/CostManagement/CostManagement.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/src/CostManagement/CostManagement.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/CostManagement/CostManagement/Az.CostManagement.psd1 b/src/CostManagement/CostManagement/Az.CostManagement.psd1 index bd228fdc4430..14d2f7e9a53d 100644 --- a/src/CostManagement/CostManagement/Az.CostManagement.psd1 +++ b/src/CostManagement/CostManagement/Az.CostManagement.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 12/5/2023 +# Generated on: 4/23/2024 # @{ @@ -51,7 +51,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.12.1'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.17.0'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'CostManagement.Autorest/bin/Az.CostManagement.private.dll' @@ -63,7 +63,7 @@ ScriptsToProcess = @() TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = 'CostManagement.Autorest/Az.CostManagement.format.ps1xml' +FormatsToProcess = 'CostManagement.Autorest\Az.CostManagement.format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @('CostManagement.Autorest/Az.CostManagement.psm1') diff --git a/src/CostManagement/CostManagement/ChangeLog.md b/src/CostManagement/CostManagement/ChangeLog.md index 414ff5c2bce9..9939c87a5a81 100644 --- a/src/CostManagement/CostManagement/ChangeLog.md +++ b/src/CostManagement/CostManagement/ChangeLog.md @@ -19,6 +19,7 @@ --> ## Upcoming Release +* Introduced secrets detection feature to safeguard sensitive data. ## Version 0.3.1 * Fixed an error that values in row could be null when grouping by the value of TagKey in Invoke-AzCostManagementQuery cmdlet. diff --git a/src/CostManagement/CostManagement/help/Az.CostManagement.md b/src/CostManagement/CostManagement/help/Az.CostManagement.md index b751c9eb4c00..bfab6addd547 100644 --- a/src/CostManagement/CostManagement/help/Az.CostManagement.md +++ b/src/CostManagement/CostManagement/help/Az.CostManagement.md @@ -26,7 +26,7 @@ Query the usage data for scope defined. ### [Invoke-AzCostManagementReservationDetailReport](Invoke-AzCostManagementReservationDetailReport.md) Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. -For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role +For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role ### [New-AzCostManagementDetailReport](New-AzCostManagementDetailReport.md) This API is the replacement for all previously release Usage Details APIs. diff --git a/src/CostManagement/CostManagement/help/Get-AzCostManagementExport.md b/src/CostManagement/CostManagement/help/Get-AzCostManagementExport.md index 07000745ef94..f4bec0bcfd18 100644 --- a/src/CostManagement/CostManagement/help/Get-AzCostManagementExport.md +++ b/src/CostManagement/CostManagement/help/Get-AzCostManagementExport.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CostManagement-help.xml Module Name: Az.CostManagement online version: https://learn.microsoft.com/powershell/module/az.costmanagement/get-azcostmanagementexport schema: 2.0.0 @@ -15,19 +15,19 @@ The operation to get the export for the defined scope by export name. ### List (Default) ``` Get-AzCostManagementExport -Scope [-Expand ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### Get ``` Get-AzCostManagementExport -Name -Scope [-Expand ] [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzCostManagementExport -InputObject [-Expand ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -66,7 +66,8 @@ Get AzCostManagementExport by Name and scope ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -127,12 +128,27 @@ 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 +``` + ### -Scope This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'. ```yaml Type: System.String -Parameter Sets: Get, List +Parameter Sets: List, Get Aliases: Required: True @@ -155,24 +171,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[AlertId ]`: Alert ID - - `[BillingAccountId ]`: Enrollment ID (Legacy BillingAccount ID) - - `[BillingProfileId ]`: BillingProfile ID - - `[ExportName ]`: Export Name. - - `[ExternalCloudProviderId ]`: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - - `[ExternalCloudProviderType ]`: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - - `[Id ]`: Resource identity path - - `[OperationId ]`: The target operation Id. - - `[Scope ]`: The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. - - `[ViewName ]`: View name - ## RELATED LINKS - diff --git a/src/CostManagement/CostManagement/help/Get-AzCostManagementExportExecutionHistory.md b/src/CostManagement/CostManagement/help/Get-AzCostManagementExportExecutionHistory.md index e9c320c6e4d7..0a5574fd2057 100644 --- a/src/CostManagement/CostManagement/help/Get-AzCostManagementExportExecutionHistory.md +++ b/src/CostManagement/CostManagement/help/Get-AzCostManagementExportExecutionHistory.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CostManagement-help.xml Module Name: Az.CostManagement online version: https://learn.microsoft.com/powershell/module/az.costmanagement/get-azcostmanagementexportexecutionhistory schema: 2.0.0 @@ -15,13 +15,13 @@ The operation to get the execution history of an export for the defined scope an ### Get (Default) ``` Get-AzCostManagementExportExecutionHistory -ExportName -Scope [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ### GetViaIdentity ``` Get-AzCostManagementExportExecutionHistory -InputObject [-DefaultProfile ] - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -61,7 +61,8 @@ Get AzCostManagementExportExecutionHistory By InputObject ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -106,6 +107,21 @@ Accept pipeline input: True (ByValue) 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 +``` + ### -Scope This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'. @@ -134,24 +150,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[AlertId ]`: Alert ID - - `[BillingAccountId ]`: Enrollment ID (Legacy BillingAccount ID) - - `[BillingProfileId ]`: BillingProfile ID - - `[ExportName ]`: Export Name. - - `[ExternalCloudProviderId ]`: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - - `[ExternalCloudProviderType ]`: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - - `[Id ]`: Resource identity path - - `[OperationId ]`: The target operation Id. - - `[Scope ]`: The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. - - `[ViewName ]`: View name - ## RELATED LINKS - diff --git a/src/CostManagement/CostManagement/help/Invoke-AzCostManagementExecuteExport.md b/src/CostManagement/CostManagement/help/Invoke-AzCostManagementExecuteExport.md index 2ff32d883263..b31a075b1325 100644 --- a/src/CostManagement/CostManagement/help/Invoke-AzCostManagementExecuteExport.md +++ b/src/CostManagement/CostManagement/help/Invoke-AzCostManagementExecuteExport.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CostManagement-help.xml Module Name: Az.CostManagement online version: https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementexecuteexport schema: 2.0.0 @@ -15,13 +15,13 @@ The operation to execute an export. ### Execute (Default) ``` Invoke-AzCostManagementExecuteExport -ExportName -Scope [-DefaultProfile ] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### ExecuteViaIdentity ``` Invoke-AzCostManagementExecuteExport -InputObject [-DefaultProfile ] - [-PassThru] [-Confirm] [-WhatIf] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -47,7 +47,8 @@ Invoke Export by InputObject ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -107,6 +108,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 +``` + ### -Scope This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'. @@ -166,24 +182,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[AlertId ]`: Alert ID - - `[BillingAccountId ]`: Enrollment ID (Legacy BillingAccount ID) - - `[BillingProfileId ]`: BillingProfile ID - - `[ExportName ]`: Export Name. - - `[ExternalCloudProviderId ]`: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - - `[ExternalCloudProviderType ]`: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - - `[Id ]`: Resource identity path - - `[OperationId ]`: The target operation Id. - - `[Scope ]`: The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. - - `[ViewName ]`: View name - ## RELATED LINKS - diff --git a/src/CostManagement/CostManagement/help/Invoke-AzCostManagementQuery.md b/src/CostManagement/CostManagement/help/Invoke-AzCostManagementQuery.md index 1e64e9d5b26f..25458dc5303d 100644 --- a/src/CostManagement/CostManagement/help/Invoke-AzCostManagementQuery.md +++ b/src/CostManagement/CostManagement/help/Invoke-AzCostManagementQuery.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CostManagement-help.xml Module Name: Az.CostManagement online version: https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementquery schema: 2.0.0 @@ -17,7 +17,8 @@ Query the usage data for scope defined. Invoke-AzCostManagementQuery -Scope -Timeframe -Type [-ConfigurationColumn ] [-DatasetAggregation ] [-DatasetFilter ] [-DatasetGranularity ] [-DatasetGrouping ] [-TimePeriodFrom ] - [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-TimePeriodTo ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### UsageExpanded1 @@ -26,7 +27,8 @@ Invoke-AzCostManagementQuery -ExternalCloudProviderId -ExternalCloudProviderType -Timeframe -Type [-ConfigurationColumn ] [-DatasetAggregation ] [-DatasetFilter ] [-DatasetGranularity ] [-DatasetGrouping ] [-TimePeriodFrom ] - [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-TimePeriodTo ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -186,6 +188,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 +``` + ### -Scope This includes 'subscriptions/{subscriptionId}/' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId} for Management Group scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. @@ -303,25 +320,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`DATASETFILTER `: Has filter expression to use in the query. - - `[And ]`: The logical "AND" expression. Must have at least 2 items. - - `[Dimensions ]`: Has comparison expression for a dimension - - `Name `: The name of the column to use in comparison. - - `Value `: Array of values to use for comparison - - `[Not ]`: The logical "NOT" expression. - - `[Or ]`: The logical "OR" expression. Must have at least 2 items. - - `[Tag ]`: Has comparison expression for a tag - -`DATASETGROUPING `: Array of group by expression to use in the query. - - `Name `: The name of the column to group. - - `Type `: Has type of the column to group. - ## RELATED LINKS - diff --git a/src/CostManagement/CostManagement/help/Invoke-AzCostManagementReservationDetailReport.md b/src/CostManagement/CostManagement/help/Invoke-AzCostManagementReservationDetailReport.md index 6fae9dafc90b..ae5bcba1ce6a 100644 --- a/src/CostManagement/CostManagement/help/Invoke-AzCostManagementReservationDetailReport.md +++ b/src/CostManagement/CostManagement/help/Invoke-AzCostManagementReservationDetailReport.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CostManagement-help.xml Module Name: Az.CostManagement online version: https://learn.microsoft.com/powershell/module/az.costmanagement/invoke-azcostmanagementreservationdetailreport schema: 2.0.0 @@ -10,27 +10,28 @@ schema: 2.0.0 ## SYNOPSIS Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. -For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role +For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role ## SYNTAX ### By (Default) ``` -Invoke-AzCostManagementReservationDetailReport -BillingAccountId -EndDate - -StartDate [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +Invoke-AzCostManagementReservationDetailReport -BillingAccountId -EndDate -StartDate + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### By1 ``` Invoke-AzCostManagementReservationDetailReport -BillingAccountId -BillingProfileId - -EndDate -StartDate [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] - [] + -EndDate -StartDate [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION Generates the reservations details report for provided date range asynchronously based on enrollment id. The Reservation usage details can be viewed only by certain enterprise roles. -For more details on the roles see, https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role +For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles#usage-and-costs-access-by-role ## EXAMPLES @@ -89,7 +90,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -133,6 +135,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 +``` + ### -StartDate Start Date @@ -190,7 +207,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CostManagement/CostManagement/help/New-AzCostManagementDetailReport.md b/src/CostManagement/CostManagement/help/New-AzCostManagementDetailReport.md index 76cf10009ef3..44432c7e83eb 100644 --- a/src/CostManagement/CostManagement/help/New-AzCostManagementDetailReport.md +++ b/src/CostManagement/CostManagement/help/New-AzCostManagementDetailReport.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CostManagement-help.xml Module Name: Az.CostManagement online version: https://learn.microsoft.com/powershell/module/az.costmanagement/new-azcostmanagementdetailreport schema: 2.0.0 @@ -22,7 +22,8 @@ The details on the file(s) available for download will be available in the polli ``` New-AzCostManagementDetailReport -Scope [-BillingPeriod ] [-InvoiceId ] [-Metric ] [-TimePeriodEnd ] [-TimePeriodStart ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -81,7 +82,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -144,6 +146,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 +``` + ### -Scope The scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope. @@ -235,7 +252,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CostManagement/CostManagement/help/New-AzCostManagementExport.md b/src/CostManagement/CostManagement/help/New-AzCostManagementExport.md index c5ee2ebfe549..77e9dce5237f 100644 --- a/src/CostManagement/CostManagement/help/New-AzCostManagementExport.md +++ b/src/CostManagement/CostManagement/help/New-AzCostManagementExport.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CostManagement-help.xml Module Name: Az.CostManagement online version: https://learn.microsoft.com/powershell/module/az.costmanagement/new-azcostmanagementexport schema: 2.0.0 @@ -21,7 +21,8 @@ New-AzCostManagementExport -Name -Scope [-ConfigurationColumn [-DestinationContainer ] [-DestinationResourceId ] [-DestinationRootFolderPath ] [-Format ] [-RecurrencePeriodFrom ] [-RecurrencePeriodTo ] [-ScheduleRecurrence ] [-ScheduleStatus ] [-TimePeriodFrom ] - [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-TimePeriodTo ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -203,6 +204,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 +``` + ### -RecurrencePeriodFrom The start date of recurrence. @@ -351,7 +367,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CostManagement/CostManagement/help/New-AzCostManagementQueryComparisonExpressionObject.md b/src/CostManagement/CostManagement/help/New-AzCostManagementQueryComparisonExpressionObject.md index 396a0ab309f4..a6814b99b7b0 100644 --- a/src/CostManagement/CostManagement/help/New-AzCostManagementQueryComparisonExpressionObject.md +++ b/src/CostManagement/CostManagement/help/New-AzCostManagementQueryComparisonExpressionObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CostManagement-help.xml Module Name: Az.CostManagement online version: https://learn.microsoft.com/powershell/module/az.CostManagement/new-AzCostManagementQueryComparisonExpressionObject schema: 2.0.0 @@ -14,7 +14,7 @@ Create a in-memory object for QueryComparisonExpression ``` New-AzCostManagementQueryComparisonExpressionObject -Name -Operator -Value - [] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -67,6 +67,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 +``` + ### -Value Array of values to use for comparison. @@ -93,7 +108,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS - diff --git a/src/CostManagement/CostManagement/help/New-AzCostManagementQueryFilterObject.md b/src/CostManagement/CostManagement/help/New-AzCostManagementQueryFilterObject.md index 8d6f7e2ad43a..aeec6eaaff58 100644 --- a/src/CostManagement/CostManagement/help/New-AzCostManagementQueryFilterObject.md +++ b/src/CostManagement/CostManagement/help/New-AzCostManagementQueryFilterObject.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CostManagement-help.xml Module Name: Az.CostManagement online version: https://learn.microsoft.com/powershell/module/az.CostManagement/new-AzCostManagementQueryFilterObject schema: 2.0.0 @@ -14,7 +14,8 @@ Create a in-memory object for QueryFilter ``` New-AzCostManagementQueryFilterObject [-And ] [-Dimensions ] - [-Not ] [-Or ] [-Tag ] [] + [-Not ] [-Or ] [-Tag ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -107,6 +108,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 +``` + ### -Tag Has comparison expression for a tag. To construct, see NOTES section for TAG properties and create a hash table. @@ -134,47 +150,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`AND `: The logical "AND" expression. Must have at least 2 items. - - `[And ]`: The logical "AND" expression. Must have at least 2 items. - - `[Dimensions ]`: Has comparison expression for a dimension - - `Name `: The name of the column to use in comparison. - - `Value `: Array of values to use for comparison - - `[Not ]`: The logical "NOT" expression. - - `[Or ]`: The logical "OR" expression. Must have at least 2 items. - - `[Tag ]`: Has comparison expression for a tag - -`DIMENSIONS `: Has comparison expression for a dimensions. - - `Name `: The name of the column to use in comparison. - - `Value `: Array of values to use for comparison - -`NOT `: The logical "NOT" expression. - - `[And ]`: The logical "AND" expression. Must have at least 2 items. - - `[Dimensions ]`: Has comparison expression for a dimension - - `Name `: The name of the column to use in comparison. - - `Value `: Array of values to use for comparison - - `[Not ]`: The logical "NOT" expression. - - `[Or ]`: The logical "OR" expression. Must have at least 2 items. - - `[Tag ]`: Has comparison expression for a tag - -`OR `: The logical "OR" expression. Must have at least 2 items. - - `[And ]`: The logical "AND" expression. Must have at least 2 items. - - `[Dimensions ]`: Has comparison expression for a dimension - - `Name `: The name of the column to use in comparison. - - `Value `: Array of values to use for comparison - - `[Not ]`: The logical "NOT" expression. - - `[Or ]`: The logical "OR" expression. Must have at least 2 items. - - `[Tag ]`: Has comparison expression for a tag - -`TAG `: Has comparison expression for a tag. - - `Name `: The name of the column to use in comparison. - - `Value `: Array of values to use for comparison - ## RELATED LINKS - diff --git a/src/CostManagement/CostManagement/help/Remove-AzCostManagementExport.md b/src/CostManagement/CostManagement/help/Remove-AzCostManagementExport.md index fd38a7fe916b..62bcecaf40ad 100644 --- a/src/CostManagement/CostManagement/help/Remove-AzCostManagementExport.md +++ b/src/CostManagement/CostManagement/help/Remove-AzCostManagementExport.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CostManagement-help.xml Module Name: Az.CostManagement online version: https://learn.microsoft.com/powershell/module/az.costmanagement/remove-azcostmanagementexport schema: 2.0.0 @@ -15,13 +15,13 @@ The operation to delete a export. ### Delete (Default) ``` Remove-AzCostManagementExport -Name -Scope [-DefaultProfile ] [-PassThru] - [-Confirm] [-WhatIf] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzCostManagementExport -InputObject [-DefaultProfile ] [-PassThru] - [-Confirm] [-WhatIf] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -47,7 +47,8 @@ Delete the AzCostManagementExport By InputObject ## PARAMETERS ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -107,6 +108,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 +``` + ### -Scope This parameter defines the scope of costmanagement from different perspectives 'Subscription','ResourceGroup' and 'Provide Service'. @@ -166,24 +182,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[AlertId ]`: Alert ID - - `[BillingAccountId ]`: Enrollment ID (Legacy BillingAccount ID) - - `[BillingProfileId ]`: BillingProfile ID - - `[ExportName ]`: Export Name. - - `[ExternalCloudProviderId ]`: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - - `[ExternalCloudProviderType ]`: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - - `[Id ]`: Resource identity path - - `[OperationId ]`: The target operation Id. - - `[Scope ]`: The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. - - `[ViewName ]`: View name - ## RELATED LINKS - diff --git a/src/CostManagement/CostManagement/help/Update-AzCostManagementExport.md b/src/CostManagement/CostManagement/help/Update-AzCostManagementExport.md index aacc734b9ae9..622213b2b15a 100644 --- a/src/CostManagement/CostManagement/help/Update-AzCostManagementExport.md +++ b/src/CostManagement/CostManagement/help/Update-AzCostManagementExport.md @@ -1,5 +1,5 @@ --- -external help file: +external help file: Az.CostManagement-help.xml Module Name: Az.CostManagement online version: https://learn.microsoft.com/powershell/module/az.costmanagement/update-azcostmanagementexport schema: 2.0.0 @@ -22,7 +22,8 @@ Update-AzCostManagementExport -Name -Scope [-ConfigurationColu [-DestinationContainer ] [-DestinationResourceId ] [-DestinationRootFolderPath ] [-ETag ] [-Format ] [-RecurrencePeriodFrom ] [-RecurrencePeriodTo ] [-ScheduleRecurrence ] [-ScheduleStatus ] [-TimePeriodFrom ] - [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-TimePeriodTo ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### UpdateViaIdentityExpanded @@ -32,7 +33,8 @@ Update-AzCostManagementExport -InputObject [-Configura [-DestinationContainer ] [-DestinationResourceId ] [-DestinationRootFolderPath ] [-ETag ] [-Format ] [-RecurrencePeriodFrom ] [-RecurrencePeriodTo ] [-ScheduleRecurrence ] [-ScheduleStatus ] [-TimePeriodFrom ] - [-TimePeriodTo ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] + [-TimePeriodTo ] [-DefaultProfile ] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ## DESCRIPTION @@ -260,6 +262,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 +``` + ### -RecurrencePeriodFrom The start date of recurrence. @@ -410,24 +427,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`INPUTOBJECT `: Identity Parameter - - `[AlertId ]`: Alert ID - - `[BillingAccountId ]`: Enrollment ID (Legacy BillingAccount ID) - - `[BillingProfileId ]`: BillingProfile ID - - `[ExportName ]`: Export Name. - - `[ExternalCloudProviderId ]`: This can be '{externalSubscriptionId}' for linked account or '{externalBillingAccountId}' for consolidated account used with dimension/query operations. - - `[ExternalCloudProviderType ]`: The external cloud provider type associated with dimension/query operations. This includes 'externalSubscriptions' for linked account and 'externalBillingAccounts' for consolidated account. - - `[Id ]`: Resource identity path - - `[OperationId ]`: The target operation Id. - - `[Scope ]`: The scope associated with view operations. This includes 'subscriptions/{subscriptionId}' for subscription scope, 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for InvoiceSection scope, 'providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, 'providers/Microsoft.CostManagement/externalBillingAccounts/{externalBillingAccountName}' for External Billing Account scope and 'providers/Microsoft.CostManagement/externalSubscriptions/{externalSubscriptionName}' for External Subscription scope. - - `[ViewName ]`: View name - ## RELATED LINKS -