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

CostManagementExtensions.GetBenefitRecommendationsAsync 方法

定义

有关购买节省计划的建议列表。

  • 请求路径/{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations
  • 操作IdBenefitRecommendations_List
public static Azure.AsyncPageable<Azure.ResourceManager.CostManagement.Models.BenefitRecommendationModel> GetBenefitRecommendationsAsync (this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string filter = default, string orderby = default, string expand = default, System.Threading.CancellationToken cancellationToken = default);
static member GetBenefitRecommendationsAsync : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * string * string * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.CostManagement.Models.BenefitRecommendationModel>
<Extension()>
Public Function GetBenefitRecommendationsAsync (client As ArmClient, scope As ResourceIdentifier, Optional filter As String = Nothing, Optional orderby As String = Nothing, Optional expand As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of BenefitRecommendationModel)

参数

client
ArmClient

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

scope
ResourceIdentifier

资源将应用于的范围。

filter
String

可用于按以下条件筛选 benefitRecommendations:具有允许值 ['Single', 'Shared'] 和默认值 'Shared' 的属性/范围;和 properties/lookBackPeriod,允许的值 ['Last7Days', 'Last30Days', 'Last60Days'] 和默认值 'Last60Days';properties/term,其允许值 ['P1Y', 'P3Y'] 和默认值 'P3Y';properties/subscriptionId;properties/resourceGroup。

orderby
String

可用于按以下方式对建议进行排序:properties/armSkuName。 对于节省计划,结果默认按顺序排列。 无需使用此子句。

expand
String

可用于通过以下方式扩展属性:properties/usage、properties/allRecommendationDetails。

cancellationToken
CancellationToken

要使用的取消标记。

返回

适用于