UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

100 lines 3.77 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.getDataSourceOutput = exports.getDataSource = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Get details about a Grafana Datasource querying by either name, uid or ID * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumi/grafana"; * import * as grafana from "@pulumiverse/grafana"; * * const prometheus = new grafana.oss.DataSource("prometheus", { * type: "prometheus", * name: "prometheus-ds-test", * uid: "prometheus-ds-test-uid", * url: "https://my-instance.com", * basicAuthEnabled: true, * basicAuthUsername: "username", * jsonDataEncoded: JSON.stringify({ * httpMethod: "POST", * prometheusType: "Mimir", * prometheusVersion: "2.4.0", * }), * secureJsonDataEncoded: JSON.stringify({ * basicAuthPassword: "password", * }), * }); * const fromName = grafana.oss.getDataSourceOutput({ * name: prometheus.name, * }); * const fromUid = grafana.oss.getDataSourceOutput({ * uid: prometheus.uid, * }); * ``` */ /** @deprecated grafana.index/getdatasource.getDataSource has been deprecated in favor of grafana.oss/getdatasource.getDataSource */ function getDataSource(args, opts) { pulumi.log.warn("getDataSource is deprecated: grafana.index/getdatasource.getDataSource has been deprecated in favor of grafana.oss/getdatasource.getDataSource"); args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("grafana:index/getDataSource:getDataSource", { "name": args.name, "orgId": args.orgId, "uid": args.uid, }, opts); } exports.getDataSource = getDataSource; /** * Get details about a Grafana Datasource querying by either name, uid or ID * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumi/grafana"; * import * as grafana from "@pulumiverse/grafana"; * * const prometheus = new grafana.oss.DataSource("prometheus", { * type: "prometheus", * name: "prometheus-ds-test", * uid: "prometheus-ds-test-uid", * url: "https://my-instance.com", * basicAuthEnabled: true, * basicAuthUsername: "username", * jsonDataEncoded: JSON.stringify({ * httpMethod: "POST", * prometheusType: "Mimir", * prometheusVersion: "2.4.0", * }), * secureJsonDataEncoded: JSON.stringify({ * basicAuthPassword: "password", * }), * }); * const fromName = grafana.oss.getDataSourceOutput({ * name: prometheus.name, * }); * const fromUid = grafana.oss.getDataSourceOutput({ * uid: prometheus.uid, * }); * ``` */ /** @deprecated grafana.index/getdatasource.getDataSource has been deprecated in favor of grafana.oss/getdatasource.getDataSource */ function getDataSourceOutput(args, opts) { pulumi.log.warn("getDataSource is deprecated: grafana.index/getdatasource.getDataSource has been deprecated in favor of grafana.oss/getdatasource.getDataSource"); args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("grafana:index/getDataSource:getDataSource", { "name": args.name, "orgId": args.orgId, "uid": args.uid, }, opts); } exports.getDataSourceOutput = getDataSourceOutput; //# sourceMappingURL=getDataSource.js.map