diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.format.ps1xml b/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.format.ps1xml index 3b5e92ffd601..8268705094af 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.format.ps1xml +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.format.ps1xml @@ -1,6 +1,64 @@ + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineExtension + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineExtension#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ResourceGroupName + + + Name + + + Location + + + TypeHandlerVersion + + + ProvisioningState + + + Publisher + + + MachineName + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineExtensionProperties @@ -179,6 +237,82 @@ + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineRunCommand + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineRunCommand#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + MachineName + + + + + + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.AccessRule @@ -2083,58 +2217,6 @@ - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineExtension - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineExtension#Multiple - - - - - - - - - - - - - - - - - - - - - - - - - - - ResourceGroupName - - - Name - - - Location - - - TypeHandlerVersion - - - ProvisioningState - - - Publisher - - - - - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineExtensionInstanceView @@ -2517,76 +2599,6 @@ - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineRunCommand - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineRunCommand#Multiple - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Location - - - Name - - - SystemDataCreatedAt - - - SystemDataCreatedBy - - - SystemDataCreatedByType - - - SystemDataLastModifiedAt - - - SystemDataLastModifiedBy - - - SystemDataLastModifiedByType - - - ResourceGroupName - - - - - - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineRunCommandInstanceView diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.psd1 b/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.psd1 index 5486d7303c03..b41f711c5f30 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.psd1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/Az.ConnectedMachine.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.ConnectedMachine.private.dll' FormatsToProcess = './Az.ConnectedMachine.format.ps1xml' - FunctionsToExport = 'Connect-AzConnectedMachine', 'Get-AzConnectedExtensionMetadata', 'Get-AzConnectedMachine', 'Get-AzConnectedMachineExtension', 'Get-AzConnectedMachineRunCommand', 'Get-AzConnectedPrivateLinkScope', 'Install-AzConnectedMachinePatch', 'Invoke-AzConnectedAssessMachinePatch', 'New-AzConnectedMachineExtension', 'New-AzConnectedMachineRunCommand', 'New-AzConnectedPrivateLinkScope', 'Remove-AzConnectedMachine', 'Remove-AzConnectedMachineExtension', 'Remove-AzConnectedMachineRunCommand', 'Remove-AzConnectedPrivateLinkScope', 'Set-AzConnectedMachineExtension', 'Set-AzConnectedPrivateLinkScope', 'Update-AzConnectedExtension', 'Update-AzConnectedMachine', 'Update-AzConnectedMachineExtension', 'Update-AzConnectedMachineRunCommand', 'Update-AzConnectedPrivateLinkScopeTag' + FunctionsToExport = 'Connect-AzConnectedMachine', 'Get-AzConnectedExtensionMetadata', 'Get-AzConnectedMachine', 'Get-AzConnectedMachineExtension', 'Get-AzConnectedMachineRunCommand', 'Get-AzConnectedPrivateLinkScope', 'Install-AzConnectedMachinePatch', 'Invoke-AzConnectedAssessMachinePatch', 'New-AzConnectedMachineExtension', 'New-AzConnectedMachineRunCommand', 'New-AzConnectedPrivateLinkScope', 'Remove-AzConnectedMachine', 'Remove-AzConnectedMachineExtension', 'Remove-AzConnectedMachineRunCommand', 'Remove-AzConnectedPrivateLinkScope', 'Set-AzConnectedMachineExtension', 'Set-AzConnectedPrivateLinkScope', 'Update-AzConnectedExtension', 'Update-AzConnectedMachineExtension', 'Update-AzConnectedMachineRunCommand', 'Update-AzConnectedPrivateLinkScopeTag' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ConnectedMachine' diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/README.md b/src/ConnectedMachine/ConnectedMachine.Autorest/README.md index c2af8f5204cb..67d86ae1271c 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/README.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/README.md @@ -3,9 +3,6 @@ This directory contains the PowerShell module for the ConnectedMachine service. --- -## Status -[![Az.ConnectedMachine](https://img.shields.io/powershellgallery/v/Az.ConnectedMachine.svg?style=flat-square&label=Az.ConnectedMachine "Az.ConnectedMachine")](https://www.powershellgallery.com/packages/Az.ConnectedMachine/) - ## Info - Modifiable: yes - Generated: all @@ -265,6 +262,12 @@ directive: parameter-name: AgentUpgradeEnableAutomaticUpgrade set: parameter-name: AgentUpgradeEnableAutomatic + + # Rename Tag to Tags + - where: + property-name: Tag + set: + property-name: Tags # Formatting - where: diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/custom/MachineExtension.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/custom/MachineExtension.cs new file mode 100644 index 000000000000..0bc6d08d0a33 --- /dev/null +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/custom/MachineExtension.cs @@ -0,0 +1,16 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Extensions; + + public partial class MachineExtension + { + public string MachineName + { + get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HybridCompute/machines/(?[^/]+)", + global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? + new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HybridCompute/machines/(?[^/]+)", + global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["machineName"].Value : null); + } + } + +} \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/custom/MachineRunCommand.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/custom/MachineRunCommand.cs new file mode 100644 index 000000000000..b453a667b733 --- /dev/null +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/custom/MachineRunCommand.cs @@ -0,0 +1,16 @@ +namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Extensions; + + public partial class MachineRunCommand + { + public string MachineName + { + get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HybridCompute/machines/(?[^/]+)", + global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? + new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.HybridCompute/machines/(?[^/]+)", + global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["machineName"].Value : null); + } + } + +} \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/custom/New-AzConnectedMachineRunCommand_ScriptLocalPath.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/custom/New-AzConnectedMachineRunCommand_ScriptLocalPath.ps1 new file mode 100644 index 000000000000..edacffd80289 --- /dev/null +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/custom/New-AzConnectedMachineRunCommand_ScriptLocalPath.ps1 @@ -0,0 +1,300 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. +# ---------------------------------------------------------------------------------- + +function New-AzConnectedMachineRunCommand_ScriptLocalPath { + [OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand])] + [CmdletBinding(PositionalBinding = $false, SupportsShouldProcess, ConfirmImpact = 'Medium')] + param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] + [System.String] + # The name of the hybrid machine. + ${MachineName}, + + [Parameter(Mandatory)] + [ArgumentCompleter({ Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName })] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] + [System.String] + # The name of the run command. + ${RunCommandName}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script = '(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [ArgumentCompleter({ Get-AzLocation | Where-Object Providers -Contains "Microsoft.HybridCompute" | Select-Object -ExpandProperty Location })] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Optional. + # If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. + ${AsyncExecution}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Client Id (GUID value) of the user-assigned managed identity. + # ObjectId should not be used if this is provided. + ${ErrorBlobManagedIdentityClientId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Object Id (GUID value) of the user-assigned managed identity. + # ClientId should not be used if this is provided. + ${ErrorBlobManagedIdentityObjectId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Specifies the Azure storage blob where script error stream will be uploaded. + # Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. + # Refer errorBlobManagedIdentity parameter. + ${ErrorBlobUri}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Client Id (GUID value) of the user-assigned managed identity. + # ObjectId should not be used if this is provided. + ${OutputBlobManagedIdentityClientId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Object Id (GUID value) of the user-assigned managed identity. + # ClientId should not be used if this is provided. + ${OutputBlobManagedIdentityObjectId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Specifies the Azure storage blob where script output stream will be uploaded. + # Use a SAS URI with read, append, create, write access OR use managed identity to provide the VM access to the blob. + # Refer outputBlobManagedIdentity parameter. + ${OutputBlobUri}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] + # The parameters used by the script. + # To construct, see NOTES section for PARAMETER properties and create a hash table. + ${Parameter}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] + # The parameters used by the script. + # To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. + ${ProtectedParameter}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Specifies the user account password on the machine when executing the run command. + ${RunAsPassword}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Specifies the user account on the machine when executing the run command. + ${RunAsUser}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Client Id (GUID value) of the user-assigned managed identity. + # ObjectId should not be used if this is provided. + ${ScriptUriManagedIdentityClientId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Object Id (GUID value) of the user-assigned managed identity. + # ClientId should not be used if this is provided. + ${ScriptUriManagedIdentityObjectId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Specifies the commandId of predefined built-in script. + ${SourceCommandId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Specifies the script content to be executed on the machine. + ${SourceScript}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Specifies the script download location. + # It can be either SAS URI of an Azure storage blob with read access or public URI. + ${SourceScriptUri}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + # Specifies the commandId of predefined built-in script. + ${ScriptLocalPath}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes = ([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.Int32] + # The timeout in seconds to execute the run command. + ${TimeoutInSecond}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process { + if ($PSBoundParameters.ContainsKey("ScriptLocalPath")) + { + # Read Local File and add + $script = "" + if ((Get-ChildItem $scriptLocalPath | Select-Object Extension).Extension -eq ".sh"){ + foreach ($line in Get-Content -Path $scriptLocalPath){ + $words = $line.trim().split() + $commentFound = $false + foreach ($word in $words){ + if ($word[0] -eq "#" -and $commentFound -eq $false){ + $commentFound = $true + $script += "``" + $word + " " + } + else{ + $script += $word + " " + } + } + $script = $script.trim() + #close + if ($commentFound){ + $script += "``" + } + $script += ";" + } + } + else{ + foreach ($line in Get-Content -Path $scriptLocalPath){ + $words = $line.trim().split() + $commentFound = $false + foreach ($word in $words){ + if ($word[0] -eq "#" -and $commentFound -eq $false){ + $commentFound = $true + $script += "<" + $word + " " + } + else{ + $script += $word + " " + } + } + $script = $script.trim() + #close + if ($commentFound){ + $script += "#>" + } + $script += ";" + } + } + + $PSBoundParameters.Add("SourceScript", $script) + # If necessary, remove the -ParameterA parameter from the dictionary of bound parameters + $null = $PSBoundParameters.Remove("ScriptLocalPath") + } + Az.ConnectedMachine\New-AzConnectedMachineRunCommand @PSBoundParameters + } +} \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/examples/Update-AzConnectedMachine.md b/src/ConnectedMachine/ConnectedMachine.Autorest/examples/Update-AzConnectedMachine.md deleted file mode 100644 index d5e7ccf62d67..000000000000 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/examples/Update-AzConnectedMachine.md +++ /dev/null @@ -1,26 +0,0 @@ -### Example 1: Update a machine using parameters -```powershell -Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId privateLinkScopeId -WindowsConfigurationPatchSettingsAssessmentMode AutomaticByOS -Tag @{"key"="value"} -``` - -```output -ResourceGroupName Name Location OSType Status ProvisioningState ------------------ ---- -------- ------ ------ ----------------- -rg surface eastus2euap windows Connected Updating -``` - -Update a machine - -### Example 2: Update a machine - cleaning a field -```powershell -Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId $null -``` - -```output -ResourceGroupName Name Location OSType Status ProvisioningState ------------------ ---- -------- ------ ------ ----------------- -rg surface eastus2euap windows Connected Updating -``` - -Update a machine to clean a field - diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Connect-AzConnectedMachine.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Connect-AzConnectedMachine.ps1 index 3f4219d84b09..9f56e77b6d31 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Connect-AzConnectedMachine.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Connect-AzConnectedMachine.ps1 @@ -90,7 +90,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(Position=8, DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedExtensionMetadata.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedExtensionMetadata.ps1 index 4eea1b1a79c4..8737fe5133df 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedExtensionMetadata.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedExtensionMetadata.ps1 @@ -77,7 +77,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachine.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachine.ps1 index b07716dfa6ce..8d2a78ec4d67 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachine.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachine.ps1 @@ -77,7 +77,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachineExtension.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachineExtension.ps1 index 385a4663e4c1..8724e663ff1b 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachineExtension.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachineExtension.ps1 @@ -78,7 +78,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachineRunCommand.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachineRunCommand.ps1 index 3e535c947e5d..d26420439793 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachineRunCommand.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedMachineRunCommand.ps1 @@ -78,7 +78,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedPrivateLinkScope.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedPrivateLinkScope.ps1 index 72fef7f6a865..54fa49cf0b72 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedPrivateLinkScope.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Get-AzConnectedPrivateLinkScope.ps1 @@ -67,7 +67,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Install-AzConnectedMachinePatch.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Install-AzConnectedMachinePatch.ps1 index 1d3e8c96c4de..bdca277b36e4 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Install-AzConnectedMachinePatch.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Install-AzConnectedMachinePatch.ps1 @@ -84,7 +84,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(Mandatory)] @@ -175,7 +175,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Invoke-AzConnectedAssessMachinePatch.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Invoke-AzConnectedAssessMachinePatch.ps1 index 9c1c693be15d..586f30bd0d89 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Invoke-AzConnectedAssessMachinePatch.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Invoke-AzConnectedAssessMachinePatch.ps1 @@ -84,7 +84,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter()] @@ -105,7 +105,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedMachineExtension.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedMachineExtension.ps1 index 7972d9d9b3c5..40af168dafea 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedMachineExtension.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedMachineExtension.ps1 @@ -48,7 +48,7 @@ To create the parameters described below, construct a hash table containing the EXTENSIONPARAMETER : Describes a Machine Extension. Location : The geo-location where the resource lives - [Tag ]: Resource tags. + [Tags ]: Resource tags. [(Any) ]: This indicates any property can be added to this object. [AutoUpgradeMinorVersion ]: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. [EnableAutomaticUpgrade ]: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. @@ -167,7 +167,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory, ValueFromPipeline)] @@ -175,7 +175,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] @@ -184,7 +184,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension] # Describes a Machine Extension. - # To construct, see NOTES section for EXTENSIONPARAMETER properties and create a hash table. + # . ${ExtensionParameter}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -369,7 +369,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedMachineRunCommand.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedMachineRunCommand.ps1 index ce3f9fb46d53..4ff7aee99348 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedMachineRunCommand.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedMachineRunCommand.ps1 @@ -89,7 +89,7 @@ PROTECTEDPARAMETER : The parameters used by the scr RUNCOMMANDPROPERTY : Describes a Run Command Location : The geo-location where the resource lives - [Tag ]: Resource tags. + [Tags ]: Resource tags. [(Any) ]: This indicates any property can be added to this object. [AsyncExecution ]: Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. [ErrorBlobManagedIdentityClientId ]: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. @@ -121,6 +121,7 @@ param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. @@ -130,6 +131,7 @@ param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] @@ -143,6 +145,7 @@ param( [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the run command. @@ -152,6 +155,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -163,7 +167,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory, ValueFromPipeline)] @@ -171,7 +175,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] @@ -180,12 +184,13 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand] # Describes a Run Command - # To construct, see NOTES section for RUNCOMMANDPROPERTY properties and create a hash table. + # . ${RunCommandProperty}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory)] + [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [ArgumentCompleter({Get-AzLocation | Where-Object Providers -Contains "Microsoft.HybridCompute" | Select-Object -ExpandProperty Location})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] @@ -195,6 +200,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Optional. @@ -204,6 +210,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. @@ -213,6 +220,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. @@ -222,6 +230,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the Azure storage blob where script error stream will be uploaded. @@ -232,6 +241,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. @@ -241,6 +251,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. @@ -250,6 +261,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the Azure storage blob where script output stream will be uploaded. @@ -260,26 +272,29 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. - # To construct, see NOTES section for PARAMETER properties and create a hash table. + # . ${Parameter}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. - # To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. + # . ${ProtectedParameter}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the user account password on the machine when executing the run command. @@ -288,6 +303,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the user account on the machine when executing the run command. @@ -296,6 +312,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. @@ -305,6 +322,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. @@ -314,6 +332,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the commandId of predefined built-in script. @@ -322,6 +341,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the script content to be executed on the machine. @@ -330,6 +350,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the script download location. @@ -339,6 +360,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] @@ -348,6 +370,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Int32] # The timeout in seconds to execute the run command. @@ -365,6 +388,11 @@ param( # Json string supplied to the Create operation ${JsonString}, + [Parameter(ParameterSetName='ScriptLocalPath')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + ${ScriptLocalPath}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -383,7 +411,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -460,8 +488,9 @@ begin { CreateViaIdentityMachineExpanded = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaIdentityMachineExpanded'; CreateViaJsonFilePath = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaJsonString'; + ScriptLocalPath = 'Az.ConnectedMachine.custom\New-AzConnectedMachineRunCommand_ScriptLocalPath'; } - if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString', 'ScriptLocalPath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedPrivateLinkScope.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedPrivateLinkScope.ps1 index 4a29258ce119..612b11f8019a 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedPrivateLinkScope.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/New-AzConnectedPrivateLinkScope.ps1 @@ -60,7 +60,7 @@ INPUTOBJECT : Identity Parameter PARAMETER : An Azure Arc PrivateLinkScope definition. Location : Resource location - [Tag ]: Resource tags + [Tags ]: Resource tags [(Any) ]: This indicates any property can be added to this object. [PublicNetworkAccess ]: Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. .Link @@ -105,7 +105,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] @@ -113,7 +113,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope] # An Azure Arc PrivateLinkScope definition. - # To construct, see NOTES section for PARAMETER properties and create a hash table. + # . ${Parameter}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -164,7 +164,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/ProxyCmdletDefinitions.ps1 index 0d0b632b2375..dcbb54b26866 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -77,7 +77,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -260,7 +260,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -443,7 +443,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -625,7 +625,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -798,7 +798,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -988,7 +988,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(Mandatory)] @@ -1079,7 +1079,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -1274,7 +1274,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter()] @@ -1295,7 +1295,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -1454,7 +1454,7 @@ To create the parameters described below, construct a hash table containing the EXTENSIONPARAMETER : Describes a Machine Extension. Location : The geo-location where the resource lives - [Tag ]: Resource tags. + [Tags ]: Resource tags. [(Any) ]: This indicates any property can be added to this object. [AutoUpgradeMinorVersion ]: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. [EnableAutomaticUpgrade ]: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. @@ -1573,7 +1573,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory, ValueFromPipeline)] @@ -1581,7 +1581,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] @@ -1590,7 +1590,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension] # Describes a Machine Extension. - # To construct, see NOTES section for EXTENSIONPARAMETER properties and create a hash table. + # . ${ExtensionParameter}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -1775,7 +1775,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -1981,7 +1981,7 @@ PROTECTEDPARAMETER : The parameters used by the scr RUNCOMMANDPROPERTY : Describes a Run Command Location : The geo-location where the resource lives - [Tag ]: Resource tags. + [Tags ]: Resource tags. [(Any) ]: This indicates any property can be added to this object. [AsyncExecution ]: Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. [ErrorBlobManagedIdentityClientId ]: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. @@ -2013,6 +2013,7 @@ param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the hybrid machine. @@ -2022,6 +2023,7 @@ param( [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] @@ -2035,6 +2037,7 @@ param( [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [System.String] # The name of the run command. @@ -2044,6 +2047,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaJsonFilePath')] [Parameter(ParameterSetName='CreateViaJsonString')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -2055,7 +2059,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='CreateViaIdentityMachine', Mandatory, ValueFromPipeline)] @@ -2063,7 +2067,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] @@ -2072,12 +2076,13 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand] # Describes a Run Command - # To construct, see NOTES section for RUNCOMMANDPROPERTY properties and create a hash table. + # . ${RunCommandProperty}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityExpanded', Mandatory)] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded', Mandatory)] + [Parameter(ParameterSetName='ScriptLocalPath', Mandatory)] [ArgumentCompleter({Get-AzLocation | Where-Object Providers -Contains "Microsoft.HybridCompute" | Select-Object -ExpandProperty Location})] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] @@ -2087,6 +2092,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Management.Automation.SwitchParameter] # Optional. @@ -2096,6 +2102,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. @@ -2105,6 +2112,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. @@ -2114,6 +2122,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the Azure storage blob where script error stream will be uploaded. @@ -2124,6 +2133,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. @@ -2133,6 +2143,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. @@ -2142,6 +2153,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the Azure storage blob where script output stream will be uploaded. @@ -2152,26 +2164,29 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. - # To construct, see NOTES section for PARAMETER properties and create a hash table. + # . ${Parameter}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. - # To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. + # . ${ProtectedParameter}, [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the user account password on the machine when executing the run command. @@ -2180,6 +2195,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the user account on the machine when executing the run command. @@ -2188,6 +2204,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Client Id (GUID value) of the user-assigned managed identity. @@ -2197,6 +2214,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Object Id (GUID value) of the user-assigned managed identity. @@ -2206,6 +2224,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the commandId of predefined built-in script. @@ -2214,6 +2233,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the script content to be executed on the machine. @@ -2222,6 +2242,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.String] # Specifies the script download location. @@ -2231,6 +2252,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags]))] [System.Collections.Hashtable] @@ -2240,6 +2262,7 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [Parameter(ParameterSetName='CreateViaIdentityExpanded')] [Parameter(ParameterSetName='CreateViaIdentityMachineExpanded')] + [Parameter(ParameterSetName='ScriptLocalPath')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [System.Int32] # The timeout in seconds to execute the run command. @@ -2257,6 +2280,11 @@ param( # Json string supplied to the Create operation ${JsonString}, + [Parameter(ParameterSetName='ScriptLocalPath')] + [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] + [System.String] + ${ScriptLocalPath}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -2275,7 +2303,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -2352,8 +2380,9 @@ begin { CreateViaIdentityMachineExpanded = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaIdentityMachineExpanded'; CreateViaJsonFilePath = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.ConnectedMachine.private\New-AzConnectedMachineRunCommand_CreateViaJsonString'; + ScriptLocalPath = 'Az.ConnectedMachine.custom\New-AzConnectedMachineRunCommand_ScriptLocalPath'; } - if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('Create', 'CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString', 'ScriptLocalPath') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -2452,7 +2481,7 @@ INPUTOBJECT : Identity Parameter PARAMETER : An Azure Arc PrivateLinkScope definition. Location : Resource location - [Tag ]: Resource tags + [Tags ]: Resource tags [(Any) ]: This indicates any property can be added to this object. [PublicNetworkAccess ]: Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. .Link @@ -2497,7 +2526,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] @@ -2505,7 +2534,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope] # An Azure Arc PrivateLinkScope definition. - # To construct, see NOTES section for PARAMETER properties and create a hash table. + # . ${Parameter}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] @@ -2556,7 +2585,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -2782,14 +2811,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter()] @@ -2810,7 +2839,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -3043,14 +3072,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter()] @@ -3071,7 +3100,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -3277,7 +3306,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter()] @@ -3292,7 +3321,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -3488,7 +3517,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter()] @@ -3509,7 +3538,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -3663,7 +3692,7 @@ To create the parameters described below, construct a hash table containing the EXTENSIONPARAMETER : Describes a Machine Extension. Location : The geo-location where the resource lives - [Tag ]: Resource tags. + [Tags ]: Resource tags. [(Any) ]: This indicates any property can be added to this object. [AutoUpgradeMinorVersion ]: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. [EnableAutomaticUpgrade ]: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. @@ -3721,7 +3750,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension] # Describes a Machine Extension. - # To construct, see NOTES section for EXTENSIONPARAMETER properties and create a hash table. + # . ${ExtensionParameter}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -3870,7 +3899,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -4018,7 +4047,7 @@ To create the parameters described below, construct a hash table containing the PARAMETER : An Azure Arc PrivateLinkScope definition. Location : Resource location - [Tag ]: Resource tags + [Tags ]: Resource tags [(Any) ]: This indicates any property can be added to this object. [PublicNetworkAccess ]: Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. .Link @@ -4053,7 +4082,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope] # An Azure Arc PrivateLinkScope definition. - # To construct, see NOTES section for PARAMETER properties and create a hash table. + # . ${Parameter}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -4101,7 +4130,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -4310,7 +4339,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='Upgrade', Mandatory, ValueFromPipeline)] @@ -4318,7 +4347,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpgrade] # Describes the Machine Extension Upgrade Properties. - # To construct, see NOTES section for EXTENSIONUPGRADEPARAMETER properties and create a hash table. + # . ${ExtensionUpgradeParameter}, [Parameter(ParameterSetName='UpgradeExpanded')] @@ -4359,7 +4388,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -4542,7 +4571,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. EXTENSIONPARAMETER : Describes a Machine Extension Update. - [Tag ]: Resource tags + [Tags ]: Resource tags [(Any) ]: This indicates any property can be added to this object. [AutoUpgradeMinorVersion ]: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. [EnableAutomaticUpgrade ]: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. @@ -4653,7 +4682,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory, ValueFromPipeline)] @@ -4661,7 +4690,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] @@ -4670,7 +4699,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdate] # Describes a Machine Extension Update. - # To construct, see NOTES section for EXTENSIONPARAMETER properties and create a hash table. + # . ${ExtensionParameter}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -4781,7 +4810,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -4988,7 +5017,7 @@ PROTECTEDPARAMETER : The parameters used by the scr RUNCOMMANDPROPERTY : Describes a Run Command Location : The geo-location where the resource lives - [Tag ]: Resource tags. + [Tags ]: Resource tags. [(Any) ]: This indicates any property can be added to this object. [AsyncExecution ]: Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. [ErrorBlobManagedIdentityClientId ]: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. @@ -5054,7 +5083,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory, ValueFromPipeline)] @@ -5062,7 +5091,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] @@ -5071,7 +5100,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand] # Describes a Run Command - # To construct, see NOTES section for RUNCOMMANDPROPERTY properties and create a hash table. + # . ${RunCommandProperty}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -5111,15 +5140,6 @@ param( # Refer errorBlobManagedIdentity parameter. ${ErrorBlobUri}, - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] - [ArgumentCompleter({Get-AzLocation | Where-Object Providers -Contains "Microsoft.HybridCompute" | Select-Object -ExpandProperty Location})] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] @@ -5155,7 +5175,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. - # To construct, see NOTES section for PARAMETER properties and create a hash table. + # . ${Parameter}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -5165,7 +5185,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. - # To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. + # . ${ProtectedParameter}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -5262,7 +5282,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -5391,388 +5411,6 @@ end { } } -<# -.Synopsis -The operation to update a hybrid machine. -.Description -The operation to update a hybrid machine. -.Example -Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId privateLinkScopeId -WindowsConfigurationPatchSettingsAssessmentMode AutomaticByOS -Tag @{"key"="value"} -.Example -Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId $null - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine -.Notes -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - -INPUTOBJECT : Identity Parameter - [ExtensionName ]: The name of the machine extension. - [ExtensionType ]: The extensionType of the Extension being received. - [GroupName ]: The name of the private link resource. - [Id ]: Resource identity path - [LicenseName ]: The name of the license. - [LicenseProfileName ]: The name of the license profile. - [Location ]: The location of the Extension being received. - [MachineName ]: The name of the hybrid machine. - [MetadataName ]: Name of the HybridIdentityMetadata. - [Name ]: The name of the hybrid machine. - [OSType ]: Defines the os type. - [PerimeterName ]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. - [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [PrivateLinkScopeId ]: The id (Guid) of the Azure Arc PrivateLinkScope resource. - [Publisher ]: The publisher of the Extension being received. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ResourceUri ]: The fully qualified Azure Resource manager identifier of the resource to be connected. - [RunCommandName ]: The name of the run command. - [ScopeName ]: The name of the Azure Arc PrivateLinkScope resource. - [SubscriptionId ]: The ID of the target subscription. - [Version ]: The version of the Extension being received. - -PARAMETER : Describes a hybrid machine Update. - [Tag ]: Resource tags - [(Any) ]: This indicates any property can be added to this object. - [AgentUpgradeCorrelationId ]: The correlation ID passed in from RSM per upgrade. - [AgentUpgradeDesiredVersion ]: Specifies the version info w.r.t AgentUpgrade for the machine. - [AgentUpgradeEnableAutomaticUpgrade ]: Specifies if RSM should try to upgrade this machine - [IdentityType ]: The identity type. - [Kind ]: Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. - [LinuxConfigurationPatchSettingsAssessmentMode ]: Specifies the assessment mode. - [LinuxConfigurationPatchSettingsPatchMode ]: Specifies the patch mode. - [LocationDataCity ]: The city or locality where the resource is located. - [LocationDataCountryOrRegion ]: The country or region where the resource is located - [LocationDataDistrict ]: The district, state, or province where the resource is located. - [LocationDataName ]: A canonical name for the geographic or physical location. - [ParentClusterResourceId ]: The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. - [PrivateLinkScopeResourceId ]: The resource id of the private link scope this machine is assigned to, if any. - [WindowsConfigurationPatchSettingsAssessmentMode ]: Specifies the assessment mode. - [WindowsConfigurationPatchSettingsPatchMode ]: Specifies the patch mode. -.Link -https://learn.microsoft.com/powershell/module/az.connectedmachine/update-azconnectedmachine -#> -function Update-AzConnectedMachine { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='Update', Mandatory)] - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Alias('MachineName')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] - [System.String] - # The name of the hybrid machine. - ${Name}, - - [Parameter(ParameterSetName='Update', Mandatory)] - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Update')] - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaJsonFilePath')] - [Parameter(ParameterSetName='UpdateViaJsonString')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate] - # Describes a hybrid machine Update. - # To construct, see NOTES section for PARAMETER properties and create a hash table. - ${Parameter}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The correlation ID passed in from RSM per upgrade. - ${AgentUpgradeCorrelationId}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Specifies the version info w.r.t AgentUpgrade for the machine. - ${AgentUpgradeDesiredVersion}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.Management.Automation.SwitchParameter] - # Specifies if RSM should try to upgrade this machine - ${AgentUpgradeEnableAutomatic}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("SystemAssigned")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The identity type. - ${IdentityType}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("AVS", "HCI", "SCVMM", "VMware", "EPS", "GCP", "AWS")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. - ${Kind}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Specifies the assessment mode. - ${LinuxConfigurationPatchSettingsAssessmentMode}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Specifies the patch mode. - ${LinuxConfigurationPatchSettingsPatchMode}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The city or locality where the resource is located. - ${LocationDataCity}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The country or region where the resource is located - ${LocationDataCountryOrRegion}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The district, state, or province where the resource is located. - ${LocationDataDistrict}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # A canonical name for the geographic or physical location. - ${LocationDataName}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. - ${ParentClusterResourceId}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The resource id of the private link scope this machine is assigned to, if any. - ${PrivateLinkScopeResourceId}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags]))] - [System.Collections.Hashtable] - # Resource tags - ${Tag}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Specifies the assessment mode. - ${WindowsConfigurationPatchSettingsAssessmentMode}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Specifies the patch mode. - ${WindowsConfigurationPatchSettingsPatchMode}, - - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Path of Json file supplied to the Update operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Json string supplied to the Update operation - ${JsonString}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] - [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - ${DefaultProfile}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) - } else { - $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - if ($internalCalledCmdlets -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name - } else { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' - } - - $mapping = @{ - Update = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_Update'; - UpdateExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateExpanded'; - UpdateViaIdentity = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaIdentity'; - UpdateViaIdentityExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaIdentityExpanded'; - UpdateViaJsonFilePath = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaJsonFilePath'; - UpdateViaJsonString = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaJsonString'; - } - if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId - - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} -} - <# .Synopsis Updates an existing PrivateLinkScope's tags. @@ -5819,7 +5457,7 @@ INPUTOBJECT : Identity Parameter [Version ]: The version of the Extension being received. PRIVATELINKSCOPETAG : A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. - [Tag ]: Resource tags + [Tags ]: Resource tags [(Any) ]: This indicates any property can be added to this object. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/update-azconnectedprivatelinkscopetag @@ -5863,7 +5501,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] @@ -5871,7 +5509,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResource] # A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. - # To construct, see NOTES section for PRIVATELINKSCOPETAG properties and create a hash table. + # . ${PrivateLinkScopeTag}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -5906,7 +5544,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] @@ -6105,7 +5743,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(Position=8, DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachine.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachine.ps1 index fb2da6732fee..51cd67d4f1d6 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachine.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachine.ps1 @@ -88,7 +88,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter()] @@ -103,7 +103,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachineExtension.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachineExtension.ps1 index 563f76e75e7c..ccf073f9849e 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachineExtension.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachineExtension.ps1 @@ -117,14 +117,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter()] @@ -145,7 +145,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachineRunCommand.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachineRunCommand.ps1 index f9e3f1d369d0..49f898f185a7 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachineRunCommand.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedMachineRunCommand.ps1 @@ -115,14 +115,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='DeleteViaIdentityMachine', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter()] @@ -143,7 +143,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedPrivateLinkScope.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedPrivateLinkScope.ps1 index e59002818782..5dd53c0b3fba 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedPrivateLinkScope.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Remove-AzConnectedPrivateLinkScope.ps1 @@ -85,7 +85,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter()] @@ -106,7 +106,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Set-AzConnectedMachineExtension.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Set-AzConnectedMachineExtension.ps1 index 5f6f12447a72..f1d3ef1e1279 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Set-AzConnectedMachineExtension.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Set-AzConnectedMachineExtension.ps1 @@ -37,7 +37,7 @@ To create the parameters described below, construct a hash table containing the EXTENSIONPARAMETER : Describes a Machine Extension. Location : The geo-location where the resource lives - [Tag ]: Resource tags. + [Tags ]: Resource tags. [(Any) ]: This indicates any property can be added to this object. [AutoUpgradeMinorVersion ]: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. [EnableAutomaticUpgrade ]: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. @@ -95,7 +95,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension] # Describes a Machine Extension. - # To construct, see NOTES section for EXTENSIONPARAMETER properties and create a hash table. + # . ${ExtensionParameter}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -244,7 +244,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Set-AzConnectedPrivateLinkScope.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Set-AzConnectedPrivateLinkScope.ps1 index 5a99b2787867..4b916ed2949d 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Set-AzConnectedPrivateLinkScope.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Set-AzConnectedPrivateLinkScope.ps1 @@ -35,7 +35,7 @@ To create the parameters described below, construct a hash table containing the PARAMETER : An Azure Arc PrivateLinkScope definition. Location : Resource location - [Tag ]: Resource tags + [Tags ]: Resource tags [(Any) ]: This indicates any property can be added to this object. [PublicNetworkAccess ]: Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. .Link @@ -70,7 +70,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope] # An Azure Arc PrivateLinkScope definition. - # To construct, see NOTES section for PARAMETER properties and create a hash table. + # . ${Parameter}, [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] @@ -118,7 +118,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedExtension.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedExtension.ps1 index 7d5eceb9b5c3..3f9a08299f7e 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedExtension.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedExtension.ps1 @@ -102,7 +102,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='Upgrade', Mandatory, ValueFromPipeline)] @@ -110,7 +110,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpgrade] # Describes the Machine Extension Upgrade Properties. - # To construct, see NOTES section for EXTENSIONUPGRADEPARAMETER properties and create a hash table. + # . ${ExtensionUpgradeParameter}, [Parameter(ParameterSetName='UpgradeExpanded')] @@ -151,7 +151,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedMachine.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedMachine.ps1 deleted file mode 100644 index d7cd51b07861..000000000000 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedMachine.ps1 +++ /dev/null @@ -1,397 +0,0 @@ - -# ---------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code -# is regenerated. -# ---------------------------------------------------------------------------------- - -<# -.Synopsis -The operation to update a hybrid machine. -.Description -The operation to update a hybrid machine. -.Example -Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId privateLinkScopeId -WindowsConfigurationPatchSettingsAssessmentMode AutomaticByOS -Tag @{"key"="value"} -.Example -Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId $null - -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity -.Inputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate -.Outputs -Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine -.Notes -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - -INPUTOBJECT : Identity Parameter - [ExtensionName ]: The name of the machine extension. - [ExtensionType ]: The extensionType of the Extension being received. - [GroupName ]: The name of the private link resource. - [Id ]: Resource identity path - [LicenseName ]: The name of the license. - [LicenseProfileName ]: The name of the license profile. - [Location ]: The location of the Extension being received. - [MachineName ]: The name of the hybrid machine. - [MetadataName ]: Name of the HybridIdentityMetadata. - [Name ]: The name of the hybrid machine. - [OSType ]: Defines the os type. - [PerimeterName ]: The name, in the format {perimeterGuid}.{associationName}, of the Network Security Perimeter resource. - [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [PrivateLinkScopeId ]: The id (Guid) of the Azure Arc PrivateLinkScope resource. - [Publisher ]: The publisher of the Extension being received. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [ResourceUri ]: The fully qualified Azure Resource manager identifier of the resource to be connected. - [RunCommandName ]: The name of the run command. - [ScopeName ]: The name of the Azure Arc PrivateLinkScope resource. - [SubscriptionId ]: The ID of the target subscription. - [Version ]: The version of the Extension being received. - -PARAMETER : Describes a hybrid machine Update. - [Tag ]: Resource tags - [(Any) ]: This indicates any property can be added to this object. - [AgentUpgradeCorrelationId ]: The correlation ID passed in from RSM per upgrade. - [AgentUpgradeDesiredVersion ]: Specifies the version info w.r.t AgentUpgrade for the machine. - [AgentUpgradeEnableAutomaticUpgrade ]: Specifies if RSM should try to upgrade this machine - [IdentityType ]: The identity type. - [Kind ]: Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. - [LinuxConfigurationPatchSettingsAssessmentMode ]: Specifies the assessment mode. - [LinuxConfigurationPatchSettingsPatchMode ]: Specifies the patch mode. - [LocationDataCity ]: The city or locality where the resource is located. - [LocationDataCountryOrRegion ]: The country or region where the resource is located - [LocationDataDistrict ]: The district, state, or province where the resource is located. - [LocationDataName ]: A canonical name for the geographic or physical location. - [ParentClusterResourceId ]: The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. - [PrivateLinkScopeResourceId ]: The resource id of the private link scope this machine is assigned to, if any. - [WindowsConfigurationPatchSettingsAssessmentMode ]: Specifies the assessment mode. - [WindowsConfigurationPatchSettingsPatchMode ]: Specifies the patch mode. -.Link -https://learn.microsoft.com/powershell/module/az.connectedmachine/update-azconnectedmachine -#> -function Update-AzConnectedMachine { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine])] -[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] -param( - [Parameter(ParameterSetName='Update', Mandatory)] - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Alias('MachineName')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] - [System.String] - # The name of the hybrid machine. - ${Name}, - - [Parameter(ParameterSetName='Update', Mandatory)] - [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [ArgumentCompleter({Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName})] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] - [System.String] - # The name of the resource group. - # The name is case insensitive. - ${ResourceGroupName}, - - [Parameter(ParameterSetName='Update')] - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaJsonFilePath')] - [Parameter(ParameterSetName='UpdateViaJsonString')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # The ID of the target subscription. - ${SubscriptionId}, - - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, - - [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] - [Parameter(ParameterSetName='UpdateViaIdentity', Mandatory, ValueFromPipeline)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate] - # Describes a hybrid machine Update. - # To construct, see NOTES section for PARAMETER properties and create a hash table. - ${Parameter}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The correlation ID passed in from RSM per upgrade. - ${AgentUpgradeCorrelationId}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Specifies the version info w.r.t AgentUpgrade for the machine. - ${AgentUpgradeDesiredVersion}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.Management.Automation.SwitchParameter] - # Specifies if RSM should try to upgrade this machine - ${AgentUpgradeEnableAutomatic}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("SystemAssigned")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The identity type. - ${IdentityType}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("AVS", "HCI", "SCVMM", "VMware", "EPS", "GCP", "AWS")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. - ${Kind}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Specifies the assessment mode. - ${LinuxConfigurationPatchSettingsAssessmentMode}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Specifies the patch mode. - ${LinuxConfigurationPatchSettingsPatchMode}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The city or locality where the resource is located. - ${LocationDataCity}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The country or region where the resource is located - ${LocationDataCountryOrRegion}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The district, state, or province where the resource is located. - ${LocationDataDistrict}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # A canonical name for the geographic or physical location. - ${LocationDataName}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. - ${ParentClusterResourceId}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The resource id of the private link scope this machine is assigned to, if any. - ${PrivateLinkScopeResourceId}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags]))] - [System.Collections.Hashtable] - # Resource tags - ${Tag}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Specifies the assessment mode. - ${WindowsConfigurationPatchSettingsAssessmentMode}, - - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Specifies the patch mode. - ${WindowsConfigurationPatchSettingsPatchMode}, - - [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Path of Json file supplied to the Update operation - ${JsonFilePath}, - - [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # Json string supplied to the Update operation - ${JsonString}, - - [Parameter()] - [Alias('AzureRMContext', 'AzureCredential')] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Azure')] - [System.Management.Automation.PSObject] - # The DefaultProfile parameter is not functional. - # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - ${DefaultProfile}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach - ${Break}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be appended to the front of the pipeline - ${HttpPipelineAppend}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[]] - # SendAsync Pipeline Steps to be prepended to the front of the pipeline - ${HttpPipelinePrepend}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [System.Uri] - # The URI for the proxy server to use - ${Proxy}, - - [Parameter(DontShow)] - [ValidateNotNull()] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [System.Management.Automation.PSCredential] - # Credentials for a proxy server to use for the remote call - ${ProxyCredential}, - - [Parameter(DontShow)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Use the default credentials for the proxy - ${ProxyUseDefaultCredentials} -) - -begin { - try { - $outBuffer = $null - if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { - $PSBoundParameters['OutBuffer'] = 1 - } - $parameterSet = $PSCmdlet.ParameterSetName - - if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() - } - $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - if ($preTelemetryId -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) - } else { - $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - if ($internalCalledCmdlets -eq '') { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name - } else { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' - } - - $mapping = @{ - Update = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_Update'; - UpdateExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateExpanded'; - UpdateViaIdentity = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaIdentity'; - UpdateViaIdentityExpanded = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaIdentityExpanded'; - UpdateViaJsonFilePath = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaJsonFilePath'; - UpdateViaJsonString = 'Az.ConnectedMachine.private\Update-AzConnectedMachine_UpdateViaJsonString'; - } - if (('Update', 'UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { - $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id - } - $cmdInfo = Get-Command -Name $mapping[$parameterSet] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) - } - $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) - $scriptCmd = {& $wrappedCmd @PSBoundParameters} - $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) - $steppablePipeline.Begin($PSCmdlet) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} - -process { - try { - $steppablePipeline.Process($_) - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } - - finally { - $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId - $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - -} -end { - try { - $steppablePipeline.End() - - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets - if ($preTelemetryId -eq '') { - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - } - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId - - } catch { - [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() - throw - } -} -} diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedMachineExtension.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedMachineExtension.ps1 index 82cbf93977a5..955ca6f74511 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedMachineExtension.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedMachineExtension.ps1 @@ -62,7 +62,7 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. EXTENSIONPARAMETER : Describes a Machine Extension Update. - [Tag ]: Resource tags + [Tags ]: Resource tags [(Any) ]: This indicates any property can be added to this object. [AutoUpgradeMinorVersion ]: Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. [EnableAutomaticUpgrade ]: Indicates whether the extension should be automatically upgraded by the platform if there is a newer version available. @@ -173,7 +173,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory, ValueFromPipeline)] @@ -181,7 +181,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] @@ -190,7 +190,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdate] # Describes a Machine Extension Update. - # To construct, see NOTES section for EXTENSIONPARAMETER properties and create a hash table. + # . ${ExtensionParameter}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -301,7 +301,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedMachineRunCommand.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedMachineRunCommand.ps1 index d42c69ce90b9..35c0b32dd706 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedMachineRunCommand.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedMachineRunCommand.ps1 @@ -90,7 +90,7 @@ PROTECTEDPARAMETER : The parameters used by the scr RUNCOMMANDPROPERTY : Describes a Run Command Location : The geo-location where the resource lives - [Tag ]: Resource tags. + [Tags ]: Resource tags. [(Any) ]: This indicates any property can be added to this object. [AsyncExecution ]: Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. [ErrorBlobManagedIdentityClientId ]: Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. @@ -156,7 +156,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='UpdateViaIdentityMachine', Mandatory, ValueFromPipeline)] @@ -164,7 +164,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. + # . ${MachineInputObject}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] @@ -173,7 +173,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand] # Describes a Run Command - # To construct, see NOTES section for RUNCOMMANDPROPERTY properties and create a hash table. + # . ${RunCommandProperty}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -213,15 +213,6 @@ param( # Refer errorBlobManagedIdentity parameter. ${ErrorBlobUri}, - [Parameter(ParameterSetName='UpdateExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] - [ArgumentCompleter({Get-AzLocation | Where-Object Providers -Contains "Microsoft.HybridCompute" | Select-Object -ExpandProperty Location})] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] - [System.String] - # The geo-location where the resource lives - ${Location}, - [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityMachineExpanded')] @@ -257,7 +248,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. - # To construct, see NOTES section for PARAMETER properties and create a hash table. + # . ${Parameter}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -267,7 +258,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[]] # The parameters used by the script. - # To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. + # . ${ProtectedParameter}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -364,7 +355,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedPrivateLinkScopeTag.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedPrivateLinkScopeTag.ps1 index c72ac309fc30..2c87b6a40b58 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedPrivateLinkScopeTag.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/exports/Update-AzConnectedPrivateLinkScopeTag.ps1 @@ -60,7 +60,7 @@ INPUTOBJECT : Identity Parameter [Version ]: The version of the Extension being received. PRIVATELINKSCOPETAG : A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. - [Tag ]: Resource tags + [Tags ]: Resource tags [(Any) ]: This indicates any property can be added to this object. .Link https://learn.microsoft.com/powershell/module/az.connectedmachine/update-azconnectedprivatelinkscopetag @@ -104,7 +104,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity] # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + # . ${InputObject}, [Parameter(ParameterSetName='Update', Mandatory, ValueFromPipeline)] @@ -112,7 +112,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResource] # A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. - # To construct, see NOTES section for PRIVATELINKSCOPETAG properties and create a hash table. + # . ${PrivateLinkScopeTag}, [Parameter(ParameterSetName='UpdateExpanded')] @@ -147,7 +147,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/Module.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/Module.cs index c1e3c1430dbe..da07ff8e945d 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/Module.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/Module.cs @@ -26,12 +26,20 @@ public partial class Module public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + private static bool _init = false; + + private static readonly global::System.Object _initLock = new global::System.Object(); + + private static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module _instance; + /// the ISendAsync pipeline instance private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.HttpPipeline _pipeline; /// the ISendAsync pipeline instance (when proxy is enabled) private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.HttpPipeline _pipelineWithProxy; + private static readonly global::System.Object _singletonLock = new global::System.Object(); + public bool _useProxy = false; public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); @@ -51,11 +59,8 @@ public partial class Module /// The delegate to get the telemetry Id. public GetTelemetryIdDelegate GetTelemetryId { get; set; } - /// Backing field for property. - private static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module _instance; - /// the singleton of this module class - public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module()); + public static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module Instance { get { if (_instance == null) { lock (_singletonLock) { if (_instance == null) { _instance = new Module(); }}} return _instance; } } /// The Name of this module public string Name => @"Az.ConnectedMachine"; @@ -117,9 +122,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.HttpPipeline /// Initialization steps performed after the module is loaded. public void Init() { - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); - OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); - CustomInit(); + if (_init == false) + { + lock (_initLock) { + if (_init == false) { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + _init = true; + } + } + } } /// Creates the module instance. diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/HybridComputePrivateLinkScope.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/HybridComputePrivateLinkScope.PowerShell.cs index e58268082cff..4c930af6b8d0 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/HybridComputePrivateLinkScope.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/HybridComputePrivateLinkScope.PowerShell.cs @@ -133,9 +133,9 @@ internal HybridComputePrivateLinkScope(global::System.Collections.IDictionary co { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Location, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { @@ -218,9 +218,9 @@ internal HybridComputePrivateLinkScope(global::System.Management.Automation.PSOb { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Location, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/HybridComputePrivateLinkScope.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/HybridComputePrivateLinkScope.cs index 7c0fef7f9218..9ff4b67120a3 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/HybridComputePrivateLinkScope.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/HybridComputePrivateLinkScope.cs @@ -138,7 +138,7 @@ public partial class HybridComputePrivateLinkScope : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)__privateLinkScopesResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)__privateLinkScopesResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tags { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)__privateLinkScopesResource).Tags; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)__privateLinkScopesResource).Tags = value ?? null /* model class */; } /// Azure resource type [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/License.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/License.PowerShell.cs index 7daf6d2b2db9..23955931543d 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/License.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/License.PowerShell.cs @@ -153,9 +153,9 @@ internal License(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { @@ -266,9 +266,9 @@ internal License(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/License.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/License.cs index a9a1c4eff516..0ab384e2b26e 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/License.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/License.cs @@ -141,7 +141,7 @@ public partial class License : /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tags { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tags; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tags = value ?? null /* model class */; } /// Describes the tenant id. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inlined)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfile.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfile.PowerShell.cs index 5b7eff98dbbf..a96d98830ed0 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfile.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfile.PowerShell.cs @@ -153,9 +153,9 @@ internal LicenseProfile(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { @@ -290,9 +290,9 @@ internal LicenseProfile(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfile.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfile.cs index 852d2c984dcd..1881bd828956 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfile.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfile.cs @@ -185,7 +185,7 @@ public partial class LicenseProfile : /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tags { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tags; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tags = value ?? null /* model class */; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfileUpdate.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfileUpdate.PowerShell.cs index 50cd5531c1f8..e9895b82d088 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfileUpdate.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfileUpdate.PowerShell.cs @@ -113,9 +113,9 @@ internal LicenseProfileUpdate(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseProfileUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseProfileUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseProfileUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.LicenseProfileUpdatePropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } if (content.Contains("SoftwareAssurance")) { @@ -170,9 +170,9 @@ internal LicenseProfileUpdate(global::System.Management.Automation.PSObject cont { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseProfileUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseProfileUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseProfileUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.LicenseProfileUpdatePropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } if (content.Contains("SoftwareAssurance")) { diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfileUpdate.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfileUpdate.cs index f157badaae0d..72cb9e528446 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfileUpdate.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseProfileUpdate.cs @@ -62,7 +62,7 @@ public partial class LicenseProfileUpdate : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tags { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tags; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tags = value ?? null /* model class */; } /// Creates an new instance. public LicenseProfileUpdate() diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseUpdate.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseUpdate.PowerShell.cs index 33dd813b2640..4ae6b8c0ee2d 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseUpdate.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseUpdate.PowerShell.cs @@ -113,9 +113,9 @@ internal LicenseUpdate(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.LicenseUpdatePropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } if (content.Contains("LicenseType")) { @@ -166,9 +166,9 @@ internal LicenseUpdate(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ILicenseUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.LicenseUpdatePropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } if (content.Contains("LicenseType")) { diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseUpdate.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseUpdate.cs index 94ccfd153562..8ba34e152120 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseUpdate.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/LicenseUpdate.cs @@ -60,7 +60,7 @@ public partial class LicenseUpdate : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tags { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tags; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tags = value ?? null /* model class */; } /// Creates an new instance. public LicenseUpdate() diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/Machine.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/Machine.PowerShell.cs index a03377c5e870..951a1b5bcdf2 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/Machine.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/Machine.PowerShell.cs @@ -165,9 +165,9 @@ internal Machine(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { @@ -602,9 +602,9 @@ internal Machine(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/Machine.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/Machine.cs index eae03b0f3e08..c7183fbb2777 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/Machine.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/Machine.cs @@ -662,7 +662,7 @@ public partial class Machine : /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tags { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tags; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tags = value ?? null /* model class */; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtension.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtension.PowerShell.cs index 8224983b64aa..ebda226837ba 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtension.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtension.PowerShell.cs @@ -153,9 +153,9 @@ internal MachineExtension(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { @@ -298,9 +298,9 @@ internal MachineExtension(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtension.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtension.cs index 39ec97dcf604..136b3c3fed83 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtension.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtension.cs @@ -202,7 +202,7 @@ public partial class MachineExtension : /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.DoNotFormat] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tags { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tags; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tags = value ?? null /* model class */; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtensionUpdate.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtensionUpdate.PowerShell.cs index 8dc12621c385..94e3ce81de56 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtensionUpdate.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtensionUpdate.PowerShell.cs @@ -113,9 +113,9 @@ internal MachineExtensionUpdate(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineExtensionUpdatePropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } if (content.Contains("ForceUpdateTag")) { @@ -170,9 +170,9 @@ internal MachineExtensionUpdate(global::System.Management.Automation.PSObject co { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineExtensionUpdatePropertiesTypeConverter.ConvertFrom); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } if (content.Contains("ForceUpdateTag")) { diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtensionUpdate.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtensionUpdate.cs index c512b11650cd..50386c019fba 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtensionUpdate.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineExtensionUpdate.cs @@ -64,7 +64,7 @@ public partial class MachineExtensionUpdate : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tags { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tags; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tags = value ?? null /* model class */; } /// Specifies the type of the extension; an example is "CustomScriptExtension". [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inlined)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommand.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommand.PowerShell.cs index bc9a6a5a7fca..f74821c06099 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommand.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommand.PowerShell.cs @@ -153,9 +153,9 @@ internal MachineRunCommand(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { @@ -346,9 +346,9 @@ internal MachineRunCommand(global::System.Management.Automation.PSObject content { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommand.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommand.cs index 2c9bd4c9adc1..7c365fd30109 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommand.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommand.cs @@ -233,7 +233,7 @@ public partial class MachineRunCommand : /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tags { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tags; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)__trackedResource).Tags = value ?? null /* model class */; } /// The timeout in seconds to execute the run command. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inlined)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommandUpdate.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommandUpdate.PowerShell.cs index 984c46059a5d..cc117d69d272 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommandUpdate.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommandUpdate.PowerShell.cs @@ -109,9 +109,9 @@ internal MachineRunCommandUpdate(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } @@ -130,9 +130,9 @@ internal MachineRunCommandUpdate(global::System.Management.Automation.PSObject c return; } // actually deserialize - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommandUpdate.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommandUpdate.cs index d333d0c4768b..da3a1754a31f 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommandUpdate.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineRunCommandUpdate.cs @@ -21,7 +21,7 @@ public partial class MachineRunCommandUpdate : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tags { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tags; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tags = value ?? null /* model class */; } /// Creates an new instance. public MachineRunCommandUpdate() diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineUpdate.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineUpdate.PowerShell.cs index b41b39360ad1..3a4b6ca230c8 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineUpdate.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineUpdate.PowerShell.cs @@ -121,9 +121,9 @@ internal MachineUpdate(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdateInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdateInternal)this).Kind, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } if (content.Contains("IdentityPrincipalId")) { @@ -274,9 +274,9 @@ internal MachineUpdate(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdateInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdateInternal)this).Kind, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } if (content.Contains("IdentityPrincipalId")) { diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineUpdate.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineUpdate.cs index 0b2aeb09682f..faa6512f3cef 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineUpdate.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/MachineUpdate.cs @@ -180,7 +180,7 @@ public partial class MachineUpdate : /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tag = value ?? null /* model class */; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tags { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tags; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)__resourceUpdate).Tags = value ?? null /* model class */; } /// Specifies the assessment mode. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inlined)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.PowerShell.cs index 93c16ea13411..bd16c4798ace 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.PowerShell.cs @@ -125,9 +125,9 @@ internal PrivateLinkScopesResource(global::System.Collections.IDictionary conten { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Location, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTagsTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } @@ -162,9 +162,9 @@ internal PrivateLinkScopesResource(global::System.Management.Automation.PSObject { ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Location, global::System.Convert.ToString); } - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTagsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.cs index 8e069a05a802..1db45b612b82 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.cs @@ -43,12 +43,12 @@ public partial class PrivateLinkScopesResource : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Owned)] public string Name { get => this._name; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags _tag; + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags _tags; /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tags { get => (this._tags = this._tags ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTags()); set => this._tags = value; } /// Backing field for property. private string _type; @@ -110,7 +110,7 @@ public partial interface IPrivateLinkScopesResource : Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tags { get; set; } /// Azure resource type [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( Required = false, @@ -135,7 +135,7 @@ internal partial interface IPrivateLinkScopesResourceInternal /// Azure resource name string Name { get; set; } /// Resource tags - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tags { get; set; } /// Azure resource type string Type { get; set; } diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.json.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.json.cs index ee36cfda03ba..60625a34c6a1 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.json.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/PrivateLinkScopesResource.json.cs @@ -81,7 +81,7 @@ internal PrivateLinkScopesResource(Microsoft.Azure.PowerShell.Cmdlets.ConnectedM {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTags.FromJson(__jsonTags) : _tag;} + {_tags = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.PrivateLinkScopesResourceTags.FromJson(__jsonTags) : _tags;} AfterFromJson(json); } @@ -120,7 +120,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode { AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); } - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AddIf( null != this._tags ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode) this._tags.ToJson(null,serializationMode) : null, "tags" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.PowerShell.cs index e34f71afbd2a..0c4df9693307 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.PowerShell.cs @@ -109,9 +109,9 @@ internal ResourceUpdate(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } @@ -130,9 +130,9 @@ internal ResourceUpdate(global::System.Management.Automation.PSObject content) return; } // actually deserialize - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTagsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.cs index 495afa746448..8787c99f846f 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.cs @@ -13,12 +13,12 @@ public partial class ResourceUpdate : Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateInternal { - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags _tag; + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags _tags; /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tags { get => (this._tags = this._tags ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTags()); set => this._tags = value; } /// Creates an new instance. public ResourceUpdate() @@ -40,7 +40,7 @@ public partial interface IResourceUpdate : Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tags { get; set; } } /// The Update Resource model definition. @@ -48,7 +48,7 @@ internal partial interface IResourceUpdateInternal { /// Resource tags - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tags { get; set; } } } \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.json.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.json.cs index 7c0338cc9305..ce7bc4ab9e5e 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.json.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/ResourceUpdate.json.cs @@ -77,7 +77,7 @@ internal ResourceUpdate(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runt { return; } - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTags.FromJson(__jsonTags) : _tag;} + {_tags = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ResourceUpdateTags.FromJson(__jsonTags) : _tags;} AfterFromJson(json); } @@ -100,7 +100,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode { return container; } - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AddIf( null != this._tags ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode) this._tags.ToJson(null,serializationMode) : null, "tags" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.PowerShell.cs index 861f63c5fff9..4c0e7627143b 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.PowerShell.cs @@ -111,9 +111,9 @@ internal TagsResource(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TagsResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TagsResourceTagsTypeConverter.ConvertFrom); } AfterDeserializeDictionary(content); } @@ -132,9 +132,9 @@ internal TagsResource(global::System.Management.Automation.PSObject content) return; } // actually deserialize - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TagsResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TagsResourceTagsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.cs index 2d775517470c..d9ff47096dc1 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.cs @@ -15,12 +15,12 @@ public partial class TagsResource : Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceInternal { - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags _tag; + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags _tags; /// Resource tags [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TagsResourceTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags Tags { get => (this._tags = this._tags ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TagsResourceTags()); set => this._tags = value; } /// Creates an new instance. public TagsResource() @@ -42,7 +42,7 @@ public partial interface ITagsResource : Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags Tags { get; set; } } /// A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. @@ -50,7 +50,7 @@ internal partial interface ITagsResourceInternal { /// Resource tags - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags Tags { get; set; } } } \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.json.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.json.cs index 46144e33ede8..db4e36b0988a 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.json.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TagsResource.json.cs @@ -79,7 +79,7 @@ internal TagsResource(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtim { return; } - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TagsResourceTags.FromJson(__jsonTags) : _tag;} + {_tags = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TagsResourceTags.FromJson(__jsonTags) : _tags;} AfterFromJson(json); } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode { return container; } - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AddIf( null != this._tags ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode) this._tags.ToJson(null,serializationMode) : null, "tags" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.PowerShell.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.PowerShell.cs index 104f5a7c044c..2473db4276ad 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.PowerShell.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.PowerShell.cs @@ -128,9 +128,9 @@ internal TrackedResource(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { @@ -193,9 +193,9 @@ internal TrackedResource(global::System.Management.Automation.PSObject content) return; } // actually deserialize - if (content.Contains("Tag")) + if (content.Contains("Tags")) { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) content.GetValueForProperty("Tags",((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceInternal)this).Tags, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTagsTypeConverter.ConvertFrom); } if (content.Contains("Location")) { diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.cs index b956aac9273e..fbadd36d6284 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.cs @@ -79,12 +79,12 @@ public partial class TrackedResource : [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Inherited)] public string SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? null; } - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags _tag; + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags _tags; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Origin(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tags { get => (this._tags = this._tags ?? new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTags()); set => this._tags = value; } /// /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" @@ -136,7 +136,7 @@ public partial interface ITrackedResource : Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) })] - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tags { get; set; } } /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' @@ -146,7 +146,7 @@ internal partial interface ITrackedResourceInternal : /// The geo-location where the resource lives string Location { get; set; } /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tags { get; set; } } } \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.json.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.json.cs index 3e142ac4a373..d54837a2d76f 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.json.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/api/Models/TrackedResource.json.cs @@ -87,7 +87,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode return container; } __resource?.ToJson(container, serializationMode); - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AddIf( null != this._tags ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode) this._tags.ToJson(null,serializationMode) : null, "tags" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeCreate)) { AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); @@ -109,7 +109,7 @@ internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Run return; } __resource = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.Resource(json); - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTags.FromJson(__jsonTags) : _tag;} + {_tags = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.TrackedResourceTags.FromJson(__jsonTags) : _tags;} {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} AfterFromJson(json); } diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateExpanded.cs index 84e1d1076fa6..89b603b9ab66 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateExpanded.cs @@ -402,7 +402,7 @@ public partial class NewAzConnectedMachineExtension_CreateExpanded : global::Sys Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _extensionParametersBody.Tag ?? null /* object */; set => _extensionParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _extensionParametersBody.Tags ?? null /* object */; set => _extensionParametersBody.Tags = value; } /// Specifies the version of the script handler. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the version of the script handler.")] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityExpanded.cs index fda204294e6f..43d568e46af8 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityExpanded.cs @@ -345,7 +345,7 @@ public partial class NewAzConnectedMachineExtension_CreateViaIdentityExpanded : Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _extensionParametersBody.Tag ?? null /* object */; set => _extensionParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _extensionParametersBody.Tags ?? null /* object */; set => _extensionParametersBody.Tags = value; } /// Specifies the version of the script handler. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the version of the script handler.")] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachineExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachineExpanded.cs index f6b98a29c64d..0fef79bd38d6 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachineExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineExtension_CreateViaIdentityMachineExpanded.cs @@ -359,7 +359,7 @@ public partial class NewAzConnectedMachineExtension_CreateViaIdentityMachineExpa Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _extensionParametersBody.Tag ?? null /* object */; set => _extensionParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _extensionParametersBody.Tags ?? null /* object */; set => _extensionParametersBody.Tags = value; } /// Specifies the version of the script handler. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the version of the script handler.")] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateExpanded.cs index c89105beafcc..34d5f5af5dde 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateExpanded.cs @@ -425,7 +425,7 @@ public partial class NewAzConnectedMachineRunCommand_CreateExpanded : global::Sy Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tag ?? null /* object */; set => _runCommandPropertiesBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tags ?? null /* object */; set => _runCommandPropertiesBody.Tags = value; } /// The timeout in seconds to execute the run command. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timeout in seconds to execute the run command.")] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityExpanded.cs index ca6751994cfc..e68f6fd754c0 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityExpanded.cs @@ -368,7 +368,7 @@ public partial class NewAzConnectedMachineRunCommand_CreateViaIdentityExpanded : Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tag ?? null /* object */; set => _runCommandPropertiesBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tags ?? null /* object */; set => _runCommandPropertiesBody.Tags = value; } /// The timeout in seconds to execute the run command. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timeout in seconds to execute the run command.")] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachineExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachineExpanded.cs index 8bfe54f1d262..541852c6e544 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachineExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedMachineRunCommand_CreateViaIdentityMachineExpanded.cs @@ -382,7 +382,7 @@ public partial class NewAzConnectedMachineRunCommand_CreateViaIdentityMachineExp Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tag ?? null /* object */; set => _runCommandPropertiesBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tags ?? null /* object */; set => _runCommandPropertiesBody.Tags = value; } /// The timeout in seconds to execute the run command. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timeout in seconds to execute the run command.")] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateExpanded.cs index 3d9aa3e08538..8fb60501b50e 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateExpanded.cs @@ -213,7 +213,7 @@ public partial class NewAzConnectedPrivateLinkScope_CreateExpanded : global::Sys Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tag { get => _parametersBody.Tags ?? null /* object */; set => _parametersBody.Tags = value; } /// /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentityExpanded.cs index 61fee8e3988e..ca9d7cb51a0d 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/NewAzConnectedPrivateLinkScope_CreateViaIdentityExpanded.cs @@ -170,7 +170,7 @@ public partial class NewAzConnectedPrivateLinkScope_CreateViaIdentityExpanded : Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tag { get => _parametersBody.Tags ?? null /* object */; set => _parametersBody.Tags = value; } /// /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_Update.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_Update.cs index f2880cc7afcd..340677cf0f59 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_Update.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_Update.cs @@ -471,7 +471,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MachineExtensionsCreateOrUpdate(SubscriptionId, ResourceGroupName, MachineName, Name, ExtensionParameter, onOk, onDefault, this, Pipeline); + await this.Client.MachineExtensionsCreateOrUpdate(SubscriptionId, ResourceGroupName, MachineName, Name, ExtensionParameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateExpanded.cs index cf7620ea4784..46353d7ecf03 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedMachineExtension_UpdateExpanded.cs @@ -402,7 +402,7 @@ public partial class SetAzConnectedMachineExtension_UpdateExpanded : global::Sys Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _extensionParametersBody.Tag ?? null /* object */; set => _extensionParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _extensionParametersBody.Tags ?? null /* object */; set => _extensionParametersBody.Tags = value; } /// Specifies the version of the script handler. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the version of the script handler.")] @@ -677,7 +677,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MachineExtensionsCreateOrUpdate(SubscriptionId, ResourceGroupName, MachineName, Name, _extensionParametersBody, onOk, onDefault, this, Pipeline); + await this.Client.MachineExtensionsCreateOrUpdate(SubscriptionId, ResourceGroupName, MachineName, Name, _extensionParametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_Update.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_Update.cs index f0ad4240d943..63a9feda4bf2 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_Update.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_Update.cs @@ -388,7 +388,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateLinkScopesCreateOrUpdate(SubscriptionId, ResourceGroupName, ScopeName, Parameter, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.PrivateLinkScopesCreateOrUpdate(SubscriptionId, ResourceGroupName, ScopeName, Parameter, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateExpanded.cs index d59067a455d0..49dcccf44b42 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/SetAzConnectedPrivateLinkScope_UpdateExpanded.cs @@ -213,7 +213,7 @@ public partial class SetAzConnectedPrivateLinkScope_UpdateExpanded : global::Sys Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IPrivateLinkScopesResourceTags Tag { get => _parametersBody.Tags ?? null /* object */; set => _parametersBody.Tags = value; } /// /// overrideOnCreated will be called before the regular onCreated has been processed, allowing customization of what @@ -418,7 +418,7 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.PrivateLinkScopesCreateOrUpdate(SubscriptionId, ResourceGroupName, ScopeName, _parametersBody, onOk, onCreated, onDefault, this, Pipeline); + await this.Client.PrivateLinkScopesCreateOrUpdate(SubscriptionId, ResourceGroupName, ScopeName, _parametersBody, onOk, onCreated, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeCreate); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateExpanded.cs index f03832995daf..8985232c50d4 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateExpanded.cs @@ -287,7 +287,7 @@ public partial class UpdateAzConnectedMachineExtension_UpdateExpanded : global:: Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => _extensionParametersBody.Tag ?? null /* object */; set => _extensionParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => _extensionParametersBody.Tags ?? null /* object */; set => _extensionParametersBody.Tags = value; } /// Specifies the type of the extension; an example is "CustomScriptExtension". [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the type of the extension; an example is \"CustomScriptExtension\".")] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityExpanded.cs index 9e65f89b699b..0538518ad6d4 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityExpanded.cs @@ -230,7 +230,7 @@ public partial class UpdateAzConnectedMachineExtension_UpdateViaIdentityExpanded Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => _extensionParametersBody.Tag ?? null /* object */; set => _extensionParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => _extensionParametersBody.Tags ?? null /* object */; set => _extensionParametersBody.Tags = value; } /// Specifies the type of the extension; an example is "CustomScriptExtension". [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the type of the extension; an example is \"CustomScriptExtension\".")] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachineExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachineExpanded.cs index de1f50fa702c..ef5d116265ad 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachineExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineExtension_UpdateViaIdentityMachineExpanded.cs @@ -244,7 +244,7 @@ public partial class UpdateAzConnectedMachineExtension_UpdateViaIdentityMachineE Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => _extensionParametersBody.Tag ?? null /* object */; set => _extensionParametersBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => _extensionParametersBody.Tags ?? null /* object */; set => _extensionParametersBody.Tags = value; } /// Specifies the type of the extension; an example is "CustomScriptExtension". [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the type of the extension; an example is \"CustomScriptExtension\".")] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_Update.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_Update.cs index e9ff138ae126..a251db2424f4 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_Update.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_Update.cs @@ -473,7 +473,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } RunCommandProperty = await this.Client.MachineRunCommandsGetWithResult(SubscriptionId, ResourceGroupName, MachineName, RunCommandName, this, Pipeline); this.UpdateRunCommandProperty(); - await this.Client.MachineRunCommandsCreateOrUpdate(SubscriptionId, ResourceGroupName, MachineName, RunCommandName, RunCommandProperty, onOk, onDefault, this, Pipeline); + await this.Client.MachineRunCommandsCreateOrUpdate(SubscriptionId, ResourceGroupName, MachineName, RunCommandName, RunCommandProperty, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateExpanded.cs index 0e26564d33fa..412efdf93492 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateExpanded.cs @@ -149,21 +149,6 @@ public partial class UpdateAzConnectedMachineRunCommand_UpdateExpanded : global: /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - /// The geo-location where the resource lives - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.CompleterInfo( - Name = @"Location Completer", - Description =@"Gets the list of locations available for this resource.", - Script = @"Get-AzLocation | Where-Object Providers -Contains ""Microsoft.HybridCompute"" | Select-Object -ExpandProperty Location")] - public string Location { get => _runCommandPropertiesBody.Location ?? null; set => _runCommandPropertiesBody.Location = value; } - /// Backing field for property. private string _machineName; @@ -425,7 +410,7 @@ public partial class UpdateAzConnectedMachineRunCommand_UpdateExpanded : global: Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tag ?? null /* object */; set => _runCommandPropertiesBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tags ?? null /* object */; set => _runCommandPropertiesBody.Tags = value; } /// The timeout in seconds to execute the run command. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timeout in seconds to execute the run command.")] @@ -702,7 +687,7 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } _runCommandPropertiesBody = await this.Client.MachineRunCommandsGetWithResult(SubscriptionId, ResourceGroupName, MachineName, RunCommandName, this, Pipeline); this.Update_runCommandPropertiesBody(); - await this.Client.MachineRunCommandsCreateOrUpdate(SubscriptionId, ResourceGroupName, MachineName, RunCommandName, _runCommandPropertiesBody, onOk, onDefault, this, Pipeline); + await this.Client.MachineRunCommandsCreateOrUpdate(SubscriptionId, ResourceGroupName, MachineName, RunCommandName, _runCommandPropertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) @@ -740,10 +725,6 @@ private void Update_runCommandPropertiesBody() { this.Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags)(this.MyInvocation?.BoundParameters["Tag"]); } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("Location"))) - { - this.Location = (string)(this.MyInvocation?.BoundParameters["Location"]); - } if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("Parameter"))) { this.Parameter = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[])(this.MyInvocation?.BoundParameters["Parameter"]); diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentity.cs index 7c9751284dfc..45ad5851f46b 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentity.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentity.cs @@ -414,7 +414,7 @@ protected override void ProcessRecord() { RunCommandProperty = await this.Client.MachineRunCommandsGetViaIdentityWithResult(InputObject.Id, this, Pipeline); this.UpdateRunCommandProperty(); - await this.Client.MachineRunCommandsCreateOrUpdateViaIdentity(InputObject.Id, RunCommandProperty, onOk, onDefault, this, Pipeline); + await this.Client.MachineRunCommandsCreateOrUpdateViaIdentity(InputObject.Id, RunCommandProperty, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); } else { @@ -437,7 +437,7 @@ protected override void ProcessRecord() } RunCommandProperty = await this.Client.MachineRunCommandsGetWithResult(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.MachineName ?? null, InputObject.RunCommandName ?? null, this, Pipeline); this.UpdateRunCommandProperty(); - await this.Client.MachineRunCommandsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.MachineName ?? null, InputObject.RunCommandName ?? null, RunCommandProperty, onOk, onDefault, this, Pipeline); + await this.Client.MachineRunCommandsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.MachineName ?? null, InputObject.RunCommandName ?? null, RunCommandProperty, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityExpanded.cs index ce1fbb948e31..04f04bf11189 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityExpanded.cs @@ -157,21 +157,6 @@ public partial class UpdateAzConnectedMachineRunCommand_UpdateViaIdentityExpande /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - /// The geo-location where the resource lives - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.CompleterInfo( - Name = @"Location Completer", - Description =@"Gets the list of locations available for this resource.", - Script = @"Get-AzLocation | Where-Object Providers -Contains ""Microsoft.HybridCompute"" | Select-Object -ExpandProperty Location")] - public string Location { get => _runCommandPropertiesBody.Location ?? null; set => _runCommandPropertiesBody.Location = value; } - /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -368,7 +353,7 @@ public partial class UpdateAzConnectedMachineRunCommand_UpdateViaIdentityExpande Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tag ?? null /* object */; set => _runCommandPropertiesBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tags ?? null /* object */; set => _runCommandPropertiesBody.Tags = value; } /// The timeout in seconds to execute the run command. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timeout in seconds to execute the run command.")] @@ -645,7 +630,7 @@ protected override void ProcessRecord() { _runCommandPropertiesBody = await this.Client.MachineRunCommandsGetViaIdentityWithResult(InputObject.Id, this, Pipeline); this.Update_runCommandPropertiesBody(); - await this.Client.MachineRunCommandsCreateOrUpdateViaIdentity(InputObject.Id, _runCommandPropertiesBody, onOk, onDefault, this, Pipeline); + await this.Client.MachineRunCommandsCreateOrUpdateViaIdentity(InputObject.Id, _runCommandPropertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); } else { @@ -668,7 +653,7 @@ protected override void ProcessRecord() } _runCommandPropertiesBody = await this.Client.MachineRunCommandsGetWithResult(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.MachineName ?? null, InputObject.RunCommandName ?? null, this, Pipeline); this.Update_runCommandPropertiesBody(); - await this.Client.MachineRunCommandsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.MachineName ?? null, InputObject.RunCommandName ?? null, _runCommandPropertiesBody, onOk, onDefault, this, Pipeline); + await this.Client.MachineRunCommandsCreateOrUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.MachineName ?? null, InputObject.RunCommandName ?? null, _runCommandPropertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -707,10 +692,6 @@ private void Update_runCommandPropertiesBody() { this.Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags)(this.MyInvocation?.BoundParameters["Tag"]); } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("Location"))) - { - this.Location = (string)(this.MyInvocation?.BoundParameters["Location"]); - } if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("Parameter"))) { this.Parameter = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[])(this.MyInvocation?.BoundParameters["Parameter"]); diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachine.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachine.cs index 726474b68c42..d50362367617 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachine.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachine.cs @@ -432,7 +432,7 @@ protected override void ProcessRecord() this.MachineInputObject.Id += $"/runCommands/{(global::System.Uri.EscapeDataString(this.RunCommandName.ToString()))}"; RunCommandProperty = await this.Client.MachineRunCommandsGetViaIdentityWithResult(MachineInputObject.Id, this, Pipeline); this.UpdateRunCommandProperty(); - await this.Client.MachineRunCommandsCreateOrUpdateViaIdentity(MachineInputObject.Id, RunCommandProperty, onOk, onDefault, this, Pipeline); + await this.Client.MachineRunCommandsCreateOrUpdateViaIdentity(MachineInputObject.Id, RunCommandProperty, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); } else { @@ -451,7 +451,7 @@ protected override void ProcessRecord() } RunCommandProperty = await this.Client.MachineRunCommandsGetWithResult(MachineInputObject.SubscriptionId ?? null, MachineInputObject.ResourceGroupName ?? null, MachineInputObject.MachineName ?? null, RunCommandName, this, Pipeline); this.UpdateRunCommandProperty(); - await this.Client.MachineRunCommandsCreateOrUpdate(MachineInputObject.SubscriptionId ?? null, MachineInputObject.ResourceGroupName ?? null, MachineInputObject.MachineName ?? null, RunCommandName, RunCommandProperty, onOk, onDefault, this, Pipeline); + await this.Client.MachineRunCommandsCreateOrUpdate(MachineInputObject.SubscriptionId ?? null, MachineInputObject.ResourceGroupName ?? null, MachineInputObject.MachineName ?? null, RunCommandName, RunCommandProperty, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachineExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachineExpanded.cs index a5fae0ca1ce9..4f776a44dece 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachineExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachineExpanded.cs @@ -149,21 +149,6 @@ public partial class UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachine /// Accessor for our copy of the InvocationInfo. public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - /// The geo-location where the resource lives - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The geo-location where the resource lives")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The geo-location where the resource lives", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.CompleterInfo( - Name = @"Location Completer", - Description =@"Gets the list of locations available for this resource.", - Script = @"Get-AzLocation | Where-Object Providers -Contains ""Microsoft.HybridCompute"" | Select-Object -ExpandProperty Location")] - public string Location { get => _runCommandPropertiesBody.Location ?? null; set => _runCommandPropertiesBody.Location = value; } - /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity _machineInputObject; @@ -382,7 +367,7 @@ public partial class UpdateAzConnectedMachineRunCommand_UpdateViaIdentityMachine Description = @"Resource tags.", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tag ?? null /* object */; set => _runCommandPropertiesBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags Tag { get => _runCommandPropertiesBody.Tags ?? null /* object */; set => _runCommandPropertiesBody.Tags = value; } /// The timeout in seconds to execute the run command. [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timeout in seconds to execute the run command.")] @@ -661,7 +646,7 @@ protected override void ProcessRecord() this.MachineInputObject.Id += $"/runCommands/{(global::System.Uri.EscapeDataString(this.RunCommandName.ToString()))}"; _runCommandPropertiesBody = await this.Client.MachineRunCommandsGetViaIdentityWithResult(MachineInputObject.Id, this, Pipeline); this.Update_runCommandPropertiesBody(); - await this.Client.MachineRunCommandsCreateOrUpdateViaIdentity(MachineInputObject.Id, _runCommandPropertiesBody, onOk, onDefault, this, Pipeline); + await this.Client.MachineRunCommandsCreateOrUpdateViaIdentity(MachineInputObject.Id, _runCommandPropertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); } else { @@ -680,7 +665,7 @@ protected override void ProcessRecord() } _runCommandPropertiesBody = await this.Client.MachineRunCommandsGetWithResult(MachineInputObject.SubscriptionId ?? null, MachineInputObject.ResourceGroupName ?? null, MachineInputObject.MachineName ?? null, RunCommandName, this, Pipeline); this.Update_runCommandPropertiesBody(); - await this.Client.MachineRunCommandsCreateOrUpdate(MachineInputObject.SubscriptionId ?? null, MachineInputObject.ResourceGroupName ?? null, MachineInputObject.MachineName ?? null, RunCommandName, _runCommandPropertiesBody, onOk, onDefault, this, Pipeline); + await this.Client.MachineRunCommandsCreateOrUpdate(MachineInputObject.SubscriptionId ?? null, MachineInputObject.ResourceGroupName ?? null, MachineInputObject.MachineName ?? null, RunCommandName, _runCommandPropertiesBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } @@ -720,10 +705,6 @@ private void Update_runCommandPropertiesBody() { this.Tag = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITrackedResourceTags)(this.MyInvocation?.BoundParameters["Tag"]); } - if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("Location"))) - { - this.Location = (string)(this.MyInvocation?.BoundParameters["Location"]); - } if ((bool)(true == this.MyInvocation?.BoundParameters.ContainsKey("Parameter"))) { this.Parameter = (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[])(this.MyInvocation?.BoundParameters["Parameter"]); diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_Update.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_Update.cs deleted file mode 100644 index 0764d1c03a6d..000000000000 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_Update.cs +++ /dev/null @@ -1,493 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Cmdlets; - using System; - - /// The operation to update a hybrid machine. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzConnectedMachine_Update", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Description(@"The operation to update a hybrid machine.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}", ApiVersion = "2023-10-03-preview")] - public partial class UpdateAzConnectedMachine_Update : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ConnectedMachine Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the hybrid machine. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the hybrid machine.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the hybrid machine.", - SerializedName = @"machineName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("MachineName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate _parameter; - - /// Describes a hybrid machine Update. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Describes a hybrid machine Update.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Describes a hybrid machine Update.", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate Parameter { get => this._parameter; set => this._parameter = value; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.CompleterInfo( - Name = @"ResourceGroupName Completer", - Description =@"Gets the list of ResourceGroupName's available for this subscription.", - Script = @"Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'MachinesUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token); - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MachinesUpdate(SubscriptionId, ResourceGroupName, Name, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public UpdateAzConnectedMachine_Update() - { - - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } - } - } - } -} \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateExpanded.cs deleted file mode 100644 index 9fae44f82194..000000000000 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateExpanded.cs +++ /dev/null @@ -1,669 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Cmdlets; - using System; - - /// The operation to update a hybrid machine. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzConnectedMachine_UpdateExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Description(@"The operation to update a hybrid machine.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}", ApiVersion = "2023-10-03-preview")] - public partial class UpdateAzConnectedMachine_UpdateExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// Describes a hybrid machine Update. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineUpdate(); - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - - /// The correlation ID passed in from RSM per upgrade. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The correlation ID passed in from RSM per upgrade.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The correlation ID passed in from RSM per upgrade.", - SerializedName = @"correlationId", - PossibleTypes = new [] { typeof(string) })] - public string AgentUpgradeCorrelationId { get => _parametersBody.AgentUpgradeCorrelationId ?? null; set => _parametersBody.AgentUpgradeCorrelationId = value; } - - /// Specifies the version info w.r.t AgentUpgrade for the machine. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the version info w.r.t AgentUpgrade for the machine.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the version info w.r.t AgentUpgrade for the machine.", - SerializedName = @"desiredVersion", - PossibleTypes = new [] { typeof(string) })] - public string AgentUpgradeDesiredVersion { get => _parametersBody.AgentUpgradeDesiredVersion ?? null; set => _parametersBody.AgentUpgradeDesiredVersion = value; } - - /// Specifies if RSM should try to upgrade this machine - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies if RSM should try to upgrade this machine")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies if RSM should try to upgrade this machine", - SerializedName = @"enableAutomaticUpgrade", - PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter AgentUpgradeEnableAutomatic { get => _parametersBody.AgentUpgradeEnableAutomaticUpgrade ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.AgentUpgradeEnableAutomaticUpgrade = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ConnectedMachine Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// The identity type. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The identity type.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The identity type.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("SystemAssigned")] - public string IdentityType { get => _parametersBody.IdentityType ?? null; set => _parametersBody.IdentityType = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc.", - SerializedName = @"kind", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("AVS", "HCI", "SCVMM", "VMware", "EPS", "GCP", "AWS")] - public string Kind { get => _parametersBody.Kind ?? null; set => _parametersBody.Kind = value; } - - /// Specifies the assessment mode. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the assessment mode.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the assessment mode.", - SerializedName = @"assessmentMode", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] - public string LinuxConfigurationPatchSettingsAssessmentMode { get => _parametersBody.LinuxConfigurationPatchSettingsAssessmentMode ?? null; set => _parametersBody.LinuxConfigurationPatchSettingsAssessmentMode = value; } - - /// Specifies the patch mode. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the patch mode.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the patch mode.", - SerializedName = @"patchMode", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] - public string LinuxConfigurationPatchSettingsPatchMode { get => _parametersBody.LinuxConfigurationPatchSettingsPatchMode ?? null; set => _parametersBody.LinuxConfigurationPatchSettingsPatchMode = value; } - - /// The city or locality where the resource is located. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The city or locality where the resource is located.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The city or locality where the resource is located.", - SerializedName = @"city", - PossibleTypes = new [] { typeof(string) })] - public string LocationDataCity { get => _parametersBody.LocationDataCity ?? null; set => _parametersBody.LocationDataCity = value; } - - /// The country or region where the resource is located - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The country or region where the resource is located")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The country or region where the resource is located", - SerializedName = @"countryOrRegion", - PossibleTypes = new [] { typeof(string) })] - public string LocationDataCountryOrRegion { get => _parametersBody.LocationDataCountryOrRegion ?? null; set => _parametersBody.LocationDataCountryOrRegion = value; } - - /// The district, state, or province where the resource is located. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The district, state, or province where the resource is located.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The district, state, or province where the resource is located.", - SerializedName = @"district", - PossibleTypes = new [] { typeof(string) })] - public string LocationDataDistrict { get => _parametersBody.LocationDataDistrict ?? null; set => _parametersBody.LocationDataDistrict = value; } - - /// A canonical name for the geographic or physical location. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A canonical name for the geographic or physical location.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A canonical name for the geographic or physical location.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - public string LocationDataName { get => _parametersBody.LocationDataName ?? null; set => _parametersBody.LocationDataName = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the hybrid machine. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the hybrid machine.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the hybrid machine.", - SerializedName = @"machineName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("MachineName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.", - SerializedName = @"parentClusterResourceId", - PossibleTypes = new [] { typeof(string) })] - public string ParentClusterResourceId { get => _parametersBody.ParentClusterResourceId ?? null; set => _parametersBody.ParentClusterResourceId = value; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.HttpPipeline Pipeline { get; set; } - - /// The resource id of the private link scope this machine is assigned to, if any. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource id of the private link scope this machine is assigned to, if any.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The resource id of the private link scope this machine is assigned to, if any.", - SerializedName = @"privateLinkScopeResourceId", - PossibleTypes = new [] { typeof(string) })] - public string PrivateLinkScopeResourceId { get => _parametersBody.PrivateLinkScopeResourceId ?? null; set => _parametersBody.PrivateLinkScopeResourceId = value; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.CompleterInfo( - Name = @"ResourceGroupName Completer", - Description =@"Gets the list of ResourceGroupName's available for this subscription.", - Script = @"Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// Resource tags - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } - - /// Specifies the assessment mode. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the assessment mode.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the assessment mode.", - SerializedName = @"assessmentMode", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] - public string WindowsConfigurationPatchSettingsAssessmentMode { get => _parametersBody.WindowsConfigurationPatchSettingsAssessmentMode ?? null; set => _parametersBody.WindowsConfigurationPatchSettingsAssessmentMode = value; } - - /// Specifies the patch mode. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the patch mode.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the patch mode.", - SerializedName = @"patchMode", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] - public string WindowsConfigurationPatchSettingsPatchMode { get => _parametersBody.WindowsConfigurationPatchSettingsPatchMode ?? null; set => _parametersBody.WindowsConfigurationPatchSettingsPatchMode = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'MachinesUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token); - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MachinesUpdate(SubscriptionId, ResourceGroupName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public UpdateAzConnectedMachine_UpdateExpanded() - { - - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } - } - } - } -} \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentity.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentity.cs deleted file mode 100644 index 01003ef9cc8a..000000000000 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentity.cs +++ /dev/null @@ -1,469 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Cmdlets; - using System; - - /// The operation to update a hybrid machine. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzConnectedMachine_UpdateViaIdentity", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Description(@"The operation to update a hybrid machine.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}", ApiVersion = "2023-10-03-preview")] - public partial class UpdateAzConnectedMachine_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ConnectedMachine Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate _parameter; - - /// Describes a hybrid machine Update. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Describes a hybrid machine Update.", ValueFromPipeline = true)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Describes a hybrid machine Update.", - SerializedName = @"parameters", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate Parameter { get => this._parameter; set => this._parameter = value; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'MachinesUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token); - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.MachinesUpdateViaIdentity(InputObject.Id, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ResourceGroupName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.MachineName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MachineName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.MachinesUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.MachineName ?? null, Parameter, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public UpdateAzConnectedMachine_UpdateViaIdentity() - { - - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } - } - } - } -} \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentityExpanded.cs deleted file mode 100644 index 06316f012525..000000000000 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaIdentityExpanded.cs +++ /dev/null @@ -1,645 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Cmdlets; - using System; - - /// The operation to update a hybrid machine. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzConnectedMachine_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Description(@"The operation to update a hybrid machine.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}", ApiVersion = "2023-10-03-preview")] - public partial class UpdateAzConnectedMachine_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// Describes a hybrid machine Update. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.MachineUpdate(); - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - - /// The correlation ID passed in from RSM per upgrade. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The correlation ID passed in from RSM per upgrade.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The correlation ID passed in from RSM per upgrade.", - SerializedName = @"correlationId", - PossibleTypes = new [] { typeof(string) })] - public string AgentUpgradeCorrelationId { get => _parametersBody.AgentUpgradeCorrelationId ?? null; set => _parametersBody.AgentUpgradeCorrelationId = value; } - - /// Specifies the version info w.r.t AgentUpgrade for the machine. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the version info w.r.t AgentUpgrade for the machine.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the version info w.r.t AgentUpgrade for the machine.", - SerializedName = @"desiredVersion", - PossibleTypes = new [] { typeof(string) })] - public string AgentUpgradeDesiredVersion { get => _parametersBody.AgentUpgradeDesiredVersion ?? null; set => _parametersBody.AgentUpgradeDesiredVersion = value; } - - /// Specifies if RSM should try to upgrade this machine - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies if RSM should try to upgrade this machine")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies if RSM should try to upgrade this machine", - SerializedName = @"enableAutomaticUpgrade", - PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] - public global::System.Management.Automation.SwitchParameter AgentUpgradeEnableAutomatic { get => _parametersBody.AgentUpgradeEnableAutomaticUpgrade ?? default(global::System.Management.Automation.SwitchParameter); set => _parametersBody.AgentUpgradeEnableAutomaticUpgrade = value; } - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ConnectedMachine Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// The identity type. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The identity type.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The identity type.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("SystemAssigned")] - public string IdentityType { get => _parametersBody.IdentityType ?? null; set => _parametersBody.IdentityType = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity _inputObject; - - /// Identity Parameter - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// - /// Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc.", - SerializedName = @"kind", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("AVS", "HCI", "SCVMM", "VMware", "EPS", "GCP", "AWS")] - public string Kind { get => _parametersBody.Kind ?? null; set => _parametersBody.Kind = value; } - - /// Specifies the assessment mode. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the assessment mode.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the assessment mode.", - SerializedName = @"assessmentMode", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] - public string LinuxConfigurationPatchSettingsAssessmentMode { get => _parametersBody.LinuxConfigurationPatchSettingsAssessmentMode ?? null; set => _parametersBody.LinuxConfigurationPatchSettingsAssessmentMode = value; } - - /// Specifies the patch mode. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the patch mode.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the patch mode.", - SerializedName = @"patchMode", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] - public string LinuxConfigurationPatchSettingsPatchMode { get => _parametersBody.LinuxConfigurationPatchSettingsPatchMode ?? null; set => _parametersBody.LinuxConfigurationPatchSettingsPatchMode = value; } - - /// The city or locality where the resource is located. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The city or locality where the resource is located.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The city or locality where the resource is located.", - SerializedName = @"city", - PossibleTypes = new [] { typeof(string) })] - public string LocationDataCity { get => _parametersBody.LocationDataCity ?? null; set => _parametersBody.LocationDataCity = value; } - - /// The country or region where the resource is located - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The country or region where the resource is located")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The country or region where the resource is located", - SerializedName = @"countryOrRegion", - PossibleTypes = new [] { typeof(string) })] - public string LocationDataCountryOrRegion { get => _parametersBody.LocationDataCountryOrRegion ?? null; set => _parametersBody.LocationDataCountryOrRegion = value; } - - /// The district, state, or province where the resource is located. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The district, state, or province where the resource is located.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The district, state, or province where the resource is located.", - SerializedName = @"district", - PossibleTypes = new [] { typeof(string) })] - public string LocationDataDistrict { get => _parametersBody.LocationDataDistrict ?? null; set => _parametersBody.LocationDataDistrict = value; } - - /// A canonical name for the geographic or physical location. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A canonical name for the geographic or physical location.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A canonical name for the geographic or physical location.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - public string LocationDataName { get => _parametersBody.LocationDataName ?? null; set => _parametersBody.LocationDataName = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// - /// The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any.", - SerializedName = @"parentClusterResourceId", - PossibleTypes = new [] { typeof(string) })] - public string ParentClusterResourceId { get => _parametersBody.ParentClusterResourceId ?? null; set => _parametersBody.ParentClusterResourceId = value; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.HttpPipeline Pipeline { get; set; } - - /// The resource id of the private link scope this machine is assigned to, if any. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource id of the private link scope this machine is assigned to, if any.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The resource id of the private link scope this machine is assigned to, if any.", - SerializedName = @"privateLinkScopeResourceId", - PossibleTypes = new [] { typeof(string) })] - public string PrivateLinkScopeResourceId { get => _parametersBody.PrivateLinkScopeResourceId ?? null; set => _parametersBody.PrivateLinkScopeResourceId = value; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Resource tags - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ExportAs(typeof(global::System.Collections.Hashtable))] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IResourceUpdateTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = value; } - - /// Specifies the assessment mode. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the assessment mode.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the assessment mode.", - SerializedName = @"assessmentMode", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform")] - public string WindowsConfigurationPatchSettingsAssessmentMode { get => _parametersBody.WindowsConfigurationPatchSettingsAssessmentMode ?? null; set => _parametersBody.WindowsConfigurationPatchSettingsAssessmentMode = value; } - - /// Specifies the patch mode. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies the patch mode.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Body)] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the patch mode.", - SerializedName = @"patchMode", - PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.PSArgumentCompleterAttribute("ImageDefault", "AutomaticByPlatform", "AutomaticByOS", "Manual")] - public string WindowsConfigurationPatchSettingsPatchMode { get => _parametersBody.WindowsConfigurationPatchSettingsPatchMode ?? null; set => _parametersBody.WindowsConfigurationPatchSettingsPatchMode = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'MachinesUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token); - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - if (InputObject?.Id != null) - { - await this.Client.MachinesUpdateViaIdentity(InputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); - } - else - { - // try to call with PATH parameters from Input Object - if (null == InputObject.SubscriptionId) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.ResourceGroupName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - if (null == InputObject.MachineName) - { - ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.MachineName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); - } - await this.Client.MachinesUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.MachineName ?? null, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SerializationMode.IncludeUpdate); - } - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public UpdateAzConnectedMachine_UpdateViaIdentityExpanded() - { - - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } - } - } - } -} \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonFilePath.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonFilePath.cs deleted file mode 100644 index a55933b1a29e..000000000000 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonFilePath.cs +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Cmdlets; - using System; - - /// The operation to update a hybrid machine. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzConnectedMachine_UpdateViaJsonFilePath", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Description(@"The operation to update a hybrid machine.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}", ApiVersion = "2023-10-03-preview")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.NotSuggestDefaultParameterSet] - public partial class UpdateAzConnectedMachine_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - public global::System.String _jsonString; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ConnectedMachine Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// Backing field for property. - private string _jsonFilePath; - - /// Path of Json file supplied to the Update operation - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Path of Json file supplied to the Update operation", - SerializedName = @"JsonFilePath", - PossibleTypes = new [] { typeof(string) })] - public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the hybrid machine. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the hybrid machine.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the hybrid machine.", - SerializedName = @"machineName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("MachineName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.CompleterInfo( - Name = @"ResourceGroupName Completer", - Description =@"Gets the list of ResourceGroupName's available for this subscription.", - Script = @"Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'MachinesUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token); - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MachinesUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public UpdateAzConnectedMachine_UpdateViaJsonFilePath() - { - - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } - } - } - } -} \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonString.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonString.cs deleted file mode 100644 index 203f88a614e1..000000000000 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedMachine_UpdateViaJsonString.cs +++ /dev/null @@ -1,493 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -namespace Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Cmdlets -{ - using static Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Extensions; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell; - using Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Cmdlets; - using System; - - /// The operation to update a hybrid machine. - /// - /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}" - /// - [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzConnectedMachine_UpdateViaJsonString", SupportsShouldProcess = true)] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine))] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Description(@"The operation to update a hybrid machine.")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{machineName}", ApiVersion = "2023-10-03-preview")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.NotSuggestDefaultParameterSet] - public partial class UpdateAzConnectedMachine_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener, - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IContext - { - /// A unique id generatd for the this cmdlet when it is instantiated. - private string __correlationId = System.Guid.NewGuid().ToString(); - - /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) - private global::System.Management.Automation.InvocationInfo __invocationInfo; - - /// A unique id generatd for the this cmdlet when ProcessRecord() is called. - private string __processRecordId; - - /// - /// The for this operation. - /// - private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); - - /// A dictionary to carry over additional data for pipeline. - private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); - - /// A buffer to record first returned object in response. - private object _firstResponse = null; - - /// - /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. - /// Two means multiple returned objects in response. - /// - private int _responseSize = 0; - - /// Wait for .NET debugger to attach - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter Break { get; set; } - - /// Accessor for cancellationTokenSource. - public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } - - /// The reference to the client API class. - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ConnectedMachine Client => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.ClientAPI; - - /// - /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet - /// against a different subscription - /// - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] - [global::System.Management.Automation.ValidateNotNull] - [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Azure)] - public global::System.Management.Automation.PSObject DefaultProfile { get; set; } - - /// Accessor for extensibleParameters. - public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - - /// SendAsync Pipeline Steps to be appended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } - - /// SendAsync Pipeline Steps to be prepended to the front of the pipeline - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } - - /// Accessor for our copy of the InvocationInfo. - public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } - - /// Backing field for property. - private string _jsonString; - - /// Json string supplied to the Update operation - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Json string supplied to the Update operation", - SerializedName = @"JsonString", - PossibleTypes = new [] { typeof(string) })] - public string JsonString { get => this._jsonString; set => this._jsonString = value; } - - /// - /// cancellation delegate. Stops the cmdlet when called. - /// - global::System.Action Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; - - /// cancellation token. - global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Token => _cancellationTokenSource.Token; - - /// Backing field for property. - private string _name; - - /// The name of the hybrid machine. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the hybrid machine.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the hybrid machine.", - SerializedName = @"machineName", - PossibleTypes = new [] { typeof(string) })] - [global::System.Management.Automation.Alias("MachineName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string Name { get => this._name; set => this._name = value; } - - /// - /// The instance of the that the remote call will use. - /// - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.HttpPipeline Pipeline { get; set; } - - /// The URI for the proxy server to use - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Uri Proxy { get; set; } - - /// Credentials for a proxy server to use for the remote call - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] - [global::System.Management.Automation.ValidateNotNull] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } - - /// Use the default credentials for the proxy - [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Runtime)] - public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } - - /// Backing field for property. - private string _resourceGroupName; - - /// The name of the resource group. The name is case insensitive. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The name of the resource group. The name is case insensitive.", - SerializedName = @"resourceGroupName", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.CompleterInfo( - Name = @"ResourceGroupName Completer", - Description =@"Gets the list of ResourceGroupName's available for this subscription.", - Script = @"Get-AzResourceGroup | Select-Object -ExpandProperty ResourceGroupName")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - - /// Backing field for property. - private string _subscriptionId; - - /// The ID of the target subscription. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"The ID of the target subscription.", - SerializedName = @"subscriptionId", - PossibleTypes = new [] { typeof(string) })] - [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.DefaultInfo( - Name = @"", - Description =@"", - Script = @"(Get-AzContext).Subscription.Id", - SetCondition = @"")] - [global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category(global::Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.ParameterCategory.Path)] - public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } - - /// - /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what - /// happens on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// /// Determines if the rest of the onDefault method should be processed, or if the method should - /// return immediately (set to true to skip further processing ) - - partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens - /// on that response. Implement this method in a partial class to enable this behavior - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// /// Determines if the rest of the onOk method should be processed, or if the method should return - /// immediately (set to true to skip further processing ) - - partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); - - /// - /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) - /// - protected override void BeginProcessing() - { - var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.GetTelemetryId.Invoke(); - if (telemetryId != "" && telemetryId != "internal") - { - __correlationId = telemetryId; - } - Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); - if (Break) - { - Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.AttachDebugger.Break(); - } - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - - /// Performs clean-up after the command execution - protected override void EndProcessing() - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse); - } - } - - /// Handles/Dispatches events during the call to the REST service. - /// The message id - /// The message cancellation token. When this call is cancelled, this should be true - /// Detailed message data for the message event. - /// - /// A that will be complete when handling of the message is completed. - /// - async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) - { - using( NoSynchronizationContext ) - { - if (token.IsCancellationRequested) - { - return ; - } - - switch ( id ) - { - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Verbose: - { - WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Warning: - { - WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Information: - { - var data = messageData(); - WriteInformation(data.Message, new string[]{}); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Debug: - { - WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Error: - { - WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); - return ; - } - case Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.Progress: - { - var data = messageData(); - int progress = (int)data.Value; - string activityMessage, statusDescription; - global::System.Management.Automation.ProgressRecordType recordType; - if (progress < 100) - { - activityMessage = "In progress"; - statusDescription = "Checking operation status"; - recordType = System.Management.Automation.ProgressRecordType.Processing; - } - else - { - activityMessage = "Completed"; - statusDescription = "Completed"; - recordType = System.Management.Automation.ProgressRecordType.Completed; - } - WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) - { - PercentComplete = progress, - RecordType = recordType - }); - return ; - } - } - await Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(i, t, () => Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventDataConverter.ConvertFrom(m()) as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); - if (token.IsCancellationRequested) - { - return ; - } - WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); - } - } - - /// Performs execution of the command. - protected override void ProcessRecord() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - __processRecordId = System.Guid.NewGuid().ToString(); - try - { - // work - if (ShouldProcess($"Call remote 'MachinesUpdate' operation")) - { - using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token) ) - { - asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token); - } - } - } - catch (global::System.AggregateException aggregateException) - { - // unroll the inner exceptions to get the root cause - foreach( var innerException in aggregateException.Flatten().InnerExceptions ) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - } - catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - // Write exception out to error channel. - WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); - } - finally - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordEnd).Wait(); - } - } - - /// Performs execution of the command, working asynchronously if required. - /// - /// A that will be complete when handling of the method is completed. - /// - protected async global::System.Threading.Tasks.Task ProcessRecordAsync() - { - using( NoSynchronizationContext ) - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - Pipeline = Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); - if (null != HttpPipelinePrepend) - { - Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); - } - if (null != HttpPipelineAppend) - { - Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); - } - // get the client instance - try - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - await this.Client.MachinesUpdateViaJsonString(SubscriptionId, ResourceGroupName, Name, _jsonString, onOk, onDefault, this, Pipeline); - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } - } - catch (Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.UndeclaredResponseException urexception) - { - WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } - }); - } - finally - { - await ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.Events.CmdletProcessRecordAsyncEnd); - } - } - } - - /// Interrupts currently running code within the command. - protected override void StopProcessing() - { - ((Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.IEventListener)this).Cancel(); - base.StopProcessing(); - } - - /// - /// Initializes a new instance of the cmdlet class. - /// - public UpdateAzConnectedMachine_UpdateViaJsonString() - { - - } - - /// - /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). - /// - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IErrorResponse - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnDefault(responseMessage, response, ref _returnNow); - // if overrideOnDefault has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // Error Response : default - var code = (await response)?.Code; - var message = (await response)?.Message; - if ((null == code || null == message)) - { - // Unrecognized Response. Create an error record based on what we have. - var ex = new Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Runtime.RestException(responseMessage, await response); - WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } - }); - } - else - { - WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) - { - ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } - }); - } - } - } - - /// a delegate that is called when the remote service returns 200 (OK). - /// the raw response message as an global::System.Net.Http.HttpResponseMessage. - /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - /// from the remote call - /// - /// A that will be complete when handling of the method is completed. - /// - private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) - { - using( NoSynchronizationContext ) - { - var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); - overrideOnOk(responseMessage, response, ref _returnNow); - // if overrideOnOk has returned true, then return right away. - if ((null != _returnNow && await _returnNow)) - { - return ; - } - // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - var result = (await response); - if (null != result) - { - if (0 == _responseSize) - { - _firstResponse = result; - _responseSize = 1; - } - else - { - if (1 ==_responseSize) - { - // Flush buffer - WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); - } - WriteObject(result.AddMultipleTypeNameIntoPSObject()); - _responseSize = 2; - } - } - } - } - } -} \ No newline at end of file diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateExpanded.cs index bdd827142e53..3befed8039d4 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateExpanded.cs @@ -185,7 +185,7 @@ public partial class UpdateAzConnectedPrivateLinkScopeTag_UpdateExpanded : globa Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags Tag { get => _privateLinkScopeTagsBody.Tag ?? null /* object */; set => _privateLinkScopeTagsBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags Tag { get => _privateLinkScopeTagsBody.Tags ?? null /* object */; set => _privateLinkScopeTagsBody.Tags = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentityExpanded.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentityExpanded.cs index 3393784b96f2..cbad4beebbbd 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentityExpanded.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/cmdlets/UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentityExpanded.cs @@ -142,7 +142,7 @@ public partial class UpdateAzConnectedPrivateLinkScopeTag_UpdateViaIdentityExpan Description = @"Resource tags", SerializedName = @"tags", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags) })] - public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags Tag { get => _privateLinkScopeTagsBody.Tag ?? null /* object */; set => _privateLinkScopeTagsBody.Tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResourceTags Tag { get => _privateLinkScopeTagsBody.Tags ?? null /* object */; set => _privateLinkScopeTagsBody.Tags = value; } /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs index aee3ccd83df6..667e7ae7612b 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -70,9 +70,8 @@ protected override void ProcessRecord() var variantGroups = profileGroups.SelectMany(pg => pg.Variants .GroupBy(v => new { v.CmdletName, v.IsInternal }) .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), - Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) .ToArray(); - var license = new StringBuilder(); license.Append(@" # ---------------------------------------------------------------------------------- @@ -114,6 +113,7 @@ protected override void ProcessRecord() sb.Append("param("); sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + foreach (var parameterGroup in parameterGroups) { var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs index e7f0ebc64706..54c14c6f5372 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -94,7 +94,7 @@ public static void WriteMarkdowns(IEnumerable variantGroups, PsMod sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); foreach (var relatedLink in markdownInfo.RelatedLinks) { - sb.Append($"{relatedLink}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"[{relatedLink}]({relatedLink}){Environment.NewLine}{Environment.NewLine}"); } File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 0a3c6a350df2..91d9b00aa536 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -188,6 +188,7 @@ internal class BaseOutput public VariantGroup VariantGroup { get; } protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) { VariantGroup = variantGroup; @@ -295,6 +296,7 @@ private string GetDefaultValuesStatements() } return sb.ToString(); } + } internal class ProcessOutput : BaseOutput diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs index 586a503ff8d0..3e2d5f2f581b 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -31,7 +31,7 @@ internal class VariantGroup { public string ModuleName { get; } - public string RootModuleName {get => @"";} + public string RootModuleName { get => @""; } public string CmdletName { get; } public string CmdletVerb { get; } public string CmdletNoun { get; } @@ -49,7 +49,6 @@ internal class VariantGroup public PsHelpInfo HelpInfo { get; } public bool IsGenerated { get; } public bool IsInternal { get; } - public string OutputFolder { get; } public string FileName { get; } public string FilePath { get; } @@ -84,7 +83,6 @@ public VariantGroup(string moduleName, string cmdletName, Variant[] variants, st HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); IsInternal = isInternal; - OutputFolder = outputFolder; FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; FilePath = Path.Combine(OutputFolder, FileName); @@ -258,7 +256,6 @@ internal class Parameter public ParameterMetadata Metadata { get; } public PsParameterHelpInfo HelpInfo { get; } public Type ParameterType { get; } - public Attribute[] Attributes { get; } public ParameterCategory[] Categories { get; } public ParameterCategory OrderCategory { get; } @@ -311,7 +308,7 @@ public Parameter(string variantName, string parameterName, ParameterMetadata met IsMandatory = ParameterAttribute.Mandatory; var complexParameterName = ParameterName.ToUpperInvariant(); - var complexMessage = $"{Environment.NewLine}To construct, see NOTES section for {complexParameterName} properties and create a hash table."; + var complexMessage = $"{Environment.NewLine}."; var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; // Remove the complex type message as it will be reinserted if this is a complex type description = description.NormalizeNewLines().Replace(complexMessage, String.Empty).Replace(complexMessage.ToPsSingleLine(), String.Empty); @@ -334,7 +331,7 @@ internal class ComplexInterfaceInfo public bool Required { get; } public bool ReadOnly { get; } public string Description { get; } - + public ComplexInterfaceInfo[] NestedInfos { get; } public bool IsComplexInterface { get; } @@ -351,7 +348,7 @@ public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, var unwrappedType = Type.Unwrap(); var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); - NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[]{} : + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[] { } : unwrappedType.GetInterfaces() .Concat(InfoAttribute.PossibleTypes) .SelectMany(pt => pt.GetProperties() @@ -440,7 +437,7 @@ public CompleterInfo(ArgumentCompleterAttribute completerAttribute) } } - internal class PSArgumentCompleterInfo: CompleterInfo + internal class PSArgumentCompleterInfo : CompleterInfo { public string[] ResourceTypes { get; } @@ -511,7 +508,8 @@ public static Parameter[] ToParameters(this Variant variant) parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); } var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); - if (variant.SupportsPaging) { + if (variant.SupportsPaging) + { // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Az.ConnectedMachine.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Az.ConnectedMachine.md index 7057351a2635..56e742717b32 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Az.ConnectedMachine.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Az.ConnectedMachine.md @@ -67,9 +67,6 @@ Note: You cannot specify a different value for InstrumentationKey nor AppId in t ### [Update-AzConnectedExtension](Update-AzConnectedExtension.md) The operation to Upgrade Machine Extensions. -### [Update-AzConnectedMachine](Update-AzConnectedMachine.md) -The operation to update a hybrid machine. - ### [Update-AzConnectedMachineExtension](Update-AzConnectedMachineExtension.md) The operation to Update the extension. diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Install-AzConnectedMachinePatch.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Install-AzConnectedMachinePatch.md index 1c6c6ac14d26..bdea49ce3a19 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Install-AzConnectedMachinePatch.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Install-AzConnectedMachinePatch.md @@ -91,7 +91,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Invoke-AzConnectedAssessMachinePatch.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Invoke-AzConnectedAssessMachinePatch.md index 96cfc23510f0..f7df44f16c97 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Invoke-AzConnectedAssessMachinePatch.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Invoke-AzConnectedAssessMachinePatch.md @@ -77,7 +77,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedMachineExtension.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedMachineExtension.md index 4eb96d6f21b2..7db69b788a6b 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedMachineExtension.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedMachineExtension.md @@ -207,7 +207,7 @@ Accept wildcard characters: False ### -ExtensionParameter Describes a Machine Extension. -To construct, see NOTES section for EXTENSIONPARAMETER properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension @@ -253,7 +253,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity @@ -359,7 +359,7 @@ Accept wildcard characters: False ### -MachineInputObject Identity Parameter -To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedMachineRunCommand.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedMachineRunCommand.md index ac72a1a3690c..53d4a0f0412f 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedMachineRunCommand.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedMachineRunCommand.md @@ -88,6 +88,20 @@ New-AzConnectedMachineRunCommand -MachineName -ResourceGroupName ] ``` +### ScriptLocalPath +``` +New-AzConnectedMachineRunCommand -MachineName -ResourceGroupName -RunCommandName + -Location [-SubscriptionId ] [-AsyncExecution] [-ErrorBlobManagedIdentityClientId ] + [-ErrorBlobManagedIdentityObjectId ] [-ErrorBlobUri ] + [-OutputBlobManagedIdentityClientId ] [-OutputBlobManagedIdentityObjectId ] + [-OutputBlobUri ] [-Parameter ] + [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] + [-ScriptLocalPath ] [-ScriptUriManagedIdentityClientId ] + [-ScriptUriManagedIdentityObjectId ] [-SourceCommandId ] [-SourceScript ] + [-SourceScriptUri ] [-Tag ] [-TimeoutInSecond ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + ## DESCRIPTION The operation to Create a run command. @@ -166,7 +180,7 @@ If set to true, provisioning will complete as soon as script starts and will not ```yaml Type: System.Management.Automation.SwitchParameter -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -198,7 +212,7 @@ ObjectId should not be used if this is provided. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -214,7 +228,7 @@ ClientId should not be used if this is provided. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -231,7 +245,7 @@ Refer errorBlobManagedIdentity parameter. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -243,7 +257,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity @@ -292,7 +306,7 @@ The geo-location where the resource lives ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: True @@ -304,7 +318,7 @@ Accept wildcard characters: False ### -MachineInputObject Identity Parameter -To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity @@ -323,7 +337,7 @@ The name of the hybrid machine. ```yaml Type: System.String -Parameter Sets: Create, CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString +Parameter Sets: Create, CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString, ScriptLocalPath Aliases: Required: True @@ -354,7 +368,7 @@ ObjectId should not be used if this is provided. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -370,7 +384,7 @@ ClientId should not be used if this is provided. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -387,7 +401,7 @@ Refer outputBlobManagedIdentity parameter. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -399,11 +413,11 @@ Accept wildcard characters: False ### -Parameter The parameters used by the script. -To construct, see NOTES section for PARAMETER properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[] -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -415,11 +429,11 @@ Accept wildcard characters: False ### -ProtectedParameter The parameters used by the script. -To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[] -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -435,7 +449,7 @@ The name is case insensitive. ```yaml Type: System.String -Parameter Sets: Create, CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString +Parameter Sets: Create, CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString, ScriptLocalPath Aliases: Required: True @@ -450,7 +464,7 @@ Specifies the user account password on the machine when executing the run comman ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -465,7 +479,7 @@ Specifies the user account on the machine when executing the run command. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -480,7 +494,7 @@ The name of the run command. ```yaml Type: System.String -Parameter Sets: Create, CreateExpanded, CreateViaIdentityMachine, CreateViaIdentityMachineExpanded, CreateViaJsonFilePath, CreateViaJsonString +Parameter Sets: Create, CreateExpanded, CreateViaIdentityMachine, CreateViaIdentityMachineExpanded, CreateViaJsonFilePath, CreateViaJsonString, ScriptLocalPath Aliases: Required: True @@ -492,7 +506,7 @@ Accept wildcard characters: False ### -RunCommandProperty Describes a Run Command -To construct, see NOTES section for RUNCOMMANDPROPERTY properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand @@ -506,13 +520,28 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ScriptLocalPath + + +```yaml +Type: System.String +Parameter Sets: ScriptLocalPath +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ScriptUriManagedIdentityClientId Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -528,7 +557,7 @@ ClientId should not be used if this is provided. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -543,7 +572,7 @@ Specifies the commandId of predefined built-in script. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -558,7 +587,7 @@ Specifies the script content to be executed on the machine. ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -574,7 +603,7 @@ It can be either SAS URI of an Azure storage blob with read access or public URI ```yaml Type: System.String -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -589,7 +618,7 @@ The ID of the target subscription. ```yaml Type: System.String -Parameter Sets: Create, CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString +Parameter Sets: Create, CreateExpanded, CreateViaJsonFilePath, CreateViaJsonString, ScriptLocalPath Aliases: Required: False @@ -604,7 +633,7 @@ Resource tags. ```yaml Type: System.Collections.Hashtable -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False @@ -619,7 +648,7 @@ The timeout in seconds to execute the run command. ```yaml Type: System.Int32 -Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded +Parameter Sets: CreateExpanded, CreateViaIdentityExpanded, CreateViaIdentityMachineExpanded, ScriptLocalPath Aliases: Required: False diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedPrivateLinkScope.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedPrivateLinkScope.md index 0da902900de2..00e7e236b65d 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedPrivateLinkScope.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/New-AzConnectedPrivateLinkScope.md @@ -93,7 +93,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity @@ -154,7 +154,7 @@ Accept wildcard characters: False ### -Parameter An Azure Arc PrivateLinkScope definition. -To construct, see NOTES section for PARAMETER properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachine.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachine.md index 148d13cb0e85..2b2e1b7e6493 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachine.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachine.md @@ -63,7 +63,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachineExtension.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachineExtension.md index 6d2dbb5cab90..9f45a36503a1 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachineExtension.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachineExtension.md @@ -85,7 +85,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity @@ -101,7 +101,7 @@ Accept wildcard characters: False ### -MachineInputObject Identity Parameter -To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachineRunCommand.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachineRunCommand.md index 215506870f5c..fb285fab792a 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachineRunCommand.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedMachineRunCommand.md @@ -78,7 +78,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity @@ -94,7 +94,7 @@ Accept wildcard characters: False ### -MachineInputObject Identity Parameter -To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedPrivateLinkScope.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedPrivateLinkScope.md index fcb780b86889..7f1318dd67ed 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedPrivateLinkScope.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Remove-AzConnectedPrivateLinkScope.md @@ -75,7 +75,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Set-AzConnectedMachineExtension.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Set-AzConnectedMachineExtension.md index ac9f7566d211..973d7a838121 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Set-AzConnectedMachineExtension.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Set-AzConnectedMachineExtension.md @@ -144,7 +144,7 @@ Accept wildcard characters: False ### -ExtensionParameter Describes a Machine Extension. -To construct, see NOTES section for EXTENSIONPARAMETER properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtension diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Set-AzConnectedPrivateLinkScope.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Set-AzConnectedPrivateLinkScope.md index d06dbb69e234..b0ba48a81869 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Set-AzConnectedPrivateLinkScope.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Set-AzConnectedPrivateLinkScope.md @@ -123,7 +123,7 @@ Accept wildcard characters: False ### -Parameter An Azure Arc PrivateLinkScope definition. -To construct, see NOTES section for PARAMETER properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IHybridComputePrivateLinkScope diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedExtension.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedExtension.md index 8c642e6892e9..428fecc55f70 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedExtension.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedExtension.md @@ -120,7 +120,7 @@ Accept wildcard characters: False ### -ExtensionUpgradeParameter Describes the Machine Extension Upgrade Properties. -To construct, see NOTES section for EXTENSIONUPGRADEPARAMETER properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpgrade @@ -136,7 +136,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedMachine.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedMachine.md deleted file mode 100644 index d46255947f11..000000000000 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedMachine.md +++ /dev/null @@ -1,509 +0,0 @@ ---- -external help file: -Module Name: Az.ConnectedMachine -online version: https://learn.microsoft.com/powershell/module/az.connectedmachine/update-azconnectedmachine -schema: 2.0.0 ---- - -# Update-AzConnectedMachine - -## SYNOPSIS -The operation to update a hybrid machine. - -## SYNTAX - -### UpdateExpanded (Default) -``` -Update-AzConnectedMachine -Name -ResourceGroupName [-SubscriptionId ] - [-AgentUpgradeCorrelationId ] [-AgentUpgradeDesiredVersion ] [-AgentUpgradeEnableAutomatic] - [-IdentityType ] [-Kind ] [-LinuxConfigurationPatchSettingsAssessmentMode ] - [-LinuxConfigurationPatchSettingsPatchMode ] [-LocationDataCity ] - [-LocationDataCountryOrRegion ] [-LocationDataDistrict ] [-LocationDataName ] - [-ParentClusterResourceId ] [-PrivateLinkScopeResourceId ] [-Tag ] - [-WindowsConfigurationPatchSettingsAssessmentMode ] - [-WindowsConfigurationPatchSettingsPatchMode ] [-DefaultProfile ] [-Confirm] [-WhatIf] - [] -``` - -### Update -``` -Update-AzConnectedMachine -Name -ResourceGroupName -Parameter - [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaIdentity -``` -Update-AzConnectedMachine -InputObject -Parameter - [-DefaultProfile ] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaIdentityExpanded -``` -Update-AzConnectedMachine -InputObject [-AgentUpgradeCorrelationId ] - [-AgentUpgradeDesiredVersion ] [-AgentUpgradeEnableAutomatic] [-IdentityType ] - [-Kind ] [-LinuxConfigurationPatchSettingsAssessmentMode ] - [-LinuxConfigurationPatchSettingsPatchMode ] [-LocationDataCity ] - [-LocationDataCountryOrRegion ] [-LocationDataDistrict ] [-LocationDataName ] - [-ParentClusterResourceId ] [-PrivateLinkScopeResourceId ] [-Tag ] - [-WindowsConfigurationPatchSettingsAssessmentMode ] - [-WindowsConfigurationPatchSettingsPatchMode ] [-DefaultProfile ] [-Confirm] [-WhatIf] - [] -``` - -### UpdateViaJsonFilePath -``` -Update-AzConnectedMachine -Name -ResourceGroupName -JsonFilePath - [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] -``` - -### UpdateViaJsonString -``` -Update-AzConnectedMachine -Name -ResourceGroupName -JsonString - [-SubscriptionId ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] -``` - -## DESCRIPTION -The operation to update a hybrid machine. - -## EXAMPLES - -### Example 1: Update a machine using parameters -```powershell -Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId privateLinkScopeId -WindowsConfigurationPatchSettingsAssessmentMode AutomaticByOS -Tag @{"key"="value"} -``` - -```output -ResourceGroupName Name Location OSType Status ProvisioningState ------------------ ---- -------- ------ ------ ----------------- -rg surface eastus2euap windows Connected Updating -``` - -Update a machine - -### Example 2: Update a machine - cleaning a field -```powershell -Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId $null -``` - -```output -ResourceGroupName Name Location OSType Status ProvisioningState ------------------ ---- -------- ------ ------ ----------------- -rg surface eastus2euap windows Connected Updating -``` - -Update a machine to clean a field - -## PARAMETERS - -### -AgentUpgradeCorrelationId -The correlation ID passed in from RSM per upgrade. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AgentUpgradeDesiredVersion -Specifies the version info w.r.t AgentUpgrade for the machine. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AgentUpgradeEnableAutomatic -Specifies if RSM should try to upgrade this machine - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DefaultProfile -The DefaultProfile parameter is not functional. -Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IdentityType -The identity type. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity -Parameter Sets: UpdateViaIdentity, UpdateViaIdentityExpanded -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -JsonFilePath -Path of Json file supplied to the Update operation - -```yaml -Type: System.String -Parameter Sets: UpdateViaJsonFilePath -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -JsonString -Json string supplied to the Update operation - -```yaml -Type: System.String -Parameter Sets: UpdateViaJsonString -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Kind -Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LinuxConfigurationPatchSettingsAssessmentMode -Specifies the assessment mode. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LinuxConfigurationPatchSettingsPatchMode -Specifies the patch mode. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LocationDataCity -The city or locality where the resource is located. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LocationDataCountryOrRegion -The country or region where the resource is located - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LocationDataDistrict -The district, state, or province where the resource is located. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LocationDataName -A canonical name for the geographic or physical location. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name -The name of the hybrid machine. - -```yaml -Type: System.String -Parameter Sets: Update, UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString -Aliases: MachineName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Parameter -Describes a hybrid machine Update. -To construct, see NOTES section for PARAMETER properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate -Parameter Sets: Update, UpdateViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ParentClusterResourceId -The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkScopeResourceId -The resource id of the private link scope this machine is assigned to, if any. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. -The name is case insensitive. - -```yaml -Type: System.String -Parameter Sets: Update, UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -The ID of the target subscription. - -```yaml -Type: System.String -Parameter Sets: Update, UpdateExpanded, UpdateViaJsonFilePath, UpdateViaJsonString -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -Resource tags - -```yaml -Type: System.Collections.Hashtable -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WindowsConfigurationPatchSettingsAssessmentMode -Specifies the assessment mode. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WindowsConfigurationPatchSettingsPatchMode -Specifies the patch mode. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity - -### Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachine - -## NOTES - -## RELATED LINKS - diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedMachineExtension.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedMachineExtension.md index c60e7f5f2a47..7c54ea1c83cd 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedMachineExtension.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedMachineExtension.md @@ -223,7 +223,7 @@ Accept wildcard characters: False ### -ExtensionParameter Describes a Machine Extension Update. -To construct, see NOTES section for EXTENSIONPARAMETER properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineExtensionUpdate @@ -254,7 +254,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity @@ -300,7 +300,7 @@ Accept wildcard characters: False ### -MachineInputObject Identity Parameter -To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedMachineRunCommand.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedMachineRunCommand.md index 46fe486b6833..c2ed4c16d491 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedMachineRunCommand.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedMachineRunCommand.md @@ -16,7 +16,7 @@ The operation to Create a run command. ``` Update-AzConnectedMachineRunCommand -MachineName -ResourceGroupName -RunCommandName [-SubscriptionId ] [-AsyncExecution] [-ErrorBlobManagedIdentityClientId ] - [-ErrorBlobManagedIdentityObjectId ] [-ErrorBlobUri ] [-Location ] + [-ErrorBlobManagedIdentityObjectId ] [-ErrorBlobUri ] [-OutputBlobManagedIdentityClientId ] [-OutputBlobManagedIdentityObjectId ] [-OutputBlobUri ] [-Parameter ] [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] @@ -44,7 +44,7 @@ Update-AzConnectedMachineRunCommand -InputObject ``` Update-AzConnectedMachineRunCommand -InputObject [-AsyncExecution] [-ErrorBlobManagedIdentityClientId ] [-ErrorBlobManagedIdentityObjectId ] - [-ErrorBlobUri ] [-Location ] [-OutputBlobManagedIdentityClientId ] + [-ErrorBlobUri ] [-OutputBlobManagedIdentityClientId ] [-OutputBlobManagedIdentityObjectId ] [-OutputBlobUri ] [-Parameter ] [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] @@ -64,7 +64,7 @@ Update-AzConnectedMachineRunCommand -MachineInputObject -RunCommandName [-AsyncExecution] [-ErrorBlobManagedIdentityClientId ] [-ErrorBlobManagedIdentityObjectId ] - [-ErrorBlobUri ] [-Location ] [-OutputBlobManagedIdentityClientId ] + [-ErrorBlobUri ] [-OutputBlobManagedIdentityClientId ] [-OutputBlobManagedIdentityObjectId ] [-OutputBlobUri ] [-Parameter ] [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] @@ -231,7 +231,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity @@ -245,24 +245,9 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -Location -The geo-location where the resource lives - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded, UpdateViaIdentityMachineExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -MachineInputObject Identity Parameter -To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity @@ -357,7 +342,7 @@ Accept wildcard characters: False ### -Parameter The parameters used by the script. -To construct, see NOTES section for PARAMETER properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[] @@ -373,7 +358,7 @@ Accept wildcard characters: False ### -ProtectedParameter The parameters used by the script. -To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[] @@ -450,7 +435,7 @@ Accept wildcard characters: False ### -RunCommandProperty Describes a Run Command -To construct, see NOTES section for RUNCOMMANDPROPERTY properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedPrivateLinkScopeTag.md b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedPrivateLinkScopeTag.md index a25afca8f40d..5b528e4c99b5 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedPrivateLinkScopeTag.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/help/Update-AzConnectedPrivateLinkScopeTag.md @@ -91,7 +91,7 @@ Accept wildcard characters: False ### -InputObject Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity @@ -137,7 +137,7 @@ Accept wildcard characters: False ### -PrivateLinkScopeTag A container holding only the Tags for a resource, allowing the user to update the tags on a PrivateLinkScope instance. -To construct, see NOTES section for PRIVATELINKSCOPETAG properties and create a hash table. +. ```yaml Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.ITagsResource diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/internal/Get-AzConnectedOperation.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/internal/Get-AzConnectedOperation.ps1 index f33f3aeb5e98..a712c0b5dae8 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/internal/Get-AzConnectedOperation.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/internal/Get-AzConnectedOperation.ps1 @@ -45,7 +45,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/internal/ProxyCmdletDefinitions.ps1 index f33f3aeb5e98..a712c0b5dae8 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -45,7 +45,7 @@ param( [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Category('Runtime')] [System.Management.Automation.SwitchParameter] - # Wait for .NET debugger to attach + # Wait forNET debugger to attach ${Break}, [Parameter(DontShow)] diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/test/Remove-AzConnectedPrivateLinkScope.Tests.ps1 b/src/ConnectedMachine/ConnectedMachine.Autorest/test/Remove-AzConnectedPrivateLinkScope.Tests.ps1 index d026caf7958a..e86f3dc4e6d4 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/test/Remove-AzConnectedPrivateLinkScope.Tests.ps1 +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/test/Remove-AzConnectedPrivateLinkScope.Tests.ps1 @@ -35,14 +35,14 @@ Describe 'Remove-AzConnectedPrivateLinkScope' { $privateLinkScope = Get-AzConnectedPrivateLinkScope -ResourceGroupName $resourceGroupName -ScopeName $scopeName $privateLinkScope.Name | Should -Be $scopeName $privateLinkScope.PublicNetworkAccess | Should -Be "Disabled" - $privateLinkScope.Tag.AdditionalProperties["Tag1"] | Should -Be "tag1" + $privateLinkScope.Tags.AdditionalProperties["Tag1"] | Should -Be "tag1" Update-AzConnectedPrivateLinkScopeTag -ResourceGroupName $resourceGroupName -ScopeName $scopeName -Tag $tags2 $privateLinkScope = Get-AzConnectedPrivateLinkScope -ResourceGroupName $resourceGroupName -ScopeName $scopeName $privateLinkScope.Name | Should -Be $scopeName $privateLinkScope.PublicNetworkAccess | Should -Be "Disabled" - $privateLinkScope.Tag.AdditionalProperties["hello"] | Should -Be "hello" + $privateLinkScope.Tags.AdditionalProperties["hello"] | Should -Be "hello" Remove-AzConnectedPrivateLinkScope -ResourceGroupName $resourceGroupName -ScopeName $scopeName diff --git a/src/ConnectedMachine/ConnectedMachine/Az.ConnectedMachine.psd1 b/src/ConnectedMachine/ConnectedMachine/Az.ConnectedMachine.psd1 index 478e94e450bb..4bf2bffe9cc2 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: 12/7/2023 +# Generated on: 2/21/2024 # @{ @@ -51,16 +51,16 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.2'; }) +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.15.1'; }) # Assemblies that must be loaded prior to importing this module RequiredAssemblies = 'ConnectedMachine.Autorest/bin/Az.ConnectedMachine.private.dll' # Script files (.ps1) that are run in the caller's environment prior to importing this module. -# ScriptsToProcess = @() +ScriptsToProcess = @() # Type files (.ps1xml) to be loaded when importing this module -# TypesToProcess = @() +TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module FormatsToProcess = 'ConnectedMachine.Autorest/Az.ConnectedMachine.format.ps1xml' @@ -83,7 +83,7 @@ FunctionsToExport = 'Connect-AzConnectedMachine', 'Get-AzConnectedExtensionMetad 'Remove-AzConnectedPrivateLinkScope', 'Set-AzConnectedMachineExtension', 'Set-AzConnectedPrivateLinkScope', 'Update-AzConnectedExtension', - 'Update-AzConnectedMachine', 'Update-AzConnectedMachineExtension', + 'Update-AzConnectedMachineExtension', 'Update-AzConnectedMachineRunCommand', 'Update-AzConnectedPrivateLinkScopeTag' @@ -111,7 +111,7 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','PSModule','ConnectedMachine' + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'ConnectedMachine' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -140,7 +140,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/ConnectedMachine/ConnectedMachine/help/Az.ConnectedMachine.md b/src/ConnectedMachine/ConnectedMachine/help/Az.ConnectedMachine.md index 4b0c58ffb178..83b00c8e6235 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Az.ConnectedMachine.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Az.ConnectedMachine.md @@ -23,6 +23,9 @@ Retrieves information about the model view or the instance view of a hybrid mach ### [Get-AzConnectedMachineExtension](Get-AzConnectedMachineExtension.md) The operation to get the extension. +### [Get-AzConnectedMachineRunCommand](Get-AzConnectedMachineRunCommand.md) +The operation to get a run command. + ### [Get-AzConnectedPrivateLinkScope](Get-AzConnectedPrivateLinkScope.md) Returns a Azure Arc PrivateLinkScope. @@ -35,6 +38,9 @@ The operation to assess patches on a hybrid machine identity in Azure. ### [New-AzConnectedMachineExtension](New-AzConnectedMachineExtension.md) The operation to create or update the extension. +### [New-AzConnectedMachineRunCommand](New-AzConnectedMachineRunCommand.md) +The operation to Create a run command. + ### [New-AzConnectedPrivateLinkScope](New-AzConnectedPrivateLinkScope.md) Creates (or updates) a Azure Arc PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. @@ -45,6 +51,9 @@ The operation to delete a hybrid machine. ### [Remove-AzConnectedMachineExtension](Remove-AzConnectedMachineExtension.md) The operation to delete the extension. +### [Remove-AzConnectedMachineRunCommand](Remove-AzConnectedMachineRunCommand.md) +The operation to delete a run command. + ### [Remove-AzConnectedPrivateLinkScope](Remove-AzConnectedPrivateLinkScope.md) Deletes a Azure Arc PrivateLinkScope. @@ -58,12 +67,12 @@ Note: You cannot specify a different value for InstrumentationKey nor AppId in t ### [Update-AzConnectedExtension](Update-AzConnectedExtension.md) The operation to Upgrade Machine Extensions. -### [Update-AzConnectedMachine](Update-AzConnectedMachine.md) -The operation to update a hybrid machine. - ### [Update-AzConnectedMachineExtension](Update-AzConnectedMachineExtension.md) The operation to create or update the extension. +### [Update-AzConnectedMachineRunCommand](Update-AzConnectedMachineRunCommand.md) +The operation to Create a run command. + ### [Update-AzConnectedPrivateLinkScopeTag](Update-AzConnectedPrivateLinkScopeTag.md) Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Connect-AzConnectedMachine.md b/src/ConnectedMachine/ConnectedMachine/help/Connect-AzConnectedMachine.md index 3df91f004db7..e839df510a26 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Connect-AzConnectedMachine.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Connect-AzConnectedMachine.md @@ -15,7 +15,7 @@ API to register a new machine and thereby create a tracked resource in ARM ``` Connect-AzConnectedMachine [-ResourceGroupName] [[-SubscriptionId] ] [[-Name] ] [-Location] [[-PSSession] ] [[-Tag] ] [[-DefaultProfile] ] - [[-Proxy] ] [] + [[-Proxy] ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -113,6 +113,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Proxy The URI for the proxy server to use diff --git a/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedExtensionMetadata.md b/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedExtensionMetadata.md index c5e51f05cc67..6f0d86ff38ea 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedExtensionMetadata.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedExtensionMetadata.md @@ -15,13 +15,15 @@ Gets an Extension Metadata based on location, publisher, extensionType and versi ### List (Default) ``` Get-AzConnectedExtensionMetadata -ExtensionType -Location -Publisher - [-SubscriptionId ] [-DefaultProfile ] [] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] ``` ### Get ``` Get-AzConnectedExtensionMetadata -ExtensionType -Location -Publisher - [-SubscriptionId ] -Version [-DefaultProfile ] [] + [-SubscriptionId ] -Version [-DefaultProfile ] + [-ProgressAction ] [] ``` ## DESCRIPTION @@ -103,6 +105,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Publisher The publisher of the Extension being received. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachine.md b/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachine.md index e61b5d3a7ab9..fbdd550383eb 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachine.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachine.md @@ -14,19 +14,20 @@ Retrieves information about the model view or the instance view of a hybrid mach ### List1 (Default) ``` -Get-AzConnectedMachine [-SubscriptionId ] [-DefaultProfile ] [] +Get-AzConnectedMachine [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### Get ``` Get-AzConnectedMachine -Name -ResourceGroupName [-SubscriptionId ] - [-Expand ] [-DefaultProfile ] [] + [-Expand ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### List ``` Get-AzConnectedMachine -ResourceGroupName [-SubscriptionId ] [-Expand ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -126,6 +127,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachineExtension.md b/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachineExtension.md index 04e627974ecb..64dd53004c6f 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachineExtension.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachineExtension.md @@ -15,13 +15,14 @@ The operation to get the extension. ### List (Default) ``` Get-AzConnectedMachineExtension -MachineName -ResourceGroupName [-SubscriptionId ] - [-Expand ] [-DefaultProfile ] [] + [-Expand ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzConnectedMachineExtension -MachineName -ResourceGroupName -Name - [-SubscriptionId ] [-DefaultProfile ] [] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -120,6 +121,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachineRunCommand.md b/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachineRunCommand.md index 7ea23593b117..3188759ad6d8 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachineRunCommand.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedMachineRunCommand.md @@ -15,13 +15,14 @@ The operation to get a run command. ### List (Default) ``` Get-AzConnectedMachineRunCommand -MachineName -ResourceGroupName [-SubscriptionId ] - [-Expand ] [-DefaultProfile ] [] + [-Expand ] [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzConnectedMachineRunCommand -MachineName -ResourceGroupName -RunCommandName - [-SubscriptionId ] [-DefaultProfile ] [] + [-SubscriptionId ] [-DefaultProfile ] [-ProgressAction ] + [] ``` ## DESCRIPTION @@ -46,7 +47,7 @@ The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml -Type: PSObject +Type: System.Management.Automation.PSObject Parameter Sets: (All) Aliases: AzureRMContext, AzureCredential @@ -61,7 +62,7 @@ Accept wildcard characters: False The expand expression to apply on the operation. ```yaml -Type: String +Type: System.String Parameter Sets: List Aliases: @@ -76,7 +77,7 @@ Accept wildcard characters: False The name of the hybrid machine. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -87,12 +88,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -107,7 +123,7 @@ Accept wildcard characters: False The name of the run command. ```yaml -Type: String +Type: System.String Parameter Sets: Get Aliases: @@ -122,7 +138,7 @@ Accept wildcard characters: False The ID of the target subscription. ```yaml -Type: String[] +Type: System.String[] Parameter Sets: (All) Aliases: diff --git a/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedPrivateLinkScope.md b/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedPrivateLinkScope.md index 782b2987a2b3..7ce7493b4d0f 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedPrivateLinkScope.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Get-AzConnectedPrivateLinkScope.md @@ -14,19 +14,20 @@ Returns a Azure Arc PrivateLinkScope. ### List (Default) ``` -Get-AzConnectedPrivateLinkScope [-SubscriptionId ] [-DefaultProfile ] [] +Get-AzConnectedPrivateLinkScope [-SubscriptionId ] [-DefaultProfile ] + [-ProgressAction ] [] ``` ### List1 ``` Get-AzConnectedPrivateLinkScope -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ### Get ``` Get-AzConnectedPrivateLinkScope -ResourceGroupName -ScopeName [-SubscriptionId ] - [-DefaultProfile ] [] + [-DefaultProfile ] [-ProgressAction ] [] ``` ## DESCRIPTION @@ -80,6 +81,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Install-AzConnectedMachinePatch.md b/src/ConnectedMachine/ConnectedMachine/help/Install-AzConnectedMachinePatch.md index b943b529029d..12a0f38d8b84 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Install-AzConnectedMachinePatch.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Install-AzConnectedMachinePatch.md @@ -19,8 +19,8 @@ Install-AzConnectedMachinePatch -Name -ResourceGroupName [-Sub [-LinuxParameterPackageNameMasksToExclude ] [-LinuxParameterPackageNameMasksToInclude ] [-WindowParameterClassificationsToInclude ] [-WindowParameterExcludeKbsRequiringReboot] [-WindowParameterKbNumbersToExclude ] [-WindowParameterKbNumbersToInclude ] - [-WindowParameterMaxPatchPublishDate ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-WindowParameterMaxPatchPublishDate ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### InstallViaIdentityExpanded @@ -30,8 +30,8 @@ Install-AzConnectedMachinePatch -InputObject -Maximu [-LinuxParameterPackageNameMasksToExclude ] [-LinuxParameterPackageNameMasksToInclude ] [-WindowParameterClassificationsToInclude ] [-WindowParameterExcludeKbsRequiringReboot] [-WindowParameterKbNumbersToExclude ] [-WindowParameterKbNumbersToInclude ] - [-WindowParameterMaxPatchPublishDate ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-WindowParameterMaxPatchPublishDate ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -198,6 +198,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -RebootSetting Defines when it is acceptable to reboot a VM during a software update operation. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Invoke-AzConnectedAssessMachinePatch.md b/src/ConnectedMachine/ConnectedMachine/help/Invoke-AzConnectedAssessMachinePatch.md index 552a5318ebfa..15ed418fa050 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Invoke-AzConnectedAssessMachinePatch.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Invoke-AzConnectedAssessMachinePatch.md @@ -15,13 +15,14 @@ The operation to assess patches on a hybrid machine identity in Azure. ### Assess (Default) ``` Invoke-AzConnectedAssessMachinePatch -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### AssessViaIdentity ``` Invoke-AzConnectedAssessMachinePatch -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -121,6 +122,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. diff --git a/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedMachineExtension.md b/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedMachineExtension.md index 1801100924c3..68208b410292 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedMachineExtension.md +++ b/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedMachineExtension.md @@ -20,28 +20,29 @@ New-AzConnectedMachineExtension -MachineName -Name -ResourceGr [-InstanceViewTypeHandlerVersion ] [-ProtectedSetting ] [-Publisher ] [-Setting ] [-StatusCode ] [-StatusDisplayStatus ] [-StatusLevel ] [-StatusMessage ] [-StatusTime ] [-Tag ] [-TypeHandlerVersion ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### CreateViaJsonString ``` New-AzConnectedMachineExtension -MachineName -Name -ResourceGroupName - [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonFilePath ``` New-AzConnectedMachineExtension -MachineName -Name -ResourceGroupName - [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Create ``` New-AzConnectedMachineExtension -MachineName -Name -ResourceGroupName [-SubscriptionId ] -ExtensionParameter [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityMachineExpanded @@ -52,14 +53,15 @@ New-AzConnectedMachineExtension -Name -MachineInputObject ] [-ProtectedSetting ] [-Publisher ] [-Setting ] [-StatusCode ] [-StatusDisplayStatus ] [-StatusLevel ] [-StatusMessage ] [-StatusTime ] [-Tag ] [-TypeHandlerVersion ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### CreateViaIdentityMachine ``` New-AzConnectedMachineExtension -Name -MachineInputObject - -ExtensionParameter [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + -ExtensionParameter [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityExpanded @@ -69,15 +71,15 @@ New-AzConnectedMachineExtension -InputObject -Locati [-InstanceViewName ] [-InstanceViewType ] [-InstanceViewTypeHandlerVersion ] [-ProtectedSetting ] [-Publisher ] [-Setting ] [-StatusCode ] [-StatusDisplayStatus ] [-StatusLevel ] [-StatusMessage ] [-StatusTime ] - [-Tag ] [-TypeHandlerVersion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-Tag ] [-TypeHandlerVersion ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentity ``` New-AzConnectedMachineExtension -InputObject - -ExtensionParameter [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + -ExtensionParameter [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -418,6 +420,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ProtectedSetting The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. diff --git a/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedMachineRunCommand.md b/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedMachineRunCommand.md index e1f781819825..5f93cb15e133 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedMachineRunCommand.md +++ b/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedMachineRunCommand.md @@ -22,29 +22,43 @@ New-AzConnectedMachineRunCommand -MachineName -ResourceGroupName ] [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] - [-TimeoutInSecond ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + [-TimeoutInSecond ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +### ScriptLocalPath +``` +New-AzConnectedMachineRunCommand -MachineName -ResourceGroupName -RunCommandName + [-SubscriptionId ] -Location [-AsyncExecution] [-ErrorBlobManagedIdentityClientId ] + [-ErrorBlobManagedIdentityObjectId ] [-ErrorBlobUri ] + [-OutputBlobManagedIdentityClientId ] [-OutputBlobManagedIdentityObjectId ] + [-OutputBlobUri ] [-Parameter ] + [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] + [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] + [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] + [-TimeoutInSecond ] [-ScriptLocalPath ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonString ``` New-AzConnectedMachineRunCommand -MachineName -ResourceGroupName -RunCommandName - [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonFilePath ``` New-AzConnectedMachineRunCommand -MachineName -ResourceGroupName -RunCommandName - [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Create ``` New-AzConnectedMachineRunCommand -MachineName -ResourceGroupName -RunCommandName [-SubscriptionId ] -RunCommandProperty [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityMachineExpanded @@ -57,15 +71,15 @@ New-AzConnectedMachineRunCommand -RunCommandName -MachineInputObject ] [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] - [-TimeoutInSecond ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + [-TimeoutInSecond ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityMachine ``` New-AzConnectedMachineRunCommand -RunCommandName -MachineInputObject - -RunCommandProperty [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + -RunCommandProperty [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityExpanded @@ -78,14 +92,14 @@ New-AzConnectedMachineRunCommand -InputObject -Locat [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] [-TimeoutInSecond ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentity ``` New-AzConnectedMachineRunCommand -InputObject - -RunCommandProperty [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + -RunCommandProperty [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -104,7 +118,7 @@ New-AzConnectedMachineRunCommand -ResourceGroupName "az-sdk-test" -Location "eas Run the command as a job ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -120,8 +134,8 @@ Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. ```yaml -Type: SwitchParameter -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.Management.Automation.SwitchParameter +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -136,7 +150,7 @@ The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml -Type: PSObject +Type: System.Management.Automation.PSObject Parameter Sets: (All) Aliases: AzureRMContext, AzureCredential @@ -152,8 +166,8 @@ Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -168,8 +182,8 @@ Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -185,8 +199,8 @@ Use a SAS URI with read, append, create, write access OR use managed identity to Refer errorBlobManagedIdentity parameter. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -201,7 +215,7 @@ Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml -Type: IConnectedMachineIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity Parameter Sets: CreateViaIdentityExpanded, CreateViaIdentity Aliases: @@ -216,7 +230,7 @@ Accept wildcard characters: False Path of Json file supplied to the Create operation ```yaml -Type: String +Type: System.String Parameter Sets: CreateViaJsonFilePath Aliases: @@ -231,7 +245,7 @@ Accept wildcard characters: False Json string supplied to the Create operation ```yaml -Type: String +Type: System.String Parameter Sets: CreateViaJsonString Aliases: @@ -246,8 +260,8 @@ Accept wildcard characters: False The geo-location where the resource lives ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: True @@ -262,7 +276,7 @@ Identity Parameter To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. ```yaml -Type: IConnectedMachineIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity Parameter Sets: CreateViaIdentityMachineExpanded, CreateViaIdentityMachine Aliases: @@ -277,8 +291,8 @@ Accept wildcard characters: False The name of the hybrid machine. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath, Create +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaJsonString, CreateViaJsonFilePath, Create Aliases: Required: True @@ -292,7 +306,7 @@ Accept wildcard characters: False Run the command asynchronously ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -308,8 +322,8 @@ Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -324,8 +338,8 @@ Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -341,8 +355,8 @@ Use a SAS URI with read, append, create, write access OR use managed identity to Refer outputBlobManagedIdentity parameter. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -357,8 +371,8 @@ The parameters used by the script. To construct, see NOTES section for PARAMETER properties and create a hash table. ```yaml -Type: IRunCommandInputParameter[] -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[] +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -368,13 +382,28 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ProtectedParameter The parameters used by the script. To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. ```yaml -Type: IRunCommandInputParameter[] -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[] +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -389,8 +418,8 @@ The name of the resource group. The name is case insensitive. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath, Create +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaJsonString, CreateViaJsonFilePath, Create Aliases: Required: True @@ -404,8 +433,8 @@ Accept wildcard characters: False Specifies the user account password on the machine when executing the run command. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -419,8 +448,8 @@ Accept wildcard characters: False Specifies the user account on the machine when executing the run command. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -434,8 +463,8 @@ Accept wildcard characters: False The name of the run command. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath, Create, CreateViaIdentityMachineExpanded, CreateViaIdentityMachine +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaJsonString, CreateViaJsonFilePath, Create, CreateViaIdentityMachineExpanded, CreateViaIdentityMachine Aliases: Required: True @@ -450,7 +479,7 @@ Describes a Run Command To construct, see NOTES section for RUNCOMMANDPROPERTY properties and create a hash table. ```yaml -Type: IMachineRunCommand +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand Parameter Sets: Create, CreateViaIdentityMachine, CreateViaIdentity Aliases: @@ -461,13 +490,28 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ScriptLocalPath +{{ Fill ScriptLocalPath Description }} + +```yaml +Type: System.String +Parameter Sets: ScriptLocalPath +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ScriptUriManagedIdentityClientId Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -482,8 +526,8 @@ Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -497,8 +541,8 @@ Accept wildcard characters: False Specifies the commandId of predefined built-in script. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -512,8 +556,8 @@ Accept wildcard characters: False Specifies the script content to be executed on the machine. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -528,8 +572,8 @@ Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -543,8 +587,8 @@ Accept wildcard characters: False The ID of the target subscription. ```yaml -Type: String -Parameter Sets: CreateExpanded, CreateViaJsonString, CreateViaJsonFilePath, Create +Type: System.String +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaJsonString, CreateViaJsonFilePath, Create Aliases: Required: False @@ -558,8 +602,8 @@ Accept wildcard characters: False Resource tags. ```yaml -Type: Hashtable -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.Collections.Hashtable +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -573,8 +617,8 @@ Accept wildcard characters: False The timeout in seconds to execute the run command. ```yaml -Type: Int32 -Parameter Sets: CreateExpanded, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded +Type: System.Int32 +Parameter Sets: CreateExpanded, ScriptLocalPath, CreateViaIdentityMachineExpanded, CreateViaIdentityExpanded Aliases: Required: False @@ -588,7 +632,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -604,7 +648,7 @@ Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedPrivateLinkScope.md b/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedPrivateLinkScope.md index 517ed96ebf23..40e3917e2294 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedPrivateLinkScope.md +++ b/src/ConnectedMachine/ConnectedMachine/help/New-AzConnectedPrivateLinkScope.md @@ -16,41 +16,43 @@ Note: You cannot specify a different value for InstrumentationKey nor AppId in t ### CreateExpanded (Default) ``` New-AzConnectedPrivateLinkScope -ResourceGroupName -ScopeName [-SubscriptionId ] - -Location [-PublicNetworkAccess ] [-Tag ] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] + -Location [-PublicNetworkAccess ] [-Tag ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaJsonString ``` New-AzConnectedPrivateLinkScope -ResourceGroupName -ScopeName [-SubscriptionId ] - -JsonString [-DefaultProfile ] [-WhatIf] [-Confirm] [] + -JsonString [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### CreateViaJsonFilePath ``` New-AzConnectedPrivateLinkScope -ResourceGroupName -ScopeName [-SubscriptionId ] - -JsonFilePath [-DefaultProfile ] [-WhatIf] [-Confirm] [] + -JsonFilePath [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### Create ``` New-AzConnectedPrivateLinkScope -ResourceGroupName -ScopeName [-SubscriptionId ] - -Parameter [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + -Parameter [-DefaultProfile ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentityExpanded ``` New-AzConnectedPrivateLinkScope -InputObject -Location - [-PublicNetworkAccess ] [-Tag ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + [-PublicNetworkAccess ] [-Tag ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### CreateViaIdentity ``` New-AzConnectedPrivateLinkScope -InputObject - -Parameter [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + -Parameter [-DefaultProfile ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -167,6 +169,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicNetworkAccess Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachine.md b/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachine.md index d3fea4fc3aff..c39ba84391e9 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachine.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachine.md @@ -15,13 +15,14 @@ The operation to delete a hybrid machine. ### Delete (Default) ``` Remove-AzConnectedMachine -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### DeleteViaIdentity ``` Remove-AzConnectedMachine -InputObject [-DefaultProfile ] [-PassThru] - [-WhatIf] [-Confirm] [] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -107,6 +108,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachineExtension.md b/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachineExtension.md index 2d33bf32c6ba..5a6aff10350c 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachineExtension.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachineExtension.md @@ -15,20 +15,21 @@ The operation to delete the extension. ### Delete (Default) ``` Remove-AzConnectedMachineExtension -MachineName -Name -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] - [] + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentityMachine ``` Remove-AzConnectedMachineExtension -Name -MachineInputObject - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzConnectedMachineExtension -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -175,6 +176,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachineRunCommand.md b/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachineRunCommand.md index 084ea1df4de1..198d5febaca6 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachineRunCommand.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedMachineRunCommand.md @@ -15,20 +15,21 @@ The operation to delete a run command. ### Delete (Default) ``` Remove-AzConnectedMachineRunCommand -MachineName -ResourceGroupName -RunCommandName - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] - [] + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### DeleteViaIdentityMachine ``` Remove-AzConnectedMachineRunCommand -RunCommandName -MachineInputObject - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzConnectedMachineRunCommand -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -47,7 +48,7 @@ Remove-AzConnectedMachineRunCommand -ResourceGroupName "az-sdk-test" -RunCommand Run the command as a job ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -63,7 +64,7 @@ The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml -Type: PSObject +Type: System.Management.Automation.PSObject Parameter Sets: (All) Aliases: AzureRMContext, AzureCredential @@ -79,7 +80,7 @@ Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml -Type: IConnectedMachineIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity Parameter Sets: DeleteViaIdentity Aliases: @@ -95,7 +96,7 @@ Identity Parameter To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. ```yaml -Type: IConnectedMachineIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity Parameter Sets: DeleteViaIdentityMachine Aliases: @@ -110,7 +111,7 @@ Accept wildcard characters: False The name of the hybrid machine. ```yaml -Type: String +Type: System.String Parameter Sets: Delete Aliases: @@ -125,7 +126,7 @@ Accept wildcard characters: False Run the command asynchronously ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -140,7 +141,7 @@ Accept wildcard characters: False Returns true when the command succeeds ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -151,12 +152,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. ```yaml -Type: String +Type: System.String Parameter Sets: Delete Aliases: @@ -171,7 +187,7 @@ Accept wildcard characters: False The name of the run command. ```yaml -Type: String +Type: System.String Parameter Sets: Delete, DeleteViaIdentityMachine Aliases: @@ -186,7 +202,7 @@ Accept wildcard characters: False The ID of the target subscription. ```yaml -Type: String +Type: System.String Parameter Sets: Delete Aliases: @@ -201,7 +217,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -217,7 +233,7 @@ Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedPrivateLinkScope.md b/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedPrivateLinkScope.md index 6cfa7f7845aa..a2770109b2fe 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedPrivateLinkScope.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Remove-AzConnectedPrivateLinkScope.md @@ -15,13 +15,14 @@ Deletes a Azure Arc PrivateLinkScope. ### Delete (Default) ``` Remove-AzConnectedPrivateLinkScope -ResourceGroupName -ScopeName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### DeleteViaIdentity ``` Remove-AzConnectedPrivateLinkScope -InputObject [-DefaultProfile ] - [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -119,6 +120,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Set-AzConnectedMachineExtension.md b/src/ConnectedMachine/ConnectedMachine/help/Set-AzConnectedMachineExtension.md index 75f14f773226..a3ab52b3e92c 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Set-AzConnectedMachineExtension.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Set-AzConnectedMachineExtension.md @@ -20,28 +20,29 @@ Set-AzConnectedMachineExtension -MachineName -Name -ResourceGr [-InstanceViewTypeHandlerVersion ] [-ProtectedSetting ] [-Publisher ] [-Setting ] [-StatusCode ] [-StatusDisplayStatus ] [-StatusLevel ] [-StatusMessage ] [-StatusTime ] [-Tag ] [-TypeHandlerVersion ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### Update ``` Set-AzConnectedMachineExtension -MachineName -Name -ResourceGroupName [-SubscriptionId ] -ExtensionParameter [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonFilePath ``` Set-AzConnectedMachineExtension -MachineName -Name -ResourceGroupName - [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonString ``` Set-AzConnectedMachineExtension -MachineName -Name -ResourceGroupName - [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -323,6 +324,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ProtectedSetting The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Set-AzConnectedPrivateLinkScope.md b/src/ConnectedMachine/ConnectedMachine/help/Set-AzConnectedPrivateLinkScope.md index a0ce117257b6..8eff782bc2b0 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Set-AzConnectedPrivateLinkScope.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Set-AzConnectedPrivateLinkScope.md @@ -16,27 +16,29 @@ Note: You cannot specify a different value for InstrumentationKey nor AppId in t ### UpdateExpanded (Default) ``` Set-AzConnectedPrivateLinkScope -ResourceGroupName -ScopeName [-SubscriptionId ] - -Location [-PublicNetworkAccess ] [-Tag ] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] + -Location [-PublicNetworkAccess ] [-Tag ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Update ``` Set-AzConnectedPrivateLinkScope -ResourceGroupName -ScopeName [-SubscriptionId ] - -Parameter [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + -Parameter [-DefaultProfile ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonFilePath ``` Set-AzConnectedPrivateLinkScope -ResourceGroupName -ScopeName [-SubscriptionId ] - -JsonFilePath [-DefaultProfile ] [-WhatIf] [-Confirm] [] + -JsonFilePath [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### UpdateViaJsonString ``` Set-AzConnectedPrivateLinkScope -ResourceGroupName -ScopeName [-SubscriptionId ] - -JsonString [-DefaultProfile ] [-WhatIf] [-Confirm] [] + -JsonString [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ## DESCRIPTION @@ -137,6 +139,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PublicNetworkAccess Indicates whether machines associated with the private link scope can also use public Azure Arc service endpoints. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedExtension.md b/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedExtension.md index e999d1284033..2e8047b6cf77 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedExtension.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedExtension.md @@ -15,42 +15,43 @@ The operation to Upgrade Machine Extensions. ### UpgradeExpanded (Default) ``` Update-AzConnectedExtension -MachineName -ResourceGroupName [-SubscriptionId ] - [-ExtensionTarget ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] - [-Confirm] [] + [-ExtensionTarget ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpgradeViaJsonString ``` Update-AzConnectedExtension -MachineName -ResourceGroupName [-SubscriptionId ] - -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] - [] + -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpgradeViaJsonFilePath ``` Update-AzConnectedExtension -MachineName -ResourceGroupName [-SubscriptionId ] - -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] - [] + -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Upgrade ``` Update-AzConnectedExtension -MachineName -ResourceGroupName [-SubscriptionId ] -ExtensionUpgradeParameter [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpgradeViaIdentityExpanded ``` Update-AzConnectedExtension -InputObject [-ExtensionTarget ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-ProgressAction ] [-WhatIf] + [-Confirm] [] ``` ### UpgradeViaIdentity ``` Update-AzConnectedExtension -InputObject -ExtensionUpgradeParameter [-DefaultProfile ] [-AsJob] [-NoWait] - [-PassThru] [-WhatIf] [-Confirm] [] + [-PassThru] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -225,6 +226,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedMachine.md b/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedMachine.md deleted file mode 100644 index 528000810009..000000000000 --- a/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedMachine.md +++ /dev/null @@ -1,508 +0,0 @@ ---- -external help file: Az.ConnectedMachine-help.xml -Module Name: Az.ConnectedMachine -online version: https://learn.microsoft.com/powershell/module/az.connectedmachine/update-azconnectedmachine -schema: 2.0.0 ---- - -# Update-AzConnectedMachine - -## SYNOPSIS -The operation to update a hybrid machine. - -## SYNTAX - -### UpdateExpanded (Default) -``` -Update-AzConnectedMachine -Name -ResourceGroupName [-SubscriptionId ] - [-AgentUpgradeCorrelationId ] [-AgentUpgradeDesiredVersion ] [-AgentUpgradeEnableAutomatic] - [-IdentityType ] [-Kind ] [-LinuxConfigurationPatchSettingsAssessmentMode ] - [-LinuxConfigurationPatchSettingsPatchMode ] [-LocationDataCity ] - [-LocationDataCountryOrRegion ] [-LocationDataDistrict ] [-LocationDataName ] - [-ParentClusterResourceId ] [-PrivateLinkScopeResourceId ] [-Tag ] - [-WindowsConfigurationPatchSettingsAssessmentMode ] - [-WindowsConfigurationPatchSettingsPatchMode ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### UpdateViaJsonString -``` -Update-AzConnectedMachine -Name -ResourceGroupName [-SubscriptionId ] - -JsonString [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### UpdateViaJsonFilePath -``` -Update-AzConnectedMachine -Name -ResourceGroupName [-SubscriptionId ] - -JsonFilePath [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### Update -``` -Update-AzConnectedMachine -Name -ResourceGroupName [-SubscriptionId ] - -Parameter [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -### UpdateViaIdentityExpanded -``` -Update-AzConnectedMachine -InputObject [-AgentUpgradeCorrelationId ] - [-AgentUpgradeDesiredVersion ] [-AgentUpgradeEnableAutomatic] [-IdentityType ] - [-Kind ] [-LinuxConfigurationPatchSettingsAssessmentMode ] - [-LinuxConfigurationPatchSettingsPatchMode ] [-LocationDataCity ] - [-LocationDataCountryOrRegion ] [-LocationDataDistrict ] [-LocationDataName ] - [-ParentClusterResourceId ] [-PrivateLinkScopeResourceId ] [-Tag ] - [-WindowsConfigurationPatchSettingsAssessmentMode ] - [-WindowsConfigurationPatchSettingsPatchMode ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] -``` - -### UpdateViaIdentity -``` -Update-AzConnectedMachine -InputObject -Parameter - [-DefaultProfile ] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -The operation to update a hybrid machine. - -## EXAMPLES - -### Example 1: Update a machine using parameters -```powershell -Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId privateLinkScopeId -WindowsConfigurationPatchSettingsAssessmentMode AutomaticByOS -Tag @{"key"="value"} -``` - -```output -ResourceGroupName Name Location OSType Status ProvisioningState ------------------ ---- -------- ------ ------ ----------------- -rg surface eastus2euap windows Connected Updating -``` - -Update a machine - -### Example 2: Update a machine - cleaning a field -```powershell -Update-AzConnectedMachine -Name surface -ResourceGroupName rg -PrivateLinkScopeResourceId $null -``` - -```output -ResourceGroupName Name Location OSType Status ProvisioningState ------------------ ---- -------- ------ ------ ----------------- -rg surface eastus2euap windows Connected Updating -``` - -Update a machine to clean a field - -## PARAMETERS - -### -AgentUpgradeCorrelationId -The correlation ID passed in from RSM per upgrade. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AgentUpgradeDesiredVersion -Specifies the version info w.r.t AgentUpgrade for the machine. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -AgentUpgradeEnableAutomatic -Specifies if RSM should try to upgrade this machine - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -DefaultProfile -The DefaultProfile parameter is not functional. -Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -IdentityType -The identity type. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -InputObject -Identity Parameter -To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity -Parameter Sets: UpdateViaIdentityExpanded, UpdateViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -JsonFilePath -Path of Json file supplied to the Update operation - -```yaml -Type: System.String -Parameter Sets: UpdateViaJsonFilePath -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -JsonString -Json string supplied to the Update operation - -```yaml -Type: System.String -Parameter Sets: UpdateViaJsonString -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Kind -Indicates which kind of Arc machine placement on-premises, such as HCI, SCVMM or VMware etc. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LinuxConfigurationPatchSettingsAssessmentMode -Specifies the assessment mode. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LinuxConfigurationPatchSettingsPatchMode -Specifies the patch mode. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LocationDataCity -The city or locality where the resource is located. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LocationDataCountryOrRegion -The country or region where the resource is located - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LocationDataDistrict -The district, state, or province where the resource is located. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -LocationDataName -A canonical name for the geographic or physical location. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Name -The name of the hybrid machine. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath, Update -Aliases: MachineName - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Parameter -Describes a hybrid machine Update. -To construct, see NOTES section for PARAMETER properties and create a hash table. - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineUpdate -Parameter Sets: Update, UpdateViaIdentity -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: True (ByValue) -Accept wildcard characters: False -``` - -### -ParentClusterResourceId -The resource id of the parent cluster (Azure HCI) this machine is assigned to, if any. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PrivateLinkScopeResourceId -The resource id of the private link scope this machine is assigned to, if any. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group. -The name is case insensitive. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath, Update -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -The ID of the target subscription. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaJsonString, UpdateViaJsonFilePath, Update -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Tag -Resource tags - -```yaml -Type: System.Collections.Hashtable -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WindowsConfigurationPatchSettingsAssessmentMode -Specifies the assessment mode. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WindowsConfigurationPatchSettingsPatchMode -Specifies the patch mode. - -```yaml -Type: System.String -Parameter Sets: UpdateExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.Api20221227.IMachineUpdate - -### Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.Api20221227.IMachine - -## NOTES - -## RELATED LINKS diff --git a/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedMachineExtension.md b/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedMachineExtension.md index 0b67ef9c97a1..5763afb0c68f 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedMachineExtension.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedMachineExtension.md @@ -17,29 +17,29 @@ The operation to create or update the extension. Update-AzConnectedMachineExtension -MachineName -Name -ResourceGroupName [-SubscriptionId ] [-AutoUpgradeMinorVersion] [-EnableAutomaticUpgrade] [-ForceRerun ] [-ProtectedSetting ] [-Publisher ] [-Setting ] [-Tag ] - [-Type ] [-TypeHandlerVersion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-Type ] [-TypeHandlerVersion ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonString ``` Update-AzConnectedMachineExtension -MachineName -Name -ResourceGroupName - [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-SubscriptionId ] -JsonString [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonFilePath ``` Update-AzConnectedMachineExtension -MachineName -Name -ResourceGroupName - [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Update ``` Update-AzConnectedMachineExtension -MachineName -Name -ResourceGroupName [-SubscriptionId ] -ExtensionParameter [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityMachineExpanded @@ -47,15 +47,15 @@ Update-AzConnectedMachineExtension -MachineName -Name -Resourc Update-AzConnectedMachineExtension -Name -MachineInputObject [-AutoUpgradeMinorVersion] [-EnableAutomaticUpgrade] [-ForceRerun ] [-ProtectedSetting ] [-Publisher ] [-Setting ] [-Tag ] [-Type ] - [-TypeHandlerVersion ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + [-TypeHandlerVersion ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityMachine ``` Update-AzConnectedMachineExtension -Name -MachineInputObject - -ExtensionParameter [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + -ExtensionParameter [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded @@ -63,14 +63,15 @@ Update-AzConnectedMachineExtension -Name -MachineInputObject [-AutoUpgradeMinorVersion] [-EnableAutomaticUpgrade] [-ForceRerun ] [-ProtectedSetting ] [-Publisher ] [-Setting ] [-Tag ] [-Type ] [-TypeHandlerVersion ] - [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] + [] ``` ### UpdateViaIdentity ``` Update-AzConnectedMachineExtension -InputObject - -ExtensionParameter [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] - [-Confirm] [] + -ExtensionParameter [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -359,6 +360,21 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ProtectedSetting The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. diff --git a/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedMachineRunCommand.md b/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedMachineRunCommand.md index 9b710c3485fe..0d8369c9e865 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedMachineRunCommand.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedMachineRunCommand.md @@ -16,61 +16,61 @@ The operation to Create a run command. ``` Update-AzConnectedMachineRunCommand -MachineName -ResourceGroupName -RunCommandName [-SubscriptionId ] [-AsyncExecution] [-ErrorBlobManagedIdentityClientId ] - [-ErrorBlobManagedIdentityObjectId ] [-ErrorBlobUri ] [-Location ] + [-ErrorBlobManagedIdentityObjectId ] [-ErrorBlobUri ] [-OutputBlobManagedIdentityClientId ] [-OutputBlobManagedIdentityObjectId ] [-OutputBlobUri ] [-Parameter ] [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] - [-TimeoutInSecond ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + [-TimeoutInSecond ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Update ``` Update-AzConnectedMachineRunCommand -MachineName -ResourceGroupName -RunCommandName [-SubscriptionId ] -RunCommandProperty [-DefaultProfile ] [-AsJob] - [-NoWait] [-WhatIf] [-Confirm] [] + [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityMachineExpanded ``` Update-AzConnectedMachineRunCommand -RunCommandName -MachineInputObject [-AsyncExecution] [-ErrorBlobManagedIdentityClientId ] [-ErrorBlobManagedIdentityObjectId ] - [-ErrorBlobUri ] [-Location ] [-OutputBlobManagedIdentityClientId ] + [-ErrorBlobUri ] [-OutputBlobManagedIdentityClientId ] [-OutputBlobManagedIdentityObjectId ] [-OutputBlobUri ] [-Parameter ] [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] [-TimeoutInSecond ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityMachine ``` Update-AzConnectedMachineRunCommand -RunCommandName -MachineInputObject - -RunCommandProperty [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + -RunCommandProperty [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzConnectedMachineRunCommand -InputObject [-AsyncExecution] [-ErrorBlobManagedIdentityClientId ] [-ErrorBlobManagedIdentityObjectId ] - [-ErrorBlobUri ] [-Location ] [-OutputBlobManagedIdentityClientId ] + [-ErrorBlobUri ] [-OutputBlobManagedIdentityClientId ] [-OutputBlobManagedIdentityObjectId ] [-OutputBlobUri ] [-Parameter ] [-ProtectedParameter ] [-RunAsPassword ] [-RunAsUser ] [-ScriptUriManagedIdentityClientId ] [-ScriptUriManagedIdentityObjectId ] [-SourceCommandId ] [-SourceScript ] [-SourceScriptUri ] [-Tag ] [-TimeoutInSecond ] [-DefaultProfile ] - [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] + [-AsJob] [-NoWait] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentity ``` Update-AzConnectedMachineRunCommand -InputObject - -RunCommandProperty [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] - [] + -RunCommandProperty [-DefaultProfile ] [-AsJob] [-NoWait] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -89,7 +89,7 @@ Update-AzConnectedMachineRunCommand -ResourceGroupName "az-sdk-test" -RunCommand Run the command as a job ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -105,7 +105,7 @@ Optional. If set to true, provisioning will complete as soon as script starts and will not wait for script to complete. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -121,7 +121,7 @@ The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml -Type: PSObject +Type: System.Management.Automation.PSObject Parameter Sets: (All) Aliases: AzureRMContext, AzureCredential @@ -137,7 +137,7 @@ Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -153,7 +153,7 @@ Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -170,7 +170,7 @@ Use a SAS URI with read, append, create, write access OR use managed identity to Refer errorBlobManagedIdentity parameter. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -186,7 +186,7 @@ Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ```yaml -Type: IConnectedMachineIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity Parameter Sets: UpdateViaIdentityExpanded, UpdateViaIdentity Aliases: @@ -197,27 +197,12 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -Location -The geo-location where the resource lives - -```yaml -Type: String -Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -MachineInputObject Identity Parameter To construct, see NOTES section for MACHINEINPUTOBJECT properties and create a hash table. ```yaml -Type: IConnectedMachineIdentity +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IConnectedMachineIdentity Parameter Sets: UpdateViaIdentityMachineExpanded, UpdateViaIdentityMachine Aliases: @@ -232,7 +217,7 @@ Accept wildcard characters: False The name of the hybrid machine. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, Update Aliases: @@ -247,7 +232,7 @@ Accept wildcard characters: False Run the command asynchronously ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: @@ -263,7 +248,7 @@ Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -279,7 +264,7 @@ Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -296,7 +281,7 @@ Use a SAS URI with read, append, create, write access OR use managed identity to Refer outputBlobManagedIdentity parameter. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -312,7 +297,7 @@ The parameters used by the script. To construct, see NOTES section for PARAMETER properties and create a hash table. ```yaml -Type: IRunCommandInputParameter[] +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[] Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -323,12 +308,27 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ProtectedParameter The parameters used by the script. To construct, see NOTES section for PROTECTEDPARAMETER properties and create a hash table. ```yaml -Type: IRunCommandInputParameter[] +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IRunCommandInputParameter[] Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -344,7 +344,7 @@ The name of the resource group. The name is case insensitive. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, Update Aliases: @@ -359,7 +359,7 @@ Accept wildcard characters: False Specifies the user account password on the machine when executing the run command. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -374,7 +374,7 @@ Accept wildcard characters: False Specifies the user account on the machine when executing the run command. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -389,7 +389,7 @@ Accept wildcard characters: False The name of the run command. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, Update, UpdateViaIdentityMachineExpanded, UpdateViaIdentityMachine Aliases: @@ -405,7 +405,7 @@ Describes a Run Command To construct, see NOTES section for RUNCOMMANDPROPERTY properties and create a hash table. ```yaml -Type: IMachineRunCommand +Type: Microsoft.Azure.PowerShell.Cmdlets.ConnectedMachine.Models.IMachineRunCommand Parameter Sets: Update, UpdateViaIdentityMachine, UpdateViaIdentity Aliases: @@ -421,7 +421,7 @@ Client Id (GUID value) of the user-assigned managed identity. ObjectId should not be used if this is provided. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -437,7 +437,7 @@ Object Id (GUID value) of the user-assigned managed identity. ClientId should not be used if this is provided. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -452,7 +452,7 @@ Accept wildcard characters: False Specifies the commandId of predefined built-in script. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -467,7 +467,7 @@ Accept wildcard characters: False Specifies the script content to be executed on the machine. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -483,7 +483,7 @@ Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -498,7 +498,7 @@ Accept wildcard characters: False The ID of the target subscription. ```yaml -Type: String +Type: System.String Parameter Sets: UpdateExpanded, Update Aliases: @@ -513,7 +513,7 @@ Accept wildcard characters: False Resource tags. ```yaml -Type: Hashtable +Type: System.Collections.Hashtable Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -528,7 +528,7 @@ Accept wildcard characters: False The timeout in seconds to execute the run command. ```yaml -Type: Int32 +Type: System.Int32 Parameter Sets: UpdateExpanded, UpdateViaIdentityMachineExpanded, UpdateViaIdentityExpanded Aliases: @@ -543,7 +543,7 @@ Accept wildcard characters: False Prompts you for confirmation before running the cmdlet. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: cf @@ -559,7 +559,7 @@ Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml -Type: SwitchParameter +Type: System.Management.Automation.SwitchParameter Parameter Sets: (All) Aliases: wi diff --git a/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedPrivateLinkScopeTag.md b/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedPrivateLinkScopeTag.md index 9a8e9be1125c..b2511fb59944 100644 --- a/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedPrivateLinkScopeTag.md +++ b/src/ConnectedMachine/ConnectedMachine/help/Update-AzConnectedPrivateLinkScopeTag.md @@ -16,41 +16,42 @@ To update other fields use the CreateOrUpdate method. ### UpdateExpanded (Default) ``` Update-AzConnectedPrivateLinkScopeTag -ResourceGroupName -ScopeName - [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + [-SubscriptionId ] [-Tag ] [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonString ``` Update-AzConnectedPrivateLinkScopeTag -ResourceGroupName -ScopeName - [-SubscriptionId ] -JsonString [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + [-SubscriptionId ] -JsonString [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaJsonFilePath ``` Update-AzConnectedPrivateLinkScopeTag -ResourceGroupName -ScopeName - [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + [-SubscriptionId ] -JsonFilePath [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### Update ``` Update-AzConnectedPrivateLinkScopeTag -ResourceGroupName -ScopeName - [-SubscriptionId ] -PrivateLinkScopeTag [-DefaultProfile ] [-WhatIf] - [-Confirm] [] + [-SubscriptionId ] -PrivateLinkScopeTag [-DefaultProfile ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentityExpanded ``` Update-AzConnectedPrivateLinkScopeTag -InputObject [-Tag ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-ProgressAction ] [-WhatIf] [-Confirm] [] ``` ### UpdateViaIdentity ``` Update-AzConnectedPrivateLinkScopeTag -InputObject - -PrivateLinkScopeTag [-DefaultProfile ] [-WhatIf] [-Confirm] [] + -PrivateLinkScopeTag [-DefaultProfile ] [-ProgressAction ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -153,6 +154,21 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -ProgressAction +{{ Fill ProgressAction Description }} + +```yaml +Type: System.Management.Automation.ActionPreference +Parameter Sets: (All) +Aliases: proga + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -ResourceGroupName The name of the resource group. The name is case insensitive.