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

grafana.getFolder

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 "@pulumi/grafana";
    import * as grafana from "@pulumiverse/grafana";
    
    const test = new grafana.Folder("test", {
        title: "test-folder",
        uid: "test-ds-folder-uid",
    });
    const fromTitle = grafana.getFolderOutput({
        title: test.title,
    });
    
    import pulumi
    import pulumi_grafana as grafana
    import pulumiverse_grafana as grafana
    
    test = grafana.Folder("test",
        title="test-folder",
        uid="test-ds-folder-uid")
    from_title = grafana.get_folder_output(title=test.title)
    
    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 {
    		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, grafana.GetFolderOutputArgs{
    			Title: test.Title,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Grafana = Pulumi.Grafana;
    using Grafana = Pulumiverse.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 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());
    
        }
    }
    
    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(org_id: Optional[str] = None,
                   title: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetFolderResult
    def get_folder_output(org_id: Optional[pulumi.Input[str]] = None,
                   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 title of the folder.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Title string
    The title of the folder.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    title String
    The title of the folder.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    title string
    The title of the folder.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    title str
    The title of the folder.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    title String
    The title of the folder.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.

    getFolder Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    ParentFolderUid string
    The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
    Title string
    The title of the folder.
    Uid string
    Unique identifier.
    Url string
    The full URL of the folder.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Id string
    The provider-assigned unique ID for this managed resource.
    ParentFolderUid string
    The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
    Title string
    The title of the folder.
    Uid string
    Unique identifier.
    Url string
    The full URL of the folder.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    id String
    The provider-assigned unique ID for this managed resource.
    parentFolderUid String
    The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
    title String
    The title of the folder.
    uid String
    Unique identifier.
    url String
    The full URL of the folder.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    id string
    The provider-assigned unique ID for this managed resource.
    parentFolderUid string
    The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
    title string
    The title of the folder.
    uid string
    Unique identifier.
    url string
    The full URL of the folder.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    id str
    The provider-assigned unique ID for this managed resource.
    parent_folder_uid str
    The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
    title str
    The title of the folder.
    uid str
    Unique identifier.
    url str
    The full URL of the folder.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    id String
    The provider-assigned unique ID for this managed resource.
    parentFolderUid String
    The uid of the parent folder. If set, the folder will be nested. If not set, the folder will be created in the root folder. Note: This requires the nestedFolders feature flag to be enabled on your Grafana instance.
    title String
    The title of the folder.
    uid String
    Unique identifier.
    url String
    The full URL of the folder.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.

    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