---
title: Delete automatic allocation rule permanently
slug: reference/delete-automatic-allocation-rule-permanently
docTags: 
createdAt: 2025-07-03T16:20:35.017Z
---

{
  "id": "YIc5cW8bdZP4gWRu3Q1jE",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://app.amberflo.io/business-unit/focus-allocation/automatic/rule/{ruleId}",
    "servers": [
      {
        "url": "https://app.amberflo.io/business-unit/focus-allocation/automatic/rule/{ruleId}"
      }
    ],
    "name": "Delete automatic allocation rule permanently",
    "description": "<p>Permanently removes an automatic FOCUS allocation rule from the execution sequence and disables its cost allocation logic.\nDeletion immediately stops rule execution but preserves historical cost allocations already processed by the rule.</p>\n<p>Required parameters:</p>\n<ul>\n<li><code>ruleId</code>: Unique identifier for the rule to delete</li>\n</ul>\n<p>Optional parameters:</p>\n<ul>\n<li><code>tagName</code>: Specific tag context filter for rule deletion validation</li>\n</ul>\n<p><strong>Important considerations:</strong></p>\n<ul>\n<li>Historical cost allocations remain intact after rule deletion</li>\n<li>Rule execution order automatically adjusts after removal</li>\n<li>Deletion cannot be undone - recreate rule if needed</li>\n<li>Costs previously allocated by this rule will not be reassigned</li>\n</ul>\n<p>Returns final rule configuration for confirmation. Use with caution in production environments.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "ruleId",
          "type": "string<uuid>",
          "example": "0e63b938-6785-429b-a89d-c4164144fc88",
          "description": "<p>Unique system-generated identifier for the automatic allocation rule to permanently delete from execution sequence.</p>"
        }
      ],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "tagName",
          "type": "string",
          "description": "<p>FOCUS tag name filter for rule deletion context. Provides additional validation for tag-specific rule removal operations.</p>"
        }
      ],
      "bodyDataParameters": [],
      "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 automatic FOCUS allocation rule configuration with system-generated metadata for cost assignment to business units based on resource tag matching.",
            "customType": "business_unit.focus_allocation.automatic.AutomaticMatchingRule.out",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "System-generated unique identifier for rule tracking. Required for rule updates, deletions, and position management in execution sequence.",
                "example": "0e63b938-6785-429b-a89d-c4164144fc88"
              },
              {
                "name": "provider",
                "kind": "required",
                "type": "string",
                "description": "Cloud provider for cost allocation filtering. Supported values include AWS, AZURE, GOOGLE_CLOUD for targeted rule application.",
                "modelRef": "#/components/schemas/focus.common.FocusProvider.out",
                "customType": "focus.common.FocusProvider.out",
                "schema": []
              },
              {
                "name": "predicate",
                "kind": "required",
                "type": "object",
                "description": "Matching conditions that determine when rule applies to cost records. Defines value matrix logic for resource identification.",
                "modelRef": "#/components/schemas/business_unit.focus_allocation.automatic.predicate.GroupKeyPredicate.out",
                "customType": "business_unit.focus_allocation.automatic.predicate.GroupKeyPredicate.out",
                "schema": [],
                "complexType": "oneOf",
                "complexItems": [
                  {
                    "name": "business_unit.focus_allocation.automatic.predicate.ValueMatrixPredicate.out",
                    "description": "",
                    "modelRef": "#/components/schemas/business_unit.focus_allocation.automatic.predicate.ValueMatrixPredicate.out",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "required",
                        "type": "string",
                        "description": "Predicate type identifier for value matrix matching logic. Always set to 'value_matrix' for matrix-based resource filtering conditions.",
                        "example": "",
                        "default": "value_matrix"
                      },
                      {
                        "name": "columns",
                        "kind": "required",
                        "type": "array",
                        "description": "FOCUS column names for matrix dimension headers. Defines resource attributes used for matching conditions in allocation rules.",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      },
                      {
                        "name": "rows",
                        "kind": "required",
                        "type": "array",
                        "description": "Matrix row definitions containing value combinations for resource matching. Each row represents specific resource attribute criteria for rule application.",
                        "modelRef": "#/components/schemas/business_unit.focus_allocation.automatic.predicate.ValueMatrixPredicate.ValueMatrixRow.out",
                        "customType": "business_unit.focus_allocation.automatic.predicate.ValueMatrixPredicate.ValueMatrixRow.out[]",
                        "schema": [
                          {
                            "name": "values",
                            "kind": "required",
                            "type": "array",
                            "description": "Array of string values corresponding to matrix columns for resource matching. Each element matches position in predicate column array.",
                            "example": "",
                            "itemType": "string",
                            "customType": "string[]",
                            "itemExample": "",
                            "itemDefault": ""
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "name": "tagName",
                "kind": "optional",
                "type": "string",
                "description": "FOCUS tag key for cost allocation target. Specifies resource tag name used for business unit assignment mapping.",
                "example": ""
              },
              {
                "name": "tagValue",
                "kind": "optional",
                "type": "string",
                "description": "Specific FOCUS tag value to match for cost allocation. Must be used with tagName for targeted resource matching.",
                "example": ""
              },
              {
                "name": "businessUnitId",
                "kind": "optional",
                "type": "string",
                "description": "Target business unit identifier for cost assignment. Alternative to tagName/tagValue approach for direct business unit allocation.",
                "example": ""
              },
              {
                "name": "label",
                "kind": "optional",
                "type": "string",
                "description": "Human-readable display name for rule management and identification. Used for administrative organization and rule tracking purposes.",
                "example": ""
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "Detailed explanation of rule purpose and allocation logic. Provides context for rule configuration and business unit cost assignment.",
                "example": ""
              },
              {
                "name": "enabled",
                "kind": "optional",
                "type": "boolean",
                "description": "Rule activation status for automatic cost allocation processing. Controls whether rule participates in allocation execution sequence.",
                "example": ""
              },
              {
                "name": "createTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Rule creation timestamp in Unix time milliseconds. Tracks when automatic allocation rule was first established in system.",
                "example": 0
              },
              {
                "name": "updateTimeInMillis",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Rule modification timestamp in Unix time milliseconds. Tracks when automatic allocation rule configuration was last changed.",
                "example": 0
              }
            ],
            "modelRef": "#/components/schemas/business_unit.focus_allocation.automatic.AutomaticMatchingRule.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "cnVUlkfXHhR4vZ0BIWkok",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url https://app.amberflo.io/business-unit/focus-allocation/automatic/rule/{ruleId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "nzAZX5x6Dvzt9lkMo0B1t",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/business-unit/focus-allocation/automatic/rule/{ruleId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "lGVPMs0rE22xhu8RuNnC9",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/business-unit/focus-allocation/automatic/rule/{ruleId}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "mNMsdefCYhDbZ4EQsOWxw",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/business-unit/focus-allocation/automatic/rule/{ruleId}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "cnVUlkfXHhR4vZ0BIWkok"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful request\n{\n  \"id\": \"0e63b938-6785-429b-a89d-c4164144fc88\",\n  \"provider\": \"\",\n  \"predicate\": {},\n  \"tagName\": \"\",\n  \"tagValue\": \"\",\n  \"businessUnitId\": \"\",\n  \"label\": \"\",\n  \"description\": \"\",\n  \"enabled\": false,\n  \"createTimeInMillis\": \"\",\n  \"updateTimeInMillis\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": "",
      "id": "q1TofdVBKSeYPe9iv1NRj"
    }
  ]
}