1. Packages
  2. Azure DevOps Provider
  3. API Docs
  4. WorkitemqueryFolder
Azure DevOps v3.11.0 published on Saturday, Dec 20, 2025 by Pulumi
azuredevops logo
Azure DevOps v3.11.0 published on Saturday, Dec 20, 2025 by Pulumi

    Manages a Work Item Query Folder in Azure DevOps.

    Folders allow you to organize queries in a hierarchy beneath either the Shared Queries or My Queries root folder (area). You must provide exactly one of area (either Shared Queries or My Queries) or parent_id (an existing folder’s ID) when creating a folder.

    Example Usage

    Basic folder under Shared Queries

    import * as pulumi from "@pulumi/pulumi";
    import * as azuredevops from "@pulumi/azuredevops";
    
    const example = new azuredevops.Project("example", {
        name: "Example Project",
        workItemTemplate: "Agile",
        versionControl: "Git",
        visibility: "private",
        description: "Managed by Pulumi",
    });
    const teamFolder = new azuredevops.WorkitemqueryFolder("team_folder", {
        projectId: example.id,
        name: "Team",
        area: "Shared Queries",
    });
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    example = azuredevops.Project("example",
        name="Example Project",
        work_item_template="Agile",
        version_control="Git",
        visibility="private",
        description="Managed by Pulumi")
    team_folder = azuredevops.WorkitemqueryFolder("team_folder",
        project_id=example.id,
        name="Team",
        area="Shared Queries")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := azuredevops.NewProject(ctx, "example", &azuredevops.ProjectArgs{
    			Name:             pulumi.String("Example Project"),
    			WorkItemTemplate: pulumi.String("Agile"),
    			VersionControl:   pulumi.String("Git"),
    			Visibility:       pulumi.String("private"),
    			Description:      pulumi.String("Managed by Pulumi"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuredevops.NewWorkitemqueryFolder(ctx, "team_folder", &azuredevops.WorkitemqueryFolderArgs{
    			ProjectId: example.ID(),
    			Name:      pulumi.String("Team"),
    			Area:      pulumi.String("Shared Queries"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureDevOps = Pulumi.AzureDevOps;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AzureDevOps.Project("example", new()
        {
            Name = "Example Project",
            WorkItemTemplate = "Agile",
            VersionControl = "Git",
            Visibility = "private",
            Description = "Managed by Pulumi",
        });
    
        var teamFolder = new AzureDevOps.WorkitemqueryFolder("team_folder", new()
        {
            ProjectId = example.Id,
            Name = "Team",
            Area = "Shared Queries",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuredevops.Project;
    import com.pulumi.azuredevops.ProjectArgs;
    import com.pulumi.azuredevops.WorkitemqueryFolder;
    import com.pulumi.azuredevops.WorkitemqueryFolderArgs;
    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 example = new Project("example", ProjectArgs.builder()
                .name("Example Project")
                .workItemTemplate("Agile")
                .versionControl("Git")
                .visibility("private")
                .description("Managed by Pulumi")
                .build());
    
            var teamFolder = new WorkitemqueryFolder("teamFolder", WorkitemqueryFolderArgs.builder()
                .projectId(example.id())
                .name("Team")
                .area("Shared Queries")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azuredevops:Project
        properties:
          name: Example Project
          workItemTemplate: Agile
          versionControl: Git
          visibility: private
          description: Managed by Pulumi
      teamFolder:
        type: azuredevops:WorkitemqueryFolder
        name: team_folder
        properties:
          projectId: ${example.id}
          name: Team
          area: Shared Queries
    

    Nested folder

    import * as pulumi from "@pulumi/pulumi";
    import * as azuredevops from "@pulumi/azuredevops";
    
    const parent = new azuredevops.WorkitemqueryFolder("parent", {
        projectId: example.id,
        name: "Parent",
        area: "Shared Queries",
    });
    const child = new azuredevops.WorkitemqueryFolder("child", {
        projectId: example.id,
        name: "Child",
        parentId: parent.id,
    });
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    parent = azuredevops.WorkitemqueryFolder("parent",
        project_id=example["id"],
        name="Parent",
        area="Shared Queries")
    child = azuredevops.WorkitemqueryFolder("child",
        project_id=example["id"],
        name="Child",
        parent_id=parent.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		parent, err := azuredevops.NewWorkitemqueryFolder(ctx, "parent", &azuredevops.WorkitemqueryFolderArgs{
    			ProjectId: pulumi.Any(example.Id),
    			Name:      pulumi.String("Parent"),
    			Area:      pulumi.String("Shared Queries"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuredevops.NewWorkitemqueryFolder(ctx, "child", &azuredevops.WorkitemqueryFolderArgs{
    			ProjectId: pulumi.Any(example.Id),
    			Name:      pulumi.String("Child"),
    			ParentId:  parent.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureDevOps = Pulumi.AzureDevOps;
    
    return await Deployment.RunAsync(() => 
    {
        var parent = new AzureDevOps.WorkitemqueryFolder("parent", new()
        {
            ProjectId = example.Id,
            Name = "Parent",
            Area = "Shared Queries",
        });
    
        var child = new AzureDevOps.WorkitemqueryFolder("child", new()
        {
            ProjectId = example.Id,
            Name = "Child",
            ParentId = parent.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuredevops.WorkitemqueryFolder;
    import com.pulumi.azuredevops.WorkitemqueryFolderArgs;
    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 parent = new WorkitemqueryFolder("parent", WorkitemqueryFolderArgs.builder()
                .projectId(example.id())
                .name("Parent")
                .area("Shared Queries")
                .build());
    
            var child = new WorkitemqueryFolder("child", WorkitemqueryFolderArgs.builder()
                .projectId(example.id())
                .name("Child")
                .parentId(parent.id())
                .build());
    
        }
    }
    
    resources:
      parent:
        type: azuredevops:WorkitemqueryFolder
        properties:
          projectId: ${example.id}
          name: Parent
          area: Shared Queries
      child:
        type: azuredevops:WorkitemqueryFolder
        properties:
          projectId: ${example.id}
          name: Child
          parentId: ${parent.id}
    

    PAT Permissions Required

    • Work Items: Read & Write

    Create WorkitemqueryFolder Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new WorkitemqueryFolder(name: string, args: WorkitemqueryFolderArgs, opts?: CustomResourceOptions);
    @overload
    def WorkitemqueryFolder(resource_name: str,
                            args: WorkitemqueryFolderArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def WorkitemqueryFolder(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            project_id: Optional[str] = None,
                            area: Optional[str] = None,
                            name: Optional[str] = None,
                            parent_id: Optional[str] = None)
    func NewWorkitemqueryFolder(ctx *Context, name string, args WorkitemqueryFolderArgs, opts ...ResourceOption) (*WorkitemqueryFolder, error)
    public WorkitemqueryFolder(string name, WorkitemqueryFolderArgs args, CustomResourceOptions? opts = null)
    public WorkitemqueryFolder(String name, WorkitemqueryFolderArgs args)
    public WorkitemqueryFolder(String name, WorkitemqueryFolderArgs args, CustomResourceOptions options)
    
    type: azuredevops:WorkitemqueryFolder
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args WorkitemqueryFolderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args WorkitemqueryFolderArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args WorkitemqueryFolderArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WorkitemqueryFolderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WorkitemqueryFolderArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var workitemqueryFolderResource = new AzureDevOps.WorkitemqueryFolder("workitemqueryFolderResource", new()
    {
        ProjectId = "string",
        Area = "string",
        Name = "string",
        ParentId = "string",
    });
    
    example, err := azuredevops.NewWorkitemqueryFolder(ctx, "workitemqueryFolderResource", &azuredevops.WorkitemqueryFolderArgs{
    	ProjectId: pulumi.String("string"),
    	Area:      pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	ParentId:  pulumi.String("string"),
    })
    
    var workitemqueryFolderResource = new WorkitemqueryFolder("workitemqueryFolderResource", WorkitemqueryFolderArgs.builder()
        .projectId("string")
        .area("string")
        .name("string")
        .parentId("string")
        .build());
    
    workitemquery_folder_resource = azuredevops.WorkitemqueryFolder("workitemqueryFolderResource",
        project_id="string",
        area="string",
        name="string",
        parent_id="string")
    
    const workitemqueryFolderResource = new azuredevops.WorkitemqueryFolder("workitemqueryFolderResource", {
        projectId: "string",
        area: "string",
        name: "string",
        parentId: "string",
    });
    
    type: azuredevops:WorkitemqueryFolder
    properties:
        area: string
        name: string
        parentId: string
        projectId: string
    

    WorkitemqueryFolder Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The WorkitemqueryFolder resource accepts the following input properties:

    ProjectId string
    The ID of the Project containing the folder.
    Area string
    Root folder. Must be one of Shared Queries or My Queries.
    Name string
    The display name of the folder.
    ParentId string
    The ID of the parent query folder.
    ProjectId string
    The ID of the Project containing the folder.
    Area string
    Root folder. Must be one of Shared Queries or My Queries.
    Name string
    The display name of the folder.
    ParentId string
    The ID of the parent query folder.
    projectId String
    The ID of the Project containing the folder.
    area String
    Root folder. Must be one of Shared Queries or My Queries.
    name String
    The display name of the folder.
    parentId String
    The ID of the parent query folder.
    projectId string
    The ID of the Project containing the folder.
    area string
    Root folder. Must be one of Shared Queries or My Queries.
    name string
    The display name of the folder.
    parentId string
    The ID of the parent query folder.
    project_id str
    The ID of the Project containing the folder.
    area str
    Root folder. Must be one of Shared Queries or My Queries.
    name str
    The display name of the folder.
    parent_id str
    The ID of the parent query folder.
    projectId String
    The ID of the Project containing the folder.
    area String
    Root folder. Must be one of Shared Queries or My Queries.
    name String
    The display name of the folder.
    parentId String
    The ID of the parent query folder.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WorkitemqueryFolder resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing WorkitemqueryFolder Resource

    Get an existing WorkitemqueryFolder resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: WorkitemqueryFolderState, opts?: CustomResourceOptions): WorkitemqueryFolder
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            area: Optional[str] = None,
            name: Optional[str] = None,
            parent_id: Optional[str] = None,
            project_id: Optional[str] = None) -> WorkitemqueryFolder
    func GetWorkitemqueryFolder(ctx *Context, name string, id IDInput, state *WorkitemqueryFolderState, opts ...ResourceOption) (*WorkitemqueryFolder, error)
    public static WorkitemqueryFolder Get(string name, Input<string> id, WorkitemqueryFolderState? state, CustomResourceOptions? opts = null)
    public static WorkitemqueryFolder get(String name, Output<String> id, WorkitemqueryFolderState state, CustomResourceOptions options)
    resources:  _:    type: azuredevops:WorkitemqueryFolder    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Area string
    Root folder. Must be one of Shared Queries or My Queries.
    Name string
    The display name of the folder.
    ParentId string
    The ID of the parent query folder.
    ProjectId string
    The ID of the Project containing the folder.
    Area string
    Root folder. Must be one of Shared Queries or My Queries.
    Name string
    The display name of the folder.
    ParentId string
    The ID of the parent query folder.
    ProjectId string
    The ID of the Project containing the folder.
    area String
    Root folder. Must be one of Shared Queries or My Queries.
    name String
    The display name of the folder.
    parentId String
    The ID of the parent query folder.
    projectId String
    The ID of the Project containing the folder.
    area string
    Root folder. Must be one of Shared Queries or My Queries.
    name string
    The display name of the folder.
    parentId string
    The ID of the parent query folder.
    projectId string
    The ID of the Project containing the folder.
    area str
    Root folder. Must be one of Shared Queries or My Queries.
    name str
    The display name of the folder.
    parent_id str
    The ID of the parent query folder.
    project_id str
    The ID of the Project containing the folder.
    area String
    Root folder. Must be one of Shared Queries or My Queries.
    name String
    The display name of the folder.
    parentId String
    The ID of the parent query folder.
    projectId String
    The ID of the Project containing the folder.

    Import

    The resource does not support import.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure DevOps pulumi/pulumi-azuredevops
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuredevops Terraform Provider.
    azuredevops logo
    Azure DevOps v3.11.0 published on Saturday, Dec 20, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate