grafana.Playlist
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumiverse/grafana";
const test = new grafana.oss.Playlist("test", {
name: "My Playlist!",
interval: "5m",
items: [
{
order: 2,
title: "Terraform Dashboard By Tag",
type: "dashboard_by_tag",
value: "terraform",
},
{
order: 1,
title: "Terraform Dashboard By ID",
type: "dashboard_by_id",
value: "3",
},
],
});
import pulumi
import pulumiverse_grafana as grafana
test = grafana.oss.Playlist("test",
name="My Playlist!",
interval="5m",
items=[
{
"order": 2,
"title": "Terraform Dashboard By Tag",
"type": "dashboard_by_tag",
"value": "terraform",
},
{
"order": 1,
"title": "Terraform Dashboard By ID",
"type": "dashboard_by_id",
"value": "3",
},
])
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.NewPlaylist(ctx, "test", &oss.PlaylistArgs{
Name: pulumi.String("My Playlist!"),
Interval: pulumi.String("5m"),
Items: oss.PlaylistItemArray{
&oss.PlaylistItemArgs{
Order: pulumi.Int(2),
Title: pulumi.String("Terraform Dashboard By Tag"),
Type: pulumi.String("dashboard_by_tag"),
Value: pulumi.String("terraform"),
},
&oss.PlaylistItemArgs{
Order: pulumi.Int(1),
Title: pulumi.String("Terraform Dashboard By ID"),
Type: pulumi.String("dashboard_by_id"),
Value: pulumi.String("3"),
},
},
})
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.Playlist("test", new()
{
Name = "My Playlist!",
Interval = "5m",
Items = new[]
{
new Grafana.Oss.Inputs.PlaylistItemArgs
{
Order = 2,
Title = "Terraform Dashboard By Tag",
Type = "dashboard_by_tag",
Value = "terraform",
},
new Grafana.Oss.Inputs.PlaylistItemArgs
{
Order = 1,
Title = "Terraform Dashboard By ID",
Type = "dashboard_by_id",
Value = "3",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.oss.Playlist;
import com.pulumi.grafana.oss.PlaylistArgs;
import com.pulumi.grafana.oss.inputs.PlaylistItemArgs;
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 Playlist("test", PlaylistArgs.builder()
.name("My Playlist!")
.interval("5m")
.items(
PlaylistItemArgs.builder()
.order(2)
.title("Terraform Dashboard By Tag")
.type("dashboard_by_tag")
.value("terraform")
.build(),
PlaylistItemArgs.builder()
.order(1)
.title("Terraform Dashboard By ID")
.type("dashboard_by_id")
.value("3")
.build())
.build());
}
}
resources:
test:
type: grafana:oss:Playlist
properties:
name: My Playlist!
interval: 5m
items:
- order: 2
title: Terraform Dashboard By Tag
type: dashboard_by_tag
value: terraform
- order: 1
title: Terraform Dashboard By ID
type: dashboard_by_id
value: '3'
Create Playlist Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Playlist(name: string, args: PlaylistArgs, opts?: CustomResourceOptions);
@overload
def Playlist(resource_name: str,
args: PlaylistArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Playlist(resource_name: str,
opts: Optional[ResourceOptions] = None,
interval: Optional[str] = None,
items: Optional[Sequence[PlaylistItemArgs]] = None,
name: Optional[str] = None,
org_id: Optional[str] = None)
func NewPlaylist(ctx *Context, name string, args PlaylistArgs, opts ...ResourceOption) (*Playlist, error)
public Playlist(string name, PlaylistArgs args, CustomResourceOptions? opts = null)
public Playlist(String name, PlaylistArgs args)
public Playlist(String name, PlaylistArgs args, CustomResourceOptions options)
type: grafana:Playlist
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 PlaylistArgs
- 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 PlaylistArgs
- 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 PlaylistArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PlaylistArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PlaylistArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Playlist 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 Playlist resource accepts the following input properties:
- Interval string
- Items
List<Pulumiverse.
Grafana. Inputs. Playlist Item> - Name string
- The name of the playlist.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Interval string
- Items
[]Playlist
Item Args - Name string
- The name of the playlist.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- interval String
- items
List<Playlist
Item> - name String
- The name of the playlist.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- interval string
- items
Playlist
Item[] - name string
- The name of the playlist.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- interval str
- items
Sequence[Playlist
Item Args] - name str
- The name of the playlist.
- org_
id str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- interval String
- items List<Property Map>
- name String
- The name of the playlist.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Playlist 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 Playlist Resource
Get an existing Playlist 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?: PlaylistState, opts?: CustomResourceOptions): Playlist
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
interval: Optional[str] = None,
items: Optional[Sequence[PlaylistItemArgs]] = None,
name: Optional[str] = None,
org_id: Optional[str] = None) -> Playlist
func GetPlaylist(ctx *Context, name string, id IDInput, state *PlaylistState, opts ...ResourceOption) (*Playlist, error)
public static Playlist Get(string name, Input<string> id, PlaylistState? state, CustomResourceOptions? opts = null)
public static Playlist get(String name, Output<String> id, PlaylistState 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.
- Interval string
- Items
List<Pulumiverse.
Grafana. Inputs. Playlist Item> - Name string
- The name of the playlist.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- Interval string
- Items
[]Playlist
Item Args - Name string
- The name of the playlist.
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- interval String
- items
List<Playlist
Item> - name String
- The name of the playlist.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- interval string
- items
Playlist
Item[] - name string
- The name of the playlist.
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- interval str
- items
Sequence[Playlist
Item Args] - name str
- The name of the playlist.
- org_
id str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
- interval String
- items List<Property Map>
- name String
- The name of the playlist.
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
Supporting Types
PlaylistItem, PlaylistItemArgs
Import
$ pulumi import grafana:index/playlist:Playlist name "{{ uid }}"
$ pulumi import grafana:index/playlist:Playlist name "{{ orgID }}:{{ uid }}"
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.