1. Packages
  2. Strata Cloud Manager Provider
  3. API Docs
  4. getFolder
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
scm logo
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi

    Folder data source

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scm from "@pulumi/scm";
    
    // Look up a folder by id
    const scmFolderDs = scm.getFolder({
        id: "0f11d0d9-df7c-45da-a60c-4d80f8422544",
    });
    export const scmFolderOutput = {
        id: scmFolderDs.then(scmFolderDs => scmFolderDs.id),
        name: scmFolderDs.then(scmFolderDs => scmFolderDs.name),
        description: scmFolderDs.then(scmFolderDs => scmFolderDs.description),
        parent: scmFolderDs.then(scmFolderDs => scmFolderDs.parent),
    };
    
    import pulumi
    import pulumi_scm as scm
    
    # Look up a folder by id
    scm_folder_ds = scm.get_folder(id="0f11d0d9-df7c-45da-a60c-4d80f8422544")
    pulumi.export("scmFolderOutput", {
        "id": scm_folder_ds.id,
        "name": scm_folder_ds.name,
        "description": scm_folder_ds.description,
        "parent": scm_folder_ds.parent,
    })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-scm/sdk/go/scm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Look up a folder by id
    		scmFolderDs, err := scm.LookupFolder(ctx, &scm.LookupFolderArgs{
    			Id: "0f11d0d9-df7c-45da-a60c-4d80f8422544",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("scmFolderOutput", pulumi.StringMap{
    			"id":          scmFolderDs.Id,
    			"name":        scmFolderDs.Name,
    			"description": scmFolderDs.Description,
    			"parent":      scmFolderDs.Parent,
    		})
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scm = Pulumi.Scm;
    
    return await Deployment.RunAsync(() => 
    {
        // Look up a folder by id
        var scmFolderDs = Scm.GetFolder.Invoke(new()
        {
            Id = "0f11d0d9-df7c-45da-a60c-4d80f8422544",
        });
    
        return new Dictionary<string, object?>
        {
            ["scmFolderOutput"] = 
            {
                { "id", scmFolderDs.Apply(getFolderResult => getFolderResult.Id) },
                { "name", scmFolderDs.Apply(getFolderResult => getFolderResult.Name) },
                { "description", scmFolderDs.Apply(getFolderResult => getFolderResult.Description) },
                { "parent", scmFolderDs.Apply(getFolderResult => getFolderResult.Parent) },
            },
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scm.ScmFunctions;
    import com.pulumi.scm.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 a folder by id
            final var scmFolderDs = ScmFunctions.getFolder(GetFolderArgs.builder()
                .id("0f11d0d9-df7c-45da-a60c-4d80f8422544")
                .build());
    
            ctx.export("scmFolderOutput", Map.ofEntries(
                Map.entry("id", scmFolderDs.id()),
                Map.entry("name", scmFolderDs.name()),
                Map.entry("description", scmFolderDs.description()),
                Map.entry("parent", scmFolderDs.parent())
            ));
        }
    }
    
    variables:
      # Look up a folder by id
      scmFolderDs:
        fn::invoke:
          function: scm:getFolder
          arguments:
            id: 0f11d0d9-df7c-45da-a60c-4d80f8422544
    outputs:
      # Output the details of the found folder to verify they were read correctly.
      scmFolderOutput:
        id: ${scmFolderDs.id}
        name: ${scmFolderDs.name}
        description: ${scmFolderDs.description}
        parent: ${scmFolderDs.parent}
    

    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(id: Optional[str] = None,
                   name: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetFolderResult
    def get_folder_output(id: Optional[pulumi.Input[str]] = None,
                   name: 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)
    public static Output<GetFolderResult> getFolder(GetFolderArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scm:index/getFolder:getFolder
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The UUID of the folder
    Name string
    The name of the folder
    Id string
    The UUID of the folder
    Name string
    The name of the folder
    id String
    The UUID of the folder
    name String
    The name of the folder
    id string
    The UUID of the folder
    name string
    The name of the folder
    id str
    The UUID of the folder
    name str
    The name of the folder
    id String
    The UUID of the folder
    name String
    The name of the folder

    getFolder Result

    The following output properties are available:

    Description string
    The description of the folder
    Id string
    The UUID of the folder
    Labels List<string>
    Labels assigned to the folder
    Name string
    The name of the folder
    Parent string
    The parent folder
    Snippets List<string>
    Snippets associated with the folder
    Tfid string
    Description string
    The description of the folder
    Id string
    The UUID of the folder
    Labels []string
    Labels assigned to the folder
    Name string
    The name of the folder
    Parent string
    The parent folder
    Snippets []string
    Snippets associated with the folder
    Tfid string
    description String
    The description of the folder
    id String
    The UUID of the folder
    labels List<String>
    Labels assigned to the folder
    name String
    The name of the folder
    parent String
    The parent folder
    snippets List<String>
    Snippets associated with the folder
    tfid String
    description string
    The description of the folder
    id string
    The UUID of the folder
    labels string[]
    Labels assigned to the folder
    name string
    The name of the folder
    parent string
    The parent folder
    snippets string[]
    Snippets associated with the folder
    tfid string
    description str
    The description of the folder
    id str
    The UUID of the folder
    labels Sequence[str]
    Labels assigned to the folder
    name str
    The name of the folder
    parent str
    The parent folder
    snippets Sequence[str]
    Snippets associated with the folder
    tfid str
    description String
    The description of the folder
    id String
    The UUID of the folder
    labels List<String>
    Labels assigned to the folder
    name String
    The name of the folder
    parent String
    The parent folder
    snippets List<String>
    Snippets associated with the folder
    tfid String

    Package Details

    Repository
    scm pulumi/pulumi-scm
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scm Terraform Provider.
    scm logo
    Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate