MachineRunCommand interface

Describes a Run Command

Extends

Properties

asyncExecution

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

errorBlobManagedIdentity

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

errorBlobUri

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.

instanceView

The machine run command instance view.

outputBlobManagedIdentity

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

outputBlobUri

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.

parameters

The parameters used by the script.

protectedParameters

The parameters used by the script.

provisioningState

The provisioning state, which only appears in the response.

runAsPassword

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

runAsUser

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

source

The source of the run command script.

timeoutInSeconds

The timeout in seconds to execute the run command.

Inherited Properties

id

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

The geo-location where the resource lives

name

The name of the resource

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

Resource tags.

type

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Property Details

asyncExecution

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

asyncExecution?: boolean

Property Value

boolean

errorBlobManagedIdentity

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

errorBlobManagedIdentity?: RunCommandManagedIdentity

Property Value

errorBlobUri

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?: string

Property Value

string

instanceView

The machine run command instance view.

instanceView?: MachineRunCommandInstanceView

Property Value

outputBlobManagedIdentity

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

outputBlobManagedIdentity?: RunCommandManagedIdentity

Property Value

outputBlobUri

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?: string

Property Value

string

parameters

The parameters used by the script.

parameters?: RunCommandInputParameter[]

Property Value

protectedParameters

The parameters used by the script.

protectedParameters?: RunCommandInputParameter[]

Property Value

provisioningState

The provisioning state, which only appears in the response.

provisioningState?: string

Property Value

string

runAsPassword

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

runAsPassword?: string

Property Value

string

runAsUser

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

runAsUser?: string

Property Value

string

source

The source of the run command script.

source?: MachineRunCommandScriptSource

Property Value

timeoutInSeconds

The timeout in seconds to execute the run command.

timeoutInSeconds?: number

Property Value

number

Inherited Property Details

id

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

id?: string

Property Value

string

Inherited From TrackedResource.id

location

The geo-location where the resource lives

location: string

Property Value

string

Inherited From TrackedResource.location

name

The name of the resource

name?: string

Property Value

string

Inherited From TrackedResource.name

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

systemData?: SystemData

Property Value

Inherited From TrackedResource.systemData

tags

Resource tags.

tags?: Record<string, string>

Property Value

Record<string, string>

Inherited From TrackedResource.tags

type

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

type?: string

Property Value

string

Inherited From TrackedResource.type