1. Packages
  2. Packages
  3. Vantage Provider
  4. API Docs
  5. getFolder
Viewing docs for vantage 0.3.11
published on Friday, Jul 24, 2026 by vantage-sh
Viewing docs for vantage 0.3.11
published on Friday, Jul 24, 2026 by vantage-sh

    Looks up a folder by its title. Searches all folders returned by the Get All Folders endpoint and returns the first match.

    Use workspace_token or parent_folder_token to narrow the search when multiple folders share the same title.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vantage from "@pulumi/vantage";
    
    // Look up by title only
    const example = vantage.getFolder({
        title: "Engineering",
    });
    // Look up by title within a specific workspace
    const filtered = vantage.getFolder({
        title: "Engineering",
        workspaceToken: "wrkspc_1a2b3c4d5e6f",
    });
    export const folderToken = example.then(example => example.token);
    
    import pulumi
    import pulumi_vantage as vantage
    
    # Look up by title only
    example = vantage.get_folder(title="Engineering")
    # Look up by title within a specific workspace
    filtered = vantage.get_folder(title="Engineering",
        workspace_token="wrkspc_1a2b3c4d5e6f")
    pulumi.export("folderToken", example.token)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vantage/vantage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Look up by title only
    		example, err := vantage.LookupFolder(ctx, &vantage.LookupFolderArgs{
    			Title: "Engineering",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Look up by title within a specific workspace
    		_, err = vantage.LookupFolder(ctx, &vantage.LookupFolderArgs{
    			Title:          "Engineering",
    			WorkspaceToken: pulumi.StringRef("wrkspc_1a2b3c4d5e6f"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("folderToken", example.Token)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vantage = Pulumi.Vantage;
    
    return await Deployment.RunAsync(() => 
    {
        // Look up by title only
        var example = Vantage.GetFolder.Invoke(new()
        {
            Title = "Engineering",
        });
    
        // Look up by title within a specific workspace
        var filtered = Vantage.GetFolder.Invoke(new()
        {
            Title = "Engineering",
            WorkspaceToken = "wrkspc_1a2b3c4d5e6f",
        });
    
        return new Dictionary<string, object?>
        {
            ["folderToken"] = example.Apply(getFolderResult => getFolderResult.Token),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vantage.VantageFunctions;
    import com.pulumi.vantage.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) {
            // Look up by title only
            final var example = VantageFunctions.getFolder(GetFolderArgs.builder()
                .title("Engineering")
                .build());
    
            // Look up by title within a specific workspace
            final var filtered = VantageFunctions.getFolder(GetFolderArgs.builder()
                .title("Engineering")
                .workspaceToken("wrkspc_1a2b3c4d5e6f")
                .build());
    
            ctx.export("folderToken", example.token());
        }
    }
    
    variables:
      # Look up by title only
      example:
        fn::invoke:
          function: vantage:getFolder
          arguments:
            title: Engineering
      # Look up by title within a specific workspace
      filtered:
        fn::invoke:
          function: vantage:getFolder
          arguments:
            title: Engineering
            workspaceToken: wrkspc_1a2b3c4d5e6f
    outputs:
      folderToken: ${example.token}
    
    Example coming soon!
    

    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(parent_folder_token: Optional[str] = None,
                   title: Optional[str] = None,
                   workspace_token: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetFolderResult
    def get_folder_output(parent_folder_token: pulumi.Input[Optional[str]] = None,
                   title: pulumi.Input[Optional[str]] = None,
                   workspace_token: pulumi.Input[Optional[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)
    public static Output<GetFolderResult> getFolder(GetFolderArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vantage:index/getFolder:getFolder
      arguments:
        # arguments dictionary
    data "vantage_get_folder" "name" {
        # arguments
    }

    The following arguments are supported:

    Title string
    The title of the folder to find.
    ParentFolderToken string
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    WorkspaceToken string
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    Title string
    The title of the folder to find.
    ParentFolderToken string
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    WorkspaceToken string
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    title string
    The title of the folder to find.
    parent_folder_token string
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    workspace_token string
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    title String
    The title of the folder to find.
    parentFolderToken String
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    workspaceToken String
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    title string
    The title of the folder to find.
    parentFolderToken string
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    workspaceToken string
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    title str
    The title of the folder to find.
    parent_folder_token str
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    workspace_token str
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    title String
    The title of the folder to find.
    parentFolderToken String
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    workspaceToken String
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.

    getFolder Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    ParentFolderToken string
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    Title string
    The title of the folder to find.
    Token string
    The unique token of the matched folder.
    WorkspaceToken string
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    Id string
    The provider-assigned unique ID for this managed resource.
    ParentFolderToken string
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    Title string
    The title of the folder to find.
    Token string
    The unique token of the matched folder.
    WorkspaceToken string
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    id string
    The provider-assigned unique ID for this managed resource.
    parent_folder_token string
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    title string
    The title of the folder to find.
    token string
    The unique token of the matched folder.
    workspace_token string
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    id String
    The provider-assigned unique ID for this managed resource.
    parentFolderToken String
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    title String
    The title of the folder to find.
    token String
    The unique token of the matched folder.
    workspaceToken String
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    id string
    The provider-assigned unique ID for this managed resource.
    parentFolderToken string
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    title string
    The title of the folder to find.
    token string
    The unique token of the matched folder.
    workspaceToken string
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    id str
    The provider-assigned unique ID for this managed resource.
    parent_folder_token str
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    title str
    The title of the folder to find.
    token str
    The unique token of the matched folder.
    workspace_token str
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.
    id String
    The provider-assigned unique ID for this managed resource.
    parentFolderToken String
    Filter folders by parent folder token. Set to an empty string ("") to match only root-level folders (those with no parent). Also populated as an output with the parent folder token of the matched folder.
    title String
    The title of the folder to find.
    token String
    The unique token of the matched folder.
    workspaceToken String
    Filter folders by workspace token. If not specified, the first folder matching the title is returned. Also populated as an output with the workspace token of the matched folder.

    Package Details

    Repository
    vantage vantage-sh/terraform-provider-vantage
    License
    Notes
    This Pulumi package is based on the vantage Terraform Provider.
    Viewing docs for vantage 0.3.11
    published on Friday, Jul 24, 2026 by vantage-sh

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial