UNPKG

@lbrlabs/pulumi-grafana

Version:

A Pulumi package for creating and managing grafana.

84 lines 4.59 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.MachineLearningOutlierDetector = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * An outlier detector monitors the results of a query and reports when its values are outside normal bands. * * The normal band is configured by choice of algorithm, its sensitivity and other configuration. * * Visit https://grafana.com/docs/grafana-cloud/machine-learning/outlier-detection/ for more details. */ class MachineLearningOutlierDetector extends pulumi.CustomResource { /** * Get an existing MachineLearningOutlierDetector 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, id, state, opts) { return new MachineLearningOutlierDetector(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of MachineLearningOutlierDetector. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === MachineLearningOutlierDetector.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["algorithm"] = state ? state.algorithm : undefined; resourceInputs["datasourceId"] = state ? state.datasourceId : undefined; resourceInputs["datasourceType"] = state ? state.datasourceType : undefined; resourceInputs["datasourceUid"] = state ? state.datasourceUid : undefined; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["interval"] = state ? state.interval : undefined; resourceInputs["metric"] = state ? state.metric : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["queryParams"] = state ? state.queryParams : undefined; } else { const args = argsOrState; if ((!args || args.algorithm === undefined) && !opts.urn) { throw new Error("Missing required property 'algorithm'"); } if ((!args || args.datasourceType === undefined) && !opts.urn) { throw new Error("Missing required property 'datasourceType'"); } if ((!args || args.metric === undefined) && !opts.urn) { throw new Error("Missing required property 'metric'"); } if ((!args || args.queryParams === undefined) && !opts.urn) { throw new Error("Missing required property 'queryParams'"); } resourceInputs["algorithm"] = args ? args.algorithm : undefined; resourceInputs["datasourceId"] = args ? args.datasourceId : undefined; resourceInputs["datasourceType"] = args ? args.datasourceType : undefined; resourceInputs["datasourceUid"] = args ? args.datasourceUid : undefined; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["interval"] = args ? args.interval : undefined; resourceInputs["metric"] = args ? args.metric : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["queryParams"] = args ? args.queryParams : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(MachineLearningOutlierDetector.__pulumiType, name, resourceInputs, opts); } } exports.MachineLearningOutlierDetector = MachineLearningOutlierDetector; /** @internal */ MachineLearningOutlierDetector.__pulumiType = 'grafana:index/machineLearningOutlierDetector:MachineLearningOutlierDetector'; //# sourceMappingURL=machineLearningOutlierDetector.js.map