你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

MachineRunCommandScriptSource Class

Definition

Describes the script sources for run command. Use only one of script, scriptUri, commandId.

public class MachineRunCommandScriptSource : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.HybridCompute.Models.MachineRunCommandScriptSource>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.HybridCompute.Models.MachineRunCommandScriptSource>
type MachineRunCommandScriptSource = class
    interface IJsonModel<MachineRunCommandScriptSource>
    interface IPersistableModel<MachineRunCommandScriptSource>
Public Class MachineRunCommandScriptSource
Implements IJsonModel(Of MachineRunCommandScriptSource), IPersistableModel(Of MachineRunCommandScriptSource)
Inheritance
MachineRunCommandScriptSource
Implements

Constructors

MachineRunCommandScriptSource()

Initializes a new instance of MachineRunCommandScriptSource.

Properties

CommandId

Specifies the commandId of predefined built-in script.

Script

Specifies the script content to be executed on the machine.

ScriptUri

Specifies the script download location. It can be either SAS URI of an Azure storage blob with read access or public URI.

ScriptUriManagedIdentity

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.

Explicit Interface Implementations

IJsonModel<MachineRunCommandScriptSource>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<MachineRunCommandScriptSource>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<MachineRunCommandScriptSource>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<MachineRunCommandScriptSource>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<MachineRunCommandScriptSource>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to