VirtualMachineRunCommandScriptSource Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
VirtualMachineRunCommandScriptSource() |
Initializes a new instance of the VirtualMachineRunCommandScriptSource class. |
VirtualMachineRunCommandScriptSource(String, String, String, RunCommandManagedIdentity) |
Initializes a new instance of the VirtualMachineRunCommandScriptSource class. |
VirtualMachineRunCommandScriptSource()
Initializes a new instance of the VirtualMachineRunCommandScriptSource class.
public VirtualMachineRunCommandScriptSource ();
Public Sub New ()
Applies to
VirtualMachineRunCommandScriptSource(String, String, String, RunCommandManagedIdentity)
Initializes a new instance of the VirtualMachineRunCommandScriptSource class.
public VirtualMachineRunCommandScriptSource (string script = default, string scriptUri = default, string commandId = default, Microsoft.Azure.Management.Compute.Models.RunCommandManagedIdentity scriptUriManagedIdentity = default);
new Microsoft.Azure.Management.Compute.Models.VirtualMachineRunCommandScriptSource : string * string * string * Microsoft.Azure.Management.Compute.Models.RunCommandManagedIdentity -> Microsoft.Azure.Management.Compute.Models.VirtualMachineRunCommandScriptSource
Public Sub New (Optional script As String = Nothing, Optional scriptUri As String = Nothing, Optional commandId As String = Nothing, Optional scriptUriManagedIdentity As RunCommandManagedIdentity = Nothing)
Parameters
- script
- String
Specifies the script content to be executed on the VM.
- scriptUri
- String
Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.
- commandId
- String
Specifies a commandId of predefined built-in script.
- scriptUriManagedIdentity
- RunCommandManagedIdentity
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.
Applies to
Azure SDK for .NET