你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ConsumptionExtensions.GetConsumptionReservationRecommendationDetailsAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
预留实例的 What-if 分析的预留建议的详细信息。
- 请求路径/{resourceScope}/providers/Microsoft.Consumption/reservationRecommendationDetails
- 操作IdReservationRecommendationDetails_Get
public static System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendationDetails>> GetConsumptionReservationRecommendationDetailsAsync (this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendationScope reservationScope, string region, Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendationTerm term, Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendationLookBackPeriod lookBackPeriod, string product, System.Threading.CancellationToken cancellationToken = default);
static member GetConsumptionReservationRecommendationDetailsAsync : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendationScope * string * Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendationTerm * Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendationLookBackPeriod * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Consumption.Models.ConsumptionReservationRecommendationDetails>>
<Extension()>
Public Function GetConsumptionReservationRecommendationDetailsAsync (client As ArmClient, scope As ResourceIdentifier, reservationScope As ConsumptionReservationRecommendationScope, region As String, term As ConsumptionReservationRecommendationTerm, lookBackPeriod As ConsumptionReservationRecommendationLookBackPeriod, product As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ConsumptionReservationRecommendationDetails))
参数
- scope
- ResourceIdentifier
资源将应用于的范围。
- reservationScope
- ConsumptionReservationRecommendationScope
预留的范围。
- region
- String
用于选择应为其生成建议的区域。
指定预留建议期限的长度。
- lookBackPeriod
- ConsumptionReservationRecommendationLookBackPeriod
筛选预留建议结果所基于的时间段。
- product
- String
筛选生成预留建议结果的产品。 示例:VM) 的Standard_DS1_v2 (,托管磁盘) Premium_SSD_Managed_Disks_P30 (。
- cancellationToken
- CancellationToken
要使用的取消标记。
返回
例外
region
或 product
为 null。