import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Provides a Datadog derived metric resource computed from a formula and metric queries. Managing derived metrics requires the Manage Tags for Metrics permission. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as datadog from "@pulumi/datadog"; * * // Create a derived metric that combines two metric queries * const cpuTotal = new datadog.DerivedMetric("cpu_total", { * name: "custom.cpu.total", * definition: { * formula: "a + b", * queries: [ * { * name: "a", * dataSource: "metrics", * query: "avg:system.cpu.user{*}", * }, * { * name: "b", * dataSource: "metrics", * query: "avg:system.cpu.system{*}", * }, * ], * }, * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * Derived metrics can be imported using their name, e.g. * * ```sh * $ pulumi import datadog:index/derivedMetric:DerivedMetric cpu_total "custom.cpu.total" * ``` */ export declare class DerivedMetric extends pulumi.CustomResource { /** * Get an existing DerivedMetric 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?: DerivedMetricState, opts?: pulumi.CustomResourceOptions): DerivedMetric; /** * Check whether an existing DerivedMetric 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?: DerivedMetricState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of DerivedMetric. 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 DerivedMetric; /** * The definition of a derived metric as a formula over one or more queries. */ readonly definition: pulumi.Output; /** * Caller-assigned name sent as the create ID. After import, the first apply adopts the configured name through an update using the canonical API ID, without replacing the resource. Once the name is stored in state, changing it replaces the resource. String length must be at least 1. */ readonly name: pulumi.Output; /** * Create a DerivedMetric 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: DerivedMetricArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering DerivedMetric resources. */ export interface DerivedMetricState { /** * The definition of a derived metric as a formula over one or more queries. */ definition?: pulumi.Input; /** * Caller-assigned name sent as the create ID. After import, the first apply adopts the configured name through an update using the canonical API ID, without replacing the resource. Once the name is stored in state, changing it replaces the resource. String length must be at least 1. */ name?: pulumi.Input; } /** * The set of arguments for constructing a DerivedMetric resource. */ export interface DerivedMetricArgs { /** * The definition of a derived metric as a formula over one or more queries. */ definition: pulumi.Input; /** * Caller-assigned name sent as the create ID. After import, the first apply adopts the configured name through an update using the canonical API ID, without replacing the resource. Once the name is stored in state, changing it replaces the resource. String length must be at least 1. */ name: pulumi.Input; } //# sourceMappingURL=derivedMetric.d.ts.map