---
title: Update manual cost distribution percentages
slug: reference/update-manual-cost-distribution-percentages
createdAt: 2025-07-03T16:20:35.017Z
---

{
  "id": "MIrSNauIPsNY3fJzG74Ym",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "https://app.amberflo.io/business-unit/focus-allocation/manual",
    "servers": [
      {
        "url": "https://app.amberflo.io/business-unit/focus-allocation/manual"
      }
    ],
    "name": "Update manual cost distribution percentages",
    "description": "<p>Updates an existing manual FOCUS allocation policy that distributes cloud costs to business units using fixed percentage rules.\nModifies policy properties including distribution percentages, time periods, and service scope while maintaining cost allocation integrity.</p>\n<p>Required request body fields:</p>\n<ul>\n<li><code>provider</code>: Cloud provider for the policy (must match existing policy)</li>\n<li><code>service</code>: Cloud service name for cost allocation scope (must match existing policy)</li>\n<li><code>policy</code>: Updated distribution rule with business unit allocation percentages</li>\n<li><code>startTimeInSeconds</code>: Updated policy activation time in Unix timestamp seconds</li>\n</ul>\n<p>Optional request body fields:</p>\n<ul>\n<li><code>endTimeInSeconds</code>: Updated policy expiration time for time-bounded allocations</li>\n</ul>\n<p><strong>Important considerations:</strong></p>\n<ul>\n<li>Updated allocation percentages in policy must sum to 100.0 for complete cost distribution</li>\n<li>Provider and service combination identifies the policy to update - cannot be changed</li>\n<li>Business unit IDs in updated allocations must exist in the account's business unit registry</li>\n<li>Updated time periods cannot overlap with other existing policies for same provider/service</li>\n<li>Historical cost allocations using previous percentages remain unchanged</li>\n</ul>\n<p>Returns updated policy with modified timestamp and complete configuration.\nUse this endpoint to adjust cost distribution rules while maintaining allocation history.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Input model for creating manual FOCUS allocation policies that distribute cloud costs to business units using fixed percentage rules overriding automatic allocation.",
          "customType": "business_unit.focus_allocation.manual.ManualFocusAllocationPolicy.in",
          "schema": [
            {
              "name": "provider",
              "kind": "required",
              "type": "string",
              "description": "Cloud provider for cost allocation policy. Supported values include AWS, AZURE, GOOGLE_CLOUD for targeted service cost distribution.",
              "modelRef": "#/components/schemas/focus.common.FocusProvider.in",
              "customType": "focus.common.FocusProvider.in",
              "schema": []
            },
            {
              "name": "service",
              "kind": "required",
              "type": "string",
              "description": "Specific cloud service name for cost allocation scope. Defines service boundaries for manual percentage-based cost distribution rules.",
              "example": ""
            },
            {
              "name": "policy",
              "kind": "required",
              "type": "object",
              "description": "Distribution rule containing business unit allocation percentages. Defines how costs are divided among business units using fixed ratios.",
              "modelRef": "#/components/schemas/business_unit.focus_allocation.manual.rules.SimpleDistributionRule.in",
              "customType": "business_unit.focus_allocation.manual.rules.SimpleDistributionRule.in",
              "schema": [
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Rule type identifier for simple distribution logic. Always set to 'simple_distribution' for percentage-based cost allocation rules.",
                  "example": "",
                  "default": "simple_distribution"
                },
                {
                  "name": "allocations",
                  "kind": "required",
                  "type": "map",
                  "description": "Map of business unit IDs to allocation percentages. Keys are business unit identifiers, values are decimal percentages totaling 100.0.",
                  "example": "",
                  "customType": "map<string, number>",
                  "schema": []
                }
              ]
            },
            {
              "name": "startTimeInSeconds",
              "kind": "required",
              "type": "integer<int64>",
              "description": "Policy activation timestamp in Unix seconds format. Defines when manual allocation rule begins applying to cloud service costs.",
              "example": 0
            },
            {
              "name": "endTimeInSeconds",
              "kind": "optional",
              "type": "integer<int64>",
              "description": "Policy expiration timestamp in Unix seconds format. Optional end time for time-bounded manual allocation rule application periods.",
              "example": 0
            }
          ],
          "modelRef": "#/components/schemas/business_unit.focus_allocation.manual.ManualFocusAllocationPolicy.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Complete manual FOCUS allocation policy configuration with system metadata for distributing cloud costs using fixed percentage rules that override automatic allocation.",
            "customType": "business_unit.focus_allocation.manual.ManualFocusAllocationPolicy.out",
            "schema": [
              {
                "name": "provider",
                "kind": "required",
                "type": "string",
                "description": "Cloud provider for cost allocation policy. Supported values include AWS, AZURE, GOOGLE_CLOUD for targeted service cost distribution.",
                "modelRef": "#/components/schemas/focus.common.FocusProvider.out",
                "customType": "focus.common.FocusProvider.out",
                "schema": []
              },
              {
                "name": "service",
                "kind": "required",
                "type": "string",
                "description": "Specific cloud service name for cost allocation scope. Defines service boundaries for manual percentage-based cost distribution rules.",
                "example": ""
              },
              {
                "name": "policy",
                "kind": "required",
                "type": "object",
                "description": "Distribution rule containing business unit allocation percentages. Defines how costs are divided among business units using fixed ratios.",
                "modelRef": "#/components/schemas/business_unit.focus_allocation.manual.rules.SimpleDistributionRule.out",
                "customType": "business_unit.focus_allocation.manual.rules.SimpleDistributionRule.out",
                "schema": [
                  {
                    "name": "type",
                    "kind": "required",
                    "type": "string",
                    "description": "Rule type identifier for simple distribution logic. Always set to 'simple_distribution' for percentage-based cost allocation rules.",
                    "example": "",
                    "default": "simple_distribution"
                  },
                  {
                    "name": "allocations",
                    "kind": "required",
                    "type": "map",
                    "description": "Map of business unit IDs to allocation percentages. Keys are business unit identifiers, values are decimal percentages totaling 100.0.",
                    "example": "",
                    "customType": "map<string, number>",
                    "schema": []
                  }
                ]
              },
              {
                "name": "startTimeInSeconds",
                "kind": "required",
                "type": "integer<int64>",
                "description": "Policy activation timestamp in Unix seconds format. Defines when manual allocation rule begins applying to cloud service costs.",
                "example": 0
              },
              {
                "name": "endTimeInSeconds",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Policy expiration timestamp in Unix seconds format. Optional end time for time-bounded manual allocation rule application periods.",
                "example": 0
              },
              {
                "name": "createTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Policy creation timestamp in Unix milliseconds format. Tracks when manual allocation policy was first established in system.",
                "example": 0
              },
              {
                "name": "updateTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Policy modification timestamp in Unix milliseconds format. Tracks when manual allocation policy configuration was last changed.",
                "example": 0
              }
            ],
            "modelRef": "#/components/schemas/business_unit.focus_allocation.manual.ManualFocusAllocationPolicy.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url https://app.amberflo.io/business-unit/focus-allocation/manual \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"provider\": \"\",\n     \"service\": \"\",\n     \"policy\": {\n     \"type\": \"simple_distribution\",\n     \"allocations\": \"\"\n     },\n     \"startTimeInSeconds\": 0\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"provider\": \"\",\n   \"service\": \"\",\n   \"policy\": {\n      \"type\": \"simple_distribution\",\n      \"allocations\": \"\"\n   },\n   \"startTimeInSeconds\": 0\n});\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/business-unit/focus-allocation/manual\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/business-unit/focus-allocation/manual\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"provider\": \"\",\n   \"service\": \"\",\n   \"policy\": {\n      \"type\": \"simple_distribution\",\n      \"allocations\": \"\"\n   },\n   \"startTimeInSeconds\": 0\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/business-unit/focus-allocation/manual\"\n\npayload = json.dumps({\n   \"provider\": \"\",\n   \"service\": \"\",\n   \"policy\": {\n      \"type\": \"simple_distribution\",\n      \"allocations\": \"\"\n   },\n   \"startTimeInSeconds\": 0\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful request\n{\n  \"provider\": \"\",\n  \"service\": \"\",\n  \"policy\": {\n    \"type\": \"\",\n    \"allocations\": \"\"\n  },\n  \"startTimeInSeconds\": \"\",\n  \"endTimeInSeconds\": \"\",\n  \"createTimeInMillis\": \"\",\n  \"updateTimeInMillis\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": "",
      "id": "JopneEdhOjRpKKMQpKPdD"
    }
  ]
}