diff --git a/src/ConnectedMachine/ConnectedMachine.Autorest/README.md b/src/ConnectedMachine/ConnectedMachine.Autorest/README.md index c2af8f5204cb..ba1055163dcc 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/README.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/README.md @@ -265,6 +265,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/docs/New-AzConnectedMachineRunCommand.md b/src/ConnectedMachine/ConnectedMachine.Autorest/docs/New-AzConnectedMachineRunCommand.md index ac72a1a3690c..ecc4b3ca2845 100644 --- a/src/ConnectedMachine/ConnectedMachine.Autorest/docs/New-AzConnectedMachineRunCommand.md +++ b/src/ConnectedMachine/ConnectedMachine.Autorest/docs/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 @@ -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 @@ -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 @@ -403,7 +417,7 @@ 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 @@ -419,7 +433,7 @@ To construct, see NOTES section for PROTECTEDPARAMETER properties and create a h ```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 @@ -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/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