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

VirtualMachineScaleSetVMRunCommandsOperationsExtensions.CreateOrUpdateAsync 方法

定义

用于创建或更新 VMSS VM run 命令的操作。

public static System.Threading.Tasks.Task<Microsoft.Azure.Management.Compute.Models.VirtualMachineRunCommand> CreateOrUpdateAsync (this Microsoft.Azure.Management.Compute.IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, Microsoft.Azure.Management.Compute.Models.VirtualMachineRunCommand runCommand, System.Threading.CancellationToken cancellationToken = default);
static member CreateOrUpdateAsync : Microsoft.Azure.Management.Compute.IVirtualMachineScaleSetVMRunCommandsOperations * string * string * string * string * Microsoft.Azure.Management.Compute.Models.VirtualMachineRunCommand * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.Compute.Models.VirtualMachineRunCommand>
<Extension()>
Public Function CreateOrUpdateAsync (operations As IVirtualMachineScaleSetVMRunCommandsOperations, resourceGroupName As String, vmScaleSetName As String, instanceId As String, runCommandName As String, runCommand As VirtualMachineRunCommand, Optional cancellationToken As CancellationToken = Nothing) As Task(Of VirtualMachineRunCommand)

参数

operations
IVirtualMachineScaleSetVMRunCommandsOperations

此扩展方法的操作组。

resourceGroupName
String

资源组的名称。

vmScaleSetName
String

VM 规模集的名称。

instanceId
String

虚拟机的实例 ID。

runCommandName
String

虚拟机运行命令的名称。

runCommand
VirtualMachineRunCommand

提供给创建虚拟机 RunCommand 操作的参数。

cancellationToken
CancellationToken

取消标记。

返回

适用于