grafana logo
Grafana v0.0.10, May 21 23

grafana.Annotation

Explore with Pulumi AI

Example Usage

using System.Collections.Generic;
using System.Linq;
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 "@lbrlabs/pulumi-grafana";

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

Create 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,
               dashboard_uid: Optional[str] = None,
               org_id: Optional[str] = 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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

DashboardUid string

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

OrgId string

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

DashboardUid string

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

OrgId string

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

dashboardUid String

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

orgId String

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

dashboardUid string

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

orgId string

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

dashboard_uid str

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

org_id str

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

dashboardUid String

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

orgId String

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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 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,
        dashboard_uid: Optional[str] = None,
        org_id: Optional[str] = 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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

DashboardUid string

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

OrgId string

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

DashboardUid string

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

OrgId string

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

dashboardUid String

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

orgId String

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

dashboardUid string

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

orgId string

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

dashboard_uid str

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

org_id str

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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. Deprecated: Use dashboard_uid instead.

Deprecated:

Use dashboard_uid instead.

dashboardUid String

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

orgId String

The Organization ID. If not set, the Org ID defined in the provider block will be used.

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
grafana lbrlabs/pulumi-grafana
License
Apache-2.0
Notes

This Pulumi package is based on the grafana Terraform Provider.