Datadog v4.58.0 published on Thursday, Oct 16, 2025 by Pulumi
datadog.getCustomAllocationRule
Use this data source to retrieve information about an existing custom allocation rule.
Using getCustomAllocationRule
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getCustomAllocationRule(args: GetCustomAllocationRuleArgs, opts?: InvokeOptions): Promise<GetCustomAllocationRuleResult>
function getCustomAllocationRuleOutput(args: GetCustomAllocationRuleOutputArgs, opts?: InvokeOptions): Output<GetCustomAllocationRuleResult>
def get_custom_allocation_rule(costs_to_allocates: Optional[Sequence[GetCustomAllocationRuleCostsToAllocate]] = None,
rule_id: Optional[int] = None,
strategy: Optional[GetCustomAllocationRuleStrategy] = None,
opts: Optional[InvokeOptions] = None) -> GetCustomAllocationRuleResult
def get_custom_allocation_rule_output(costs_to_allocates: Optional[pulumi.Input[Sequence[pulumi.Input[GetCustomAllocationRuleCostsToAllocateArgs]]]] = None,
rule_id: Optional[pulumi.Input[int]] = None,
strategy: Optional[pulumi.Input[GetCustomAllocationRuleStrategyArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCustomAllocationRuleResult]
func LookupCustomAllocationRule(ctx *Context, args *LookupCustomAllocationRuleArgs, opts ...InvokeOption) (*LookupCustomAllocationRuleResult, error)
func LookupCustomAllocationRuleOutput(ctx *Context, args *LookupCustomAllocationRuleOutputArgs, opts ...InvokeOption) LookupCustomAllocationRuleResultOutput
> Note: This function is named LookupCustomAllocationRule
in the Go SDK.
public static class GetCustomAllocationRule
{
public static Task<GetCustomAllocationRuleResult> InvokeAsync(GetCustomAllocationRuleArgs args, InvokeOptions? opts = null)
public static Output<GetCustomAllocationRuleResult> Invoke(GetCustomAllocationRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCustomAllocationRuleResult> getCustomAllocationRule(GetCustomAllocationRuleArgs args, InvokeOptions options)
public static Output<GetCustomAllocationRuleResult> getCustomAllocationRule(GetCustomAllocationRuleArgs args, InvokeOptions options)
fn::invoke:
function: datadog:index/getCustomAllocationRule:getCustomAllocationRule
arguments:
# arguments dictionary
The following arguments are supported:
- Costs
To List<GetAllocates Custom Allocation Rule Costs To Allocate> - Rule
Id int - The ID of the custom allocation rule to retrieve.
- Strategy
Get
Custom Allocation Rule Strategy
- Costs
To []GetAllocates Custom Allocation Rule Costs To Allocate - Rule
Id int - The ID of the custom allocation rule to retrieve.
- Strategy
Get
Custom Allocation Rule Strategy
- costs
To List<GetAllocates Custom Allocation Rule Costs To Allocate> - rule
Id Integer - The ID of the custom allocation rule to retrieve.
- strategy
Get
Custom Allocation Rule Strategy
- costs
To GetAllocates Custom Allocation Rule Costs To Allocate[] - rule
Id number - The ID of the custom allocation rule to retrieve.
- strategy
Get
Custom Allocation Rule Strategy
- costs_
to_ Sequence[Getallocates Custom Allocation Rule Costs To Allocate] - rule_
id int - The ID of the custom allocation rule to retrieve.
- strategy
Get
Custom Allocation Rule Strategy
- costs
To List<Property Map>Allocates - rule
Id Number - The ID of the custom allocation rule to retrieve.
- strategy Property Map
getCustomAllocationRule Result
The following output properties are available:
- Created string
- The timestamp (in ISO 8601 format) when the rule was created.
- Enabled bool
- Whether the custom allocation rule is enabled.
- Id string
- The ID of this resource.
- Last
Modified stringUser Uuid - The UUID of the user who last modified the rule.
- Order
Id int - The order of the rule in the list of custom allocation rules.
- Providernames List<string>
- List of cloud providers the rule applies to (e.g.,
aws
,azure
,gcp
). - Rejected bool
- Whether the rule was rejected by Datadog due to runtime errors. This field can be updated well after the rule was created. If rejected this rule is treated as disabled until modified where the rejection status is reset.
- Rule
Name string - The unique name of the custom allocation rule.
- Type string
- The type of the custom allocation rule. This is always
shared
currently. - Updated string
- The timestamp (in ISO 8601 format) when the rule was last updated.
- Version string
- The version number of the rule.
- Costs
To List<GetAllocates Custom Allocation Rule Costs To Allocate> - Rule
Id int - The ID of the custom allocation rule to retrieve.
- Strategy
Get
Custom Allocation Rule Strategy
- Created string
- The timestamp (in ISO 8601 format) when the rule was created.
- Enabled bool
- Whether the custom allocation rule is enabled.
- Id string
- The ID of this resource.
- Last
Modified stringUser Uuid - The UUID of the user who last modified the rule.
- Order
Id int - The order of the rule in the list of custom allocation rules.
- Providernames []string
- List of cloud providers the rule applies to (e.g.,
aws
,azure
,gcp
). - Rejected bool
- Whether the rule was rejected by Datadog due to runtime errors. This field can be updated well after the rule was created. If rejected this rule is treated as disabled until modified where the rejection status is reset.
- Rule
Name string - The unique name of the custom allocation rule.
- Type string
- The type of the custom allocation rule. This is always
shared
currently. - Updated string
- The timestamp (in ISO 8601 format) when the rule was last updated.
- Version string
- The version number of the rule.
- Costs
To []GetAllocates Custom Allocation Rule Costs To Allocate - Rule
Id int - The ID of the custom allocation rule to retrieve.
- Strategy
Get
Custom Allocation Rule Strategy
- created String
- The timestamp (in ISO 8601 format) when the rule was created.
- enabled Boolean
- Whether the custom allocation rule is enabled.
- id String
- The ID of this resource.
- last
Modified StringUser Uuid - The UUID of the user who last modified the rule.
- order
Id Integer - The order of the rule in the list of custom allocation rules.
- providernames List<String>
- List of cloud providers the rule applies to (e.g.,
aws
,azure
,gcp
). - rejected Boolean
- Whether the rule was rejected by Datadog due to runtime errors. This field can be updated well after the rule was created. If rejected this rule is treated as disabled until modified where the rejection status is reset.
- rule
Name String - The unique name of the custom allocation rule.
- type String
- The type of the custom allocation rule. This is always
shared
currently. - updated String
- The timestamp (in ISO 8601 format) when the rule was last updated.
- version String
- The version number of the rule.
- costs
To List<GetAllocates Custom Allocation Rule Costs To Allocate> - rule
Id Integer - The ID of the custom allocation rule to retrieve.
- strategy
Get
Custom Allocation Rule Strategy
- created string
- The timestamp (in ISO 8601 format) when the rule was created.
- enabled boolean
- Whether the custom allocation rule is enabled.
- id string
- The ID of this resource.
- last
Modified stringUser Uuid - The UUID of the user who last modified the rule.
- order
Id number - The order of the rule in the list of custom allocation rules.
- providernames string[]
- List of cloud providers the rule applies to (e.g.,
aws
,azure
,gcp
). - rejected boolean
- Whether the rule was rejected by Datadog due to runtime errors. This field can be updated well after the rule was created. If rejected this rule is treated as disabled until modified where the rejection status is reset.
- rule
Name string - The unique name of the custom allocation rule.
- type string
- The type of the custom allocation rule. This is always
shared
currently. - updated string
- The timestamp (in ISO 8601 format) when the rule was last updated.
- version string
- The version number of the rule.
- costs
To GetAllocates Custom Allocation Rule Costs To Allocate[] - rule
Id number - The ID of the custom allocation rule to retrieve.
- strategy
Get
Custom Allocation Rule Strategy
- created str
- The timestamp (in ISO 8601 format) when the rule was created.
- enabled bool
- Whether the custom allocation rule is enabled.
- id str
- The ID of this resource.
- last_
modified_ struser_ uuid - The UUID of the user who last modified the rule.
- order_
id int - The order of the rule in the list of custom allocation rules.
- providernames Sequence[str]
- List of cloud providers the rule applies to (e.g.,
aws
,azure
,gcp
). - rejected bool
- Whether the rule was rejected by Datadog due to runtime errors. This field can be updated well after the rule was created. If rejected this rule is treated as disabled until modified where the rejection status is reset.
- rule_
name str - The unique name of the custom allocation rule.
- type str
- The type of the custom allocation rule. This is always
shared
currently. - updated str
- The timestamp (in ISO 8601 format) when the rule was last updated.
- version str
- The version number of the rule.
- costs_
to_ Sequence[Getallocates Custom Allocation Rule Costs To Allocate] - rule_
id int - The ID of the custom allocation rule to retrieve.
- strategy
Get
Custom Allocation Rule Strategy
- created String
- The timestamp (in ISO 8601 format) when the rule was created.
- enabled Boolean
- Whether the custom allocation rule is enabled.
- id String
- The ID of this resource.
- last
Modified StringUser Uuid - The UUID of the user who last modified the rule.
- order
Id Number - The order of the rule in the list of custom allocation rules.
- providernames List<String>
- List of cloud providers the rule applies to (e.g.,
aws
,azure
,gcp
). - rejected Boolean
- Whether the rule was rejected by Datadog due to runtime errors. This field can be updated well after the rule was created. If rejected this rule is treated as disabled until modified where the rejection status is reset.
- rule
Name String - The unique name of the custom allocation rule.
- type String
- The type of the custom allocation rule. This is always
shared
currently. - updated String
- The timestamp (in ISO 8601 format) when the rule was last updated.
- version String
- The version number of the rule.
- costs
To List<Property Map>Allocates - rule
Id Number - The ID of the custom allocation rule to retrieve.
- strategy Property Map
Supporting Types
GetCustomAllocationRuleCostsToAllocate
- Condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - Tag string
- The tag key used in the filter.
- Value string
- The tag value used in the filter (for single-value conditions).
- Values List<string>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- Condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - Tag string
- The tag key used in the filter.
- Value string
- The tag value used in the filter (for single-value conditions).
- Values []string
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition String
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag String
- The tag key used in the filter.
- value String
- The tag value used in the filter (for single-value conditions).
- values List<String>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag string
- The tag key used in the filter.
- value string
- The tag value used in the filter (for single-value conditions).
- values string[]
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition str
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag str
- The tag key used in the filter.
- value str
- The tag value used in the filter (for single-value conditions).
- values Sequence[str]
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition String
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag String
- The tag key used in the filter.
- value String
- The tag value used in the filter (for single-value conditions).
- values List<String>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
GetCustomAllocationRuleStrategy
- Allocated
By List<string>Tag Keys - List of tag keys used to allocate costs.
- Evaluate
Grouped List<string>By Tag Keys - List of tag keys used to group costs before allocation.
- Granularity string
- The granularity level for cost allocation (
daily
ormonthly
). - Method string
- The allocation method. Valid values are
even
,proportional
,proportional_timeseries
, orpercent
. - Allocated
Bies List<GetCustom Allocation Rule Strategy Allocated By> - Allocated
By List<GetFilters Custom Allocation Rule Strategy Allocated By Filter> - Based
On List<GetCosts Custom Allocation Rule Strategy Based On Cost> - Based
On GetTimeseries Custom Allocation Rule Strategy Based On Timeseries - Evaluate
Grouped List<GetBy Filters Custom Allocation Rule Strategy Evaluate Grouped By Filter>
- Allocated
By []stringTag Keys - List of tag keys used to allocate costs.
- Evaluate
Grouped []stringBy Tag Keys - List of tag keys used to group costs before allocation.
- Granularity string
- The granularity level for cost allocation (
daily
ormonthly
). - Method string
- The allocation method. Valid values are
even
,proportional
,proportional_timeseries
, orpercent
. - Allocated
Bies []GetCustom Allocation Rule Strategy Allocated By - Allocated
By []GetFilters Custom Allocation Rule Strategy Allocated By Filter - Based
On []GetCosts Custom Allocation Rule Strategy Based On Cost - Based
On GetTimeseries Custom Allocation Rule Strategy Based On Timeseries - Evaluate
Grouped []GetBy Filters Custom Allocation Rule Strategy Evaluate Grouped By Filter
- allocated
By List<String>Tag Keys - List of tag keys used to allocate costs.
- evaluate
Grouped List<String>By Tag Keys - List of tag keys used to group costs before allocation.
- granularity String
- The granularity level for cost allocation (
daily
ormonthly
). - method String
- The allocation method. Valid values are
even
,proportional
,proportional_timeseries
, orpercent
. - allocated
Bies List<GetCustom Allocation Rule Strategy Allocated By> - allocated
By List<GetFilters Custom Allocation Rule Strategy Allocated By Filter> - based
On List<GetCosts Custom Allocation Rule Strategy Based On Cost> - based
On GetTimeseries Custom Allocation Rule Strategy Based On Timeseries - evaluate
Grouped List<GetBy Filters Custom Allocation Rule Strategy Evaluate Grouped By Filter>
- allocated
By string[]Tag Keys - List of tag keys used to allocate costs.
- evaluate
Grouped string[]By Tag Keys - List of tag keys used to group costs before allocation.
- granularity string
- The granularity level for cost allocation (
daily
ormonthly
). - method string
- The allocation method. Valid values are
even
,proportional
,proportional_timeseries
, orpercent
. - allocated
Bies GetCustom Allocation Rule Strategy Allocated By[] - allocated
By GetFilters Custom Allocation Rule Strategy Allocated By Filter[] - based
On GetCosts Custom Allocation Rule Strategy Based On Cost[] - based
On GetTimeseries Custom Allocation Rule Strategy Based On Timeseries - evaluate
Grouped GetBy Filters Custom Allocation Rule Strategy Evaluate Grouped By Filter[]
- allocated_
by_ Sequence[str]tag_ keys - List of tag keys used to allocate costs.
- evaluate_
grouped_ Sequence[str]by_ tag_ keys - List of tag keys used to group costs before allocation.
- granularity str
- The granularity level for cost allocation (
daily
ormonthly
). - method str
- The allocation method. Valid values are
even
,proportional
,proportional_timeseries
, orpercent
. - allocated_
bies Sequence[GetCustom Allocation Rule Strategy Allocated By] - allocated_
by_ Sequence[Getfilters Custom Allocation Rule Strategy Allocated By Filter] - based_
on_ Sequence[Getcosts Custom Allocation Rule Strategy Based On Cost] - based_
on_ Gettimeseries Custom Allocation Rule Strategy Based On Timeseries - evaluate_
grouped_ Sequence[Getby_ filters Custom Allocation Rule Strategy Evaluate Grouped By Filter]
- allocated
By List<String>Tag Keys - List of tag keys used to allocate costs.
- evaluate
Grouped List<String>By Tag Keys - List of tag keys used to group costs before allocation.
- granularity String
- The granularity level for cost allocation (
daily
ormonthly
). - method String
- The allocation method. Valid values are
even
,proportional
,proportional_timeseries
, orpercent
. - allocated
Bies List<Property Map> - allocated
By List<Property Map>Filters - based
On List<Property Map>Costs - based
On Property MapTimeseries - evaluate
Grouped List<Property Map>By Filters
GetCustomAllocationRuleStrategyAllocatedBy
- Percentage double
- The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
- List<Get
Custom Allocation Rule Strategy Allocated By Allocated Tag>
- Percentage float64
- The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
- []Get
Custom Allocation Rule Strategy Allocated By Allocated Tag
- percentage Double
- The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
- List<Get
Custom Allocation Rule Strategy Allocated By Allocated Tag>
- percentage number
- The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
- Get
Custom Allocation Rule Strategy Allocated By Allocated Tag[]
- percentage float
- The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
- Sequence[Get
Custom Allocation Rule Strategy Allocated By Allocated Tag]
- percentage Number
- The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
- List<Property Map>
GetCustomAllocationRuleStrategyAllocatedByAllocatedTag
GetCustomAllocationRuleStrategyAllocatedByFilter
- Condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - Tag string
- The tag key used in the filter.
- Value string
- The tag value used in the filter (for single-value conditions).
- Values List<string>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- Condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - Tag string
- The tag key used in the filter.
- Value string
- The tag value used in the filter (for single-value conditions).
- Values []string
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition String
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag String
- The tag key used in the filter.
- value String
- The tag value used in the filter (for single-value conditions).
- values List<String>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag string
- The tag key used in the filter.
- value string
- The tag value used in the filter (for single-value conditions).
- values string[]
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition str
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag str
- The tag key used in the filter.
- value str
- The tag value used in the filter (for single-value conditions).
- values Sequence[str]
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition String
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag String
- The tag key used in the filter.
- value String
- The tag value used in the filter (for single-value conditions).
- values List<String>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
GetCustomAllocationRuleStrategyBasedOnCost
- Condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - Tag string
- The tag key used in the filter.
- Value string
- The tag value used in the filter (for single-value conditions).
- Values List<string>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- Condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - Tag string
- The tag key used in the filter.
- Value string
- The tag value used in the filter (for single-value conditions).
- Values []string
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition String
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag String
- The tag key used in the filter.
- value String
- The tag value used in the filter (for single-value conditions).
- values List<String>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag string
- The tag key used in the filter.
- value string
- The tag value used in the filter (for single-value conditions).
- values string[]
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition str
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag str
- The tag key used in the filter.
- value str
- The tag value used in the filter (for single-value conditions).
- values Sequence[str]
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition String
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag String
- The tag key used in the filter.
- value String
- The tag value used in the filter (for single-value conditions).
- values List<String>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
GetCustomAllocationRuleStrategyEvaluateGroupedByFilter
- Condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - Tag string
- The tag key used in the filter.
- Value string
- The tag value used in the filter (for single-value conditions).
- Values List<string>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- Condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - Tag string
- The tag key used in the filter.
- Value string
- The tag value used in the filter (for single-value conditions).
- Values []string
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition String
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag String
- The tag key used in the filter.
- value String
- The tag value used in the filter (for single-value conditions).
- values List<String>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition string
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag string
- The tag key used in the filter.
- value string
- The tag value used in the filter (for single-value conditions).
- values string[]
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition str
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag str
- The tag key used in the filter.
- value str
- The tag value used in the filter (for single-value conditions).
- values Sequence[str]
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
- condition String
- The condition used to match tags. Valid values are
=
,!=
,is
,is not
,like
,in
,not in
. - tag String
- The tag key used in the filter.
- value String
- The tag value used in the filter (for single-value conditions).
- values List<String>
- The list of tag values used in the filter (for multi-value conditions like
in
ornot_in
).
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.