Grafana

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

getFolder

Example Usage

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

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

    var fromTitle = Grafana.GetFolder.Invoke(new()
    {
        Title = test.Title,
    });

});
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 {
		test, err := grafana.NewFolder(ctx, "test", &grafana.FolderArgs{
			Title: pulumi.String("test-folder"),
			Uid:   pulumi.String("test-ds-folder-uid"),
		})
		if err != nil {
			return err
		}
		_ = grafana.LookupFolderOutput(ctx, GetFolderOutputArgs{
			Title: test.Title,
		}, nil)
		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 com.pulumi.grafana.inputs.GetFolderArgs;
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 Folder("test", FolderArgs.builder()        
            .title("test-folder")
            .uid("test-ds-folder-uid")
            .build());

        final var fromTitle = GrafanaFunctions.getFolder(GetFolderArgs.builder()
            .title(test.title())
            .build());

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

test = grafana.Folder("test",
    title="test-folder",
    uid="test-ds-folder-uid")
from_title = grafana.get_folder_output(title=test.title)
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@lbrlabs/pulumi-grafana";
import * as grafana from "@pulumi/grafana";

const test = new grafana.Folder("test", {
    title: "test-folder",
    uid: "test-ds-folder-uid",
});
const fromTitle = grafana.getFolderOutput({
    title: test.title,
});
resources:
  test:
    type: grafana:Folder
    properties:
      title: test-folder
      uid: test-ds-folder-uid
variables:
  fromTitle:
    Fn::Invoke:
      Function: grafana:getFolder
      Arguments:
        title: ${test.title}

Using getFolder

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getFolder(args: GetFolderArgs, opts?: InvokeOptions): Promise<GetFolderResult>
function getFolderOutput(args: GetFolderOutputArgs, opts?: InvokeOptions): Output<GetFolderResult>
def get_folder(title: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetFolderResult
def get_folder_output(title: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetFolderResult]
func LookupFolder(ctx *Context, args *LookupFolderArgs, opts ...InvokeOption) (*LookupFolderResult, error)
func LookupFolderOutput(ctx *Context, args *LookupFolderOutputArgs, opts ...InvokeOption) LookupFolderResultOutput

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

public static class GetFolder 
{
    public static Task<GetFolderResult> InvokeAsync(GetFolderArgs args, InvokeOptions? opts = null)
    public static Output<GetFolderResult> Invoke(GetFolderInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFolderResult> getFolder(GetFolderArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: grafana:index/getFolder:getFolder
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Title string

The name of the Grafana folder.

Title string

The name of the Grafana folder.

title String

The name of the Grafana folder.

title string

The name of the Grafana folder.

title str

The name of the Grafana folder.

title String

The name of the Grafana folder.

getFolder Result

The following output properties are available:

Id int

The numerical ID of the Grafana folder.

Title string

The name of the Grafana folder.

Uid string

The uid of the Grafana folder.

Url string

The full URL of the folder.

Id int

The numerical ID of the Grafana folder.

Title string

The name of the Grafana folder.

Uid string

The uid of the Grafana folder.

Url string

The full URL of the folder.

id Integer

The numerical ID of the Grafana folder.

title String

The name of the Grafana folder.

uid String

The uid of the Grafana folder.

url String

The full URL of the folder.

id number

The numerical ID of the Grafana folder.

title string

The name of the Grafana folder.

uid string

The uid of the Grafana folder.

url string

The full URL of the folder.

id int

The numerical ID of the Grafana folder.

title str

The name of the Grafana folder.

uid str

The uid of the Grafana folder.

url str

The full URL of the folder.

id Number

The numerical ID of the Grafana folder.

title String

The name of the Grafana folder.

uid String

The uid of the Grafana folder.

url String

The full URL of the folder.

Package Details

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

This Pulumi package is based on the grafana Terraform Provider.