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

IVirtualMachineScaleSetsOperations.DeallocateWithHttpMessagesAsync 方法

定义

重载

DeallocateWithHttpMessagesAsync(String, String, IList<String>, Dictionary<String,List<String>>, CancellationToken)

解除分配 VM 规模集中的特定虚拟机。 关闭虚拟机并释放计算资源。 无需为此虚拟机规模集解除分配的计算资源付费。

DeallocateWithHttpMessagesAsync(String, String, Nullable<Boolean>, IList<String>, Dictionary<String,List<String>>, CancellationToken)

解除分配 VM 规模集中的特定虚拟机。 关闭虚拟机并释放计算资源。 无需为此虚拟机规模集解除分配的计算资源付费。

DeallocateWithHttpMessagesAsync(String, String, IList<String>, Dictionary<String,List<String>>, CancellationToken)

解除分配 VM 规模集中的特定虚拟机。 关闭虚拟机并释放计算资源。 无需为此虚拟机规模集解除分配的计算资源付费。

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> DeallocateWithHttpMessagesAsync (string resourceGroupName, string vmScaleSetName, System.Collections.Generic.IList<string> instanceIds, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeallocateWithHttpMessagesAsync : string * string * System.Collections.Generic.IList<string> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse>
Public Function DeallocateWithHttpMessagesAsync (resourceGroupName As String, vmScaleSetName As String, instanceIds As IList(Of String), Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse)

参数

resourceGroupName
String

资源组的名称。

vmScaleSetName
String

VM 规模集的名称。

instanceIds
IList<String>

虚拟机规模集实例 ID。 省略虚拟机规模集实例 ID 将导致在虚拟机规模集中的所有虚拟机上执行操作。

customHeaders
Dictionary<String,List<String>>

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

例外

操作返回无效状态代码时引发

当所需的参数为 null 时引发

适用于

DeallocateWithHttpMessagesAsync(String, String, Nullable<Boolean>, IList<String>, Dictionary<String,List<String>>, CancellationToken)

解除分配 VM 规模集中的特定虚拟机。 关闭虚拟机并释放计算资源。 无需为此虚拟机规模集解除分配的计算资源付费。

public System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse> DeallocateWithHttpMessagesAsync (string resourceGroupName, string vmScaleSetName, bool? hibernate = default, System.Collections.Generic.IList<string> instanceIds = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member DeallocateWithHttpMessagesAsync : string * string * Nullable<bool> * System.Collections.Generic.IList<string> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse>
Public Function DeallocateWithHttpMessagesAsync (resourceGroupName As String, vmScaleSetName As String, Optional hibernate As Nullable(Of Boolean) = Nothing, Optional instanceIds As IList(Of String) = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AzureOperationResponse)

参数

resourceGroupName
String

资源组的名称。

vmScaleSetName
String

VM 规模集的名称。

hibernate
Nullable<Boolean>

用于从 VM 规模集休眠虚拟机的可选参数。 (此功能仅适用于具有灵活 OrchestrationMode 的 VMSS)

instanceIds
IList<String>

虚拟机规模集实例 ID。 省略虚拟机规模集实例 ID 将导致在虚拟机规模集中的所有虚拟机上执行操作。

customHeaders
Dictionary<String,List<String>>

将添加到请求的标头。

cancellationToken
CancellationToken

取消标记。

返回

例外

操作返回无效状态代码时引发

当所需的参数为 null 时引发

适用于