VirtualMachineRunCommandScriptSource Class
Describes the script sources for run command. Use only one of these script sources: script, scriptUri, commandId, galleryScriptReferenceId.
Constructor
VirtualMachineRunCommandScriptSource(*args: Any, **kwargs: Any)
Variables
| Name | Description |
|---|---|
|
script
|
Specifies the script content to be executed on the VM. |
|
script_uri
|
Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI. |
|
command_id
|
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_uri_managed_identity
|
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. |
|
script_shell
|
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. Known values are: "Default" and "Powershell7". |
|
gallery_script_reference_id
|
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}. |
Attributes
command_id
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.
command_id: str | None
gallery_script_reference_id
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}.
gallery_script_reference_id: str | None
script
Specifies the script content to be executed on the VM.
script: str | None
script_shell
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. Known values are: "Default" and "Powershell7".
script_shell: str | _models.ScriptShellTypes | None
script_uri
Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
script_uri: str | None
script_uri_managed_identity
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.
script_uri_managed_identity: _models.RunCommandManagedIdentity | None