1. Packages
  2. Datadog Provider
  3. API Docs
  4. getCustomAllocationRule
Datadog v4.58.0 published on Thursday, Oct 16, 2025 by Pulumi

datadog.getCustomAllocationRule

Deploy with Pulumi
datadog logo
Datadog v4.58.0 published on Thursday, Oct 16, 2025 by Pulumi

    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:

    costsToAllocates List<Property Map>
    ruleId 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.
    LastModifiedUserUuid string
    The UUID of the user who last modified the rule.
    OrderId 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.
    RuleName 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.
    CostsToAllocates List<GetCustomAllocationRuleCostsToAllocate>
    RuleId int
    The ID of the custom allocation rule to retrieve.
    Strategy GetCustomAllocationRuleStrategy
    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.
    LastModifiedUserUuid string
    The UUID of the user who last modified the rule.
    OrderId 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.
    RuleName 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.
    CostsToAllocates []GetCustomAllocationRuleCostsToAllocate
    RuleId int
    The ID of the custom allocation rule to retrieve.
    Strategy GetCustomAllocationRuleStrategy
    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.
    lastModifiedUserUuid String
    The UUID of the user who last modified the rule.
    orderId 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.
    ruleName 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.
    costsToAllocates List<GetCustomAllocationRuleCostsToAllocate>
    ruleId Integer
    The ID of the custom allocation rule to retrieve.
    strategy GetCustomAllocationRuleStrategy
    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.
    lastModifiedUserUuid string
    The UUID of the user who last modified the rule.
    orderId 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.
    ruleName 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.
    costsToAllocates GetCustomAllocationRuleCostsToAllocate[]
    ruleId number
    The ID of the custom allocation rule to retrieve.
    strategy GetCustomAllocationRuleStrategy
    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_user_uuid str
    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_allocates Sequence[GetCustomAllocationRuleCostsToAllocate]
    rule_id int
    The ID of the custom allocation rule to retrieve.
    strategy GetCustomAllocationRuleStrategy
    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.
    lastModifiedUserUuid String
    The UUID of the user who last modified the rule.
    orderId 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.
    ruleName 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.
    costsToAllocates List<Property Map>
    ruleId 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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_in).

    GetCustomAllocationRuleStrategy

    AllocatedByTagKeys List<string>
    List of tag keys used to allocate costs.
    EvaluateGroupedByTagKeys List<string>
    List of tag keys used to group costs before allocation.
    Granularity string
    The granularity level for cost allocation (daily or monthly).
    Method string
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.
    AllocatedBies List<GetCustomAllocationRuleStrategyAllocatedBy>
    AllocatedByFilters List<GetCustomAllocationRuleStrategyAllocatedByFilter>
    BasedOnCosts List<GetCustomAllocationRuleStrategyBasedOnCost>
    BasedOnTimeseries GetCustomAllocationRuleStrategyBasedOnTimeseries
    EvaluateGroupedByFilters List<GetCustomAllocationRuleStrategyEvaluateGroupedByFilter>
    AllocatedByTagKeys []string
    List of tag keys used to allocate costs.
    EvaluateGroupedByTagKeys []string
    List of tag keys used to group costs before allocation.
    Granularity string
    The granularity level for cost allocation (daily or monthly).
    Method string
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.
    AllocatedBies []GetCustomAllocationRuleStrategyAllocatedBy
    AllocatedByFilters []GetCustomAllocationRuleStrategyAllocatedByFilter
    BasedOnCosts []GetCustomAllocationRuleStrategyBasedOnCost
    BasedOnTimeseries GetCustomAllocationRuleStrategyBasedOnTimeseries
    EvaluateGroupedByFilters []GetCustomAllocationRuleStrategyEvaluateGroupedByFilter
    allocatedByTagKeys List<String>
    List of tag keys used to allocate costs.
    evaluateGroupedByTagKeys List<String>
    List of tag keys used to group costs before allocation.
    granularity String
    The granularity level for cost allocation (daily or monthly).
    method String
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.
    allocatedBies List<GetCustomAllocationRuleStrategyAllocatedBy>
    allocatedByFilters List<GetCustomAllocationRuleStrategyAllocatedByFilter>
    basedOnCosts List<GetCustomAllocationRuleStrategyBasedOnCost>
    basedOnTimeseries GetCustomAllocationRuleStrategyBasedOnTimeseries
    evaluateGroupedByFilters List<GetCustomAllocationRuleStrategyEvaluateGroupedByFilter>
    allocatedByTagKeys string[]
    List of tag keys used to allocate costs.
    evaluateGroupedByTagKeys string[]
    List of tag keys used to group costs before allocation.
    granularity string
    The granularity level for cost allocation (daily or monthly).
    method string
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.
    allocatedBies GetCustomAllocationRuleStrategyAllocatedBy[]
    allocatedByFilters GetCustomAllocationRuleStrategyAllocatedByFilter[]
    basedOnCosts GetCustomAllocationRuleStrategyBasedOnCost[]
    basedOnTimeseries GetCustomAllocationRuleStrategyBasedOnTimeseries
    evaluateGroupedByFilters GetCustomAllocationRuleStrategyEvaluateGroupedByFilter[]
    allocated_by_tag_keys Sequence[str]
    List of tag keys used to allocate costs.
    evaluate_grouped_by_tag_keys Sequence[str]
    List of tag keys used to group costs before allocation.
    granularity str
    The granularity level for cost allocation (daily or monthly).
    method str
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.
    allocated_bies Sequence[GetCustomAllocationRuleStrategyAllocatedBy]
    allocated_by_filters Sequence[GetCustomAllocationRuleStrategyAllocatedByFilter]
    based_on_costs Sequence[GetCustomAllocationRuleStrategyBasedOnCost]
    based_on_timeseries GetCustomAllocationRuleStrategyBasedOnTimeseries
    evaluate_grouped_by_filters Sequence[GetCustomAllocationRuleStrategyEvaluateGroupedByFilter]
    allocatedByTagKeys List<String>
    List of tag keys used to allocate costs.
    evaluateGroupedByTagKeys List<String>
    List of tag keys used to group costs before allocation.
    granularity String
    The granularity level for cost allocation (daily or monthly).
    method String
    The allocation method. Valid values are even, proportional, proportional_timeseries, or percent.
    allocatedBies List<Property Map>
    allocatedByFilters List<Property Map>
    basedOnCosts List<Property Map>
    basedOnTimeseries Property Map
    evaluateGroupedByFilters List<Property Map>

    GetCustomAllocationRuleStrategyAllocatedBy

    Percentage double
    The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
    AllocatedTags List<GetCustomAllocationRuleStrategyAllocatedByAllocatedTag>
    Percentage float64
    The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
    AllocatedTags []GetCustomAllocationRuleStrategyAllocatedByAllocatedTag
    percentage Double
    The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
    allocatedTags List<GetCustomAllocationRuleStrategyAllocatedByAllocatedTag>
    percentage number
    The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
    allocatedTags GetCustomAllocationRuleStrategyAllocatedByAllocatedTag[]
    percentage float
    The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
    allocated_tags Sequence[GetCustomAllocationRuleStrategyAllocatedByAllocatedTag]
    percentage Number
    The percentage of costs allocated to this target as a decimal (e.g., 0.33 for 33%).
    allocatedTags List<Property Map>

    GetCustomAllocationRuleStrategyAllocatedByAllocatedTag

    Key string
    The tag key for cost allocation.
    Value string
    The tag value used in the filter (for single-value conditions).
    Key string
    The tag key for cost allocation.
    Value string
    The tag value used in the filter (for single-value conditions).
    key String
    The tag key for cost allocation.
    value String
    The tag value used in the filter (for single-value conditions).
    key string
    The tag key for cost allocation.
    value string
    The tag value used in the filter (for single-value conditions).
    key str
    The tag key for cost allocation.
    value str
    The tag value used in the filter (for single-value conditions).
    key String
    The tag key for cost allocation.
    value String
    The tag value used in the filter (for single-value conditions).

    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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_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 or not_in).

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Datadog v4.58.0 published on Thursday, Oct 16, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate