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

ConsumptionExtensions.GetConsumptionReservationRecommendationsAsync 方法

定义

有关购买预留实例的建议列表。

  • 请求路径/{resourceScope}/providers/Microsoft.Consumption/reservationRecommendations
  • 操作IdReservationRecommendations_List
public static Azure.AsyncPageable<Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendation> GetConsumptionReservationRecommendationsAsync (this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string filter = default, System.Threading.CancellationToken cancellationToken = default);
static member GetConsumptionReservationRecommendationsAsync : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendation>
<Extension()>
Public Function GetConsumptionReservationRecommendationsAsync (client As ArmClient, scope As ResourceIdentifier, Optional filter As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of ConsumptionReservationRecommendation)

参数

client
ArmClient

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

scope
ResourceIdentifier

资源将应用于的范围。

filter
String

可用于按以下条件筛选 reservationRecommendations:具有允许值 ['Single', 'Shared'] 和默认值 'Single' 的属性/范围;properties/resourceType with allowed values ['VirtualMachines', “SQLDatabases”、“PostgreSQL”、“ManagedDisk”、“MySQL”、“RedHat”、“MariaDB”、“RedisCache”、“CosmosDB”、“SqlDataWarehouse”、“SUSELinux”、“AppService”、“BlockBlob”、“AzureDataExplorer”、“VMwareCloudSimple”和默认值“VirtualMachines”;和 properties/lookBackPeriod,允许的值 ['Last7Days', 'Last30Days', 'Last60Days'] 和默认值 'Last7Days'。

cancellationToken
CancellationToken

要使用的取消标记。

返回

适用于