Grafana

v0.0.3 published on Sunday, Sep 18, 2022 by lbrlabs

getFolders

Example Usage

using System.Collections.Generic;
using Pulumi;
using Grafana = Lbrlabs.PulumiPackage.Grafana;
using Grafana = Pulumi.Grafana;

return await Deployment.RunAsync(() => 
{
    var testA = new Grafana.Folder("testA", new()
    {
        Title = "test-folder-a",
        Uid = "test-ds-folder-uid-a",
    });

    var testB = new Grafana.Folder("testB", new()
    {
        Title = "test-folder-b",
        Uid = "test-ds-folder-uid-b",
    });

    var test = Grafana.GetFolders.Invoke();

});
package main

import (
	"github.com/lbrlabs/pulumi-grafana/sdk/go/grafana"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := grafana.NewFolder(ctx, "testA", &grafana.FolderArgs{
			Title: pulumi.String("test-folder-a"),
			Uid:   pulumi.String("test-ds-folder-uid-a"),
		})
		if err != nil {
			return err
		}
		_, err = grafana.NewFolder(ctx, "testB", &grafana.FolderArgs{
			Title: pulumi.String("test-folder-b"),
			Uid:   pulumi.String("test-ds-folder-uid-b"),
		})
		if err != nil {
			return err
		}
		_, err = grafana.GetFolders(ctx, nil, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.Folder;
import com.pulumi.grafana.FolderArgs;
import com.pulumi.grafana.GrafanaFunctions;
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 testA = new Folder("testA", FolderArgs.builder()        
            .title("test-folder-a")
            .uid("test-ds-folder-uid-a")
            .build());

        var testB = new Folder("testB", FolderArgs.builder()        
            .title("test-folder-b")
            .uid("test-ds-folder-uid-b")
            .build());

        final var test = GrafanaFunctions.getFolders();

    }
}
import pulumi
import lbrlabs_pulumi_grafana as grafana
import pulumi_grafana as grafana

test_a = grafana.Folder("testA",
    title="test-folder-a",
    uid="test-ds-folder-uid-a")
test_b = grafana.Folder("testB",
    title="test-folder-b",
    uid="test-ds-folder-uid-b")
test = grafana.get_folders()
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@lbrlabs/pulumi-grafana";
import * as grafana from "@pulumi/grafana";

const testA = new grafana.Folder("testA", {
    title: "test-folder-a",
    uid: "test-ds-folder-uid-a",
});
const testB = new grafana.Folder("testB", {
    title: "test-folder-b",
    uid: "test-ds-folder-uid-b",
});
const test = grafana.getFolders({});
resources:
  testA:
    type: grafana:Folder
    properties:
      title: test-folder-a
      uid: test-ds-folder-uid-a
  testB:
    type: grafana:Folder
    properties:
      title: test-folder-b
      uid: test-ds-folder-uid-b
variables:
  test:
    Fn::Invoke:
      Function: grafana:getFolders
      Arguments: {}

Using getFolders

function getFolders(opts?: InvokeOptions): Promise<GetFoldersResult>
def get_folders(opts: Optional[InvokeOptions] = None) -> GetFoldersResult
func GetFolders(ctx *Context, opts ...InvokeOption) (*GetFoldersResult, error)

> Note: This function is named GetFolders in the Go SDK.

public static class GetFolders 
{
    public static Task<GetFoldersResult> InvokeAsync(InvokeOptions? opts = null)
}
public static CompletableFuture<GetFoldersResult> getFolders(InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: grafana:index/getFolders:getFolders
  Arguments:
    # Arguments dictionary

getFolders Result

The following output properties are available:

Folders List<Lbrlabs.PulumiPackage.Grafana.Outputs.GetFoldersFolder>

The Grafana instance's folders.

Id string

The provider-assigned unique ID for this managed resource.

Folders []GetFoldersFolder

The Grafana instance's folders.

Id string

The provider-assigned unique ID for this managed resource.

folders List<GetFoldersFolder>

The Grafana instance's folders.

id String

The provider-assigned unique ID for this managed resource.

folders GetFoldersFolder[]

The Grafana instance's folders.

id string

The provider-assigned unique ID for this managed resource.

folders Sequence[GetFoldersFolder]

The Grafana instance's folders.

id str

The provider-assigned unique ID for this managed resource.

folders List<Property Map>

The Grafana instance's folders.

id String

The provider-assigned unique ID for this managed resource.

Supporting Types

GetFoldersFolder

Id int

The ID of this resource.

Title string
Uid string
Url string
Id int

The ID of this resource.

Title string
Uid string
Url string
id Integer

The ID of this resource.

title String
uid String
url String
id number

The ID of this resource.

title string
uid string
url string
id int

The ID of this resource.

title str
uid str
url str
id Number

The ID of this resource.

title String
uid String
url String

Package Details

Repository
https://github.com/lbrlabs/pulumi-grafana
License
Apache-2.0
Notes

This Pulumi package is based on the grafana Terraform Provider.