@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
143 lines (142 loc) • 4.67 kB
TypeScript
import * as pulumi from "@pulumi/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 `parentId` (an existing folder's ID) when creating a folder.
*
* ## Example Usage
*
* ### Basic folder under Shared Queries
*
* ```typescript
* 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",
* });
* ```
*
* ### Nested folder
*
* ```typescript
* 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,
* });
* ```
*
* ## Relevant Links
*
* * [Azure DevOps REST API - Work Item Query (Queries)](https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/queries?view=azure-devops-rest-7.1)
*
* ## PAT Permissions Required
*
* * **Work Items**: Read & Write
*
* ## Import
*
* The resource does not support import.
*/
export declare class WorkitemqueryFolder extends pulumi.CustomResource {
/**
* Get an existing WorkitemqueryFolder resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: WorkitemqueryFolderState, opts?: pulumi.CustomResourceOptions): WorkitemqueryFolder;
/**
* Returns true if the given object is an instance of WorkitemqueryFolder. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is WorkitemqueryFolder;
/**
* Root folder. Must be one of `Shared Queries` or `My Queries`.
*/
readonly area: pulumi.Output<string | undefined>;
/**
* The display name of the folder.
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the parent query folder.
*/
readonly parentId: pulumi.Output<string | undefined>;
/**
* The ID of the Project containing the folder.
*/
readonly projectId: pulumi.Output<string>;
/**
* Create a WorkitemqueryFolder resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: WorkitemqueryFolderArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering WorkitemqueryFolder resources.
*/
export interface WorkitemqueryFolderState {
/**
* Root folder. Must be one of `Shared Queries` or `My Queries`.
*/
area?: pulumi.Input<string>;
/**
* The display name of the folder.
*/
name?: pulumi.Input<string>;
/**
* The ID of the parent query folder.
*/
parentId?: pulumi.Input<string>;
/**
* The ID of the Project containing the folder.
*/
projectId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a WorkitemqueryFolder resource.
*/
export interface WorkitemqueryFolderArgs {
/**
* Root folder. Must be one of `Shared Queries` or `My Queries`.
*/
area?: pulumi.Input<string>;
/**
* The display name of the folder.
*/
name?: pulumi.Input<string>;
/**
* The ID of the parent query folder.
*/
parentId?: pulumi.Input<string>;
/**
* The ID of the Project containing the folder.
*/
projectId: pulumi.Input<string>;
}