import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a Datadog Custom Allocation Rule resource. Custom allocation rules allow you to allocate cloud costs based on tags and filters. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as datadog from "@pulumi/datadog"; * * // Create new datadog_custom_allocation_rule resource * const myAllocationRule = new datadog.CustomAllocationRule("my_allocation_rule", { * costsToAllocates: [{ * condition: "is", * tag: "aws_product", * value: "ec2", * }], * enabled: true, * providernames: ["aws"], * ruleName: "my-allocation-rule", * strategy: [{ * allocatedByTagKeys: ["team"], * basedOnCosts: [{ * condition: "is", * tag: "env", * value: "prod", * }], * granularity: "daily", * method: "even", * }], * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * ```sh * $ pulumi import datadog:index/customAllocationRule:CustomAllocationRule new_list * ``` */ export declare class CustomAllocationRule extends pulumi.CustomResource { /** * Get an existing CustomAllocationRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: CustomAllocationRuleState, opts?: pulumi.CustomResourceOptions): CustomAllocationRule; /** * Returns true if the given object is an instance of CustomAllocationRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CustomAllocationRule; readonly costsToAllocates: pulumi.Output; /** * The timestamp (in ISO 8601 format) when the rule was created. */ readonly created: pulumi.Output; /** * Whether the custom allocation rule is enabled. */ readonly enabled: pulumi.Output; /** * The UUID of the user who last modified the rule. */ readonly lastModifiedUserUuid: pulumi.Output; /** * The order of the rule in the list of custom allocation rules. This field is read-only. Use the `datadog.CustomAllocationRules` resource to manage rule order. */ readonly orderId: pulumi.Output; /** * List of cloud providers the rule applies to. Valid values include `aws`, `azure`, and `gcp`. */ readonly providernames: pulumi.Output; /** * Whether the rule was rejected by the API during creation due to validation errors. This field is read-only. */ readonly rejected: pulumi.Output; /** * The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource. */ readonly ruleName: pulumi.Output; readonly strategy: pulumi.Output; /** * The timestamp (in ISO 8601 format) when the rule was last updated. */ readonly updated: pulumi.Output; /** * The version number of the rule. This increments each time the rule is updated. */ readonly version: pulumi.Output; /** * Create a CustomAllocationRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CustomAllocationRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CustomAllocationRule resources. */ export interface CustomAllocationRuleState { costsToAllocates?: pulumi.Input[]>; /** * The timestamp (in ISO 8601 format) when the rule was created. */ created?: pulumi.Input; /** * Whether the custom allocation rule is enabled. */ enabled?: pulumi.Input; /** * The UUID of the user who last modified the rule. */ lastModifiedUserUuid?: pulumi.Input; /** * The order of the rule in the list of custom allocation rules. This field is read-only. Use the `datadog.CustomAllocationRules` resource to manage rule order. */ orderId?: pulumi.Input; /** * List of cloud providers the rule applies to. Valid values include `aws`, `azure`, and `gcp`. */ providernames?: pulumi.Input[]>; /** * Whether the rule was rejected by the API during creation due to validation errors. This field is read-only. */ rejected?: pulumi.Input; /** * The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource. */ ruleName?: pulumi.Input; strategy?: pulumi.Input; /** * The timestamp (in ISO 8601 format) when the rule was last updated. */ updated?: pulumi.Input; /** * The version number of the rule. This increments each time the rule is updated. */ version?: pulumi.Input; } /** * The set of arguments for constructing a CustomAllocationRule resource. */ export interface CustomAllocationRuleArgs { costsToAllocates?: pulumi.Input[]>; /** * Whether the custom allocation rule is enabled. */ enabled: pulumi.Input; /** * List of cloud providers the rule applies to. Valid values include `aws`, `azure`, and `gcp`. */ providernames: pulumi.Input[]>; /** * The name of the custom allocation rule. This field is immutable - changing it will force replacement of the resource. */ ruleName: pulumi.Input; strategy?: pulumi.Input; }