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

CognitiveServicesExtensions.GetUsagesAsync 方法

定义

获取所请求订阅的使用情况

  • 请求路径/订阅/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/usages
  • 操作IdUsages_List
public static Azure.AsyncPageable<Azure.ResourceManager.CognitiveServices.Models.ServiceAccountUsage> GetUsagesAsync (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string filter = default, System.Threading.CancellationToken cancellationToken = default);
static member GetUsagesAsync : Azure.ResourceManager.Resources.SubscriptionResource * Azure.Core.AzureLocation * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.CognitiveServices.Models.ServiceAccountUsage>
<Extension()>
Public Function GetUsagesAsync (subscriptionResource As SubscriptionResource, location As AzureLocation, Optional filter As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of ServiceAccountUsage)

参数

subscriptionResource
SubscriptionResource

方法 SubscriptionResource 将对其执行的实例。

location
AzureLocation

资源位置。

filter
String

描述要返回的一部分用法的 OData 筛选器表达式。 支持的参数为 name.value (指标的名称,可以具有) 多个名称的 或 。

cancellationToken
CancellationToken

要使用的取消标记。

返回

的异步集合 ServiceAccountUsage ,可能需要循环访问多个服务请求。

适用于