1. Packages
  2. Grafana Cloud
  3. API Docs
  4. oss
  5. Playlist
Grafana v0.16.3 published on Monday, Apr 7, 2025 by pulumiverse

grafana.oss.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 UID",
            type: "dashboard_by_uid",
            value: "cIBgcSjkk",
        },
    ],
});
Copy
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 UID",
            "type": "dashboard_by_uid",
            "value": "cIBgcSjkk",
        },
    ])
Copy
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 UID"),
					Type:  pulumi.String("dashboard_by_uid"),
					Value: pulumi.String("cIBgcSjkk"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 UID",
                Type = "dashboard_by_uid",
                Value = "cIBgcSjkk",
            },
        },
    });

});
Copy
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 UID")
                    .type("dashboard_by_uid")
                    .value("cIBgcSjkk")
                    .build())
            .build());

    }
}
Copy
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 UID
          type: dashboard_by_uid
          value: cIBgcSjkk
Copy

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:oss:Playlist
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PlaylistArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. PlaylistArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PlaylistArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PlaylistArgs
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 playlistResource = new Grafana.Oss.Playlist("playlistResource", new()
{
    Interval = "string",
    Items = new[]
    {
        new Grafana.Oss.Inputs.PlaylistItemArgs
        {
            Order = 0,
            Title = "string",
            Id = "string",
            Type = "string",
            Value = "string",
        },
    },
    Name = "string",
    OrgId = "string",
});
Copy
example, err := oss.NewPlaylist(ctx, "playlistResource", &oss.PlaylistArgs{
	Interval: pulumi.String("string"),
	Items: oss.PlaylistItemArray{
		&oss.PlaylistItemArgs{
			Order: pulumi.Int(0),
			Title: pulumi.String("string"),
			Id:    pulumi.String("string"),
			Type:  pulumi.String("string"),
			Value: pulumi.String("string"),
		},
	},
	Name:  pulumi.String("string"),
	OrgId: pulumi.String("string"),
})
Copy
var playlistResource = new Playlist("playlistResource", PlaylistArgs.builder()
    .interval("string")
    .items(PlaylistItemArgs.builder()
        .order(0)
        .title("string")
        .id("string")
        .type("string")
        .value("string")
        .build())
    .name("string")
    .orgId("string")
    .build());
Copy
playlist_resource = grafana.oss.Playlist("playlistResource",
    interval="string",
    items=[{
        "order": 0,
        "title": "string",
        "id": "string",
        "type": "string",
        "value": "string",
    }],
    name="string",
    org_id="string")
Copy
const playlistResource = new grafana.oss.Playlist("playlistResource", {
    interval: "string",
    items: [{
        order: 0,
        title: "string",
        id: "string",
        type: "string",
        value: "string",
    }],
    name: "string",
    orgId: "string",
});
Copy
type: grafana:oss:Playlist
properties:
    interval: string
    items:
        - id: string
          order: 0
          title: string
          type: string
          value: string
    name: string
    orgId: string
Copy

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 This property is required. string
Items This property is required. List<Pulumiverse.Grafana.Oss.Inputs.PlaylistItem>
Name Changes to this property will trigger replacement. string
The name of the playlist.
OrgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
Interval This property is required. string
Items This property is required. []PlaylistItemArgs
Name Changes to this property will trigger replacement. string
The name of the playlist.
OrgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
interval This property is required. String
items This property is required. List<PlaylistItem>
name Changes to this property will trigger replacement. String
The name of the playlist.
orgId Changes to this property will trigger replacement. String
The Organization ID. If not set, the Org ID defined in the provider block will be used.
interval This property is required. string
items This property is required. PlaylistItem[]
name Changes to this property will trigger replacement. string
The name of the playlist.
orgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
interval This property is required. str
items This property is required. Sequence[PlaylistItemArgs]
name Changes to this property will trigger replacement. str
The name of the playlist.
org_id Changes to this property will trigger replacement. str
The Organization ID. If not set, the Org ID defined in the provider block will be used.
interval This property is required. String
items This property is required. List<Property Map>
name Changes to this property will trigger replacement. String
The name of the playlist.
orgId Changes to this property will trigger replacement. 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)
resources:  _:    type: grafana:oss:Playlist    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Interval string
Items List<Pulumiverse.Grafana.Oss.Inputs.PlaylistItem>
Name Changes to this property will trigger replacement. string
The name of the playlist.
OrgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
Interval string
Items []PlaylistItemArgs
Name Changes to this property will trigger replacement. string
The name of the playlist.
OrgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
interval String
items List<PlaylistItem>
name Changes to this property will trigger replacement. String
The name of the playlist.
orgId Changes to this property will trigger replacement. String
The Organization ID. If not set, the Org ID defined in the provider block will be used.
interval string
items PlaylistItem[]
name Changes to this property will trigger replacement. string
The name of the playlist.
orgId Changes to this property will trigger replacement. string
The Organization ID. If not set, the Org ID defined in the provider block will be used.
interval str
items Sequence[PlaylistItemArgs]
name Changes to this property will trigger replacement. str
The name of the playlist.
org_id Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The name of the playlist.
orgId Changes to this property will trigger replacement. String
The Organization ID. If not set, the Org ID defined in the provider block will be used.

Supporting Types

PlaylistItem
, PlaylistItemArgs

Order This property is required. int
Title This property is required. string
Id string
Type string
Value string
Order This property is required. int
Title This property is required. string
Id string
Type string
Value string
order This property is required. Integer
title This property is required. String
id String
type String
value String
order This property is required. number
title This property is required. string
id string
type string
value string
order This property is required. int
title This property is required. str
id str
type str
value str
order This property is required. Number
title This property is required. String
id String
type String
value String

Import

$ pulumi import grafana:oss/playlist:Playlist name "{{ uid }}"
Copy
$ pulumi import grafana:oss/playlist:Playlist name "{{ orgID }}:{{ uid }}"
Copy

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.