logzio.GrafanaDashboard
Explore with Pulumi AI
# Grafana Dashboard Provider
Provides a Logz.io Grafana dashboard resource. This can be used to create and manage Grafana dashboards in Logz.io.
- Learn more about Logz.io’s Grafana dashboard API in Logz.io Docs.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as logzio from "@pulumi/logzio";
const myDashboard = new logzio.GrafanaDashboard("myDashboard", {
    dashboardJson: `{
  "title": "a title",
  "uid": "my_dashboard_uid",
  "panels": []
}
`,
    folderUid: "my_folder_uid",
    message: "my message",
    overwrite: true,
});
import pulumi
import pulumi_logzio as logzio
my_dashboard = logzio.GrafanaDashboard("myDashboard",
    dashboard_json="""{
  "title": "a title",
  "uid": "my_dashboard_uid",
  "panels": []
}
""",
    folder_uid="my_folder_uid",
    message="my message",
    overwrite=True)
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/logzio/logzio"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := logzio.NewGrafanaDashboard(ctx, "myDashboard", &logzio.GrafanaDashboardArgs{
			DashboardJson: pulumi.String(`{
  "title": "a title",
  "uid": "my_dashboard_uid",
  "panels": []
}
`),
			FolderUid: pulumi.String("my_folder_uid"),
			Message:   pulumi.String("my message"),
			Overwrite: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Logzio = Pulumi.Logzio;
return await Deployment.RunAsync(() => 
{
    var myDashboard = new Logzio.GrafanaDashboard("myDashboard", new()
    {
        DashboardJson = @"{
  ""title"": ""a title"",
  ""uid"": ""my_dashboard_uid"",
  ""panels"": []
}
",
        FolderUid = "my_folder_uid",
        Message = "my message",
        Overwrite = true,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.logzio.GrafanaDashboard;
import com.pulumi.logzio.GrafanaDashboardArgs;
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 myDashboard = new GrafanaDashboard("myDashboard", GrafanaDashboardArgs.builder()
            .dashboardJson("""
{
  "title": "a title",
  "uid": "my_dashboard_uid",
  "panels": []
}
            """)
            .folderUid("my_folder_uid")
            .message("my message")
            .overwrite(true)
            .build());
    }
}
resources:
  myDashboard:
    type: logzio:GrafanaDashboard
    properties:
      dashboardJson: |+
        {
          "title": "a title",
          "uid": "my_dashboard_uid",
          "panels": []
        }        
      folderUid: my_folder_uid
      message: my message
      overwrite: true
Create GrafanaDashboard Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GrafanaDashboard(name: string, args: GrafanaDashboardArgs, opts?: CustomResourceOptions);@overload
def GrafanaDashboard(resource_name: str,
                     args: GrafanaDashboardArgs,
                     opts: Optional[ResourceOptions] = None)
@overload
def GrafanaDashboard(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     dashboard_json: Optional[str] = None,
                     folder_uid: Optional[str] = None,
                     grafana_dashboard_id: Optional[str] = None,
                     message: Optional[str] = None,
                     overwrite: Optional[bool] = None)func NewGrafanaDashboard(ctx *Context, name string, args GrafanaDashboardArgs, opts ...ResourceOption) (*GrafanaDashboard, error)public GrafanaDashboard(string name, GrafanaDashboardArgs args, CustomResourceOptions? opts = null)
public GrafanaDashboard(String name, GrafanaDashboardArgs args)
public GrafanaDashboard(String name, GrafanaDashboardArgs args, CustomResourceOptions options)
type: logzio:GrafanaDashboard
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args GrafanaDashboardArgs
- 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 GrafanaDashboardArgs
- 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 GrafanaDashboardArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GrafanaDashboardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GrafanaDashboardArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var grafanaDashboardResource = new Logzio.GrafanaDashboard("grafanaDashboardResource", new()
{
    DashboardJson = "string",
    FolderUid = "string",
    GrafanaDashboardId = "string",
    Message = "string",
    Overwrite = false,
});
example, err := logzio.NewGrafanaDashboard(ctx, "grafanaDashboardResource", &logzio.GrafanaDashboardArgs{
	DashboardJson:      pulumi.String("string"),
	FolderUid:          pulumi.String("string"),
	GrafanaDashboardId: pulumi.String("string"),
	Message:            pulumi.String("string"),
	Overwrite:          pulumi.Bool(false),
})
var grafanaDashboardResource = new GrafanaDashboard("grafanaDashboardResource", GrafanaDashboardArgs.builder()
    .dashboardJson("string")
    .folderUid("string")
    .grafanaDashboardId("string")
    .message("string")
    .overwrite(false)
    .build());
grafana_dashboard_resource = logzio.GrafanaDashboard("grafanaDashboardResource",
    dashboard_json="string",
    folder_uid="string",
    grafana_dashboard_id="string",
    message="string",
    overwrite=False)
const grafanaDashboardResource = new logzio.GrafanaDashboard("grafanaDashboardResource", {
    dashboardJson: "string",
    folderUid: "string",
    grafanaDashboardId: "string",
    message: "string",
    overwrite: false,
});
type: logzio:GrafanaDashboard
properties:
    dashboardJson: string
    folderUid: string
    grafanaDashboardId: string
    message: string
    overwrite: false
GrafanaDashboard Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The GrafanaDashboard resource accepts the following input properties:
- DashboardJson string
- FolderUid string
- GrafanaDashboard stringId 
- Message string
- Overwrite bool
- DashboardJson string
- FolderUid string
- GrafanaDashboard stringId 
- Message string
- Overwrite bool
- dashboardJson String
- folderUid String
- grafanaDashboard StringId 
- message String
- overwrite Boolean
- dashboardJson string
- folderUid string
- grafanaDashboard stringId 
- message string
- overwrite boolean
- dashboard_json str
- folder_uid str
- grafana_dashboard_ strid 
- message str
- overwrite bool
- dashboardJson String
- folderUid String
- grafanaDashboard StringId 
- message String
- overwrite Boolean
Outputs
All input properties are implicitly available as output properties. Additionally, the GrafanaDashboard resource produces the following output properties:
- DashboardId double
- (Int) The identifier (id) of a dashboard.
- DashboardUid string
- (String) The unique identifier (uid) of a dashboard.
- Id string
- The provider-assigned unique ID for this managed resource.
- Url string
- (String) Dashboard url.
- Version double
- (Int) Dashboard version.
- DashboardId float64
- (Int) The identifier (id) of a dashboard.
- DashboardUid string
- (String) The unique identifier (uid) of a dashboard.
- Id string
- The provider-assigned unique ID for this managed resource.
- Url string
- (String) Dashboard url.
- Version float64
- (Int) Dashboard version.
- dashboardId Double
- (Int) The identifier (id) of a dashboard.
- dashboardUid String
- (String) The unique identifier (uid) of a dashboard.
- id String
- The provider-assigned unique ID for this managed resource.
- url String
- (String) Dashboard url.
- version Double
- (Int) Dashboard version.
- dashboardId number
- (Int) The identifier (id) of a dashboard.
- dashboardUid string
- (String) The unique identifier (uid) of a dashboard.
- id string
- The provider-assigned unique ID for this managed resource.
- url string
- (String) Dashboard url.
- version number
- (Int) Dashboard version.
- dashboard_id float
- (Int) The identifier (id) of a dashboard.
- dashboard_uid str
- (String) The unique identifier (uid) of a dashboard.
- id str
- The provider-assigned unique ID for this managed resource.
- url str
- (String) Dashboard url.
- version float
- (Int) Dashboard version.
- dashboardId Number
- (Int) The identifier (id) of a dashboard.
- dashboardUid String
- (String) The unique identifier (uid) of a dashboard.
- id String
- The provider-assigned unique ID for this managed resource.
- url String
- (String) Dashboard url.
- version Number
- (Int) Dashboard version.
Look up Existing GrafanaDashboard Resource
Get an existing GrafanaDashboard 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?: GrafanaDashboardState, opts?: CustomResourceOptions): GrafanaDashboard@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        dashboard_id: Optional[float] = None,
        dashboard_json: Optional[str] = None,
        dashboard_uid: Optional[str] = None,
        folder_uid: Optional[str] = None,
        grafana_dashboard_id: Optional[str] = None,
        message: Optional[str] = None,
        overwrite: Optional[bool] = None,
        url: Optional[str] = None,
        version: Optional[float] = None) -> GrafanaDashboardfunc GetGrafanaDashboard(ctx *Context, name string, id IDInput, state *GrafanaDashboardState, opts ...ResourceOption) (*GrafanaDashboard, error)public static GrafanaDashboard Get(string name, Input<string> id, GrafanaDashboardState? state, CustomResourceOptions? opts = null)public static GrafanaDashboard get(String name, Output<String> id, GrafanaDashboardState state, CustomResourceOptions options)resources:  _:    type: logzio:GrafanaDashboard    get:      id: ${id}- 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.
- DashboardId double
- (Int) The identifier (id) of a dashboard.
- DashboardJson string
- DashboardUid string
- (String) The unique identifier (uid) of a dashboard.
- FolderUid string
- GrafanaDashboard stringId 
- Message string
- Overwrite bool
- Url string
- (String) Dashboard url.
- Version double
- (Int) Dashboard version.
- DashboardId float64
- (Int) The identifier (id) of a dashboard.
- DashboardJson string
- DashboardUid string
- (String) The unique identifier (uid) of a dashboard.
- FolderUid string
- GrafanaDashboard stringId 
- Message string
- Overwrite bool
- Url string
- (String) Dashboard url.
- Version float64
- (Int) Dashboard version.
- dashboardId Double
- (Int) The identifier (id) of a dashboard.
- dashboardJson String
- dashboardUid String
- (String) The unique identifier (uid) of a dashboard.
- folderUid String
- grafanaDashboard StringId 
- message String
- overwrite Boolean
- url String
- (String) Dashboard url.
- version Double
- (Int) Dashboard version.
- dashboardId number
- (Int) The identifier (id) of a dashboard.
- dashboardJson string
- dashboardUid string
- (String) The unique identifier (uid) of a dashboard.
- folderUid string
- grafanaDashboard stringId 
- message string
- overwrite boolean
- url string
- (String) Dashboard url.
- version number
- (Int) Dashboard version.
- dashboard_id float
- (Int) The identifier (id) of a dashboard.
- dashboard_json str
- dashboard_uid str
- (String) The unique identifier (uid) of a dashboard.
- folder_uid str
- grafana_dashboard_ strid 
- message str
- overwrite bool
- url str
- (String) Dashboard url.
- version float
- (Int) Dashboard version.
- dashboardId Number
- (Int) The identifier (id) of a dashboard.
- dashboardJson String
- dashboardUid String
- (String) The unique identifier (uid) of a dashboard.
- folderUid String
- grafanaDashboard StringId 
- message String
- overwrite Boolean
- url String
- (String) Dashboard url.
- version Number
- (Int) Dashboard version.
Package Details
- Repository
- logzio logzio/terraform-provider-logzio
- License
- Notes
- This Pulumi package is based on the logzioTerraform Provider.