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

VirtualMachineRunCommand 类

描述虚拟机运行命令。

变量仅由服务器填充,发送请求时将被忽略。

必须填充所有必需的参数才能发送到 Azure。

继承
azure.mgmt.compute.v2021_03_01.models._models_py3.Resource
VirtualMachineRunCommand

构造函数

VirtualMachineRunCommand(*, location: str, tags: Dict[str, str] | None = None, source: _models.VirtualMachineRunCommandScriptSource | None = None, parameters: List[_models.RunCommandInputParameter] | None = None, protected_parameters: List[_models.RunCommandInputParameter] | None = None, async_execution: bool = False, run_as_user: str | None = None, run_as_password: str | None = None, timeout_in_seconds: int | None = None, output_blob_uri: str | None = None, error_blob_uri: str | None = None, **kwargs: Any)

Keyword-Only Parameters

location
str

资源位置。 必需。

tags
dict[str, str]

资源标记。

source
VirtualMachineRunCommandScriptSource

运行命令脚本的源。

parameters
list[RunCommandInputParameter]

脚本使用的参数。

protected_parameters
list[RunCommandInputParameter]

脚本使用的参数。

async_execution
bool

可选。 如果设置为 true,则脚本启动后,预配将立即完成,并且不会等待脚本完成。

run_as_user
str

指定执行 run 命令时 VM 上的用户帐户。

run_as_password
str

指定执行 run 命令时 VM 上的用户帐户密码。

timeout_in_seconds
int

执行 run 命令的超时时间(秒)。

output_blob_uri
str

指定要在其中上传脚本输出流的 Azure 存储 Blob。

error_blob_uri
str

指定将上传脚本错误流的 Azure 存储 Blob。

变量

id
str

资源 ID。

name
str

资源名称。

type
str

资源类型。

location
str

资源位置。 必需。

tags
dict[str, str]

资源标记。

source
VirtualMachineRunCommandScriptSource

运行命令脚本的源。

parameters
list[RunCommandInputParameter]

脚本使用的参数。

protected_parameters
list[RunCommandInputParameter]

脚本使用的参数。

async_execution
bool

可选。 如果设置为 true,则脚本启动后,预配将立即完成,并且不会等待脚本完成。

run_as_user
str

指定执行 run 命令时 VM 上的用户帐户。

run_as_password
str

指定执行 run 命令时 VM 上的用户帐户密码。

timeout_in_seconds
int

执行 run 命令的超时时间(秒)。

output_blob_uri
str

指定要在其中上传脚本输出流的 Azure 存储 Blob。

error_blob_uri
str

指定将上传脚本错误流的 Azure 存储 Blob。

provisioning_state
str

预配状态,仅显示在响应中。

instance_view
VirtualMachineRunCommandInstanceView

虚拟机运行命令实例视图。