Skip to content

Commit

Permalink
FOCUS #149: CommitmentDiscountId spec changes and supporting content (#…
Browse files Browse the repository at this point in the history
…166)

Closes #149

---------

Co-authored-by: Michael Flanakin <[email protected]>
Co-authored-by: Udam Dewaraja <[email protected]>
Co-authored-by: Andrew Qu <[email protected]>
  • Loading branch information
4 people authored Oct 10, 2023
1 parent 657d1b5 commit bb40fca
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
32 changes: 32 additions & 0 deletions specification/dimensions/commitmentdiscountid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Commitment Discount ID

A commitment-based discount is a contractual commitment for an amount of usage or spend throughout a specified term, in exchange for discounted unit pricing on that amount. The commitment may be based on quantities of resource units or monetary value, with various payment options and time frames.

A Commitment Discount ID is the identifier assigned to a commitment-based discount by the provider. Commitment Discount ID is commonly used for scenarios like chargeback for commitments and savings per commitment-based discount.

The CommitmentDiscountId column MUST be present in the billing data. This column must be of type String and MUST NOT contain null values when a charge is related to a commitment-based discount. When a charge is not associated with a commitment-based discount, the column MUST be null. CommitmentDiscountId MUST be unique within the provider.

## Column ID

CommitmentDiscountId

## Display name

Commitment Discount ID

## Description

The identifier assigned to a commitment-based discount by the provider.

## Content constraints

| Constraint | Value |
|:----------------|:-----------------|
| Column required | True |
| Data type | String |
| Allows nulls | True |
| Value format | \<not specified> |

## Introduced (version)

1.0
1 change: 1 addition & 0 deletions specification/dimensions/dimensions.mdpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dimensions to categorize, filter, and reveal details in your data when grouped w
!INCLUDE "chargeperiodend.md",1
!INCLUDE "chargeperiodstart.md",1
!INCLUDE "chargetype.md",1
!INCLUDE "commitmentdiscountid.md",1
!INCLUDE "invoiceissuer.md",1
!INCLUDE "provider.md",1
!INCLUDE "publisher.md",1
Expand Down
45 changes: 45 additions & 0 deletions supporting_content/dimensions/commitmentdiscountid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Column: CommitmentDiscountId

## Example provider mappings

Current column mappings found in available data sets:

| Provider | Data set | Column |
|-----------|--------------------------|----------------------------------------------------------|
| AWS | CUR | reservation/ReservationARN<br>savingsPlan/SavingsPlanArn |
| GCP | Big Query Billing Export | credits.id |
| Microsoft | Cost details | ReservationId (old)<br>BenefitId (new) |


## Documentation

- AWS: [Reserved Instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-reserved-instances.html), [Savings Plans](https://docs.aws.amazon.com/savingsplans/latest/userguide/what-is-savings-plans.html)
- GCP: [Structure of Standard data export](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables/standard-usage), [Committed Use Discounts](https://cloud.google.com/docs/cuds)
- Microsoft: [Azure Savings Plans](https://learn.microsoft.com/azure/cost-management-billing/savings-plan/savings-plan-compute-overview), [Azure Reservations](https://learn.microsoft.com/azure/cost-management-billing/reservations/save-compute-costs-reservations)


## Example usage scenarios

Current values observed in billing data for various scenarios:

| Provider | Data set | Scenario |
|-----------|----------------------------|------------------------------------------------------------------|
| AWS | CUR | arn:partition:service:region:account-id:reserved-instances/\<id> |
| AWS | CUR | arn:partition:savingsplans:[region]:account-id:savingsplan/\<id> |
| GCP | Big Query Billing Export | \<alphanumeric identifier> |
| GCP | Big Query Billing Export | \<credit description>, i.e. "Committed Use Discount: CPU" |
| Microsoft | Cost details | Commitment order GUID for purchase records |
| Microsoft | Cost details | Commitment instance GUID for amortized usage |


## Discussion / Scratch space:

* Column names considered:
* CommitmentBasedDiscountId
* CommitmentId
* CommitmentDiscountId
* DiscountId
* BenefitId
* In AWS, includes RI and SP, commitments that don’t map 1:1 with a single resource, capacity reservations (i.e. DynamoDB).
* Only commitments were identified to require an explicit id/name.
* The name “commitment” was agreed upon. Applies to both id and name.

0 comments on commit bb40fca

Please sign in to comment.