UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

140 lines (139 loc) 5.24 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 "@pulumiverse/grafana"; * * const testFolder = new grafana.oss.Folder("test_folder", {title: "Terraform Test Folder"}); * const testFolderDashboard = new grafana.oss.Dashboard("test_folder", { * folder: testFolder.id, * configJson: `{ * "title": "Dashboard in folder", * "uid": "dashboard-in-folder" * } * `, * }); * const testFolderWithUid = new grafana.oss.Folder("test_folder_with_uid", { * uid: "test-folder-uid", * title: "Terraform Test Folder With UID", * }); * ``` * * ## Import * * ```sh * $ pulumi import grafana:oss/folder:Folder name "{{ uid }}" * ``` * * ```sh * $ pulumi import grafana:oss/folder:Folder name "{{ orgID }}:{{ 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>; /** * The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance. */ readonly parentFolderUid: pulumi.Output<string | undefined>; /** * Prevent deletion of the folder if it is not empty (contains dashboards or alert rules). This feature requires Grafana 10.2 or later. 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>; /** * The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance. */ parentFolderUid?: pulumi.Input<string>; /** * Prevent deletion of the folder if it is not empty (contains dashboards or alert rules). This feature requires Grafana 10.2 or later. 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>; /** * The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance. */ parentFolderUid?: pulumi.Input<string>; /** * Prevent deletion of the folder if it is not empty (contains dashboards or alert rules). This feature requires Grafana 10.2 or later. Defaults to `false`. */ preventDestroyIfNotEmpty?: pulumi.Input<boolean>; /** * The title of the folder. */ title: pulumi.Input<string>; /** * Unique identifier. */ uid?: pulumi.Input<string>; }