UNPKG

@lbrlabs/pulumi-grafana

Version:

A Pulumi package for creating and managing grafana.

128 lines (127 loc) 4.26 kB
import * as pulumi from "@pulumi/pulumi"; /** * * [Official documentation](https://grafana.com/docs/grafana/latest/dashboards/manage-dashboards/) * * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/folder/) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as grafana from "@lbrlabs/pulumi-grafana"; * * const testFolderFolder = new grafana.Folder("testFolderFolder", {title: "Terraform Test Folder"}); * const testFolderDashboard = new grafana.Dashboard("testFolderDashboard", { * folder: testFolderFolder.id, * configJson: `{ * "title": "Dashboard in folder", * "uid": "dashboard-in-folder" * } * `, * }); * const testFolderWithUid = new grafana.Folder("testFolderWithUid", { * uid: "test-folder-uid", * title: "Terraform Test Folder With UID", * }); * ``` * * ## Import * * ```sh * $ pulumi import grafana:index/folder:Folder by_integer_id {{folder_id}} * ``` * * ```sh * $ pulumi import grafana:index/folder:Folder by_uid {{folder_uid}} * ``` */ export declare class Folder extends pulumi.CustomResource { /** * Get an existing Folder 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?: FolderState, opts?: pulumi.CustomResourceOptions): Folder; /** * Returns true if the given object is an instance of Folder. 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 Folder; /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ readonly orgId: pulumi.Output<string | undefined>; /** * Prevent deletion of the folder if it is not empty (contains dashboards or alert rules). Defaults to `false`. */ readonly preventDestroyIfNotEmpty: pulumi.Output<boolean | undefined>; /** * The title of the folder. */ readonly title: pulumi.Output<string>; /** * Unique identifier. */ readonly uid: pulumi.Output<string>; /** * The full URL of the folder. */ readonly url: pulumi.Output<string>; /** * Create a Folder 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: FolderArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Folder resources. */ export interface FolderState { /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: pulumi.Input<string>; /** * Prevent deletion of the folder if it is not empty (contains dashboards or alert rules). Defaults to `false`. */ preventDestroyIfNotEmpty?: pulumi.Input<boolean>; /** * The title of the folder. */ title?: pulumi.Input<string>; /** * Unique identifier. */ uid?: pulumi.Input<string>; /** * The full URL of the folder. */ url?: pulumi.Input<string>; } /** * The set of arguments for constructing a Folder resource. */ export interface FolderArgs { /** * The Organization ID. If not set, the Org ID defined in the provider block will be used. */ orgId?: pulumi.Input<string>; /** * Prevent deletion of the folder if it is not empty (contains dashboards or alert rules). Defaults to `false`. */ preventDestroyIfNotEmpty?: pulumi.Input<boolean>; /** * The title of the folder. */ title: pulumi.Input<string>; /** * Unique identifier. */ uid?: pulumi.Input<string>; }