From fd50873633272957fc4bea6bcb05042fe03f525e Mon Sep 17 00:00:00 2001 From: Viv Lingaiah Date: Wed, 26 Mar 2025 11:48:21 -0700 Subject: [PATCH 1/3] Add galleryScriptReferenceId parameter to runCommand.json --- .../ComputeRP/stable/2025-04-01/runCommand.json | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json index d0c3b065e6f1..624c20a89059 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json +++ b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json @@ -1189,15 +1189,27 @@ }, "commandId": { "type": "string", - "description": "Specifies a commandId of predefined built-in script." + "description": "Specifies a commandId of predefined built-in script. commandIds available for Linux listed at https://aka.ms/RunCommandManagedLinux#available-commands, Windows at https://aka.ms/RunCommandManagedWindows#available-commands" }, "scriptUriManagedIdentity": { "$ref": "#/definitions/RunCommandManagedIdentity", "description": "User-assigned managed identity that has access to scriptUri in case of Azure storage blob. Use an empty object in case of system-assigned identity. Make sure the Azure storage blob exists, and managed identity has been given access to blob's container with 'Storage Blob Data Reader' role assignment. In case of user-assigned identity, make sure you add it under VM's identity. For more info on managed identity and Run Command, refer https://aka.ms/ManagedIdentity and https://aka.ms/RunCommandManaged." + }, + "scriptShell": { + "type": "string", + "description": "Optional. Specify which shell to use for running the script. These values must match those expected by the extension. Currently supported only for Windows VMs, script uses Powershell 7 when specified. Powershell 7 must be already installed on the machine to use Powershell7 parameter value.", + "enum": [ + "Default", + "Powershell7" + ] + }, + "galleryScriptReferenceId": { + "type": "string", + "description": "The resource Id of a Gallery Script version that needs to be executed. Example Id looks like /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/galleries/{galleryName}/scripts/{scriptName}/versions/{version}." } }, "type": "object", - "description": "Describes the script sources for run command. Use only one of script, scriptUri, commandId." + "description": "Describes the script sources for run command. Use only one these script sources: script, scriptUri, commandId, galleryScriptReferenceId." }, "VirtualMachineRunCommandProperties": { "properties": { From 1efc75768ca3caf3124cedaedebc99e879fcb300 Mon Sep 17 00:00:00 2001 From: Viv Lingaiah Date: Fri, 4 Apr 2025 10:34:05 -0700 Subject: [PATCH 2/3] Address PR comments --- .../ComputeRP/stable/2025-04-01/runCommand.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json index 624c20a89059..9e8fc0c498f8 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json +++ b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json @@ -1189,7 +1189,7 @@ }, "commandId": { "type": "string", - "description": "Specifies a commandId of predefined built-in script. commandIds available for Linux listed at https://aka.ms/RunCommandManagedLinux#available-commands, Windows at https://aka.ms/RunCommandManagedWindows#available-commands" + "description": "Specifies a commandId of predefined built-in script. Command Ids available for Linux are listed at https://aka.ms/RunCommandManagedLinux#available-commands, Windows at https://aka.ms/RunCommandManagedWindows#available-commands" }, "scriptUriManagedIdentity": { "$ref": "#/definitions/RunCommandManagedIdentity", @@ -1201,7 +1201,11 @@ "enum": [ "Default", "Powershell7" - ] + ], + "x-ms-enum": { + "name": "ScriptShellTypes", + "modelAsString": true + } }, "galleryScriptReferenceId": { "type": "string", @@ -1209,7 +1213,7 @@ } }, "type": "object", - "description": "Describes the script sources for run command. Use only one these script sources: script, scriptUri, commandId, galleryScriptReferenceId." + "description": "Describes the script sources for run command. Use only one of these script sources: script, scriptUri, commandId, galleryScriptReferenceId." }, "VirtualMachineRunCommandProperties": { "properties": { From 0ae9da7d979c6f7118f6ed97cd451e89da19b3a7 Mon Sep 17 00:00:00 2001 From: Viv Lingaiah Date: Mon, 7 Apr 2025 19:41:52 -0700 Subject: [PATCH 3/3] Address PR comments --- .../ComputeRP/stable/2025-04-01/runCommand.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json index 9e8fc0c498f8..2c7af79d7887 100644 --- a/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json +++ b/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/runCommand.json @@ -103,7 +103,7 @@ "in": "path", "required": true, "type": "string", - "description": "The command id." + "description": "Specifies a commandId of predefined built-in script. Command IDs available for Linux are listed at https://aka.ms/RunCommandManagedLinux#available-commands, Windows at https://aka.ms/RunCommandManagedWindows#available-commands." }, { "$ref": "../../../common-types/v1/common.json#/parameters/ApiVersionParameter" @@ -946,7 +946,7 @@ "properties": { "commandId": { "type": "string", - "description": "The run command id." + "description": "Specifies a commandId of predefined built-in script. Command IDs available for Linux are listed at https://aka.ms/RunCommandManagedLinux#available-commands, Windows at https://aka.ms/RunCommandManagedWindows#available-commands." }, "script": { "type": "array", @@ -1189,7 +1189,7 @@ }, "commandId": { "type": "string", - "description": "Specifies a commandId of predefined built-in script. Command Ids available for Linux are listed at https://aka.ms/RunCommandManagedLinux#available-commands, Windows at https://aka.ms/RunCommandManagedWindows#available-commands" + "description": "Specifies a commandId of predefined built-in script. Command IDs available for Linux are listed at https://aka.ms/RunCommandManagedLinux#available-commands, Windows at https://aka.ms/RunCommandManagedWindows#available-commands" }, "scriptUriManagedIdentity": { "$ref": "#/definitions/RunCommandManagedIdentity", @@ -1209,7 +1209,7 @@ }, "galleryScriptReferenceId": { "type": "string", - "description": "The resource Id of a Gallery Script version that needs to be executed. Example Id looks like /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/galleries/{galleryName}/scripts/{scriptName}/versions/{version}." + "description": "The resource ID of a Gallery Script version that needs to be executed. Example ID looks like /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.Compute/galleries/{galleryName}/scripts/{scriptName}/versions/{version}." } }, "type": "object",