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

VirtualMachinesOperationsExtensions.BeginPowerOffAsync 方法

定义

关闭电源的操作 (停止) 虚拟机。 可以使用相同的预配资源重启虚拟机。 仍需要为此虚拟机付费。

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

参数

operations
IVirtualMachinesOperations

此扩展方法的操作组。

resourceGroupName
String

资源组的名称。

vmName
String

虚拟机的名称。

skipShutdown
Nullable<Boolean>

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

cancellationToken
CancellationToken

取消标记。

返回

适用于