1. Packages
  2. Grafana Cloud
  3. API Docs
  4. Playlist
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

grafana.Playlist

Explore with Pulumi AI

grafana logo
Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const test = new grafana.Playlist("test", {
        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.Playlist("test",
        interval="5m",
        items=[
            grafana.PlaylistItemArgs(
                order=2,
                title="Terraform Dashboard By Tag",
                type="dashboard_by_tag",
                value="terraform",
            ),
            grafana.PlaylistItemArgs(
                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"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := grafana.NewPlaylist(ctx, "test", &grafana.PlaylistArgs{
    			Interval: pulumi.String("5m"),
    			Items: grafana.PlaylistItemArray{
    				&grafana.PlaylistItemArgs{
    					Order: pulumi.Int(2),
    					Title: pulumi.String("Terraform Dashboard By Tag"),
    					Type:  pulumi.String("dashboard_by_tag"),
    					Value: pulumi.String("terraform"),
    				},
    				&grafana.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.Playlist("test", new()
        {
            Interval = "5m",
            Items = new[]
            {
                new Grafana.Inputs.PlaylistItemArgs
                {
                    Order = 2,
                    Title = "Terraform Dashboard By Tag",
                    Type = "dashboard_by_tag",
                    Value = "terraform",
                },
                new Grafana.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.Playlist;
    import com.pulumi.grafana.PlaylistArgs;
    import com.pulumi.grafana.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()        
                .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:Playlist
        properties:
          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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var playlistResource = new Grafana.Playlist("playlistResource", new()
    {
        Interval = "string",
        Items = new[]
        {
            new Grafana.Inputs.PlaylistItemArgs
            {
                Order = 0,
                Title = "string",
                Id = "string",
                Type = "string",
                Value = "string",
            },
        },
        Name = "string",
        OrgId = "string",
    });
    
    example, err := grafana.NewPlaylist(ctx, "playlistResource", &grafana.PlaylistArgs{
    	Interval: pulumi.String("string"),
    	Items: grafana.PlaylistItemArray{
    		&grafana.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"),
    })
    
    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());
    
    playlist_resource = grafana.Playlist("playlistResource",
        interval="string",
        items=[grafana.PlaylistItemArgs(
            order=0,
            title="string",
            id="string",
            type="string",
            value="string",
        )],
        name="string",
        org_id="string")
    
    const playlistResource = new grafana.Playlist("playlistResource", {
        interval: "string",
        items: [{
            order: 0,
            title: "string",
            id: "string",
            type: "string",
            value: "string",
        }],
        name: "string",
        orgId: "string",
    });
    
    type: grafana:Playlist
    properties:
        interval: string
        items:
            - id: string
              order: 0
              title: string
              type: string
              value: string
        name: string
        orgId: string
    

    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

    The Playlist resource accepts the following input properties:

    Interval string
    Items List<Pulumiverse.Grafana.Inputs.PlaylistItem>
    Name string
    The name of the playlist.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Interval string
    Items []PlaylistItemArgs
    Name string
    The name of the playlist.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    interval String
    items List<PlaylistItem>
    name String
    The name of the playlist.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    interval string
    items PlaylistItem[]
    name string
    The name of the playlist.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    interval str
    items Sequence[PlaylistItemArgs]
    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.
    orgId 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.
    The following state arguments are supported:
    Interval string
    Items List<Pulumiverse.Grafana.Inputs.PlaylistItem>
    Name string
    The name of the playlist.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Interval string
    Items []PlaylistItemArgs
    Name string
    The name of the playlist.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    interval String
    items List<PlaylistItem>
    name String
    The name of the playlist.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    interval string
    items PlaylistItem[]
    name string
    The name of the playlist.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    interval str
    items Sequence[PlaylistItemArgs]
    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.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.

    Supporting Types

    PlaylistItem, PlaylistItemArgs

    Order int
    Title string
    Id string
    Type string
    Value string
    Order int
    Title string
    Id string
    Type string
    Value string
    order Integer
    title String
    id String
    type String
    value String
    order number
    title string
    id string
    type string
    value string
    order int
    title str
    id str
    type str
    value str
    order Number
    title String
    id String
    type String
    value String

    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.
    grafana logo
    Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse