UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

143 lines (142 loc) 4.88 kB
import * as pulumi from "@pulumi/pulumi"; /** * * [Official documentation](https://grafana.com/docs/grafana/latest/dashboards/) * * [Folder/Dashboard Search HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/folder_dashboard_search/) * * [Dashboard HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumi/grafana"; * import * as grafana from "@pulumiverse/grafana"; * * const test = new grafana.oss.Dashboard("test", {configJson: JSON.stringify({ * id: 12345, * uid: "test-ds-dashboard-uid", * title: "Production Overview", * tags: ["templated"], * timezone: "browser", * schemaVersion: 16, * version: 0, * refresh: "25s", * })}); * const fromUid = grafana.oss.getDashboard({ * uid: "test-ds-dashboard-uid", * }); * ``` */ /** @deprecated grafana.index/getdashboard.getDashboard has been deprecated in favor of grafana.oss/getdashboard.getDashboard */ export declare function getDashboard(args?: GetDashboardArgs, opts?: pulumi.InvokeOptions): Promise<GetDashboardResult>; /** * A collection of arguments for invoking getDashboard. */ export interface GetDashboardArgs { /** * The numerical ID of the Grafana dashboard. Specify either this or `uid`. Defaults to `-1`. */ dashboardId?: number; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: string; /** * The uid of the Grafana dashboard. Specify either this or `dashboardId`. Defaults to ``. */ uid?: string; } /** * A collection of values returned by getDashboard. */ export interface GetDashboardResult { /** * The complete dashboard model JSON. */ readonly configJson: string; /** * The numerical ID of the Grafana dashboard. Specify either this or `uid`. Defaults to `-1`. */ readonly dashboardId?: number; /** * The UID of the folder where the Grafana dashboard is found. */ readonly folderUid: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * Whether or not the Grafana dashboard is starred. Starred Dashboards will show up on your own Home Dashboard by default, and are a convenient way to mark Dashboards that you’re interested in. */ readonly isStarred: boolean; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ readonly orgId?: string; /** * URL slug of the dashboard (deprecated). */ readonly slug: string; /** * The title of the Grafana dashboard. */ readonly title: string; /** * The uid of the Grafana dashboard. Specify either this or `dashboardId`. Defaults to ``. */ readonly uid?: string; /** * The full URL of the dashboard. */ readonly url: string; /** * The numerical version of the Grafana dashboard. */ readonly version: number; } /** * * [Official documentation](https://grafana.com/docs/grafana/latest/dashboards/) * * [Folder/Dashboard Search HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/folder_dashboard_search/) * * [Dashboard HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/dashboard/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@pulumi/grafana"; * import * as grafana from "@pulumiverse/grafana"; * * const test = new grafana.oss.Dashboard("test", {configJson: JSON.stringify({ * id: 12345, * uid: "test-ds-dashboard-uid", * title: "Production Overview", * tags: ["templated"], * timezone: "browser", * schemaVersion: 16, * version: 0, * refresh: "25s", * })}); * const fromUid = grafana.oss.getDashboard({ * uid: "test-ds-dashboard-uid", * }); * ``` */ /** @deprecated grafana.index/getdashboard.getDashboard has been deprecated in favor of grafana.oss/getdashboard.getDashboard */ export declare function getDashboardOutput(args?: GetDashboardOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetDashboardResult>; /** * A collection of arguments for invoking getDashboard. */ export interface GetDashboardOutputArgs { /** * The numerical ID of the Grafana dashboard. Specify either this or `uid`. Defaults to `-1`. */ dashboardId?: pulumi.Input<number>; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: pulumi.Input<string>; /** * The uid of the Grafana dashboard. Specify either this or `dashboardId`. Defaults to ``. */ uid?: pulumi.Input<string>; }