Delen via


ArmComputeModelFactory.VirtualMachineRunCommandData Method

Definition

Initializes a new instance of VirtualMachineRunCommandData.

public static Azure.ResourceManager.Compute.VirtualMachineRunCommandData VirtualMachineRunCommandData (Azure.Core.ResourceIdentifier id = default, string name = default, Azure.Core.ResourceType resourceType = default, Azure.ResourceManager.Models.SystemData systemData = default, System.Collections.Generic.IDictionary<string,string> tags = default, Azure.Core.AzureLocation location = default, Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandScriptSource source = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Compute.Models.RunCommandInputParameter> parameters = default, System.Collections.Generic.IEnumerable<Azure.ResourceManager.Compute.Models.RunCommandInputParameter> protectedParameters = default, bool? asyncExecution = default, string runAsUser = default, string runAsPassword = default, int? timeoutInSeconds = default, Uri outputBlobUri = default, Uri errorBlobUri = default, Azure.ResourceManager.Compute.Models.RunCommandManagedIdentity outputBlobManagedIdentity = default, Azure.ResourceManager.Compute.Models.RunCommandManagedIdentity errorBlobManagedIdentity = default, string provisioningState = default, Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandInstanceView instanceView = default, bool? treatFailureAsDeploymentFailure = default);
static member VirtualMachineRunCommandData : Azure.Core.ResourceIdentifier * string * Azure.Core.ResourceType * Azure.ResourceManager.Models.SystemData * System.Collections.Generic.IDictionary<string, string> * Azure.Core.AzureLocation * Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandScriptSource * seq<Azure.ResourceManager.Compute.Models.RunCommandInputParameter> * seq<Azure.ResourceManager.Compute.Models.RunCommandInputParameter> * Nullable<bool> * string * string * Nullable<int> * Uri * Uri * Azure.ResourceManager.Compute.Models.RunCommandManagedIdentity * Azure.ResourceManager.Compute.Models.RunCommandManagedIdentity * string * Azure.ResourceManager.Compute.Models.VirtualMachineRunCommandInstanceView * Nullable<bool> -> Azure.ResourceManager.Compute.VirtualMachineRunCommandData
Public Shared Function VirtualMachineRunCommandData (Optional id As ResourceIdentifier = Nothing, Optional name As String = Nothing, Optional resourceType As ResourceType = Nothing, Optional systemData As SystemData = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional location As AzureLocation = Nothing, Optional source As VirtualMachineRunCommandScriptSource = Nothing, Optional parameters As IEnumerable(Of RunCommandInputParameter) = Nothing, Optional protectedParameters As IEnumerable(Of RunCommandInputParameter) = Nothing, Optional asyncExecution As Nullable(Of Boolean) = Nothing, Optional runAsUser As String = Nothing, Optional runAsPassword As String = Nothing, Optional timeoutInSeconds As Nullable(Of Integer) = Nothing, Optional outputBlobUri As Uri = Nothing, Optional errorBlobUri As Uri = Nothing, Optional outputBlobManagedIdentity As RunCommandManagedIdentity = Nothing, Optional errorBlobManagedIdentity As RunCommandManagedIdentity = Nothing, Optional provisioningState As String = Nothing, Optional instanceView As VirtualMachineRunCommandInstanceView = Nothing, Optional treatFailureAsDeploymentFailure As Nullable(Of Boolean) = Nothing) As VirtualMachineRunCommandData

Parameters

id
ResourceIdentifier

The id.

name
String

The name.

resourceType
ResourceType

The resourceType.

systemData
SystemData

The systemData.

tags
IDictionary<String,String>

The tags.

location
AzureLocation

The location.

source
VirtualMachineRunCommandScriptSource

The source of the run command script.

parameters
IEnumerable<RunCommandInputParameter>

The parameters used by the script.

protectedParameters
IEnumerable<RunCommandInputParameter>

The parameters used by the script.

asyncExecution
Nullable<Boolean>

Optional. If set to true, provisioning will complete as soon as the script starts and will not wait for script to complete.

runAsUser
String

Specifies the user account on the VM when executing the run command.

runAsPassword
String

Specifies the user account password on the VM when executing the run command.

timeoutInSeconds
Nullable<Int32>

The timeout in seconds to execute the run command.

outputBlobUri
Uri

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.

errorBlobUri
Uri

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.

outputBlobManagedIdentity
RunCommandManagedIdentity

User-assigned managed identity that has access to outputBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' 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.

errorBlobManagedIdentity
RunCommandManagedIdentity

User-assigned managed identity that has access to errorBlobUri storage blob. Use an empty object in case of system-assigned identity. Make sure managed identity has been given access to blob's container with 'Storage Blob Data Contributor' 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.

provisioningState
String

The provisioning state, which only appears in the response. If treatFailureAsDeploymentFailure set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If treatFailureAsDeploymentFailure set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results.

instanceView
VirtualMachineRunCommandInstanceView

The virtual machine run command instance view.

treatFailureAsDeploymentFailure
Nullable<Boolean>

Optional. If set to true, any failure in the script will fail the deployment and ProvisioningState will be marked as Failed. If set to false, ProvisioningState would only reflect whether the run command was run or not by the extensions platform, it would not indicate whether script failed in case of script failures. See instance view of run command in case of script failures to see executionMessage, output, error: https://aka.ms/runcommandmanaged#get-execution-status-and-results.

Returns

A new VirtualMachineRunCommandData instance for mocking.

Applies to