Skip to main content

benefit_recommendations

Creates, updates, deletes, gets or lists a benefit_recommendations resource.

Overview

Namebenefit_recommendations
TypeResource
Idazure.cost_management.benefit_recommendations

Fields

The following fields are returned by SELECT queries:

OK. The request has succeeded.

NameDatatypeDescription
kindstringReservation or SavingsPlan.
propertiesobjectThe properties of the benefit recommendations.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectbillingScope$filter, $orderby, $expandList of recommendations for purchasing savings plan.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
billingScopestringThe scope associated with benefit recommendation operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for enterprise agreement scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billing profile scope
$expandstringMay be used to expand the properties by: properties/usage, properties/allRecommendationDetails
$filterstringCan 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
$orderbystringMay 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.

SELECT examples

List of recommendations for purchasing savings plan.

SELECT
kind,
properties
FROM azure.cost_management.benefit_recommendations
WHERE billingScope = '{{ billingScope }}' -- required
AND $filter = '{{ $filter }}'
AND $orderby = '{{ $orderby }}'
AND $expand = '{{ $expand }}'
;