CostAllocationRuleDefinition

The cost allocation rule model definition

Cost ManagementFinOpsCloud CostBillingBudgetsExportCost AnalysisForecastingChargebacksFocusMicrosoft AzureReserved Instances

Properties

Name Type Description
properties object Cost allocation rule properties
View JSON Schema on GitHub

JSON Schema

microsoft-azure-cost-management-cost-allocation-rule-definition-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-cost-management/json-schema/microsoft-azure-cost-management-cost-allocation-rule-definition-schema.json",
  "title": "CostAllocationRuleDefinition",
  "description": "The cost allocation rule model definition",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-cost-management-costallocationruledefinitions-api-openapi.yml#/components/schemas/CostAllocationRuleDefinition",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/CostAllocationRuleProperties",
      "description": "Cost allocation rule properties"
    }
  },
  "allOf": [
    {
      "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource"
    }
  ],
  "$defs": {
    "CostAllocationPolicyType": {
      "type": "string",
      "description": "Method to use for allocating cost. FixedProportion indicates that cost will be split based on specified percentage values.",
      "enum": [
        "FixedProportion"
      ],
      "x-ms-enum": {
        "name": "CostAllocationPolicyType",
        "modelAsString": true,
        "values": [
          {
            "name": "FixedProportion",
            "value": "FixedProportion"
          }
        ]
      }
    },
    "CostAllocationProportion": {
      "type": "object",
      "description": "Target resources and allocation",
      "properties": {
        "name": {
          "type": "string",
          "description": "Target resource for cost allocation"
        },
        "percentage": {
          "type": "number",
          "format": "float",
          "description": "Percentage of source cost to allocate to this resource. This value can be specified to two decimal places and the total percentage of all resources in this rule must sum to 100.00."
        }
      },
      "required": [
        "name",
        "percentage"
      ]
    },
    "CostAllocationResource": {
      "type": "object",
      "description": "Common values for resources for cost allocation",
      "properties": {
        "resourceType": {
          "$ref": "#/$defs/CostAllocationResourceType",
          "description": "Type of resources contained in this cost allocation rule"
        },
        "name": {
          "type": "string",
          "description": "If resource type is dimension, this must be either ResourceGroupName or SubscriptionId. If resource type is tag, this must be a valid Azure tag"
        }
      },
      "required": [
        "resourceType",
        "name"
      ]
    },
    "CostAllocationResourceType": {
      "type": "string",
      "description": "Category of resource to use for allocation.",
      "enum": [
        "Dimension",
        "Tag"
      ],
      "x-ms-enum": {
        "name": "CostAllocationResourceType",
        "modelAsString": true,
        "values": [
          {
            "name": "Dimension",
            "value": "Dimension",
            "description": "Indicates an Azure dimension such as a subscription id or resource group name is being used for allocation."
          },
          {
            "name": "Tag",
            "value": "Tag",
            "description": "Allocates cost based on Azure Tag key value pairs."
          }
        ]
      }
    },
    "CostAllocationRuleDetails": {
      "type": "object",
      "description": "Resource details of the cost allocation rule",
      "properties": {
        "sourceResources": {
          "type": "array",
          "description": "Source resources for cost allocation. At this time, this list can contain no more than one element.",
          "items": {
            "$ref": "#/$defs/SourceCostAllocationResource"
          },
          "x-ms-identifiers": [
            "name"
          ]
        },
        "targetResources": {
          "type": "array",
          "description": "Target resources for cost allocation. At this time, this list can contain no more than one element.",
          "items": {
            "$ref": "#/$defs/TargetCostAllocationResource"
          },
          "x-ms-identifiers": [
            "name"
          ]
        }
      }
    },
    "CostAllocationRuleProperties": {
      "type": "object",
      "description": "The properties of a cost allocation rule",
      "properties": {
        "description": {
          "type": "string",
          "description": "Description of a cost allocation rule."
        },
        "details": {
          "$ref": "#/$defs/CostAllocationRuleDetails",
          "description": "Resource information for the cost allocation rule"
        },
        "status": {
          "$ref": "#/$defs/RuleStatus",
          "description": "Status of the rule"
        },
        "createdDate": {
          "type": "string",
          "format": "date-time",
          "description": "Time at which the rule was created. Rules that change cost for the same resource are applied in order of creation.",
          "readOnly": true
        },
        "updatedDate": {
          "type": "string",
          "format": "date-time",
          "description": "Time at which the rule was last updated.",
          "readOnly": true
        }
      },
      "required": [
        "details",
        "status"
      ]
    },
    "RuleStatus": {
      "type": "string",
      "description": "Current status of the rule.",
      "enum": [
        "NotActive",
        "Active",
        "Processing"
      ],
      "x-ms-enum": {
        "name": "RuleStatus",
        "modelAsString": true,
        "values": [
          {
            "name": "NotActive",
            "value": "NotActive",
            "description": "Rule is saved but not used to allocate costs."
          },
          {
            "name": "Active",
            "value": "Active",
            "description": "Rule is saved and impacting cost allocation."
          },
          {
            "name": "Processing",
            "value": "Processing",
            "description": "Rule is saved and cost allocation is being updated. Readonly value that cannot be submitted in a put request."
          }
        ]
      }
    },
    "SourceCostAllocationResource": {
      "type": "object",
      "description": "Source resources for cost allocation",
      "properties": {
        "values": {
          "type": "array",
          "description": "Source Resources for cost allocation. This list cannot contain more than 25 values.",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "values"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/CostAllocationResource"
        }
      ]
    },
    "TargetCostAllocationResource": {
      "type": "object",
      "description": "Target resources for cost allocation.",
      "properties": {
        "values": {
          "type": "array",
          "description": "Target resources for cost allocation. This list cannot contain more than 25 values.",
          "items": {
            "$ref": "#/$defs/CostAllocationProportion"
          },
          "x-ms-identifiers": [
            "name"
          ]
        },
        "policyType": {
          "$ref": "#/$defs/CostAllocationPolicyType",
          "description": "Method of cost allocation for the rule"
        }
      },
      "required": [
        "values",
        "policyType"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/CostAllocationResource"
        }
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/microsoft-azure-cost-management-cost-allocation-rule-definition"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.