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

VirtualMachinesOperationsExtensions.ListAsync 方法

定义

重载

ListAsync(IVirtualMachinesOperations, String, CancellationToken)

列出指定资源组中的所有虚拟机。 在响应中使用 nextLink 属性获取虚拟机的下一页。

ListAsync(IVirtualMachinesOperations, String, String, String, CancellationToken)

列出指定资源组中的所有虚拟机。 在响应中使用 nextLink 属性获取虚拟机的下一页。

ListAsync(IVirtualMachinesOperations, String, CancellationToken)

列出指定资源组中的所有虚拟机。 在响应中使用 nextLink 属性获取虚拟机的下一页。

public static System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<Microsoft.Azure.Management.Compute.Models.VirtualMachine>> ListAsync (this Microsoft.Azure.Management.Compute.IVirtualMachinesOperations operations, string resourceGroupName, System.Threading.CancellationToken cancellationToken);
static member ListAsync : Microsoft.Azure.Management.Compute.IVirtualMachinesOperations * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<Microsoft.Azure.Management.Compute.Models.VirtualMachine>>
<Extension()>
Public Function ListAsync (operations As IVirtualMachinesOperations, resourceGroupName As String, cancellationToken As CancellationToken) As Task(Of IPage(Of VirtualMachine))

参数

operations
IVirtualMachinesOperations

此扩展方法的操作组。

resourceGroupName
String

资源组的名称。

cancellationToken
CancellationToken

取消标记。

返回

适用于

ListAsync(IVirtualMachinesOperations, String, String, String, CancellationToken)

列出指定资源组中的所有虚拟机。 在响应中使用 nextLink 属性获取虚拟机的下一页。

public static System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<Microsoft.Azure.Management.Compute.Models.VirtualMachine>> ListAsync (this Microsoft.Azure.Management.Compute.IVirtualMachinesOperations operations, string resourceGroupName, string filter = default, string expand = default, System.Threading.CancellationToken cancellationToken = default);
static member ListAsync : Microsoft.Azure.Management.Compute.IVirtualMachinesOperations * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.Azure.IPage<Microsoft.Azure.Management.Compute.Models.VirtualMachine>>
<Extension()>
Public Function ListAsync (operations As IVirtualMachinesOperations, resourceGroupName As String, Optional filter As String = Nothing, Optional expand As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IPage(Of VirtualMachine))

参数

operations
IVirtualMachinesOperations

此扩展方法的操作组。

resourceGroupName
String

资源组的名称。

filter
String

用于筛选响应中返回的 VM 的系统查询选项。 允许的值为“virtualMachineScaleSet/id”eq /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmssName}'

expand
String

要应用于操作的 expand 表达式。 “instanceView”允许提取所有虚拟机的运行时状态,仅当指定了有效的$filter选项时,才能指定此状态。 可能的值包括:“instanceView”

cancellationToken
CancellationToken

取消标记。

返回

适用于