import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a Datadog AI Gateway budget resource. A budget caps spend over a daily, weekly, or monthly UTC period for the requests that match its scope. This resource is in Preview. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as datadog from "@pulumi/datadog"; * * // Block the coding assistant's OpenAI spend over $500 a month. * const codingAssistant = new datadog.AiGatewayBudget("coding_assistant", { * name: "coding-assistant-openai", * capacityMicrocents: 50000000000, * windowPolicy: "MONTHLY", * enforcement: "BLOCK", * warningThreshold: 0.8, * tags: { * ml_app: "coding-assistant", * provider: "openai", * }, * }); * // Give each user their own $20 daily budget. * const perUser = new datadog.AiGatewayBudget("per_user", { * name: "per-user-daily", * capacityMicrocents: 2000000000, * windowPolicy: "DAILY", * enforcement: "NOTIFY", * selectors: [{ * dim: "user_id", * per_value: true, * }], * }); * ``` * * ## Import * * Use the `pulumi import` command. For example: * * ```sh * $ pulumi import datadog:index/aiGatewayBudget:AiGatewayBudget coding_assistant "" * ``` */ export declare class AiGatewayBudget extends pulumi.CustomResource { /** * Get an existing AiGatewayBudget 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?: AiGatewayBudgetState, opts?: pulumi.CustomResourceOptions): AiGatewayBudget; /** * Check whether an existing AiGatewayBudget resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: AiGatewayBudgetState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of AiGatewayBudget. 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 AiGatewayBudget; /** * Whether a change to `capacityMicrocents` also applies to the current period. When `false`, the current period keeps its capacity. Not supported for budgets with a `selector`. Defaults to `false`. */ readonly applyToCurrentPeriod: pulumi.Output; /** * Spend allowed per period, in microcents: one US dollar is 100,000,000 microcents. A change applies from the next period unless `applyToCurrentPeriod` is `true`. Value must be at least 1. */ readonly capacityMicrocents: pulumi.Output; /** * Whether the budget is active. Defaults to `true`. */ readonly enabled: pulumi.Output; /** * Whether the budget rejects requests over its capacity (`BLOCK`) or only notifies (`NOTIFY`). Valid values are `BLOCK`, `NOTIFY`. */ readonly enforcement: pulumi.Output; /** * ID of the Datadog monitor created for the budget. Unset when the monitor wasn't created. */ readonly monitorId: pulumi.Output; /** * Name of the budget. String length must be at least 1. */ readonly name: pulumi.Output; /** * Dimension rules that make this budget a template budget. Each combination of values for the dimensions with `perValue = true` gets its own budget instance, and each request counts toward the instance that matches its values. Changing it replaces the budget. */ readonly selectors: pulumi.Output; /** * Scope tags, such as `provider`, `model`, or `mlApp`. A request counts toward the budget when it has all of these tags. Keys must be lowercase. Changing them replaces the budget. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * UUID of a Datadog Team. When set, only requests attributed to this team count toward the budget. Changing it replaces the budget. */ readonly teamId: pulumi.Output; /** * UUID of a Datadog user. When set, only this user's requests count toward the budget. Changing it replaces the budget. */ readonly userId: pulumi.Output; /** * Fraction of capacity that triggers a warning from the budget's monitor. Must be greater than 0 and at most 1. Defaults to `0.9`. */ readonly warningThreshold: pulumi.Output; /** * UTC accounting period of the budget. Changing it replaces the budget. Valid values are `DAILY`, `WEEKLY`, `MONTHLY`. */ readonly windowPolicy: pulumi.Output; /** * Create a AiGatewayBudget 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: AiGatewayBudgetArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AiGatewayBudget resources. */ export interface AiGatewayBudgetState { /** * Whether a change to `capacityMicrocents` also applies to the current period. When `false`, the current period keeps its capacity. Not supported for budgets with a `selector`. Defaults to `false`. */ applyToCurrentPeriod?: pulumi.Input; /** * Spend allowed per period, in microcents: one US dollar is 100,000,000 microcents. A change applies from the next period unless `applyToCurrentPeriod` is `true`. Value must be at least 1. */ capacityMicrocents?: pulumi.Input; /** * Whether the budget is active. Defaults to `true`. */ enabled?: pulumi.Input; /** * Whether the budget rejects requests over its capacity (`BLOCK`) or only notifies (`NOTIFY`). Valid values are `BLOCK`, `NOTIFY`. */ enforcement?: pulumi.Input; /** * ID of the Datadog monitor created for the budget. Unset when the monitor wasn't created. */ monitorId?: pulumi.Input; /** * Name of the budget. String length must be at least 1. */ name?: pulumi.Input; /** * Dimension rules that make this budget a template budget. Each combination of values for the dimensions with `perValue = true` gets its own budget instance, and each request counts toward the instance that matches its values. Changing it replaces the budget. */ selectors?: pulumi.Input[] | undefined>; /** * Scope tags, such as `provider`, `model`, or `mlApp`. A request counts toward the budget when it has all of these tags. Keys must be lowercase. Changing them replaces the budget. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * UUID of a Datadog Team. When set, only requests attributed to this team count toward the budget. Changing it replaces the budget. */ teamId?: pulumi.Input; /** * UUID of a Datadog user. When set, only this user's requests count toward the budget. Changing it replaces the budget. */ userId?: pulumi.Input; /** * Fraction of capacity that triggers a warning from the budget's monitor. Must be greater than 0 and at most 1. Defaults to `0.9`. */ warningThreshold?: pulumi.Input; /** * UTC accounting period of the budget. Changing it replaces the budget. Valid values are `DAILY`, `WEEKLY`, `MONTHLY`. */ windowPolicy?: pulumi.Input; } /** * The set of arguments for constructing a AiGatewayBudget resource. */ export interface AiGatewayBudgetArgs { /** * Whether a change to `capacityMicrocents` also applies to the current period. When `false`, the current period keeps its capacity. Not supported for budgets with a `selector`. Defaults to `false`. */ applyToCurrentPeriod?: pulumi.Input; /** * Spend allowed per period, in microcents: one US dollar is 100,000,000 microcents. A change applies from the next period unless `applyToCurrentPeriod` is `true`. Value must be at least 1. */ capacityMicrocents: pulumi.Input; /** * Whether the budget is active. Defaults to `true`. */ enabled?: pulumi.Input; /** * Whether the budget rejects requests over its capacity (`BLOCK`) or only notifies (`NOTIFY`). Valid values are `BLOCK`, `NOTIFY`. */ enforcement: pulumi.Input; /** * Name of the budget. String length must be at least 1. */ name: pulumi.Input; /** * Dimension rules that make this budget a template budget. Each combination of values for the dimensions with `perValue = true` gets its own budget instance, and each request counts toward the instance that matches its values. Changing it replaces the budget. */ selectors?: pulumi.Input[] | undefined>; /** * Scope tags, such as `provider`, `model`, or `mlApp`. A request counts toward the budget when it has all of these tags. Keys must be lowercase. Changing them replaces the budget. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * UUID of a Datadog Team. When set, only requests attributed to this team count toward the budget. Changing it replaces the budget. */ teamId?: pulumi.Input; /** * UUID of a Datadog user. When set, only this user's requests count toward the budget. Changing it replaces the budget. */ userId?: pulumi.Input; /** * Fraction of capacity that triggers a warning from the budget's monitor. Must be greater than 0 and at most 1. Defaults to `0.9`. */ warningThreshold?: pulumi.Input; /** * UTC accounting period of the budget. Changing it replaces the budget. Valid values are `DAILY`, `WEEKLY`, `MONTHLY`. */ windowPolicy: pulumi.Input; } //# sourceMappingURL=aiGatewayBudget.d.ts.map