1. Packages
  2. Grafana Cloud
  3. API Docs
  4. oss
  5. getFolder
Grafana v0.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse

grafana.oss.getFolder

Explore with Pulumi AI

grafana logo
Grafana v0.7.0 published on Tuesday, Nov 5, 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.oss.Folder("test", {
        title: "test-folder",
        uid: "test-ds-folder-uid",
    });
    const fromTitle = grafana.oss.getFolderOutput({
        title: test.title,
    });
    
    import pulumi
    import pulumi_grafana as grafana
    import pulumiverse_grafana as grafana
    
    test = grafana.oss.Folder("test",
        title="test-folder",
        uid="test-ds-folder-uid")
    from_title = grafana.oss.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/oss"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := oss.NewFolder(ctx, "test", &oss.FolderArgs{
    			Title: pulumi.String("test-folder"),
    			Uid:   pulumi.String("test-ds-folder-uid"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = oss.LookupFolderOutput(ctx, oss.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.Oss.Folder("test", new()
        {
            Title = "test-folder",
            Uid = "test-ds-folder-uid",
        });
    
        var fromTitle = Grafana.Oss.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.oss.Folder;
    import com.pulumi.grafana.oss.FolderArgs;
    import com.pulumi.grafana.oss.OssFunctions;
    import com.pulumi.grafana.oss.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 = OssFunctions.getFolder(GetFolderArgs.builder()
                .title(test.title())
                .build());
    
        }
    }
    
    resources:
      test:
        type: grafana:oss:Folder
        properties:
          title: test-folder
          uid: test-ds-folder-uid
    variables:
      fromTitle:
        fn::invoke:
          Function: grafana:oss: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:oss/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.7.0 published on Tuesday, Nov 5, 2024 by pulumiverse