CostManagementExtensions.GetBenefitRecommendationsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
List of recommendations for purchasing savings plan.
- Request Path: /{billingScope}/providers/Microsoft.CostManagement/benefitRecommendations
- Operation Id: BenefitRecommendations_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)
Parameters
- scope
- ResourceIdentifier
The scope that the resource will apply against.
- filter
- String
Can be used to filter benefitRecommendations by: properties/scope with allowed values ['Single', 'Shared'] and default value 'Shared'; and properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last60Days'; properties/term with allowed values ['P1Y', 'P3Y'] and default value 'P3Y'; properties/subscriptionId; properties/resourceGroup.
- orderby
- String
May be used to order the recommendations by: properties/armSkuName. For the savings plan, the results are in order by default. There is no need to use this clause.
- expand
- String
May be used to expand the properties by: properties/usage, properties/allRecommendationDetails.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
client
is null.
Applies to
Azure SDK for .NET