@pulumi/azuredevops 3.11.0-alpha.1766173758 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,225 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * Manages a Work Item Query (WIQL based list / tree query) in Azure DevOps.
4
+ *
5
+ * A query can live either directly under one of the root areas `Shared Queries` or `My Queries`, or inside another query folder. You must provide exactly one of `area` (either `Shared Queries` or `My Queries`) or `parentId` (an existing folder's ID) when creating a query.
6
+ *
7
+ * The WIQL (Work Item Query Language) statement is used to define the query logic. See the [WIQL Syntax Reference](https://learn.microsoft.com/en-us/azure/devops/boards/queries/wiql-syntax?view=azure-devops) for more information.
8
+ *
9
+ * ## Example Usage
10
+ *
11
+ * ### Basic query under Shared Queries
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as azuredevops from "@pulumi/azuredevops";
16
+ *
17
+ * const example = new azuredevops.Project("example", {
18
+ * name: "Example Project",
19
+ * workItemTemplate: "Agile",
20
+ * versionControl: "Git",
21
+ * visibility: "private",
22
+ * });
23
+ * const allIssues = new azuredevops.Workitemquery("all_issues", {
24
+ * projectId: example.id,
25
+ * name: "All Active Issues",
26
+ * area: "Shared Queries",
27
+ * wiql: `SELECT [System.Id], [System.Title], [System.State]
28
+ * FROM WorkItems
29
+ * WHERE [System.WorkItemType] = 'Issue'
30
+ * AND [System.State] <> 'Closed'
31
+ * ORDER BY [System.ChangedDate] DESC
32
+ * `,
33
+ * });
34
+ * ```
35
+ *
36
+ * ### Query inside a custom folder
37
+ *
38
+ * ```typescript
39
+ * import * as pulumi from "@pulumi/pulumi";
40
+ * import * as azuredevops from "@pulumi/azuredevops";
41
+ *
42
+ * const example = new azuredevops.Project("example", {
43
+ * name: "Example Project",
44
+ * workItemTemplate: "Agile",
45
+ * versionControl: "Git",
46
+ * visibility: "private",
47
+ * });
48
+ * const teamFolder = new azuredevops.WorkitemqueryFolder("team_folder", {
49
+ * projectId: example.id,
50
+ * name: "Team",
51
+ * area: "Shared Queries",
52
+ * });
53
+ * const myTeamBugs = new azuredevops.Workitemquery("my_team_bugs", {
54
+ * projectId: example.id,
55
+ * name: "Team Bugs",
56
+ * parentId: teamFolder.id,
57
+ * wiql: `SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
58
+ * FROM WorkItems
59
+ * WHERE [System.WorkItemType] = 'Bug'
60
+ * AND [System.State] <> 'Closed'
61
+ * ORDER BY [System.CreatedDate] DESC
62
+ * `,
63
+ * });
64
+ * ```
65
+ *
66
+ * ### Applying permissions to a query
67
+ *
68
+ * ```typescript
69
+ * import * as pulumi from "@pulumi/pulumi";
70
+ * import * as azuredevops from "@pulumi/azuredevops";
71
+ * import * as std from "@pulumi/std";
72
+ *
73
+ * const example = new azuredevops.Project("example", {
74
+ * name: "Example Project",
75
+ * workItemTemplate: "Agile",
76
+ * versionControl: "Git",
77
+ * visibility: "private",
78
+ * });
79
+ * const teamFolder = new azuredevops.WorkitemqueryFolder("team_folder", {
80
+ * projectId: example.id,
81
+ * name: "Team",
82
+ * area: "Shared Queries",
83
+ * });
84
+ * const myTeamBugs = new azuredevops.Workitemquery("my_team_bugs", {
85
+ * projectId: example.id,
86
+ * name: "Team Bugs",
87
+ * parentId: teamFolder.id,
88
+ * wiql: `SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
89
+ * FROM WorkItems
90
+ * WHERE [System.WorkItemType] = 'Bug'
91
+ * AND [System.State] <> 'Closed'
92
+ * ORDER BY [System.CreatedDate] DESC
93
+ * `,
94
+ * });
95
+ * const example_readers = azuredevops.getGroupOutput({
96
+ * projectId: example.id,
97
+ * name: "Readers",
98
+ * });
99
+ * const queryPermissions = new azuredevops.WorkItemQueryPermissions("query_permissions", {
100
+ * projectId: example.id,
101
+ * path: std.index.format({
102
+ * input: "%s/%s",
103
+ * args: [
104
+ * teamFolder.name,
105
+ * myTeamBugs.name,
106
+ * ],
107
+ * }).result,
108
+ * principal: example_readers.apply(example_readers => example_readers.id),
109
+ * permissions: {
110
+ * Read: "Allow",
111
+ * Contribute: "Deny",
112
+ * ManagePermissions: "Deny",
113
+ * Delete: "Deny",
114
+ * },
115
+ * });
116
+ * ```
117
+ *
118
+ * ## Relevant Links
119
+ *
120
+ * * [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)
121
+ * * [WIQL Syntax Reference](https://learn.microsoft.com/en-us/azure/devops/boards/queries/wiql-syntax?view=azure-devops)
122
+ *
123
+ * ## PAT Permissions Required
124
+ *
125
+ * * **Work Items**: Read & Write
126
+ *
127
+ * ## Import
128
+ *
129
+ * The resource does not support import.
130
+ */
131
+ export declare class Workitemquery extends pulumi.CustomResource {
132
+ /**
133
+ * Get an existing Workitemquery resource's state with the given name, ID, and optional extra
134
+ * properties used to qualify the lookup.
135
+ *
136
+ * @param name The _unique_ name of the resulting resource.
137
+ * @param id The _unique_ provider ID of the resource to lookup.
138
+ * @param state Any extra arguments used during the lookup.
139
+ * @param opts Optional settings to control the behavior of the CustomResource.
140
+ */
141
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: WorkitemqueryState, opts?: pulumi.CustomResourceOptions): Workitemquery;
142
+ /**
143
+ * Returns true if the given object is an instance of Workitemquery. This is designed to work even
144
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
145
+ */
146
+ static isInstance(obj: any): obj is Workitemquery;
147
+ /**
148
+ * Root folder for the query. Must be one of `Shared Queries` or `My Queries`.
149
+ */
150
+ readonly area: pulumi.Output<string | undefined>;
151
+ /**
152
+ * The display name of the query.
153
+ */
154
+ readonly name: pulumi.Output<string>;
155
+ /**
156
+ * The ID of the parent query folder under which to create the query.
157
+ */
158
+ readonly parentId: pulumi.Output<string | undefined>;
159
+ /**
160
+ * The ID of the Project containing the query.
161
+ */
162
+ readonly projectId: pulumi.Output<string>;
163
+ /**
164
+ * The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
165
+ */
166
+ readonly wiql: pulumi.Output<string>;
167
+ /**
168
+ * Create a Workitemquery resource with the given unique name, arguments, and options.
169
+ *
170
+ * @param name The _unique_ name of the resource.
171
+ * @param args The arguments to use to populate this resource's properties.
172
+ * @param opts A bag of options that control this resource's behavior.
173
+ */
174
+ constructor(name: string, args: WorkitemqueryArgs, opts?: pulumi.CustomResourceOptions);
175
+ }
176
+ /**
177
+ * Input properties used for looking up and filtering Workitemquery resources.
178
+ */
179
+ export interface WorkitemqueryState {
180
+ /**
181
+ * Root folder for the query. Must be one of `Shared Queries` or `My Queries`.
182
+ */
183
+ area?: pulumi.Input<string>;
184
+ /**
185
+ * The display name of the query.
186
+ */
187
+ name?: pulumi.Input<string>;
188
+ /**
189
+ * The ID of the parent query folder under which to create the query.
190
+ */
191
+ parentId?: pulumi.Input<string>;
192
+ /**
193
+ * The ID of the Project containing the query.
194
+ */
195
+ projectId?: pulumi.Input<string>;
196
+ /**
197
+ * The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
198
+ */
199
+ wiql?: pulumi.Input<string>;
200
+ }
201
+ /**
202
+ * The set of arguments for constructing a Workitemquery resource.
203
+ */
204
+ export interface WorkitemqueryArgs {
205
+ /**
206
+ * Root folder for the query. Must be one of `Shared Queries` or `My Queries`.
207
+ */
208
+ area?: pulumi.Input<string>;
209
+ /**
210
+ * The display name of the query.
211
+ */
212
+ name?: pulumi.Input<string>;
213
+ /**
214
+ * The ID of the parent query folder under which to create the query.
215
+ */
216
+ parentId?: pulumi.Input<string>;
217
+ /**
218
+ * The ID of the Project containing the query.
219
+ */
220
+ projectId: pulumi.Input<string>;
221
+ /**
222
+ * The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
223
+ */
224
+ wiql: pulumi.Input<string>;
225
+ }
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.Workitemquery = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Manages a Work Item Query (WIQL based list / tree query) in Azure DevOps.
10
+ *
11
+ * A query can live either directly under one of the root areas `Shared Queries` or `My Queries`, or inside another query folder. You must provide exactly one of `area` (either `Shared Queries` or `My Queries`) or `parentId` (an existing folder's ID) when creating a query.
12
+ *
13
+ * The WIQL (Work Item Query Language) statement is used to define the query logic. See the [WIQL Syntax Reference](https://learn.microsoft.com/en-us/azure/devops/boards/queries/wiql-syntax?view=azure-devops) for more information.
14
+ *
15
+ * ## Example Usage
16
+ *
17
+ * ### Basic query under Shared Queries
18
+ *
19
+ * ```typescript
20
+ * import * as pulumi from "@pulumi/pulumi";
21
+ * import * as azuredevops from "@pulumi/azuredevops";
22
+ *
23
+ * const example = new azuredevops.Project("example", {
24
+ * name: "Example Project",
25
+ * workItemTemplate: "Agile",
26
+ * versionControl: "Git",
27
+ * visibility: "private",
28
+ * });
29
+ * const allIssues = new azuredevops.Workitemquery("all_issues", {
30
+ * projectId: example.id,
31
+ * name: "All Active Issues",
32
+ * area: "Shared Queries",
33
+ * wiql: `SELECT [System.Id], [System.Title], [System.State]
34
+ * FROM WorkItems
35
+ * WHERE [System.WorkItemType] = 'Issue'
36
+ * AND [System.State] <> 'Closed'
37
+ * ORDER BY [System.ChangedDate] DESC
38
+ * `,
39
+ * });
40
+ * ```
41
+ *
42
+ * ### Query inside a custom folder
43
+ *
44
+ * ```typescript
45
+ * import * as pulumi from "@pulumi/pulumi";
46
+ * import * as azuredevops from "@pulumi/azuredevops";
47
+ *
48
+ * const example = new azuredevops.Project("example", {
49
+ * name: "Example Project",
50
+ * workItemTemplate: "Agile",
51
+ * versionControl: "Git",
52
+ * visibility: "private",
53
+ * });
54
+ * const teamFolder = new azuredevops.WorkitemqueryFolder("team_folder", {
55
+ * projectId: example.id,
56
+ * name: "Team",
57
+ * area: "Shared Queries",
58
+ * });
59
+ * const myTeamBugs = new azuredevops.Workitemquery("my_team_bugs", {
60
+ * projectId: example.id,
61
+ * name: "Team Bugs",
62
+ * parentId: teamFolder.id,
63
+ * wiql: `SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
64
+ * FROM WorkItems
65
+ * WHERE [System.WorkItemType] = 'Bug'
66
+ * AND [System.State] <> 'Closed'
67
+ * ORDER BY [System.CreatedDate] DESC
68
+ * `,
69
+ * });
70
+ * ```
71
+ *
72
+ * ### Applying permissions to a query
73
+ *
74
+ * ```typescript
75
+ * import * as pulumi from "@pulumi/pulumi";
76
+ * import * as azuredevops from "@pulumi/azuredevops";
77
+ * import * as std from "@pulumi/std";
78
+ *
79
+ * const example = new azuredevops.Project("example", {
80
+ * name: "Example Project",
81
+ * workItemTemplate: "Agile",
82
+ * versionControl: "Git",
83
+ * visibility: "private",
84
+ * });
85
+ * const teamFolder = new azuredevops.WorkitemqueryFolder("team_folder", {
86
+ * projectId: example.id,
87
+ * name: "Team",
88
+ * area: "Shared Queries",
89
+ * });
90
+ * const myTeamBugs = new azuredevops.Workitemquery("my_team_bugs", {
91
+ * projectId: example.id,
92
+ * name: "Team Bugs",
93
+ * parentId: teamFolder.id,
94
+ * wiql: `SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
95
+ * FROM WorkItems
96
+ * WHERE [System.WorkItemType] = 'Bug'
97
+ * AND [System.State] <> 'Closed'
98
+ * ORDER BY [System.CreatedDate] DESC
99
+ * `,
100
+ * });
101
+ * const example_readers = azuredevops.getGroupOutput({
102
+ * projectId: example.id,
103
+ * name: "Readers",
104
+ * });
105
+ * const queryPermissions = new azuredevops.WorkItemQueryPermissions("query_permissions", {
106
+ * projectId: example.id,
107
+ * path: std.index.format({
108
+ * input: "%s/%s",
109
+ * args: [
110
+ * teamFolder.name,
111
+ * myTeamBugs.name,
112
+ * ],
113
+ * }).result,
114
+ * principal: example_readers.apply(example_readers => example_readers.id),
115
+ * permissions: {
116
+ * Read: "Allow",
117
+ * Contribute: "Deny",
118
+ * ManagePermissions: "Deny",
119
+ * Delete: "Deny",
120
+ * },
121
+ * });
122
+ * ```
123
+ *
124
+ * ## Relevant Links
125
+ *
126
+ * * [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)
127
+ * * [WIQL Syntax Reference](https://learn.microsoft.com/en-us/azure/devops/boards/queries/wiql-syntax?view=azure-devops)
128
+ *
129
+ * ## PAT Permissions Required
130
+ *
131
+ * * **Work Items**: Read & Write
132
+ *
133
+ * ## Import
134
+ *
135
+ * The resource does not support import.
136
+ */
137
+ class Workitemquery extends pulumi.CustomResource {
138
+ /**
139
+ * Get an existing Workitemquery resource's state with the given name, ID, and optional extra
140
+ * properties used to qualify the lookup.
141
+ *
142
+ * @param name The _unique_ name of the resulting resource.
143
+ * @param id The _unique_ provider ID of the resource to lookup.
144
+ * @param state Any extra arguments used during the lookup.
145
+ * @param opts Optional settings to control the behavior of the CustomResource.
146
+ */
147
+ static get(name, id, state, opts) {
148
+ return new Workitemquery(name, state, { ...opts, id: id });
149
+ }
150
+ /**
151
+ * Returns true if the given object is an instance of Workitemquery. This is designed to work even
152
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
153
+ */
154
+ static isInstance(obj) {
155
+ if (obj === undefined || obj === null) {
156
+ return false;
157
+ }
158
+ return obj['__pulumiType'] === Workitemquery.__pulumiType;
159
+ }
160
+ constructor(name, argsOrState, opts) {
161
+ let resourceInputs = {};
162
+ opts = opts || {};
163
+ if (opts.id) {
164
+ const state = argsOrState;
165
+ resourceInputs["area"] = state?.area;
166
+ resourceInputs["name"] = state?.name;
167
+ resourceInputs["parentId"] = state?.parentId;
168
+ resourceInputs["projectId"] = state?.projectId;
169
+ resourceInputs["wiql"] = state?.wiql;
170
+ }
171
+ else {
172
+ const args = argsOrState;
173
+ if (args?.projectId === undefined && !opts.urn) {
174
+ throw new Error("Missing required property 'projectId'");
175
+ }
176
+ if (args?.wiql === undefined && !opts.urn) {
177
+ throw new Error("Missing required property 'wiql'");
178
+ }
179
+ resourceInputs["area"] = args?.area;
180
+ resourceInputs["name"] = args?.name;
181
+ resourceInputs["parentId"] = args?.parentId;
182
+ resourceInputs["projectId"] = args?.projectId;
183
+ resourceInputs["wiql"] = args?.wiql;
184
+ }
185
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
186
+ super(Workitemquery.__pulumiType, name, resourceInputs, opts);
187
+ }
188
+ }
189
+ exports.Workitemquery = Workitemquery;
190
+ /** @internal */
191
+ Workitemquery.__pulumiType = 'azuredevops:index/workitemquery:Workitemquery';
192
+ //# sourceMappingURL=workitemquery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workitemquery.js","sourceRoot":"","sources":["../workitemquery.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgIG;AACH,MAAa,aAAc,SAAQ,MAAM,CAAC,cAAc;IACpD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA0B,EAAE,IAAmC;QACxH,OAAO,IAAI,aAAa,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACpE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,aAAa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AE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;;AAnFL,sCAoFC;AAtEG,gBAAgB;AACO,0BAAY,GAAG,+CAA+C,CAAC"}
@@ -0,0 +1,142 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * Manages a Work Item Query Folder in Azure DevOps.
4
+ *
5
+ * Folders allow you to organize queries in a hierarchy beneath either the `Shared Queries` or `My Queries` root folder (area).
6
+ * You must provide exactly one of `area` (either `Shared Queries` or `My Queries`) or `parentId` (an existing folder's ID) when creating a folder.
7
+ *
8
+ * ## Example Usage
9
+ *
10
+ * ### Basic folder under Shared Queries
11
+ *
12
+ * ```typescript
13
+ * import * as pulumi from "@pulumi/pulumi";
14
+ * import * as azuredevops from "@pulumi/azuredevops";
15
+ *
16
+ * const example = new azuredevops.Project("example", {
17
+ * name: "Example Project",
18
+ * workItemTemplate: "Agile",
19
+ * versionControl: "Git",
20
+ * visibility: "private",
21
+ * description: "Managed by Pulumi",
22
+ * });
23
+ * const teamFolder = new azuredevops.WorkitemqueryFolder("team_folder", {
24
+ * projectId: example.id,
25
+ * name: "Team",
26
+ * area: "Shared Queries",
27
+ * });
28
+ * ```
29
+ *
30
+ * ### Nested folder
31
+ *
32
+ * ```typescript
33
+ * import * as pulumi from "@pulumi/pulumi";
34
+ * import * as azuredevops from "@pulumi/azuredevops";
35
+ *
36
+ * const parent = new azuredevops.WorkitemqueryFolder("parent", {
37
+ * projectId: example.id,
38
+ * name: "Parent",
39
+ * area: "Shared Queries",
40
+ * });
41
+ * const child = new azuredevops.WorkitemqueryFolder("child", {
42
+ * projectId: example.id,
43
+ * name: "Child",
44
+ * parentId: parent.id,
45
+ * });
46
+ * ```
47
+ *
48
+ * ## Relevant Links
49
+ *
50
+ * * [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)
51
+ *
52
+ * ## PAT Permissions Required
53
+ *
54
+ * * **Work Items**: Read & Write
55
+ *
56
+ * ## Import
57
+ *
58
+ * The resource does not support import.
59
+ */
60
+ export declare class WorkitemqueryFolder extends pulumi.CustomResource {
61
+ /**
62
+ * Get an existing WorkitemqueryFolder resource's state with the given name, ID, and optional extra
63
+ * properties used to qualify the lookup.
64
+ *
65
+ * @param name The _unique_ name of the resulting resource.
66
+ * @param id The _unique_ provider ID of the resource to lookup.
67
+ * @param state Any extra arguments used during the lookup.
68
+ * @param opts Optional settings to control the behavior of the CustomResource.
69
+ */
70
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: WorkitemqueryFolderState, opts?: pulumi.CustomResourceOptions): WorkitemqueryFolder;
71
+ /**
72
+ * Returns true if the given object is an instance of WorkitemqueryFolder. This is designed to work even
73
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
74
+ */
75
+ static isInstance(obj: any): obj is WorkitemqueryFolder;
76
+ /**
77
+ * Root folder. Must be one of `Shared Queries` or `My Queries`.
78
+ */
79
+ readonly area: pulumi.Output<string | undefined>;
80
+ /**
81
+ * The display name of the folder.
82
+ */
83
+ readonly name: pulumi.Output<string>;
84
+ /**
85
+ * The ID of the parent query folder.
86
+ */
87
+ readonly parentId: pulumi.Output<string | undefined>;
88
+ /**
89
+ * The ID of the Project containing the folder.
90
+ */
91
+ readonly projectId: pulumi.Output<string>;
92
+ /**
93
+ * Create a WorkitemqueryFolder resource with the given unique name, arguments, and options.
94
+ *
95
+ * @param name The _unique_ name of the resource.
96
+ * @param args The arguments to use to populate this resource's properties.
97
+ * @param opts A bag of options that control this resource's behavior.
98
+ */
99
+ constructor(name: string, args: WorkitemqueryFolderArgs, opts?: pulumi.CustomResourceOptions);
100
+ }
101
+ /**
102
+ * Input properties used for looking up and filtering WorkitemqueryFolder resources.
103
+ */
104
+ export interface WorkitemqueryFolderState {
105
+ /**
106
+ * Root folder. Must be one of `Shared Queries` or `My Queries`.
107
+ */
108
+ area?: pulumi.Input<string>;
109
+ /**
110
+ * The display name of the folder.
111
+ */
112
+ name?: pulumi.Input<string>;
113
+ /**
114
+ * The ID of the parent query folder.
115
+ */
116
+ parentId?: pulumi.Input<string>;
117
+ /**
118
+ * The ID of the Project containing the folder.
119
+ */
120
+ projectId?: pulumi.Input<string>;
121
+ }
122
+ /**
123
+ * The set of arguments for constructing a WorkitemqueryFolder resource.
124
+ */
125
+ export interface WorkitemqueryFolderArgs {
126
+ /**
127
+ * Root folder. Must be one of `Shared Queries` or `My Queries`.
128
+ */
129
+ area?: pulumi.Input<string>;
130
+ /**
131
+ * The display name of the folder.
132
+ */
133
+ name?: pulumi.Input<string>;
134
+ /**
135
+ * The ID of the parent query folder.
136
+ */
137
+ parentId?: pulumi.Input<string>;
138
+ /**
139
+ * The ID of the Project containing the folder.
140
+ */
141
+ projectId: pulumi.Input<string>;
142
+ }
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.WorkitemqueryFolder = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Manages a Work Item Query Folder in Azure DevOps.
10
+ *
11
+ * Folders allow you to organize queries in a hierarchy beneath either the `Shared Queries` or `My Queries` root folder (area).
12
+ * You must provide exactly one of `area` (either `Shared Queries` or `My Queries`) or `parentId` (an existing folder's ID) when creating a folder.
13
+ *
14
+ * ## Example Usage
15
+ *
16
+ * ### Basic folder under Shared Queries
17
+ *
18
+ * ```typescript
19
+ * import * as pulumi from "@pulumi/pulumi";
20
+ * import * as azuredevops from "@pulumi/azuredevops";
21
+ *
22
+ * const example = new azuredevops.Project("example", {
23
+ * name: "Example Project",
24
+ * workItemTemplate: "Agile",
25
+ * versionControl: "Git",
26
+ * visibility: "private",
27
+ * description: "Managed by Pulumi",
28
+ * });
29
+ * const teamFolder = new azuredevops.WorkitemqueryFolder("team_folder", {
30
+ * projectId: example.id,
31
+ * name: "Team",
32
+ * area: "Shared Queries",
33
+ * });
34
+ * ```
35
+ *
36
+ * ### Nested folder
37
+ *
38
+ * ```typescript
39
+ * import * as pulumi from "@pulumi/pulumi";
40
+ * import * as azuredevops from "@pulumi/azuredevops";
41
+ *
42
+ * const parent = new azuredevops.WorkitemqueryFolder("parent", {
43
+ * projectId: example.id,
44
+ * name: "Parent",
45
+ * area: "Shared Queries",
46
+ * });
47
+ * const child = new azuredevops.WorkitemqueryFolder("child", {
48
+ * projectId: example.id,
49
+ * name: "Child",
50
+ * parentId: parent.id,
51
+ * });
52
+ * ```
53
+ *
54
+ * ## Relevant Links
55
+ *
56
+ * * [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)
57
+ *
58
+ * ## PAT Permissions Required
59
+ *
60
+ * * **Work Items**: Read & Write
61
+ *
62
+ * ## Import
63
+ *
64
+ * The resource does not support import.
65
+ */
66
+ class WorkitemqueryFolder extends pulumi.CustomResource {
67
+ /**
68
+ * Get an existing WorkitemqueryFolder resource's state with the given name, ID, and optional extra
69
+ * properties used to qualify the lookup.
70
+ *
71
+ * @param name The _unique_ name of the resulting resource.
72
+ * @param id The _unique_ provider ID of the resource to lookup.
73
+ * @param state Any extra arguments used during the lookup.
74
+ * @param opts Optional settings to control the behavior of the CustomResource.
75
+ */
76
+ static get(name, id, state, opts) {
77
+ return new WorkitemqueryFolder(name, state, { ...opts, id: id });
78
+ }
79
+ /**
80
+ * Returns true if the given object is an instance of WorkitemqueryFolder. This is designed to work even
81
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
82
+ */
83
+ static isInstance(obj) {
84
+ if (obj === undefined || obj === null) {
85
+ return false;
86
+ }
87
+ return obj['__pulumiType'] === WorkitemqueryFolder.__pulumiType;
88
+ }
89
+ constructor(name, argsOrState, opts) {
90
+ let resourceInputs = {};
91
+ opts = opts || {};
92
+ if (opts.id) {
93
+ const state = argsOrState;
94
+ resourceInputs["area"] = state?.area;
95
+ resourceInputs["name"] = state?.name;
96
+ resourceInputs["parentId"] = state?.parentId;
97
+ resourceInputs["projectId"] = state?.projectId;
98
+ }
99
+ else {
100
+ const args = argsOrState;
101
+ if (args?.projectId === undefined && !opts.urn) {
102
+ throw new Error("Missing required property 'projectId'");
103
+ }
104
+ resourceInputs["area"] = args?.area;
105
+ resourceInputs["name"] = args?.name;
106
+ resourceInputs["parentId"] = args?.parentId;
107
+ resourceInputs["projectId"] = args?.projectId;
108
+ }
109
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
110
+ super(WorkitemqueryFolder.__pulumiType, name, resourceInputs, opts);
111
+ }
112
+ }
113
+ exports.WorkitemqueryFolder = WorkitemqueryFolder;
114
+ /** @internal */
115
+ WorkitemqueryFolder.__pulumiType = 'azuredevops:index/workitemqueryFolder:WorkitemqueryFolder';
116
+ //# sourceMappingURL=workitemqueryFolder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workitemqueryFolder.js","sourceRoot":"","sources":["../workitemqueryFolder.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,MAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;IAC1D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAgC,EAAE,IAAmC;QAC9H,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC1E,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;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