CloudHealth New Experience - Flex report for commitment Discounts (AWS)
search cancel

CloudHealth New Experience - Flex report for commitment Discounts (AWS)

book

Article ID: 414732

calendar_today

Updated On:

Products

CloudHealth

Issue/Introduction

Retrieve AWS commitment discounts and reconcile them with realized savings in the CloudHealth New Experience

Resolution

{
  "sqlStatement": "SELECT timeInterval_Month AS Month, SUM(lineItem_UnblendedCost) AS SUM_lineItem_UnblendedCost, lineItem_LineItemType AS LineItem_LineItemType, SUM(reservation_EffectiveCost) AS SUM_reservation_EffectiveCost, SUM(savingsPlan_SavingsPlanEffectiveCost) AS SUM_savingsPlan_SavingsPlanEffectiveCost, SUM(pricing_publicOnDemandCost) AS SUM_pricing_publicOnDemandCost, SUM(CASE WHEN lineItem_LineItemType = 'DiscountedUsage' THEN pricing_publicOnDemandCost - reservation_EffectiveCost ELSE pricing_publicOnDemandCost - savingsPlan_SavingsPlanEffectiveCost END) AS Committed_Discount FROM AWS_CUR WHERE ((lineItem_LineItemType IN ('DiscountedUsage')) OR (lineItem_LineItemType IN ('SavingsPlanCoveredUsage'))) GROUP BY timeInterval_Month, lineItem_LineItemType ORDER BY Month DESC",
  "needBackLinkingForTags": true,
  "dataGranularity": "MONTHLY",
  "timeRange": {
    "last": 12
  },
  "limit": -1
}