Grafana

v0.0.3 published on Sunday, Sep 18, 2022 by lbrlabs

Annotation

Example Usage

using System.Collections.Generic;
using Pulumi;
using Grafana = Lbrlabs.PulumiPackage.Grafana;

return await Deployment.RunAsync(() => 
{
    var test = new Grafana.Annotation("test", new()
    {
        Text = "basic text",
    });

});
package main

import (
	"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 {
		_, err := grafana.NewAnnotation(ctx, "test", &grafana.AnnotationArgs{
			Text: pulumi.String("basic text"),
		})
		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.Annotation;
import com.pulumi.grafana.AnnotationArgs;
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 Annotation("test", AnnotationArgs.builder()        
            .text("basic text")
            .build());

    }
}
import pulumi
import lbrlabs_pulumi_grafana as grafana

test = grafana.Annotation("test", text="basic text")
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumi/grafana";

const test = new grafana.Annotation("test", {
    text: "basic text",
});
resources:
  test:
    type: grafana:Annotation
    properties:
      text: basic text

Create a Annotation Resource

new Annotation(name: string, args: AnnotationArgs, opts?: CustomResourceOptions);
@overload
def Annotation(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               dashboard_id: Optional[int] = None,
               panel_id: Optional[int] = None,
               tags: Optional[Sequence[str]] = None,
               text: Optional[str] = None,
               time: Optional[str] = None,
               time_end: Optional[str] = None)
@overload
def Annotation(resource_name: str,
               args: AnnotationArgs,
               opts: Optional[ResourceOptions] = None)
func NewAnnotation(ctx *Context, name string, args AnnotationArgs, opts ...ResourceOption) (*Annotation, error)
public Annotation(string name, AnnotationArgs args, CustomResourceOptions? opts = null)
public Annotation(String name, AnnotationArgs args)
public Annotation(String name, AnnotationArgs args, CustomResourceOptions options)
type: grafana:Annotation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AnnotationArgs
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 AnnotationArgs
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 AnnotationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AnnotationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AnnotationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Annotation 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 Annotation resource accepts the following input properties:

Text string

The text to associate with the annotation.

DashboardId int

The ID of the dashboard on which to create the annotation.

PanelId int

The ID of the dashboard panel on which to create the annotation.

Tags List<string>

The tags to associate with the annotation.

Time string

The RFC 3339-formatted time string indicating the annotation's time.

TimeEnd string

The RFC 3339-formatted time string indicating the annotation's end time.

Text string

The text to associate with the annotation.

DashboardId int

The ID of the dashboard on which to create the annotation.

PanelId int

The ID of the dashboard panel on which to create the annotation.

Tags []string

The tags to associate with the annotation.

Time string

The RFC 3339-formatted time string indicating the annotation's time.

TimeEnd string

The RFC 3339-formatted time string indicating the annotation's end time.

text String

The text to associate with the annotation.

dashboardId Integer

The ID of the dashboard on which to create the annotation.

panelId Integer

The ID of the dashboard panel on which to create the annotation.

tags List<String>

The tags to associate with the annotation.

time String

The RFC 3339-formatted time string indicating the annotation's time.

timeEnd String

The RFC 3339-formatted time string indicating the annotation's end time.

text string

The text to associate with the annotation.

dashboardId number

The ID of the dashboard on which to create the annotation.

panelId number

The ID of the dashboard panel on which to create the annotation.

tags string[]

The tags to associate with the annotation.

time string

The RFC 3339-formatted time string indicating the annotation's time.

timeEnd string

The RFC 3339-formatted time string indicating the annotation's end time.

text str

The text to associate with the annotation.

dashboard_id int

The ID of the dashboard on which to create the annotation.

panel_id int

The ID of the dashboard panel on which to create the annotation.

tags Sequence[str]

The tags to associate with the annotation.

time str

The RFC 3339-formatted time string indicating the annotation's time.

time_end str

The RFC 3339-formatted time string indicating the annotation's end time.

text String

The text to associate with the annotation.

dashboardId Number

The ID of the dashboard on which to create the annotation.

panelId Number

The ID of the dashboard panel on which to create the annotation.

tags List<String>

The tags to associate with the annotation.

time String

The RFC 3339-formatted time string indicating the annotation's time.

timeEnd String

The RFC 3339-formatted time string indicating the annotation's end time.

Outputs

All input properties are implicitly available as output properties. Additionally, the Annotation 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 an Existing Annotation Resource

Get an existing Annotation 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?: AnnotationState, opts?: CustomResourceOptions): Annotation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        dashboard_id: Optional[int] = None,
        panel_id: Optional[int] = None,
        tags: Optional[Sequence[str]] = None,
        text: Optional[str] = None,
        time: Optional[str] = None,
        time_end: Optional[str] = None) -> Annotation
func GetAnnotation(ctx *Context, name string, id IDInput, state *AnnotationState, opts ...ResourceOption) (*Annotation, error)
public static Annotation Get(string name, Input<string> id, AnnotationState? state, CustomResourceOptions? opts = null)
public static Annotation get(String name, Output<String> id, AnnotationState 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.
The following state arguments are supported:
DashboardId int

The ID of the dashboard on which to create the annotation.

PanelId int

The ID of the dashboard panel on which to create the annotation.

Tags List<string>

The tags to associate with the annotation.

Text string

The text to associate with the annotation.

Time string

The RFC 3339-formatted time string indicating the annotation's time.

TimeEnd string

The RFC 3339-formatted time string indicating the annotation's end time.

DashboardId int

The ID of the dashboard on which to create the annotation.

PanelId int

The ID of the dashboard panel on which to create the annotation.

Tags []string

The tags to associate with the annotation.

Text string

The text to associate with the annotation.

Time string

The RFC 3339-formatted time string indicating the annotation's time.

TimeEnd string

The RFC 3339-formatted time string indicating the annotation's end time.

dashboardId Integer

The ID of the dashboard on which to create the annotation.

panelId Integer

The ID of the dashboard panel on which to create the annotation.

tags List<String>

The tags to associate with the annotation.

text String

The text to associate with the annotation.

time String

The RFC 3339-formatted time string indicating the annotation's time.

timeEnd String

The RFC 3339-formatted time string indicating the annotation's end time.

dashboardId number

The ID of the dashboard on which to create the annotation.

panelId number

The ID of the dashboard panel on which to create the annotation.

tags string[]

The tags to associate with the annotation.

text string

The text to associate with the annotation.

time string

The RFC 3339-formatted time string indicating the annotation's time.

timeEnd string

The RFC 3339-formatted time string indicating the annotation's end time.

dashboard_id int

The ID of the dashboard on which to create the annotation.

panel_id int

The ID of the dashboard panel on which to create the annotation.

tags Sequence[str]

The tags to associate with the annotation.

text str

The text to associate with the annotation.

time str

The RFC 3339-formatted time string indicating the annotation's time.

time_end str

The RFC 3339-formatted time string indicating the annotation's end time.

dashboardId Number

The ID of the dashboard on which to create the annotation.

panelId Number

The ID of the dashboard panel on which to create the annotation.

tags List<String>

The tags to associate with the annotation.

text String

The text to associate with the annotation.

time String

The RFC 3339-formatted time string indicating the annotation's time.

timeEnd String

The RFC 3339-formatted time string indicating the annotation's end time.

Package Details

Repository
https://github.com/lbrlabs/pulumi-grafana
License
Apache-2.0
Notes

This Pulumi package is based on the grafana Terraform Provider.