UNPKG

@lbrlabs/pulumi-grafana

Version:

A Pulumi package for creating and managing grafana.

194 lines (193 loc) 6.88 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages Grafana library panels. * * * [Official documentation](https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/manage-library-panels/) * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/library_element/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@lbrlabs/pulumi-grafana"; * * const test = new grafana.LibraryPanel("test", {modelJson: JSON.stringify({ * title: "updated name", * id: 12, * version: 35, * })}); * ``` * * ## Import * * ```sh * $ pulumi import grafana:index/libraryPanel:LibraryPanel panel_name {{library_panel_slug}} * ``` */ export declare class LibraryPanel extends pulumi.CustomResource { /** * Get an existing LibraryPanel 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?: LibraryPanelState, opts?: pulumi.CustomResourceOptions): LibraryPanel; /** * Returns true if the given object is an instance of LibraryPanel. 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 LibraryPanel; /** * Timestamp when the library panel was created. */ readonly created: pulumi.Output<string>; /** * Numerical IDs of Grafana dashboards containing the library panel. */ readonly dashboardIds: pulumi.Output<number[]>; /** * Description of the library panel. */ readonly description: pulumi.Output<string>; /** * ID of the folder where the library panel is stored. */ readonly folderId: pulumi.Output<string | undefined>; /** * Name of the folder containing the library panel. */ readonly folderName: pulumi.Output<string>; /** * Unique ID (UID) of the folder containing the library panel. */ readonly folderUid: pulumi.Output<string>; /** * The JSON model for the library panel. */ readonly modelJson: pulumi.Output<string>; /** * Name of the library panel. */ readonly name: pulumi.Output<string>; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ readonly orgId: pulumi.Output<string | undefined>; /** * The numeric ID of the library panel computed by Grafana. */ readonly panelId: pulumi.Output<number>; /** * Type of the library panel (eg. text). */ readonly type: pulumi.Output<string>; /** * The unique identifier (UID) of a library panel uniquely identifies library panels between multiple Grafana installs. It’s automatically generated unless you specify it during library panel creation.The UID provides consistent URLs for accessing library panels and when syncing library panels between multiple Grafana installs. */ readonly uid: pulumi.Output<string>; /** * Timestamp when the library panel was last modified. */ readonly updated: pulumi.Output<string>; /** * Version of the library panel. */ readonly version: pulumi.Output<number>; /** * Create a LibraryPanel 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: LibraryPanelArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering LibraryPanel resources. */ export interface LibraryPanelState { /** * Timestamp when the library panel was created. */ created?: pulumi.Input<string>; /** * Numerical IDs of Grafana dashboards containing the library panel. */ dashboardIds?: pulumi.Input<pulumi.Input<number>[]>; /** * Description of the library panel. */ description?: pulumi.Input<string>; /** * ID of the folder where the library panel is stored. */ folderId?: pulumi.Input<string>; /** * Name of the folder containing the library panel. */ folderName?: pulumi.Input<string>; /** * Unique ID (UID) of the folder containing the library panel. */ folderUid?: pulumi.Input<string>; /** * The JSON model for the library panel. */ modelJson?: pulumi.Input<string>; /** * Name of the library panel. */ name?: pulumi.Input<string>; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: pulumi.Input<string>; /** * The numeric ID of the library panel computed by Grafana. */ panelId?: pulumi.Input<number>; /** * Type of the library panel (eg. text). */ type?: pulumi.Input<string>; /** * The unique identifier (UID) of a library panel uniquely identifies library panels between multiple Grafana installs. It’s automatically generated unless you specify it during library panel creation.The UID provides consistent URLs for accessing library panels and when syncing library panels between multiple Grafana installs. */ uid?: pulumi.Input<string>; /** * Timestamp when the library panel was last modified. */ updated?: pulumi.Input<string>; /** * Version of the library panel. */ version?: pulumi.Input<number>; } /** * The set of arguments for constructing a LibraryPanel resource. */ export interface LibraryPanelArgs { /** * ID of the folder where the library panel is stored. */ folderId?: pulumi.Input<string>; /** * The JSON model for the library panel. */ modelJson: pulumi.Input<string>; /** * Name of the library panel. */ name?: pulumi.Input<string>; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: pulumi.Input<string>; /** * The unique identifier (UID) of a library panel uniquely identifies library panels between multiple Grafana installs. It’s automatically generated unless you specify it during library panel creation.The UID provides consistent URLs for accessing library panels and when syncing library panels between multiple Grafana installs. */ uid?: pulumi.Input<string>; }