Cost Sharing Rule Setting Endpoints

Summary

Define a set of rules around how to allocate or distribute the shared costs.

The Rule Object

updatedAt (timestamp): when it was last updated
businessDimension (string): the business dimension whose values will drive cost-sharing
sourceIncludeBuckets: values from the Business Dimension to include
scopeDimension: scopes the cost-sharing to master payer or linked accounts
mapping: the mapping details
      type: proportional, fixed, or even split mapping
      targetExcludeBuckets: what business dimension values to exclude
      metricName: the cost metric to use for this allocation

Example Rule Object

{
    "updatedAt":"2019-03-13T18:31:36.129Z",
    "businessDimension":"category4",
    "sourceIncludeBuckets":[
        "Cloudy Production",
        "Cloudy Consolidated Master"
    ],
    "scopeDimension":"account_identifier",
    "mapping":{
        "type":"ProportionalMapping",
        "targetExcludeBuckets":[
            "Cloudy IAM Account",
            "Cloudy Staging"
    ],
        "metricName":"unblended_cost"
  }
}

Example Cost Sharing Rule Requests

Create a Rule

test testerson

Example Request - Setting Proportional Allocation Rule

Allocate the shared costs to chosen targets proportionally based on the target's direct costs.

Note: metricName is required for the Proportional type (mode) only

curl -X "POST" "https://api.cloudability.com/v3/internal/cost-sharing/rules" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -u '<auth_token>:' \
     -d $'{
  "scopeDimension": "account_identifier",
  "businessDimension": "category1",
  "sourceIncludeBuckets": [
    "CloudX Production",
    "CloudX Consolidated Master"
  ],
  "mapping": {
    "type": "ProportionalMapping",
    "targetExcludeBuckets": [
      "CloudX IAM Account",
      "Other Excluded Bucket"
    ],
    "metricName": "unblended_cost"
  }
}'
{
    "updatedAt":"2019-03-13T18:31:36.129Z",
    "businessDimension":"category4",
    "sourceIncludeBuckets":[
        "CloudX Production",
        "CloudX Consolidated Master"
    ],
    "scopeDimension":"account_identifier",
    "mapping":{
        "type":"ProportionalMapping",
        "targetExcludeBuckets":[
            "CloudX IAM Account",
            "Cloudability Customer Trustee"
    ],
        "metricName":"unblended_cost"
  }
}