
Grafana v0.0.10, May 21 23

Grafana v0.0.10, May 21 23
grafana.LibraryPanel
Explore with Pulumi AI
Manages Grafana library panels.
Example Usage
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Grafana = Lbrlabs.PulumiPackage.Grafana;
return await Deployment.RunAsync(() =>
{
var test = new Grafana.LibraryPanel("test", new()
{
ModelJson = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["title"] = "updated name",
["id"] = 12,
["version"] = 35,
}),
});
});
package main
import (
"encoding/json"
"github.com/lbrlabs/pulumi-grafana/sdk/go/grafana"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"title": "updated name",
"id": 12,
"version": 35,
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = grafana.NewLibraryPanel(ctx, "test", &grafana.LibraryPanelArgs{
ModelJson: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.LibraryPanel;
import com.pulumi.grafana.LibraryPanelArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new LibraryPanel("test", LibraryPanelArgs.builder()
.modelJson(serializeJson(
jsonObject(
jsonProperty("title", "updated name"),
jsonProperty("id", 12),
jsonProperty("version", 35)
)))
.build());
}
}
import pulumi
import json
import lbrlabs_pulumi_grafana as grafana
test = grafana.LibraryPanel("test", model_json=json.dumps({
"title": "updated name",
"id": 12,
"version": 35,
}))
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,
})});
resources:
test:
type: grafana:LibraryPanel
properties:
modelJson:
fn::toJSON:
title: updated name
id: 12
version: 35
Create LibraryPanel Resource
new LibraryPanel(name: string, args: LibraryPanelArgs, opts?: CustomResourceOptions);
@overload
def LibraryPanel(resource_name: str,
opts: Optional[ResourceOptions] = None,
folder_id: Optional[int] = None,
model_json: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
uid: Optional[str] = None)
@overload
def LibraryPanel(resource_name: str,
args: LibraryPanelArgs,
opts: Optional[ResourceOptions] = None)
func NewLibraryPanel(ctx *Context, name string, args LibraryPanelArgs, opts ...ResourceOption) (*LibraryPanel, error)
public LibraryPanel(string name, LibraryPanelArgs args, CustomResourceOptions? opts = null)
public LibraryPanel(String name, LibraryPanelArgs args)
public LibraryPanel(String name, LibraryPanelArgs args, CustomResourceOptions options)
type: grafana:LibraryPanel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LibraryPanelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args LibraryPanelArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args LibraryPanelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LibraryPanelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LibraryPanelArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
LibraryPanel Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The LibraryPanel resource accepts the following input properties:
- Model
Json string The JSON model for the library panel.
- Folder
Id int ID of the folder where the library panel is stored.
- Name string
Name of the library panel.
- Org
Id string The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Uid 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.
- Model
Json string The JSON model for the library panel.
- Folder
Id int ID of the folder where the library panel is stored.
- Name string
Name of the library panel.
- Org
Id string The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Uid 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.
- model
Json String The JSON model for the library panel.
- folder
Id Integer ID of the folder where the library panel is stored.
- name String
Name of the library panel.
- org
Id String The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid 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.
- model
Json string The JSON model for the library panel.
- folder
Id number ID of the folder where the library panel is stored.
- name string
Name of the library panel.
- org
Id string The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid 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.
- model_
json str The JSON model for the library panel.
- folder_
id int ID of the folder where the library panel is stored.
- name str
Name of the library panel.
- org_
id str The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid str
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.
- model
Json String The JSON model for the library panel.
- folder
Id Number ID of the folder where the library panel is stored.
- name String
Name of the library panel.
- org
Id String The Organization ID. If not set, the Org ID defined in the provider block will be used.
- uid 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the LibraryPanel resource produces the following output properties:
- Created string
Timestamp when the library panel was created.
- Dashboard
Ids List<int> Numerical IDs of Grafana dashboards containing the library panel.
- Description string
Description of the library panel.
- Folder
Name string Name of the folder containing the library panel.
- Folder
Uid string Unique ID (UID) of the folder containing the library panel.
- Id string
The provider-assigned unique ID for this managed resource.
- Panel
Id int The numeric ID of the library panel computed by Grafana.
- Type string
Type of the library panel (eg. text).
- Updated string
Timestamp when the library panel was last modified.
- Version int
Version of the library panel.
- Created string
Timestamp when the library panel was created.
- Dashboard
Ids []int Numerical IDs of Grafana dashboards containing the library panel.
- Description string
Description of the library panel.
- Folder
Name string Name of the folder containing the library panel.
- Folder
Uid string Unique ID (UID) of the folder containing the library panel.
- Id string
The provider-assigned unique ID for this managed resource.
- Panel
Id int The numeric ID of the library panel computed by Grafana.
- Type string
Type of the library panel (eg. text).
- Updated string
Timestamp when the library panel was last modified.
- Version int
Version of the library panel.
- created String
Timestamp when the library panel was created.
- dashboard
Ids List<Integer> Numerical IDs of Grafana dashboards containing the library panel.
- description String
Description of the library panel.
- folder
Name String Name of the folder containing the library panel.
- folder
Uid String Unique ID (UID) of the folder containing the library panel.
- id String
The provider-assigned unique ID for this managed resource.
- panel
Id Integer The numeric ID of the library panel computed by Grafana.
- type String
Type of the library panel (eg. text).
- updated String
Timestamp when the library panel was last modified.
- version Integer
Version of the library panel.
- created string
Timestamp when the library panel was created.
- dashboard
Ids number[] Numerical IDs of Grafana dashboards containing the library panel.
- description string
Description of the library panel.
- folder
Name string Name of the folder containing the library panel.
- folder
Uid string Unique ID (UID) of the folder containing the library panel.
- id string
The provider-assigned unique ID for this managed resource.
- panel
Id number The numeric ID of the library panel computed by Grafana.
- type string
Type of the library panel (eg. text).
- updated string
Timestamp when the library panel was last modified.
- version number
Version of the library panel.
- created str
Timestamp when the library panel was created.
- dashboard_
ids Sequence[int] Numerical IDs of Grafana dashboards containing the library panel.
- description str
Description of the library panel.
- folder_
name str Name of the folder containing the library panel.
- folder_
uid str Unique ID (UID) of the folder containing the library panel.
- id str
The provider-assigned unique ID for this managed resource.
- panel_
id int The numeric ID of the library panel computed by Grafana.
- type str
Type of the library panel (eg. text).
- updated str
Timestamp when the library panel was last modified.
- version int
Version of the library panel.
- created String
Timestamp when the library panel was created.
- dashboard
Ids List<Number> Numerical IDs of Grafana dashboards containing the library panel.
- description String
Description of the library panel.
- folder
Name String Name of the folder containing the library panel.
- folder
Uid String Unique ID (UID) of the folder containing the library panel.
- id String
The provider-assigned unique ID for this managed resource.
- panel
Id Number The numeric ID of the library panel computed by Grafana.
- type String
Type of the library panel (eg. text).
- updated String
Timestamp when the library panel was last modified.
- version Number
Version of the library panel.
Look up Existing LibraryPanel Resource
Get an existing LibraryPanel resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: LibraryPanelState, opts?: CustomResourceOptions): LibraryPanel
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created: Optional[str] = None,
dashboard_ids: Optional[Sequence[int]] = None,
description: Optional[str] = None,
folder_id: Optional[int] = None,
folder_name: Optional[str] = None,
folder_uid: Optional[str] = None,
model_json: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
panel_id: Optional[int] = None,
type: Optional[str] = None,
uid: Optional[str] = None,
updated: Optional[str] = None,
version: Optional[int] = None) -> LibraryPanel
func GetLibraryPanel(ctx *Context, name string, id IDInput, state *LibraryPanelState, opts ...ResourceOption) (*LibraryPanel, error)
public static LibraryPanel Get(string name, Input<string> id, LibraryPanelState? state, CustomResourceOptions? opts = null)
public static LibraryPanel get(String name, Output<String> id, LibraryPanelState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created string
Timestamp when the library panel was created.
- Dashboard
Ids List<int> Numerical IDs of Grafana dashboards containing the library panel.
- Description string
Description of the library panel.
- Folder
Id int ID of the folder where the library panel is stored.
- Folder
Name string Name of the folder containing the library panel.
- Folder
Uid string Unique ID (UID) of the folder containing the library panel.
- Model
Json string The JSON model for the library panel.
- Name string
Name of the library panel.
- Org
Id string The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Panel
Id int The numeric ID of the library panel computed by Grafana.
- Type string
Type of the library panel (eg. text).
- Uid 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.
- Updated string
Timestamp when the library panel was last modified.
- Version int
Version of the library panel.
- Created string
Timestamp when the library panel was created.
- Dashboard
Ids []int Numerical IDs of Grafana dashboards containing the library panel.
- Description string
Description of the library panel.
- Folder
Id int ID of the folder where the library panel is stored.
- Folder
Name string Name of the folder containing the library panel.
- Folder
Uid string Unique ID (UID) of the folder containing the library panel.
- Model
Json string The JSON model for the library panel.
- Name string
Name of the library panel.
- Org
Id string The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Panel
Id int The numeric ID of the library panel computed by Grafana.
- Type string
Type of the library panel (eg. text).
- Uid 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.
- Updated string
Timestamp when the library panel was last modified.
- Version int
Version of the library panel.
- created String
Timestamp when the library panel was created.
- dashboard
Ids List<Integer> Numerical IDs of Grafana dashboards containing the library panel.
- description String
Description of the library panel.
- folder
Id Integer ID of the folder where the library panel is stored.
- folder
Name String Name of the folder containing the library panel.
- folder
Uid String Unique ID (UID) of the folder containing the library panel.
- model
Json String The JSON model for the library panel.
- name String
Name of the library panel.
- org
Id String The Organization ID. If not set, the Org ID defined in the provider block will be used.
- panel
Id Integer The numeric ID of the library panel computed by Grafana.
- type String
Type of the library panel (eg. text).
- uid 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.
- updated String
Timestamp when the library panel was last modified.
- version Integer
Version of the library panel.
- created string
Timestamp when the library panel was created.
- dashboard
Ids number[] Numerical IDs of Grafana dashboards containing the library panel.
- description string
Description of the library panel.
- folder
Id number ID of the folder where the library panel is stored.
- folder
Name string Name of the folder containing the library panel.
- folder
Uid string Unique ID (UID) of the folder containing the library panel.
- model
Json string The JSON model for the library panel.
- name string
Name of the library panel.
- org
Id string The Organization ID. If not set, the Org ID defined in the provider block will be used.
- panel
Id number The numeric ID of the library panel computed by Grafana.
- type string
Type of the library panel (eg. text).
- uid 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.
- updated string
Timestamp when the library panel was last modified.
- version number
Version of the library panel.
- created str
Timestamp when the library panel was created.
- dashboard_
ids Sequence[int] Numerical IDs of Grafana dashboards containing the library panel.
- description str
Description of the library panel.
- folder_
id int ID of the folder where the library panel is stored.
- folder_
name str Name of the folder containing the library panel.
- folder_
uid str Unique ID (UID) of the folder containing the library panel.
- model_
json str The JSON model for the library panel.
- name str
Name of the library panel.
- org_
id str The Organization ID. If not set, the Org ID defined in the provider block will be used.
- panel_
id int The numeric ID of the library panel computed by Grafana.
- type str
Type of the library panel (eg. text).
- uid str
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.
- updated str
Timestamp when the library panel was last modified.
- version int
Version of the library panel.
- created String
Timestamp when the library panel was created.
- dashboard
Ids List<Number> Numerical IDs of Grafana dashboards containing the library panel.
- description String
Description of the library panel.
- folder
Id Number ID of the folder where the library panel is stored.
- folder
Name String Name of the folder containing the library panel.
- folder
Uid String Unique ID (UID) of the folder containing the library panel.
- model
Json String The JSON model for the library panel.
- name String
Name of the library panel.
- org
Id String The Organization ID. If not set, the Org ID defined in the provider block will be used.
- panel
Id Number The numeric ID of the library panel computed by Grafana.
- type String
Type of the library panel (eg. text).
- uid 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.
- updated String
Timestamp when the library panel was last modified.
- version Number
Version of the library panel.
Import
$ pulumi import grafana:index/libraryPanel:LibraryPanel panel_name {{library_panel_slug}}
Package Details
- Repository
- grafana lbrlabs/pulumi-grafana
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
grafana
Terraform Provider.