provider Cloud Cost Management POST /api/v2/cost/arbitrary_rule
@utdk/datadog /api/v2/cost/arbitrary_rule
Create custom allocation rule
Create a new custom allocation rule with the specified filters and allocation strategy. **Strategy Methods:** - **PROPORTIONAL/EVEN**: Allocates costs proportionally/evenly based on existing costs. Requires: granularity, allocated_by_tag_keys. Optional: based_on_costs, allocated_by_filters, evaluate_grouped_by_tag_keys, evaluate_grouped_by_filters. - **PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES**: Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: evaluate_grouped_by_tag_keys. - **PERCENT**: Allocates fixed percentages to specific tags. Requires: allocated_by (array of percentage allocations). **Filter Conditions:** - Use **value** for single-value conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is all values", "is untagged" - Use **values** for multi-value conditions: "in", "not in" - Cannot use both value and values simultaneously. **Supported operators**: is, is not, is all values, is untagged, contains, does not contain, in, not in, =, !=, like, not like

Try it

Authentication
Configure credentials for Datadog API V2 Collection
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

createcustomallocationrule
POST/api/v2/cost/arbitrary_rule
Create a new custom allocation rule with the specified filters and allocation strategy. **Strategy Methods:** - **PROPORTIONAL/EVEN**: Allocates costs proportionally/evenly based on existing costs. Requires: granularity, allocated_by_tag_keys. Optional: based_on_costs, allocated_by_filters, evaluate_grouped_by_tag_keys, evaluate_grouped_by_filters. - **PROPORTIONAL_TIMESERIES/EVEN_TIMESERIES**: Allocates based on timeseries data. Requires: granularity, based_on_timeseries. Optional: evaluate_grouped_by_tag_keys. - **PERCENT**: Allocates fixed percentages to specific tags. Requires: allocated_by (array of percentage allocations). **Filter Conditions:** - Use **value** for single-value conditions: "is", "is not", "contains", "does not contain", "=", "!=", "like", "not like", "is all values", "is untagged" - Use **values** for multi-value conditions: "in", "not in" - Cannot use both value and values simultaneously. **Supported operators**: is, is not, is all values, is untagged, contains, does not contain, in, not in, =, !=, like, not like

Input

The definition of `ArbitraryCostUpsertRequestData` object.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import datadog from '@utdk/datadog';

await datadog.createcustomallocationrule()