coralogix.HostedDashboard
Explore with Pulumi AI
Hosted dashboard. Can be one of - [“grafana”].
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as coralogix from "@pulumi/coralogix";
import * as fs from "fs";
const testFolder = new coralogix.GrafanaFolder("testFolder", {title: "Terraform Test Folder"});
const dashboard = new coralogix.HostedDashboard("dashboard", {grafana: {
configJson: fs.readFileSync("./grafana_dashboard.json", "utf8"),
folder: testFolder.grafanaFolderId,
}});
import pulumi
import pulumi_coralogix as coralogix
test_folder = coralogix.GrafanaFolder("testFolder", title="Terraform Test Folder")
dashboard = coralogix.HostedDashboard("dashboard", grafana={
"config_json": (lambda path: open(path).read())("./grafana_dashboard.json"),
"folder": test_folder.grafana_folder_id,
})
package main
import (
"os"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/coralogix/v2/coralogix"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func readFileOrPanic(path string) pulumi.StringPtrInput {
data, err := os.ReadFile(path)
if err != nil {
panic(err.Error())
}
return pulumi.String(string(data))
}
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testFolder, err := coralogix.NewGrafanaFolder(ctx, "testFolder", &coralogix.GrafanaFolderArgs{
Title: pulumi.String("Terraform Test Folder"),
})
if err != nil {
return err
}
_, err = coralogix.NewHostedDashboard(ctx, "dashboard", &coralogix.HostedDashboardArgs{
Grafana: &coralogix.HostedDashboardGrafanaArgs{
ConfigJson: pulumi.String(readFileOrPanic("./grafana_dashboard.json")),
Folder: testFolder.GrafanaFolderId,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Pulumi;
using Coralogix = Pulumi.Coralogix;
return await Deployment.RunAsync(() =>
{
var testFolder = new Coralogix.GrafanaFolder("testFolder", new()
{
Title = "Terraform Test Folder",
});
var dashboard = new Coralogix.HostedDashboard("dashboard", new()
{
Grafana = new Coralogix.Inputs.HostedDashboardGrafanaArgs
{
ConfigJson = File.ReadAllText("./grafana_dashboard.json"),
Folder = testFolder.GrafanaFolderId,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.coralogix.GrafanaFolder;
import com.pulumi.coralogix.GrafanaFolderArgs;
import com.pulumi.coralogix.HostedDashboard;
import com.pulumi.coralogix.HostedDashboardArgs;
import com.pulumi.coralogix.inputs.HostedDashboardGrafanaArgs;
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 testFolder = new GrafanaFolder("testFolder", GrafanaFolderArgs.builder()
.title("Terraform Test Folder")
.build());
var dashboard = new HostedDashboard("dashboard", HostedDashboardArgs.builder()
.grafana(HostedDashboardGrafanaArgs.builder()
.configJson(Files.readString(Paths.get("./grafana_dashboard.json")))
.folder(testFolder.grafanaFolderId())
.build())
.build());
}
}
resources:
dashboard:
type: coralogix:HostedDashboard
properties:
grafana:
configJson:
fn::readFile: ./grafana_dashboard.json
folder: ${testFolder.grafanaFolderId}
testFolder:
type: coralogix:GrafanaFolder
properties:
title: Terraform Test Folder
Create HostedDashboard Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new HostedDashboard(name: string, args?: HostedDashboardArgs, opts?: CustomResourceOptions);
@overload
def HostedDashboard(resource_name: str,
args: Optional[HostedDashboardArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def HostedDashboard(resource_name: str,
opts: Optional[ResourceOptions] = None,
grafana: Optional[HostedDashboardGrafanaArgs] = None,
hosted_dashboard_id: Optional[str] = None,
timeouts: Optional[HostedDashboardTimeoutsArgs] = None)
func NewHostedDashboard(ctx *Context, name string, args *HostedDashboardArgs, opts ...ResourceOption) (*HostedDashboard, error)
public HostedDashboard(string name, HostedDashboardArgs? args = null, CustomResourceOptions? opts = null)
public HostedDashboard(String name, HostedDashboardArgs args)
public HostedDashboard(String name, HostedDashboardArgs args, CustomResourceOptions options)
type: coralogix:HostedDashboard
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 HostedDashboardArgs
- 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 HostedDashboardArgs
- 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 HostedDashboardArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HostedDashboardArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args HostedDashboardArgs
- 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 hostedDashboardResource = new Coralogix.HostedDashboard("hostedDashboardResource", new()
{
Grafana = new Coralogix.Inputs.HostedDashboardGrafanaArgs
{
ConfigJson = "string",
DashboardId = 0,
Folder = "string",
Message = "string",
Overwrite = false,
Uid = "string",
Url = "string",
Version = 0,
},
HostedDashboardId = "string",
Timeouts = new Coralogix.Inputs.HostedDashboardTimeoutsArgs
{
Create = "string",
Delete = "string",
Read = "string",
Update = "string",
},
});
example, err := coralogix.NewHostedDashboard(ctx, "hostedDashboardResource", &coralogix.HostedDashboardArgs{
Grafana: &coralogix.HostedDashboardGrafanaArgs{
ConfigJson: pulumi.String("string"),
DashboardId: pulumi.Float64(0),
Folder: pulumi.String("string"),
Message: pulumi.String("string"),
Overwrite: pulumi.Bool(false),
Uid: pulumi.String("string"),
Url: pulumi.String("string"),
Version: pulumi.Float64(0),
},
HostedDashboardId: pulumi.String("string"),
Timeouts: &coralogix.HostedDashboardTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var hostedDashboardResource = new HostedDashboard("hostedDashboardResource", HostedDashboardArgs.builder()
.grafana(HostedDashboardGrafanaArgs.builder()
.configJson("string")
.dashboardId(0)
.folder("string")
.message("string")
.overwrite(false)
.uid("string")
.url("string")
.version(0)
.build())
.hostedDashboardId("string")
.timeouts(HostedDashboardTimeoutsArgs.builder()
.create("string")
.delete("string")
.read("string")
.update("string")
.build())
.build());
hosted_dashboard_resource = coralogix.HostedDashboard("hostedDashboardResource",
grafana={
"config_json": "string",
"dashboard_id": 0,
"folder": "string",
"message": "string",
"overwrite": False,
"uid": "string",
"url": "string",
"version": 0,
},
hosted_dashboard_id="string",
timeouts={
"create": "string",
"delete": "string",
"read": "string",
"update": "string",
})
const hostedDashboardResource = new coralogix.HostedDashboard("hostedDashboardResource", {
grafana: {
configJson: "string",
dashboardId: 0,
folder: "string",
message: "string",
overwrite: false,
uid: "string",
url: "string",
version: 0,
},
hostedDashboardId: "string",
timeouts: {
create: "string",
"delete": "string",
read: "string",
update: "string",
},
});
type: coralogix:HostedDashboard
properties:
grafana:
configJson: string
dashboardId: 0
folder: string
message: string
overwrite: false
uid: string
url: string
version: 0
hostedDashboardId: string
timeouts:
create: string
delete: string
read: string
update: string
HostedDashboard 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 HostedDashboard resource accepts the following input properties:
- Grafana
Hosted
Dashboard Grafana - Hosted grafana dashboard. * Official documentation * HTTP API
- Hosted
Dashboard stringId - The ID of this resource.
- Timeouts
Hosted
Dashboard Timeouts
- Grafana
Hosted
Dashboard Grafana Args - Hosted grafana dashboard. * Official documentation * HTTP API
- Hosted
Dashboard stringId - The ID of this resource.
- Timeouts
Hosted
Dashboard Timeouts Args
- grafana
Hosted
Dashboard Grafana - Hosted grafana dashboard. * Official documentation * HTTP API
- hosted
Dashboard StringId - The ID of this resource.
- timeouts
Hosted
Dashboard Timeouts
- grafana
Hosted
Dashboard Grafana - Hosted grafana dashboard. * Official documentation * HTTP API
- hosted
Dashboard stringId - The ID of this resource.
- timeouts
Hosted
Dashboard Timeouts
- grafana
Hosted
Dashboard Grafana Args - Hosted grafana dashboard. * Official documentation * HTTP API
- hosted_
dashboard_ strid - The ID of this resource.
- timeouts
Hosted
Dashboard Timeouts Args
- grafana Property Map
- Hosted grafana dashboard. * Official documentation * HTTP API
- hosted
Dashboard StringId - The ID of this resource.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the HostedDashboard resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing HostedDashboard Resource
Get an existing HostedDashboard 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?: HostedDashboardState, opts?: CustomResourceOptions): HostedDashboard
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
grafana: Optional[HostedDashboardGrafanaArgs] = None,
hosted_dashboard_id: Optional[str] = None,
timeouts: Optional[HostedDashboardTimeoutsArgs] = None) -> HostedDashboard
func GetHostedDashboard(ctx *Context, name string, id IDInput, state *HostedDashboardState, opts ...ResourceOption) (*HostedDashboard, error)
public static HostedDashboard Get(string name, Input<string> id, HostedDashboardState? state, CustomResourceOptions? opts = null)
public static HostedDashboard get(String name, Output<String> id, HostedDashboardState state, CustomResourceOptions options)
resources: _: type: coralogix:HostedDashboard 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.
- Grafana
Hosted
Dashboard Grafana - Hosted grafana dashboard. * Official documentation * HTTP API
- Hosted
Dashboard stringId - The ID of this resource.
- Timeouts
Hosted
Dashboard Timeouts
- Grafana
Hosted
Dashboard Grafana Args - Hosted grafana dashboard. * Official documentation * HTTP API
- Hosted
Dashboard stringId - The ID of this resource.
- Timeouts
Hosted
Dashboard Timeouts Args
- grafana
Hosted
Dashboard Grafana - Hosted grafana dashboard. * Official documentation * HTTP API
- hosted
Dashboard StringId - The ID of this resource.
- timeouts
Hosted
Dashboard Timeouts
- grafana
Hosted
Dashboard Grafana - Hosted grafana dashboard. * Official documentation * HTTP API
- hosted
Dashboard stringId - The ID of this resource.
- timeouts
Hosted
Dashboard Timeouts
- grafana
Hosted
Dashboard Grafana Args - Hosted grafana dashboard. * Official documentation * HTTP API
- hosted_
dashboard_ strid - The ID of this resource.
- timeouts
Hosted
Dashboard Timeouts Args
- grafana Property Map
- Hosted grafana dashboard. * Official documentation * HTTP API
- hosted
Dashboard StringId - The ID of this resource.
- timeouts Property Map
Supporting Types
HostedDashboardGrafana, HostedDashboardGrafanaArgs
- Config
Json string - The complete dashboard model JSON.
- Dashboard
Id double - The numeric ID of the dashboard computed by Grafana.
- Folder string
- The id or UID of the folder to save the dashboard in.
- Message string
- Set a commit message for the version history.
- Overwrite bool
- Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
- Uid string
- The unique identifier of a dashboard. This is used to construct its URL. It's automatically generated if not provided when creating a dashboard. The uid allows having consistent URLs for accessing dashboards and when syncing dashboards between multiple Grafana installs.
- Url string
- The full URL of the dashboard.
- Version double
- Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are not lost.
- Config
Json string - The complete dashboard model JSON.
- Dashboard
Id float64 - The numeric ID of the dashboard computed by Grafana.
- Folder string
- The id or UID of the folder to save the dashboard in.
- Message string
- Set a commit message for the version history.
- Overwrite bool
- Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
- Uid string
- The unique identifier of a dashboard. This is used to construct its URL. It's automatically generated if not provided when creating a dashboard. The uid allows having consistent URLs for accessing dashboards and when syncing dashboards between multiple Grafana installs.
- Url string
- The full URL of the dashboard.
- Version float64
- Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are not lost.
- config
Json String - The complete dashboard model JSON.
- dashboard
Id Double - The numeric ID of the dashboard computed by Grafana.
- folder String
- The id or UID of the folder to save the dashboard in.
- message String
- Set a commit message for the version history.
- overwrite Boolean
- Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
- uid String
- The unique identifier of a dashboard. This is used to construct its URL. It's automatically generated if not provided when creating a dashboard. The uid allows having consistent URLs for accessing dashboards and when syncing dashboards between multiple Grafana installs.
- url String
- The full URL of the dashboard.
- version Double
- Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are not lost.
- config
Json string - The complete dashboard model JSON.
- dashboard
Id number - The numeric ID of the dashboard computed by Grafana.
- folder string
- The id or UID of the folder to save the dashboard in.
- message string
- Set a commit message for the version history.
- overwrite boolean
- Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
- uid string
- The unique identifier of a dashboard. This is used to construct its URL. It's automatically generated if not provided when creating a dashboard. The uid allows having consistent URLs for accessing dashboards and when syncing dashboards between multiple Grafana installs.
- url string
- The full URL of the dashboard.
- version number
- Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are not lost.
- config_
json str - The complete dashboard model JSON.
- dashboard_
id float - The numeric ID of the dashboard computed by Grafana.
- folder str
- The id or UID of the folder to save the dashboard in.
- message str
- Set a commit message for the version history.
- overwrite bool
- Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
- uid str
- The unique identifier of a dashboard. This is used to construct its URL. It's automatically generated if not provided when creating a dashboard. The uid allows having consistent URLs for accessing dashboards and when syncing dashboards between multiple Grafana installs.
- url str
- The full URL of the dashboard.
- version float
- Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are not lost.
- config
Json String - The complete dashboard model JSON.
- dashboard
Id Number - The numeric ID of the dashboard computed by Grafana.
- folder String
- The id or UID of the folder to save the dashboard in.
- message String
- Set a commit message for the version history.
- overwrite Boolean
- Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
- uid String
- The unique identifier of a dashboard. This is used to construct its URL. It's automatically generated if not provided when creating a dashboard. The uid allows having consistent URLs for accessing dashboards and when syncing dashboards between multiple Grafana installs.
- url String
- The full URL of the dashboard.
- version Number
- Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are not lost.
HostedDashboardTimeouts, HostedDashboardTimeoutsArgs
Package Details
- Repository
- coralogix coralogix/terraform-provider-coralogix
- License
- Notes
- This Pulumi package is based on the
coralogix
Terraform Provider.