Grafana v0.5.1 published on Wednesday, Jun 12, 2024 by pulumiverse
grafana.getFolders
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumi/grafana";
import * as grafana from "@pulumiverse/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({});
import pulumi
import pulumi_grafana as grafana
import pulumiverse_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()
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.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
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumi.Grafana;
using Grafana = Pulumiverse.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 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.GetFoldersArgs;
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();
    }
}
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
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 getFolders(args: GetFoldersArgs, opts?: InvokeOptions): Promise<GetFoldersResult>
function getFoldersOutput(args: GetFoldersOutputArgs, opts?: InvokeOptions): Output<GetFoldersResult>def get_folders(org_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetFoldersResult
def get_folders_output(org_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetFoldersResult]func GetFolders(ctx *Context, args *GetFoldersArgs, opts ...InvokeOption) (*GetFoldersResult, error)
func GetFoldersOutput(ctx *Context, args *GetFoldersOutputArgs, opts ...InvokeOption) GetFoldersResultOutput> Note: This function is named GetFolders in the Go SDK.
public static class GetFolders 
{
    public static Task<GetFoldersResult> InvokeAsync(GetFoldersArgs args, InvokeOptions? opts = null)
    public static Output<GetFoldersResult> Invoke(GetFoldersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFoldersResult> getFolders(GetFoldersArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: grafana:index/getFolders:getFolders
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
- Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
- org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
- org_
id str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
- org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
getFolders Result
The following output properties are available:
- Folders
List<Pulumiverse.
Grafana. Outputs. Get Folders Folder>  - The Grafana instance's folders.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
- Folders
[]Get
Folders Folder  - The Grafana instance's folders.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
- folders
List<Get
Folders Folder>  - The Grafana instance's folders.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
- folders
Get
Folders Folder[]  - The Grafana instance's folders.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - org
Id string - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
- folders
Sequence[Get
Folders Folder]  - The Grafana instance's folders.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - org_
id str - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
- folders List<Property Map>
 - The Grafana instance's folders.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - org
Id String - The Organization ID. If not set, the Org ID defined in the provider block will be used.
 
Supporting Types
GetFoldersFolder  
Package Details
- Repository
 - grafana pulumiverse/pulumi-grafana
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
grafanaTerraform Provider.