Share via


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

VirtualMachineScaleSetVMsOperationsExtensions.BeginPowerOffAsync 方法

定义

关闭 (停止) VM 规模集中的虚拟机。 请注意,资源仍附加,需要为资源付费。 相反,请使用解除分配来释放资源并避免产生费用。

public static System.Threading.Tasks.Task BeginPowerOffAsync (this Microsoft.Azure.Management.Compute.IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, bool? skipShutdown = False, System.Threading.CancellationToken cancellationToken = default);
static member BeginPowerOffAsync : Microsoft.Azure.Management.Compute.IVirtualMachineScaleSetVMsOperations * string * string * string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function BeginPowerOffAsync (operations As IVirtualMachineScaleSetVMsOperations, resourceGroupName As String, vmScaleSetName As String, instanceId As String, Optional skipShutdown As Nullable(Of Boolean) = False, Optional cancellationToken As CancellationToken = Nothing) As Task

参数

operations
IVirtualMachineScaleSetVMsOperations

此扩展方法的操作组。

resourceGroupName
String

资源组的名称。

vmScaleSetName
String

VM 规模集的名称。

instanceId
String

虚拟机的实例 ID。

skipShutdown
Nullable<Boolean>

用于请求非正常 VM 关闭的参数。 此标志的 True 值指示非正常关闭,而 false 指示否则。 如果未指定此标志的默认值为 false

cancellationToken
CancellationToken

取消标记。

返回

适用于