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

SubscriptionsOperationsExtensions.ListLocationsAsync 方法

定义

获取所有可用的地理位置。

public static System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Azure.Management.ResourceManager.Models.Location>> ListLocationsAsync (this Microsoft.Azure.Management.ResourceManager.ISubscriptionsOperations operations, string subscriptionId, bool? includeExtendedLocations = default, System.Threading.CancellationToken cancellationToken = default);
static member ListLocationsAsync : Microsoft.Azure.Management.ResourceManager.ISubscriptionsOperations * string * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.Azure.Management.ResourceManager.Models.Location>>
<Extension()>
Public Function ListLocationsAsync (operations As ISubscriptionsOperations, subscriptionId As String, Optional includeExtendedLocations As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IEnumerable(Of Location))

参数

operations
ISubscriptionsOperations

此扩展方法的操作组。

subscriptionId
String

目标订阅的 ID。

includeExtendedLocations
Nullable<Boolean>

是否包括扩展位置。

cancellationToken
CancellationToken

取消标记。

返回

注解

此操作提供资源提供程序可用的所有位置;但是,每个资源提供程序都可能支持此列表的子集。

适用于