diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.psm1 b/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.psm1 index e837ea4375d7..8b9042a3806a 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.psm1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.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.ConnectedMachine.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/ConnectedMachine/ConnectedMachine.Autorest/generated/Module.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/Module.cs index da07ff8e945d..b23b733cad95 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/Module.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/Module.cs @@ -17,6 +17,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine 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 @@ -59,6 +61,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; } + /// the singleton of this module class public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } @@ -77,6 +82,9 @@ public partial class Module /// The ResourceID for this module (azure arm). public string ResourceId => @"Az.ConnectedMachine"; + /// 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/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedExtensionMetadata_Get.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedExtensionMetadata_Get.cs index dc788aae3ab7..c72de3c7f187 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedExtensionMetadata_Get.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedExtensionMetadata_Get.cs @@ -248,6 +248,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -421,6 +431,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedExtensionMetadata_List.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedExtensionMetadata_List.cs index c1ab95ee619a..fa728204e7f0 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedExtensionMetadata_List.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedExtensionMetadata_List.cs @@ -232,6 +232,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -405,6 +415,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineExtension_Get.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineExtension_Get.cs index 6726c973a56b..1a8330ce760b 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineExtension_Get.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineExtension_Get.cs @@ -232,6 +232,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -405,6 +415,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineExtension_List.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineExtension_List.cs index 1d8ad6b7fe98..42106356e70b 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineExtension_List.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineExtension_List.cs @@ -238,6 +238,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -411,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineRunCommand_Get.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineRunCommand_Get.cs index c51431aca91c..eca276d632ae 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineRunCommand_Get.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineRunCommand_Get.cs @@ -232,6 +232,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -405,6 +415,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineRunCommand_List.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineRunCommand_List.cs index d321e99e22a0..a3c0fefe7e7c 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineRunCommand_List.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachineRunCommand_List.cs @@ -238,6 +238,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -411,6 +421,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_Get.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_Get.cs index dad0398d1c43..eee40ba87f0c 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_Get.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_Get.cs @@ -235,6 +235,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -408,6 +418,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_List.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_List.cs index 530cd97b0738..e7cd1e3e273c 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_List.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_List.cs @@ -227,6 +227,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -400,6 +410,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_List1.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_List1.cs index 176cb38a0503..6b498ae03a1b 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_List1.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedMachine_List1.cs @@ -195,6 +195,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -368,6 +378,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedOperation_List.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedOperation_List.cs index 70cb3a738f5d..c8134700fefb 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedOperation_List.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedOperation_List.cs @@ -168,6 +168,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -338,6 +348,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_Get.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_Get.cs index 645efc811cd5..7339348b0830 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_Get.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_Get.cs @@ -218,6 +218,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -391,6 +401,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_List.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_List.cs index 6096f68ae6af..fbbefbd54f06 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_List.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_List.cs @@ -192,6 +192,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -365,6 +375,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_List1.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_List1.cs index 55f964647817..7094759992e7 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_List1.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/GetAzConnectedPrivateLinkScope_List1.cs @@ -210,6 +210,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -383,6 +393,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InstallAzConnectedMachinePatch_InstallExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InstallAzConnectedMachinePatch_InstallExpanded.cs index c7071a6d4423..7c552898b26e 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InstallAzConnectedMachinePatch_InstallExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InstallAzConnectedMachinePatch_InstallExpanded.cs @@ -386,6 +386,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -605,6 +615,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InstallAzConnectedMachinePatch_InstallViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InstallAzConnectedMachinePatch_InstallViaIdentityExpanded.cs index 9918e2e26f53..7ae23fd48c17 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InstallAzConnectedMachinePatch_InstallViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InstallAzConnectedMachinePatch_InstallViaIdentityExpanded.cs @@ -342,6 +342,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -581,6 +591,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InvokeAzConnectedAssessMachinePatch_Assess.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InvokeAzConnectedAssessMachinePatch_Assess.cs index c6923d5797c3..f9ff0eee987a 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InvokeAzConnectedAssessMachinePatch_Assess.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InvokeAzConnectedAssessMachinePatch_Assess.cs @@ -254,6 +254,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -473,6 +483,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InvokeAzConnectedAssessMachinePatch_AssessViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InvokeAzConnectedAssessMachinePatch_AssessViaIdentity.cs index 1279268ca038..abfbec5c69e6 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InvokeAzConnectedAssessMachinePatch_AssessViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/InvokeAzConnectedAssessMachinePatch_AssessViaIdentity.cs @@ -208,6 +208,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// @@ -447,6 +457,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_Create.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_Create.cs index 115bb214ad33..088691d039fa 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_Create.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_Create.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -503,6 +513,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateExpanded.cs index 89b603b9ab66..2c174958f0eb 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateExpanded.cs @@ -490,6 +490,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -709,6 +719,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentity.cs index 064c85eed09a..2242a0050656 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentity.cs @@ -223,6 +223,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -466,6 +476,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityExpanded.cs index 43d568e46af8..5dc472c96c97 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityExpanded.cs @@ -431,6 +431,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -674,6 +684,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachine.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachine.cs index 93a69f806f65..d2baa3aa67e7 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachine.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachine.cs @@ -238,6 +238,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -478,6 +488,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachineExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachineExpanded.cs index 0fef79bd38d6..0bd0d9673ed5 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachineExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachineExpanded.cs @@ -446,6 +446,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -687,6 +697,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaJsonFilePath.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaJsonFilePath.cs index 5df62f910fe9..8411ac1a0ea2 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaJsonFilePath.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaJsonFilePath.cs @@ -286,6 +286,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -505,6 +515,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaJsonString.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaJsonString.cs index 7ed46d9150fc..245456993df5 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaJsonString.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaJsonString.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -503,6 +513,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_Create.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_Create.cs index 4b581e83ef3e..3feaa1150a19 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_Create.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_Create.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -503,6 +513,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateExpanded.cs index 34d5f5af5dde..f02696d674d3 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateExpanded.cs @@ -513,6 +513,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -732,6 +742,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentity.cs index d464004f7a30..65010cc3b6d5 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentity.cs @@ -223,6 +223,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -466,6 +476,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityExpanded.cs index e68f6fd754c0..3ac2fe37ecdf 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityExpanded.cs @@ -454,6 +454,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -697,6 +707,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachine.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachine.cs index 1e424a3536de..131851d3379e 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachine.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachine.cs @@ -240,6 +240,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -480,6 +490,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachineExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachineExpanded.cs index 541852c6e544..1eb29893e17d 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachineExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachineExpanded.cs @@ -469,6 +469,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -710,6 +720,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaJsonFilePath.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaJsonFilePath.cs index 1fe3a76cdcf7..b4b0969aab08 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaJsonFilePath.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaJsonFilePath.cs @@ -286,6 +286,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -505,6 +515,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaJsonString.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaJsonString.cs index 1e1c4ba6d466..51dc2aa2a03c 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaJsonString.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaJsonString.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -503,6 +513,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_Create.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_Create.cs index 15feece35618..338723a1de3d 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_Create.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_Create.cs @@ -247,6 +247,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -420,6 +430,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.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.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateExpanded.cs index 8fb60501b50e..5f26352989d2 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateExpanded.cs @@ -277,6 +277,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -450,6 +460,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.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.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentity.cs index 40fcfa7f2321..df0f50a696fd 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentity.cs @@ -204,6 +204,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -397,6 +407,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.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.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentityExpanded.cs index ca9d7cb51a0d..fba1dd111490 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentityExpanded.cs @@ -234,6 +234,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -427,6 +437,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.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.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaJsonFilePath.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaJsonFilePath.cs index 5d229a2292df..5e454f3ebf6b 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaJsonFilePath.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaJsonFilePath.cs @@ -249,6 +249,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -422,6 +432,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.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.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaJsonString.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaJsonString.cs index 9416b6658846..9ce0e6409f8d 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaJsonString.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaJsonString.cs @@ -247,6 +247,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -420,6 +430,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.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.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_Delete.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_Delete.cs index 3e3365ec826a..2593896d0ddd 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_Delete.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_Delete.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -503,6 +513,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_DeleteViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_DeleteViaIdentity.cs index 0155e22200fe..f754bbeb14e5 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_DeleteViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_DeleteViaIdentity.cs @@ -223,6 +223,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -466,6 +476,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_DeleteViaIdentityMachine.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_DeleteViaIdentityMachine.cs index 2c0baf7f3d4e..6604766115d0 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_DeleteViaIdentityMachine.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineExtension_DeleteViaIdentityMachine.cs @@ -240,6 +240,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -480,6 +490,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_Delete.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_Delete.cs index 3e84e6c43263..c249a97bc391 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_Delete.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_Delete.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -503,6 +513,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_DeleteViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_DeleteViaIdentity.cs index 6f5ae395d24b..93eadacd00ce 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_DeleteViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_DeleteViaIdentity.cs @@ -223,6 +223,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -466,6 +476,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_DeleteViaIdentityMachine.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_DeleteViaIdentityMachine.cs index c48148f35e1d..95e617c52f70 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_DeleteViaIdentityMachine.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachineRunCommand_DeleteViaIdentityMachine.cs @@ -240,6 +240,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -480,6 +490,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachine_Delete.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachine_Delete.cs index b026f254f95a..230448a4a325 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachine_Delete.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachine_Delete.cs @@ -234,6 +234,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -407,6 +417,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachine_DeleteViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachine_DeleteViaIdentity.cs index 20b3234acc95..28f30ec919ff 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachine_DeleteViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedMachine_DeleteViaIdentity.cs @@ -190,6 +190,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -383,6 +393,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedPrivateLinkScope_Delete.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedPrivateLinkScope_Delete.cs index 69736c78e12e..e49f660a4ec2 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedPrivateLinkScope_Delete.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedPrivateLinkScope_Delete.cs @@ -269,6 +269,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -488,6 +498,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedPrivateLinkScope_DeleteViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedPrivateLinkScope_DeleteViaIdentity.cs index aa4b8cbfd3b3..c7d780386052 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedPrivateLinkScope_DeleteViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/RemoveAzConnectedPrivateLinkScope_DeleteViaIdentity.cs @@ -223,6 +223,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -462,6 +472,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_Update.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_Update.cs index 340677cf0f59..7506d438de35 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_Update.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_Update.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -503,6 +513,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateExpanded.cs index 46353d7ecf03..a5c429168d41 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateExpanded.cs @@ -490,6 +490,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -709,6 +719,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateViaJsonFilePath.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateViaJsonFilePath.cs index 57a945c1ad24..b4ff1338f66f 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateViaJsonFilePath.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateViaJsonFilePath.cs @@ -286,6 +286,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -505,6 +515,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateViaJsonString.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateViaJsonString.cs index f39cc988ee85..fe4df88d65c3 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateViaJsonString.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateViaJsonString.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -503,6 +513,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_Update.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_Update.cs index 63a9feda4bf2..0f6676c1bedf 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_Update.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_Update.cs @@ -247,6 +247,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -420,6 +430,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.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.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateExpanded.cs index 49dcccf44b42..aa98f7af99d8 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateExpanded.cs @@ -277,6 +277,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -450,6 +460,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.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.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateViaJsonFilePath.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateViaJsonFilePath.cs index c4171760c823..194116e25230 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateViaJsonFilePath.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateViaJsonFilePath.cs @@ -249,6 +249,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -422,6 +432,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.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.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateViaJsonString.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateViaJsonString.cs index d06f59406e60..4226fa4ab5e7 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateViaJsonString.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateViaJsonString.cs @@ -247,6 +247,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -420,6 +430,21 @@ protected override void StopProcessing() base.StopProcessing(); } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.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.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_Upgrade.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_Upgrade.cs index 2ee51184c6ff..21311c4d55ce 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_Upgrade.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_Upgrade.cs @@ -274,6 +274,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -493,6 +503,21 @@ public UpdateAzConnectedExtension_Upgrade() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeExpanded.cs index 2d5677f7b728..52724b9c2002 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeExpanded.cs @@ -275,6 +275,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -494,6 +504,21 @@ public UpdateAzConnectedExtension_UpgradeExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaIdentity.cs index fd5146bc3f7d..37ced787f1fc 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaIdentity.cs @@ -228,6 +228,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -467,6 +477,21 @@ public UpdateAzConnectedExtension_UpgradeViaIdentity() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaIdentityExpanded.cs index 00084eeb5b13..41b50c1aa65c 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaIdentityExpanded.cs @@ -229,6 +229,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -468,6 +478,21 @@ public UpdateAzConnectedExtension_UpgradeViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaJsonFilePath.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaJsonFilePath.cs index 0134caadac42..193c547f7afe 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaJsonFilePath.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaJsonFilePath.cs @@ -276,6 +276,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -495,6 +505,21 @@ public UpdateAzConnectedExtension_UpgradeViaJsonFilePath() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaJsonString.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaJsonString.cs index ef374e1c9a79..d6da58003ecf 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaJsonString.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedExtension_UpgradeViaJsonString.cs @@ -274,6 +274,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -493,6 +503,21 @@ public UpdateAzConnectedExtension_UpgradeViaJsonString() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_Update.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_Update.cs index e5e9a01a2b28..0419659537a0 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_Update.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_Update.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -503,6 +513,21 @@ public UpdateAzConnectedMachineExtension_Update() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateExpanded.cs index 8985232c50d4..f32467fba9a1 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateExpanded.cs @@ -386,6 +386,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -605,6 +615,21 @@ public UpdateAzConnectedMachineExtension_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentity.cs index 26b7b9d64fd3..29f77dd4bdca 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentity.cs @@ -223,6 +223,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -466,6 +476,21 @@ public UpdateAzConnectedMachineExtension_UpdateViaIdentity() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityExpanded.cs index 0538518ad6d4..b91812793652 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityExpanded.cs @@ -327,6 +327,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -570,6 +580,21 @@ public UpdateAzConnectedMachineExtension_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachine.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachine.cs index fa0acf4db741..cd099614377d 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachine.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachine.cs @@ -240,6 +240,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -480,6 +490,21 @@ public UpdateAzConnectedMachineExtension_UpdateViaIdentityMachine() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachineExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachineExpanded.cs index ef5d116265ad..0ad21fd4c26a 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachineExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachineExpanded.cs @@ -342,6 +342,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -583,6 +593,21 @@ public UpdateAzConnectedMachineExtension_UpdateViaIdentityMachineExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaJsonFilePath.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaJsonFilePath.cs index 68de1eae797e..c408a0dd1f5f 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaJsonFilePath.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaJsonFilePath.cs @@ -286,6 +286,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -505,6 +515,21 @@ public UpdateAzConnectedMachineExtension_UpdateViaJsonFilePath() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaJsonString.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaJsonString.cs index 6268c5d02214..babfef424167 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaJsonString.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaJsonString.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -503,6 +513,21 @@ public UpdateAzConnectedMachineExtension_UpdateViaJsonString() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_Update.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_Update.cs index a251db2424f4..b800c651abca 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_Update.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_Update.cs @@ -284,6 +284,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -513,6 +523,21 @@ private void UpdateRunCommandProperty() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateExpanded.cs index 412efdf93492..959c704e8fad 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateExpanded.cs @@ -498,6 +498,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -795,6 +805,21 @@ private void Update_runCommandPropertiesBody() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentity.cs index 45ad5851f46b..a4b5960e04be 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentity.cs @@ -223,6 +223,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -478,6 +488,21 @@ private void UpdateRunCommandProperty() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityExpanded.cs index 04f04bf11189..8caafc175d31 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityExpanded.cs @@ -439,6 +439,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -762,6 +772,21 @@ private void Update_runCommandPropertiesBody() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachine.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachine.cs index d50362367617..904c57f36f22 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachine.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachine.cs @@ -240,6 +240,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -492,6 +502,21 @@ private void UpdateRunCommandProperty() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachineExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachineExpanded.cs index 4f776a44dece..666fd55b9929 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachineExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachineExpanded.cs @@ -454,6 +454,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -775,6 +785,21 @@ private void Update_runCommandPropertiesBody() } } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_Update.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_Update.cs index 0764d1c03a6d..4028ce06aade 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_Update.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_Update.cs @@ -233,6 +233,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -406,6 +416,21 @@ public UpdateAzConnectedMachine_Update() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateExpanded.cs index 96847a96b9e4..0b4dc319dd34 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateExpanded.cs @@ -409,6 +409,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -582,6 +592,21 @@ public UpdateAzConnectedMachine_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentity.cs index 01003ef9cc8a..fc5429036a42 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentity.cs @@ -189,6 +189,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -382,6 +392,21 @@ public UpdateAzConnectedMachine_UpdateViaIdentity() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentityExpanded.cs index c019abd66e0b..9069df8ce4d3 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentityExpanded.cs @@ -365,6 +365,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -558,6 +568,21 @@ public UpdateAzConnectedMachine_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonFilePath.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonFilePath.cs index a55933b1a29e..e2c7f9844f79 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonFilePath.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonFilePath.cs @@ -235,6 +235,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -408,6 +418,21 @@ public UpdateAzConnectedMachine_UpdateViaJsonFilePath() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonString.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonString.cs index 203f88a614e1..881d0d743ffb 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonString.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonString.cs @@ -233,6 +233,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -406,6 +416,21 @@ public UpdateAzConnectedMachine_UpdateViaJsonString() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_Update.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_Update.cs index daf76d630d16..4b51f5cab167 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_Update.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_Update.cs @@ -236,6 +236,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -409,6 +419,21 @@ public UpdateAzConnectedPrivateLinkScopeTag_Update() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateExpanded.cs index 3befed8039d4..b31191b620bc 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateExpanded.cs @@ -237,6 +237,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -410,6 +420,21 @@ public UpdateAzConnectedPrivateLinkScopeTag_UpdateExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentity.cs index 60b9ceaba5c4..9ae83bc14c70 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentity.cs @@ -193,6 +193,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -386,6 +396,21 @@ public UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentity() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentityExpanded.cs index cbad4beebbbd..9b0f04ec8527 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentityExpanded.cs @@ -194,6 +194,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -388,6 +398,21 @@ public UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentityExpanded() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaJsonFilePath.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaJsonFilePath.cs index 9ff3b3124a57..92644deb9262 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaJsonFilePath.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaJsonFilePath.cs @@ -236,6 +236,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -409,6 +419,21 @@ public UpdateAzConnectedPrivateLinkScopeTag_UpdateViaJsonFilePath() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaJsonString.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaJsonString.cs index d18e70246415..eb5ee50a7bb5 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaJsonString.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaJsonString.cs @@ -234,6 +234,16 @@ protected override void EndProcessing() // Flush buffer WriteObject(_firstResponse); } + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (!string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName ?? "Unknown"} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } } /// Handles/Dispatches events during the call to the REST service. @@ -407,6 +417,21 @@ public UpdateAzConnectedPrivateLinkScopeTag_UpdateViaJsonString() } + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + /// /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). /// diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/internal/Az.ConnectedMachine.internal.psm1 b/src/ConnectedMachine/ConnectedMachine.Autorest/internal/Az.ConnectedMachine.internal.psm1 index 68bf1cf91523..b2424141103a 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/internal/Az.ConnectedMachine.internal.psm1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/internal/Az.ConnectedMachine.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/ConnectedMachine/ConnectedMachine/Az.ConnectedMachine.psd1 b/src/ConnectedMachine/ConnectedMachine/Az.ConnectedMachine.psd1 index ca3015af317a..2b42e1253d70 100644 --- a/src/ConnectedMachine/ConnectedMachine/Az.ConnectedMachine.psd1 +++ b/src/ConnectedMachine/ConnectedMachine/Az.ConnectedMachine.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 3/17/2024 +# Generated on: 3/23/2024 # @{ diff --git a/src/ConnectedMachine/ConnectedMachine/ChangeLog.md b/src/ConnectedMachine/ConnectedMachine/ChangeLog.md index 49c093faa46c..7bec90f09d7b 100644 --- a/src/ConnectedMachine/ConnectedMachine/ChangeLog.md +++ b/src/ConnectedMachine/ConnectedMachine/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Implemented secrets detection ## Version 0.7.0 * Added `ScriptLocalPath` to `New-AzConnectedMachineRunCommand` to let users add script files locally