grafana.oss.Annotation
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumiverse/grafana";
const test = new grafana.oss.Annotation("test", {text: "basic text"});
import pulumi
import pulumiverse_grafana as grafana
test = grafana.oss.Annotation("test", text="basic text")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/oss"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := oss.NewAnnotation(ctx, "test", &oss.AnnotationArgs{
Text: pulumi.String("basic text"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumiverse.Grafana;
return await Deployment.RunAsync(() =>
{
var test = new Grafana.Oss.Annotation("test", new()
{
Text = "basic text",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.oss.Annotation;
import com.pulumi.grafana.oss.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());
}
}
resources:
test:
type: grafana:oss:Annotation
properties:
text: basic text
Create Annotation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Annotation(name: string, args: AnnotationArgs, opts?: CustomResourceOptions);
@overload
def Annotation(resource_name: str,
args: AnnotationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Annotation(resource_name: str,
opts: Optional[ResourceOptions] = None,
text: Optional[str] = None,
dashboard_uid: Optional[str] = None,
org_id: Optional[str] = None,
panel_id: Optional[int] = None,
tags: Optional[Sequence[str]] = None,
time: Optional[str] = None,
time_end: Optional[str] = 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:oss:Annotation
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 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var annotationResource = new Grafana.Oss.Annotation("annotationResource", new()
{
Text = "string",
DashboardUid = "string",
OrgId = "string",
PanelId = 0,
Tags = new[]
{
"string",
},
Time = "string",
TimeEnd = "string",
});
example, err := oss.NewAnnotation(ctx, "annotationResource", &oss.AnnotationArgs{
Text: pulumi.String("string"),
DashboardUid: pulumi.String("string"),
OrgId: pulumi.String("string"),
PanelId: pulumi.Int(0),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
Time: pulumi.String("string"),
TimeEnd: pulumi.String("string"),
})
var annotationResource = new Annotation("annotationResource", AnnotationArgs.builder()
.text("string")
.dashboardUid("string")
.orgId("string")
.panelId(0)
.tags("string")
.time("string")
.timeEnd("string")
.build());
annotation_resource = grafana.oss.Annotation("annotationResource",
text="string",
dashboard_uid="string",
org_id="string",
panel_id=0,
tags=["string"],
time="string",
time_end="string")
const annotationResource = new grafana.oss.Annotation("annotationResource", {
text: "string",
dashboardUid: "string",
orgId: "string",
panelId: 0,
tags: ["string"],
time: "string",
timeEnd: "string",
});
type: grafana:oss:Annotation
properties:
dashboardUid: string
orgId: string
panelId: 0
tags:
- string
text: string
time: string
timeEnd: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Annotation resource accepts the following input properties:
- Text string
- The text to associate with the annotation.
- Dashboard
Uid string - The UID of the dashboard on which to create the annotation.
- Org
Id string - 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.
- List<string>
- The tags to associate with the annotation.
- Time string
- The RFC 3339-formatted time string indicating the annotation's time.
- Time
End string - The RFC 3339-formatted time string indicating the annotation's end time.
- Text string
- The text to associate with the annotation.
- Dashboard
Uid string - The UID of the dashboard on which to create the annotation.
- Org
Id string - 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.
- []string
- The tags to associate with the annotation.
- Time string
- The RFC 3339-formatted time string indicating the annotation's time.
- Time
End string - The RFC 3339-formatted time string indicating the annotation's end time.
- text String
- The text to associate with the annotation.
- dashboard
Uid String - The UID of the dashboard on which to create the annotation.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- panel
Id Integer - The ID of the dashboard panel on which to create the annotation.
- List<String>
- The tags to associate with the annotation.
- time String
- The RFC 3339-formatted time string indicating the annotation's time.
- time
End String - The RFC 3339-formatted time string indicating the annotation's end time.
- text string
- The text to associate with the annotation.
- dashboard
Uid string - The UID of the dashboard on which to create the annotation.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- panel
Id number - The ID of the dashboard panel on which to create the annotation.
- string[]
- The tags to associate with the annotation.
- time string
- The RFC 3339-formatted time string indicating the annotation's time.
- time
End string - The RFC 3339-formatted time string indicating the annotation's end time.
- text str
- The text to associate with the annotation.
- dashboard_
uid str - The UID 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.
- 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.
- dashboard
Uid String - The UID of the dashboard on which to create the annotation.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- panel
Id Number - The ID of the dashboard panel on which to create the annotation.
- List<String>
- The tags to associate with the annotation.
- time String
- The RFC 3339-formatted time string indicating the annotation's time.
- time
End 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_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.
- Dashboard
Uid string - The UID of the dashboard on which to create the annotation.
- Org
Id string - 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.
- 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.
- Time
End string - The RFC 3339-formatted time string indicating the annotation's end time.
- Dashboard
Uid string - The UID of the dashboard on which to create the annotation.
- Org
Id string - 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.
- []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.
- Time
End string - The RFC 3339-formatted time string indicating the annotation's end time.
- dashboard
Uid String - The UID of the dashboard on which to create the annotation.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- panel
Id Integer - The ID of the dashboard panel on which to create the annotation.
- 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.
- time
End String - The RFC 3339-formatted time string indicating the annotation's end time.
- dashboard
Uid string - The UID of the dashboard on which to create the annotation.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- panel
Id number - The ID of the dashboard panel on which to create the annotation.
- 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.
- time
End string - The RFC 3339-formatted time string indicating the annotation's end time.
- dashboard_
uid str - The UID 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.
- 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.
- dashboard
Uid String - The UID of the dashboard on which to create the annotation.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- panel
Id Number - The ID of the dashboard panel on which to create the annotation.
- 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.
- time
End String - The RFC 3339-formatted time string indicating the annotation's end time.
Import
$ pulumi import grafana:oss/annotation:Annotation name "{{ id }}"
$ pulumi import grafana:oss/annotation:Annotation name "{{ orgID }}:{{ id }}"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- grafana pulumiverse/pulumi-grafana
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
grafana
Terraform Provider.