UNPKG

@pulumi/sumologic

Version:

A Pulumi package for creating and managing sumologic cloud resources.

173 lines (172 loc) 5.77 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * (Deprecated) Please use Metrics Search V2 instead. * Provides a [Sumologic Metrics Search](https://help.sumologic.com/docs/metrics/metrics-queries/metrics-explorer/). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as sumologic from "@pulumi/sumologic"; * * const personalFolder = sumologic.getPersonalFolder({}); * const exampleMetricsSearch = new sumologic.MetricsSearch("example_metrics_search", { * title: "Demo Metrics Search", * description: "Demo search description", * parentId: personalFolder.then(personalFolder => personalFolder.id), * metricsQueries: [{ * rowId: "A", * query: "metric=cpu_idle | avg", * }], * desiredQuantizationInSecs: 0, * timeRange: { * beginBoundedTimeRange: { * from: { * relativeTimeRange: { * relativeTime: "-30m", * }, * }, * }, * }, * }); * ``` * * ## Attributes reference * * In addition to all arguments above, the following attributes are exported: * * - `id` - The ID of the log search. * * ## Import * * A metrics search can be imported using it's identifier, e.g.: * * hcl * * ```sh * $ pulumi import sumologic:index/metricsSearch:MetricsSearch example_search 0000000007FFD79D * ``` * * [1]: https://help.sumologic.com/docs/metrics/metrics-queries/metrics-explorer/ */ export declare class MetricsSearch extends pulumi.CustomResource { /** * Get an existing MetricsSearch 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<pulumi.ID>, state?: MetricsSearchState, opts?: pulumi.CustomResourceOptions): MetricsSearch; /** * Returns true if the given object is an instance of MetricsSearch. 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 MetricsSearch; /** * Description of the search. */ readonly description: pulumi.Output<string>; /** * Desired quantization in seconds. Default value is `0`. */ readonly desiredQuantizationInSecs: pulumi.Output<number | undefined>; /** * Log query used to add an overlay to the chart. */ readonly logQuery: pulumi.Output<string | undefined>; /** * Array of objects MetricsSearchQuery. Metrics queries, up to the maximum of six. */ readonly metricsQueries: pulumi.Output<outputs.MetricsSearchMetricsQuery[]>; /** * The identifier of the folder to create the log search in. */ readonly parentId: pulumi.Output<string>; /** * Time range of the log search. See time range schema */ readonly timeRange: pulumi.Output<outputs.MetricsSearchTimeRange>; /** * Title of the search. */ readonly title: pulumi.Output<string>; /** * Create a MetricsSearch 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: MetricsSearchArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering MetricsSearch resources. */ export interface MetricsSearchState { /** * Description of the search. */ description?: pulumi.Input<string>; /** * Desired quantization in seconds. Default value is `0`. */ desiredQuantizationInSecs?: pulumi.Input<number>; /** * Log query used to add an overlay to the chart. */ logQuery?: pulumi.Input<string>; /** * Array of objects MetricsSearchQuery. Metrics queries, up to the maximum of six. */ metricsQueries?: pulumi.Input<pulumi.Input<inputs.MetricsSearchMetricsQuery>[]>; /** * The identifier of the folder to create the log search in. */ parentId?: pulumi.Input<string>; /** * Time range of the log search. See time range schema */ timeRange?: pulumi.Input<inputs.MetricsSearchTimeRange>; /** * Title of the search. */ title?: pulumi.Input<string>; } /** * The set of arguments for constructing a MetricsSearch resource. */ export interface MetricsSearchArgs { /** * Description of the search. */ description: pulumi.Input<string>; /** * Desired quantization in seconds. Default value is `0`. */ desiredQuantizationInSecs?: pulumi.Input<number>; /** * Log query used to add an overlay to the chart. */ logQuery?: pulumi.Input<string>; /** * Array of objects MetricsSearchQuery. Metrics queries, up to the maximum of six. */ metricsQueries: pulumi.Input<pulumi.Input<inputs.MetricsSearchMetricsQuery>[]>; /** * The identifier of the folder to create the log search in. */ parentId: pulumi.Input<string>; /** * Time range of the log search. See time range schema */ timeRange: pulumi.Input<inputs.MetricsSearchTimeRange>; /** * Title of the search. */ title: pulumi.Input<string>; }