---
title: "Get custom allocation rule"
method: GET
path: "/api/v2/cost/arbitrary_rule/{rule_id}"
tags: ["Cloud Cost Management"]
---

# Get custom allocation rule

`GET /api/v2/cost/arbitrary_rule/{rule_id}`

Get a specific custom allocation rule - Retrieve a specific custom allocation rule by its ID

## Path parameters

- `rule_id` integer, required

## Response `200`

OK

- ArbitraryRuleResponse — The definition of `ArbitraryRuleResponse` object.
  - `data` ArbitraryRuleResponseData — The definition of `ArbitraryRuleResponseData` object.
    - `attributes` ArbitraryRuleResponseDataAttributes — The definition of `ArbitraryRuleResponseDataAttributes` object.
      - `costs_to_allocate` ArbitraryRuleResponseDataAttributesCostsToAllocateItems[], required — The `attributes` `costs_to_allocate`.
        - `condition` string, required — The `items` `condition`.
        - `tag` string, required — The `items` `tag`.
        - `value` string — The `items` `value`.
        - `values` string[], nullable — The `items` `values`.
      - `created` string, date-time, required — The `attributes` `created`.
      - `enabled` boolean, required — The `attributes` `enabled`.
      - `last_modified_user_uuid` string, required — The `attributes` `last_modified_user_uuid`.
      - `order_id` integer, required — The `attributes` `order_id`.
      - `processing_status` string — The `attributes` `processing_status`.
      - `provider` string[], required — The `attributes` `provider`.
      - `rejected` boolean — The `attributes` `rejected`.
      - `rule_name` string, required — The `attributes` `rule_name`.
      - `strategy` ArbitraryRuleResponseDataAttributesStrategy, required — The definition of `ArbitraryRuleResponseDataAttributesStrategy` object.
        - `allocated_by` ArbitraryRuleResponseDataAttributesStrategyAllocatedByItems[] — The `strategy` `allocated_by`.
          - `allocated_tags` ArbitraryRuleResponseDataAttributesStrategyAllocatedByItemsAllocatedTagsItems[], required — The `items` `allocated_tags`.
            - `key` string, required — The `items` `key`.
            - `value` string, required — The `items` `value`.
          - `percentage` number, double, required — The `items` `percentage`. The numeric value format should be a 32bit float value.
        - `allocated_by_filters` ArbitraryRuleResponseDataAttributesStrategyAllocatedByFiltersItems[] — The `strategy` `allocated_by_filters`.
          - `condition` string, required — The `items` `condition`.
          - `tag` string, required — The `items` `tag`.
          - `value` string — The `items` `value`.
          - `values` string[], nullable — The `items` `values`.
        - `allocated_by_tag_keys` string[] — The `strategy` `allocated_by_tag_keys`.
        - `based_on_costs` ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems[] — The `strategy` `based_on_costs`.
          - `condition` string, required — The `items` `condition`.
          - `tag` string, required — The `items` `tag`.
          - `value` string — The `items` `value`.
          - `values` string[], nullable — The `items` `values`.
        - `based_on_timeseries` object — The rule `strategy` `based_on_timeseries`.
        - `evaluate_grouped_by_filters` ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems[] — The `strategy` `evaluate_grouped_by_filters`.
          - `condition` string, required — The `items` `condition`.
          - `tag` string, required — The `items` `tag`.
          - `value` string — The `items` `value`.
          - `values` string[], nullable — The `items` `values`.
        - `evaluate_grouped_by_tag_keys` string[] — The `strategy` `evaluate_grouped_by_tag_keys`.
        - `granularity` string — The `strategy` `granularity`.
        - `method` string, required — The `strategy` `method`.
      - `type` string, required — The `attributes` `type`.
      - `updated` string, date-time, required — The `attributes` `updated`.
      - `version` integer, required — The `attributes` `version`.
    - `id` string — The `ArbitraryRuleResponseData` `id`.
    - `type` 'arbitrary_rule', required — Arbitrary rule resource type.

## Other responses

- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
