1. Packages
  2. Packages
  3. Grafana Cloud
  4. API Docs
  5. apps
  6. apps/v0alpha1
  7. Playlist
Viewing docs for Grafana v2.28.0
published on Wednesday, Apr 29, 2026 by pulumiverse
grafana logo
Viewing docs for Grafana v2.28.0
published on Wednesday, Apr 29, 2026 by pulumiverse

    Manages Grafana playlists using the new Grafana APIs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const example = new grafana.apps.v0alpha1.Playlist("example", {
        metadata: {
            uid: "example-playlist",
        },
        spec: {
            title: "Example Playlist",
            interval: "5m",
            items: [{
                type: "dashboard_by_uid",
                value: "example-dashboard",
            }],
        },
    });
    
    import pulumi
    import pulumiverse_grafana as grafana
    
    example = grafana.apps.v0alpha1.Playlist("example",
        metadata={
            "uid": "example-playlist",
        },
        spec={
            "title": "Example Playlist",
            "interval": "5m",
            "items": [{
                "type": "dashboard_by_uid",
                "value": "example-dashboard",
            }],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/v2/go/grafana/apps"
    	appsv0alpha1 "github.com/pulumiverse/pulumi-grafana/sdk/v2/go/grafana/apps/v0alpha1"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := apps.NewPlaylist(ctx, "example", &apps.PlaylistArgs{
    			Metadata: &appsv0alpha1.PlaylistMetadataArgs{
    				Uid: pulumi.String("example-playlist"),
    			},
    			Spec: &appsv0alpha1.PlaylistSpecArgs{
    				Title:    pulumi.String("Example Playlist"),
    				Interval: pulumi.String("5m"),
    				Items: appsv0alpha1.PlaylistSpecItemArray{
    					&appsv0alpha1.PlaylistSpecItemArgs{
    						Type:  pulumi.String("dashboard_by_uid"),
    						Value: pulumi.String("example-dashboard"),
    					},
    				},
    			},
    		})
    		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 example = new Grafana.Apps.V0Alpha1.Playlist("example", new()
        {
            Metadata = new Grafana.Apps.V0Alpha1.Inputs.PlaylistMetadataArgs
            {
                Uid = "example-playlist",
            },
            Spec = new Grafana.Apps.V0Alpha1.Inputs.PlaylistSpecArgs
            {
                Title = "Example Playlist",
                Interval = "5m",
                Items = new[]
                {
                    new Grafana.Apps.V0Alpha1.Inputs.PlaylistSpecItemArgs
                    {
                        Type = "dashboard_by_uid",
                        Value = "example-dashboard",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.apps_v0alpha1.Playlist;
    import com.pulumi.grafana.apps_v0alpha1.PlaylistArgs;
    import com.pulumi.grafana.apps.inputs.PlaylistMetadataArgs;
    import com.pulumi.grafana.apps.inputs.PlaylistSpecArgs;
    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 example = new Playlist("example", PlaylistArgs.builder()
                .metadata(PlaylistMetadataArgs.builder()
                    .uid("example-playlist")
                    .build())
                .spec(PlaylistSpecArgs.builder()
                    .title("Example Playlist")
                    .interval("5m")
                    .items(PlaylistSpecItemArgs.builder()
                        .type("dashboard_by_uid")
                        .value("example-dashboard")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: grafana:apps/v0alpha1:Playlist
        properties:
          metadata:
            uid: example-playlist
          spec:
            title: Example Playlist
            interval: 5m
            items:
              - type: dashboard_by_uid
                value: example-dashboard
    

    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: Optional[PlaylistArgs] = None,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Playlist(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 metadata: Optional[PlaylistMetadataArgs] = None,
                 options: Optional[PlaylistOptionsArgs] = None,
                 spec: Optional[PlaylistSpecArgs] = None)
    func NewPlaylist(ctx *Context, name string, args *PlaylistArgs, opts ...ResourceOption) (*Playlist, error)
    public Playlist(string name, PlaylistArgs? args = null, CustomResourceOptions? opts = null)
    public Playlist(String name, PlaylistArgs args)
    public Playlist(String name, PlaylistArgs args, CustomResourceOptions options)
    
    type: grafana:apps/v0alpha1/playlist: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:

    Metadata PlaylistMetadataArgs
    The metadata of the resource.
    Options PlaylistOptionsArgs
    Options for applying the resource.
    Spec PlaylistSpecArgs
    The spec of the resource.
    metadata PlaylistMetadata
    The metadata of the resource.
    options PlaylistOptions
    Options for applying the resource.
    spec PlaylistSpec
    The spec of the resource.
    metadata PlaylistMetadata
    The metadata of the resource.
    options PlaylistOptions
    Options for applying the resource.
    spec PlaylistSpec
    The spec of the resource.
    metadata PlaylistMetadataArgs
    The metadata of the resource.
    options PlaylistOptionsArgs
    Options for applying the resource.
    spec PlaylistSpecArgs
    The spec of the resource.
    metadata Property Map
    The metadata of the resource.
    options Property Map
    Options for applying the resource.
    spec Property Map
    The spec of the resource.

    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,
            metadata: Optional[PlaylistMetadataArgs] = None,
            options: Optional[PlaylistOptionsArgs] = None,
            spec: Optional[PlaylistSpecArgs] = 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:apps/v0alpha1/playlist:Playlist    get:      id: ${id}
    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:
    Metadata PlaylistMetadataArgs
    The metadata of the resource.
    Options PlaylistOptionsArgs
    Options for applying the resource.
    Spec PlaylistSpecArgs
    The spec of the resource.
    metadata PlaylistMetadata
    The metadata of the resource.
    options PlaylistOptions
    Options for applying the resource.
    spec PlaylistSpec
    The spec of the resource.
    metadata PlaylistMetadata
    The metadata of the resource.
    options PlaylistOptions
    Options for applying the resource.
    spec PlaylistSpec
    The spec of the resource.
    metadata PlaylistMetadataArgs
    The metadata of the resource.
    options PlaylistOptionsArgs
    Options for applying the resource.
    spec PlaylistSpecArgs
    The spec of the resource.
    metadata Property Map
    The metadata of the resource.
    options Property Map
    Options for applying the resource.
    spec Property Map
    The spec of the resource.

    Supporting Types

    PlaylistMetadata, PlaylistMetadataArgs

    Uid string
    The unique identifier of the resource.
    Annotations Dictionary<string, string>
    Annotations of the resource.
    FolderUid string
    The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
    Url string
    The full URL of the resource.
    Uuid string
    The globally unique identifier of a resource, used by the API for tracking.
    Version string
    The version of the resource.
    Uid string
    The unique identifier of the resource.
    Annotations map[string]string
    Annotations of the resource.
    FolderUid string
    The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
    Url string
    The full URL of the resource.
    Uuid string
    The globally unique identifier of a resource, used by the API for tracking.
    Version string
    The version of the resource.
    uid String
    The unique identifier of the resource.
    annotations Map<String,String>
    Annotations of the resource.
    folderUid String
    The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
    url String
    The full URL of the resource.
    uuid String
    The globally unique identifier of a resource, used by the API for tracking.
    version String
    The version of the resource.
    uid string
    The unique identifier of the resource.
    annotations {[key: string]: string}
    Annotations of the resource.
    folderUid string
    The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
    url string
    The full URL of the resource.
    uuid string
    The globally unique identifier of a resource, used by the API for tracking.
    version string
    The version of the resource.
    uid str
    The unique identifier of the resource.
    annotations Mapping[str, str]
    Annotations of the resource.
    folder_uid str
    The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
    url str
    The full URL of the resource.
    uuid str
    The globally unique identifier of a resource, used by the API for tracking.
    version str
    The version of the resource.
    uid String
    The unique identifier of the resource.
    annotations Map<String>
    Annotations of the resource.
    folderUid String
    The UID of the folder to save the resource in. For example, it's supported for dashboards and folders. To know if it's supported for the specific resource you're using check the documentation.
    url String
    The full URL of the resource.
    uuid String
    The globally unique identifier of a resource, used by the API for tracking.
    version String
    The version of the resource.

    PlaylistOptions, PlaylistOptionsArgs

    ManagerIdentity string
    Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
    Overwrite bool
    Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
    ManagerIdentity string
    Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
    Overwrite bool
    Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
    managerIdentity String
    Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
    overwrite Boolean
    Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
    managerIdentity string
    Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
    overwrite boolean
    Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
    manager_identity str
    Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
    overwrite bool
    Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.
    managerIdentity String
    Override the identity stamped on this resource's manager metadata. Defaults to "grafana-terraform-provider". Use this to distinguish resources managed by different Pulumi Stacks targeting the same Grafana instance.
    overwrite Boolean
    Set to true if you want to overwrite existing resource with newer version, same resource title in folder or same resource uid.

    PlaylistSpec, PlaylistSpecArgs

    Items List<Pulumiverse.Grafana.Apps.V0Alpha1.Inputs.PlaylistSpecItem>
    The items of the playlist.
    Title string
    The title of the playlist.
    Interval string
    The interval of the playlist.
    Items []PlaylistSpecItem
    The items of the playlist.
    Title string
    The title of the playlist.
    Interval string
    The interval of the playlist.
    items List<PlaylistSpecItem>
    The items of the playlist.
    title String
    The title of the playlist.
    interval String
    The interval of the playlist.
    items PlaylistSpecItem[]
    The items of the playlist.
    title string
    The title of the playlist.
    interval string
    The interval of the playlist.
    items Sequence[PlaylistSpecItem]
    The items of the playlist.
    title str
    The title of the playlist.
    interval str
    The interval of the playlist.
    items List<Property Map>
    The items of the playlist.
    title String
    The title of the playlist.
    interval String
    The interval of the playlist.

    PlaylistSpecItem, PlaylistSpecItemArgs

    Type string
    Value string
    Type string
    Value string
    type String
    value String
    type string
    value string
    type str
    value str
    type String
    value String

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Viewing docs for Grafana v2.28.0
    published on Wednesday, Apr 29, 2026 by pulumiverse
      Try Pulumi Cloud free. Your team will thank you.