UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

110 lines 4.61 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Probe = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Besides the public probes run by Grafana Labs, you can also install your * own private probes. These are only accessible to you and only write data to * your Grafana Cloud account. Private probes are instances of the open source * Grafana Synthetic Monitoring Agent. * * * [Official documentation](https://grafana.com/docs/grafana-cloud/testing/synthetic-monitoring/set-up/set-up-private-probes/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumiverse/grafana"; * * const main = new grafana.syntheticmonitoring.Probe("main", { * name: "Mount Everest", * latitude: 27.98606, * longitude: 86.92262, * region: "APAC", * labels: { * type: "mountain", * }, * }); * ``` * * ## Import * * ```sh * terraform import grafana_synthetic_monitoring_probe.name "{{ id }}" * terraform import grafana_synthetic_monitoring_probe.name "{{ id }}:{{ authToken }}" * ``` */ class Probe extends pulumi.CustomResource { /** * Get an existing Probe 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 Probe(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Probe. 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'] === Probe.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["authToken"] = state?.authToken; resourceInputs["disableBrowserChecks"] = state?.disableBrowserChecks; resourceInputs["disableScriptedChecks"] = state?.disableScriptedChecks; resourceInputs["labels"] = state?.labels; resourceInputs["latitude"] = state?.latitude; resourceInputs["longitude"] = state?.longitude; resourceInputs["name"] = state?.name; resourceInputs["public"] = state?.public; resourceInputs["region"] = state?.region; resourceInputs["tenantId"] = state?.tenantId; } else { const args = argsOrState; if (args?.latitude === undefined && !opts.urn) { throw new Error("Missing required property 'latitude'"); } if (args?.longitude === undefined && !opts.urn) { throw new Error("Missing required property 'longitude'"); } if (args?.region === undefined && !opts.urn) { throw new Error("Missing required property 'region'"); } resourceInputs["disableBrowserChecks"] = args?.disableBrowserChecks; resourceInputs["disableScriptedChecks"] = args?.disableScriptedChecks; resourceInputs["labels"] = args?.labels; resourceInputs["latitude"] = args?.latitude; resourceInputs["longitude"] = args?.longitude; resourceInputs["name"] = args?.name; resourceInputs["public"] = args?.public; resourceInputs["region"] = args?.region; resourceInputs["authToken"] = undefined /*out*/; resourceInputs["tenantId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["authToken"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Probe.__pulumiType, name, resourceInputs, opts); } } exports.Probe = Probe; /** @internal */ Probe.__pulumiType = 'grafana:syntheticMonitoring/probe:Probe'; //# sourceMappingURL=probe.js.map