Manages a Work Item Query (WIQL based list / tree query) in Azure DevOps.
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 parent_id (an existing folder’s ID) when creating a query.
The WIQL (Work Item Query Language) statement is used to define the query logic. See the WIQL Syntax Reference for more information.
Example Usage
Basic query 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",
});
const allIssues = new azuredevops.Workitemquery("all_issues", {
projectId: example.id,
name: "All Active Issues",
area: "Shared Queries",
wiql: `SELECT [System.Id], [System.Title], [System.State]
FROM WorkItems
WHERE [System.WorkItemType] = 'Issue'
AND [System.State] <> 'Closed'
ORDER BY [System.ChangedDate] DESC
`,
});
import pulumi
import pulumi_azuredevops as azuredevops
example = azuredevops.Project("example",
name="Example Project",
work_item_template="Agile",
version_control="Git",
visibility="private")
all_issues = azuredevops.Workitemquery("all_issues",
project_id=example.id,
name="All Active Issues",
area="Shared Queries",
wiql="""SELECT [System.Id], [System.Title], [System.State]
FROM WorkItems
WHERE [System.WorkItemType] = 'Issue'
AND [System.State] <> 'Closed'
ORDER BY [System.ChangedDate] DESC
""")
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"),
})
if err != nil {
return err
}
_, err = azuredevops.NewWorkitemquery(ctx, "all_issues", &azuredevops.WorkitemqueryArgs{
ProjectId: example.ID(),
Name: pulumi.String("All Active Issues"),
Area: pulumi.String("Shared Queries"),
Wiql: pulumi.String(`SELECT [System.Id], [System.Title], [System.State]
FROM WorkItems
WHERE [System.WorkItemType] = 'Issue'
AND [System.State] <> 'Closed'
ORDER BY [System.ChangedDate] DESC
`),
})
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",
});
var allIssues = new AzureDevOps.Workitemquery("all_issues", new()
{
ProjectId = example.Id,
Name = "All Active Issues",
Area = "Shared Queries",
Wiql = @"SELECT [System.Id], [System.Title], [System.State]
FROM WorkItems
WHERE [System.WorkItemType] = 'Issue'
AND [System.State] <> 'Closed'
ORDER BY [System.ChangedDate] DESC
",
});
});
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.Workitemquery;
import com.pulumi.azuredevops.WorkitemqueryArgs;
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")
.build());
var allIssues = new Workitemquery("allIssues", WorkitemqueryArgs.builder()
.projectId(example.id())
.name("All Active Issues")
.area("Shared Queries")
.wiql("""
SELECT [System.Id], [System.Title], [System.State]
FROM WorkItems
WHERE [System.WorkItemType] = 'Issue'
AND [System.State] <> 'Closed'
ORDER BY [System.ChangedDate] DESC
""")
.build());
}
}
resources:
example:
type: azuredevops:Project
properties:
name: Example Project
workItemTemplate: Agile
versionControl: Git
visibility: private
allIssues:
type: azuredevops:Workitemquery
name: all_issues
properties:
projectId: ${example.id}
name: All Active Issues
area: Shared Queries
wiql: |
SELECT [System.Id], [System.Title], [System.State]
FROM WorkItems
WHERE [System.WorkItemType] = 'Issue'
AND [System.State] <> 'Closed'
ORDER BY [System.ChangedDate] DESC
Query inside a custom folder
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",
});
const teamFolder = new azuredevops.WorkitemqueryFolder("team_folder", {
projectId: example.id,
name: "Team",
area: "Shared Queries",
});
const myTeamBugs = new azuredevops.Workitemquery("my_team_bugs", {
projectId: example.id,
name: "Team Bugs",
parentId: teamFolder.id,
wiql: `SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
`,
});
import pulumi
import pulumi_azuredevops as azuredevops
example = azuredevops.Project("example",
name="Example Project",
work_item_template="Agile",
version_control="Git",
visibility="private")
team_folder = azuredevops.WorkitemqueryFolder("team_folder",
project_id=example.id,
name="Team",
area="Shared Queries")
my_team_bugs = azuredevops.Workitemquery("my_team_bugs",
project_id=example.id,
name="Team Bugs",
parent_id=team_folder.id,
wiql="""SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
""")
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"),
})
if err != nil {
return err
}
teamFolder, 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
}
_, err = azuredevops.NewWorkitemquery(ctx, "my_team_bugs", &azuredevops.WorkitemqueryArgs{
ProjectId: example.ID(),
Name: pulumi.String("Team Bugs"),
ParentId: teamFolder.ID(),
Wiql: pulumi.String(`SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
`),
})
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",
});
var teamFolder = new AzureDevOps.WorkitemqueryFolder("team_folder", new()
{
ProjectId = example.Id,
Name = "Team",
Area = "Shared Queries",
});
var myTeamBugs = new AzureDevOps.Workitemquery("my_team_bugs", new()
{
ProjectId = example.Id,
Name = "Team Bugs",
ParentId = teamFolder.Id,
Wiql = @"SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
",
});
});
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 com.pulumi.azuredevops.Workitemquery;
import com.pulumi.azuredevops.WorkitemqueryArgs;
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")
.build());
var teamFolder = new WorkitemqueryFolder("teamFolder", WorkitemqueryFolderArgs.builder()
.projectId(example.id())
.name("Team")
.area("Shared Queries")
.build());
var myTeamBugs = new Workitemquery("myTeamBugs", WorkitemqueryArgs.builder()
.projectId(example.id())
.name("Team Bugs")
.parentId(teamFolder.id())
.wiql("""
SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
""")
.build());
}
}
resources:
example:
type: azuredevops:Project
properties:
name: Example Project
workItemTemplate: Agile
versionControl: Git
visibility: private
teamFolder:
type: azuredevops:WorkitemqueryFolder
name: team_folder
properties:
projectId: ${example.id}
name: Team
area: Shared Queries
myTeamBugs:
type: azuredevops:Workitemquery
name: my_team_bugs
properties:
projectId: ${example.id}
name: Team Bugs
parentId: ${teamFolder.id}
wiql: |
SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
Applying permissions to a query
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
import * as std from "@pulumi/std";
const example = new azuredevops.Project("example", {
name: "Example Project",
workItemTemplate: "Agile",
versionControl: "Git",
visibility: "private",
});
const teamFolder = new azuredevops.WorkitemqueryFolder("team_folder", {
projectId: example.id,
name: "Team",
area: "Shared Queries",
});
const myTeamBugs = new azuredevops.Workitemquery("my_team_bugs", {
projectId: example.id,
name: "Team Bugs",
parentId: teamFolder.id,
wiql: `SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
`,
});
const example_readers = azuredevops.getGroupOutput({
projectId: example.id,
name: "Readers",
});
const queryPermissions = new azuredevops.WorkItemQueryPermissions("query_permissions", {
projectId: example.id,
path: std.index.format({
input: "%s/%s",
args: [
teamFolder.name,
myTeamBugs.name,
],
}).result,
principal: example_readers.apply(example_readers => example_readers.id),
permissions: {
Read: "Allow",
Contribute: "Deny",
ManagePermissions: "Deny",
Delete: "Deny",
},
});
import pulumi
import pulumi_azuredevops as azuredevops
import pulumi_std as std
example = azuredevops.Project("example",
name="Example Project",
work_item_template="Agile",
version_control="Git",
visibility="private")
team_folder = azuredevops.WorkitemqueryFolder("team_folder",
project_id=example.id,
name="Team",
area="Shared Queries")
my_team_bugs = azuredevops.Workitemquery("my_team_bugs",
project_id=example.id,
name="Team Bugs",
parent_id=team_folder.id,
wiql="""SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
""")
example_readers = azuredevops.get_group_output(project_id=example.id,
name="Readers")
query_permissions = azuredevops.WorkItemQueryPermissions("query_permissions",
project_id=example.id,
path=std.index.format(input="%s/%s",
args=[
team_folder.name,
my_team_bugs.name,
])["result"],
principal=example_readers.id,
permissions={
"Read": "Allow",
"Contribute": "Deny",
"ManagePermissions": "Deny",
"Delete": "Deny",
})
package main
import (
"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
"github.com/pulumi/pulumi-std/sdk/go/std"
"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"),
})
if err != nil {
return err
}
teamFolder, 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
}
myTeamBugs, err := azuredevops.NewWorkitemquery(ctx, "my_team_bugs", &azuredevops.WorkitemqueryArgs{
ProjectId: example.ID(),
Name: pulumi.String("Team Bugs"),
ParentId: teamFolder.ID(),
Wiql: pulumi.String(`SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
`),
})
if err != nil {
return err
}
example_readers := azuredevops.LookupGroupOutput(ctx, azuredevops.GetGroupOutputArgs{
ProjectId: example.ID(),
Name: pulumi.String("Readers"),
}, nil)
invokeFormat, err := std.Format(ctx, map[string]interface{}{
"input": "%s/%s",
"args": pulumi.StringArray{
teamFolder.Name,
myTeamBugs.Name,
},
}, nil)
if err != nil {
return err
}
_, err = azuredevops.NewWorkItemQueryPermissions(ctx, "query_permissions", &azuredevops.WorkItemQueryPermissionsArgs{
ProjectId: example.ID(),
Path: invokeFormat.Result,
Principal: pulumi.String(example_readers.ApplyT(func(example_readers azuredevops.GetGroupResult) (*string, error) {
return &example_readers.Id, nil
}).(pulumi.StringPtrOutput)),
Permissions: pulumi.StringMap{
"Read": pulumi.String("Allow"),
"Contribute": pulumi.String("Deny"),
"ManagePermissions": pulumi.String("Deny"),
"Delete": pulumi.String("Deny"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var example = new AzureDevOps.Project("example", new()
{
Name = "Example Project",
WorkItemTemplate = "Agile",
VersionControl = "Git",
Visibility = "private",
});
var teamFolder = new AzureDevOps.WorkitemqueryFolder("team_folder", new()
{
ProjectId = example.Id,
Name = "Team",
Area = "Shared Queries",
});
var myTeamBugs = new AzureDevOps.Workitemquery("my_team_bugs", new()
{
ProjectId = example.Id,
Name = "Team Bugs",
ParentId = teamFolder.Id,
Wiql = @"SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
",
});
var example_readers = AzureDevOps.GetGroup.Invoke(new()
{
ProjectId = example.Id,
Name = "Readers",
});
var queryPermissions = new AzureDevOps.WorkItemQueryPermissions("query_permissions", new()
{
ProjectId = example.Id,
Path = Std.Index.Format.Invoke(new()
{
Input = "%s/%s",
Args = new[]
{
teamFolder.Name,
myTeamBugs.Name,
},
}).Result,
Principal = example_readers.Apply(example_readers => example_readers.Apply(getGroupResult => getGroupResult.Id)),
Permissions =
{
{ "Read", "Allow" },
{ "Contribute", "Deny" },
{ "ManagePermissions", "Deny" },
{ "Delete", "Deny" },
},
});
});
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 com.pulumi.azuredevops.Workitemquery;
import com.pulumi.azuredevops.WorkitemqueryArgs;
import com.pulumi.azuredevops.AzuredevopsFunctions;
import com.pulumi.azuredevops.inputs.GetGroupArgs;
import com.pulumi.azuredevops.WorkItemQueryPermissions;
import com.pulumi.azuredevops.WorkItemQueryPermissionsArgs;
import com.pulumi.std.StdFunctions;
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")
.build());
var teamFolder = new WorkitemqueryFolder("teamFolder", WorkitemqueryFolderArgs.builder()
.projectId(example.id())
.name("Team")
.area("Shared Queries")
.build());
var myTeamBugs = new Workitemquery("myTeamBugs", WorkitemqueryArgs.builder()
.projectId(example.id())
.name("Team Bugs")
.parentId(teamFolder.id())
.wiql("""
SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
""")
.build());
final var example-readers = AzuredevopsFunctions.getGroup(GetGroupArgs.builder()
.projectId(example.id())
.name("Readers")
.build());
var queryPermissions = new WorkItemQueryPermissions("queryPermissions", WorkItemQueryPermissionsArgs.builder()
.projectId(example.id())
.path(StdFunctions.format(Map.ofEntries(
Map.entry("input", "%s/%s"),
Map.entry("args",
teamFolder.name(),
myTeamBugs.name())
)).result())
.principal(example_readers.applyValue(_example_readers -> _example_readers.id()))
.permissions(Map.ofEntries(
Map.entry("Read", "Allow"),
Map.entry("Contribute", "Deny"),
Map.entry("ManagePermissions", "Deny"),
Map.entry("Delete", "Deny")
))
.build());
}
}
resources:
example:
type: azuredevops:Project
properties:
name: Example Project
workItemTemplate: Agile
versionControl: Git
visibility: private
teamFolder:
type: azuredevops:WorkitemqueryFolder
name: team_folder
properties:
projectId: ${example.id}
name: Team
area: Shared Queries
myTeamBugs:
type: azuredevops:Workitemquery
name: my_team_bugs
properties:
projectId: ${example.id}
name: Team Bugs
parentId: ${teamFolder.id}
wiql: |
SELECT [System.Id], [System.Title], [System.State], [System.AssignedTo]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] <> 'Closed'
ORDER BY [System.CreatedDate] DESC
queryPermissions:
type: azuredevops:WorkItemQueryPermissions
name: query_permissions
properties:
projectId: ${example.id}
path:
fn::invoke:
function: std:format
arguments:
input: '%s/%s'
args:
- ${teamFolder.name}
- ${myTeamBugs.name}
return: result
principal: ${["example-readers"].id}
permissions:
Read: Allow
Contribute: Deny
ManagePermissions: Deny
Delete: Deny
variables:
example-readers:
fn::invoke:
function: azuredevops:getGroup
arguments:
projectId: ${example.id}
name: Readers
Relevant Links
PAT Permissions Required
- Work Items: Read & Write
Create Workitemquery Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Workitemquery(name: string, args: WorkitemqueryArgs, opts?: CustomResourceOptions);@overload
def Workitemquery(resource_name: str,
args: WorkitemqueryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Workitemquery(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
wiql: Optional[str] = None,
area: Optional[str] = None,
name: Optional[str] = None,
parent_id: Optional[str] = None)func NewWorkitemquery(ctx *Context, name string, args WorkitemqueryArgs, opts ...ResourceOption) (*Workitemquery, error)public Workitemquery(string name, WorkitemqueryArgs args, CustomResourceOptions? opts = null)
public Workitemquery(String name, WorkitemqueryArgs args)
public Workitemquery(String name, WorkitemqueryArgs args, CustomResourceOptions options)
type: azuredevops:Workitemquery
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 WorkitemqueryArgs
- 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 WorkitemqueryArgs
- 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 WorkitemqueryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkitemqueryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkitemqueryArgs
- 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 workitemqueryResource = new AzureDevOps.Workitemquery("workitemqueryResource", new()
{
ProjectId = "string",
Wiql = "string",
Area = "string",
Name = "string",
ParentId = "string",
});
example, err := azuredevops.NewWorkitemquery(ctx, "workitemqueryResource", &azuredevops.WorkitemqueryArgs{
ProjectId: pulumi.String("string"),
Wiql: pulumi.String("string"),
Area: pulumi.String("string"),
Name: pulumi.String("string"),
ParentId: pulumi.String("string"),
})
var workitemqueryResource = new Workitemquery("workitemqueryResource", WorkitemqueryArgs.builder()
.projectId("string")
.wiql("string")
.area("string")
.name("string")
.parentId("string")
.build());
workitemquery_resource = azuredevops.Workitemquery("workitemqueryResource",
project_id="string",
wiql="string",
area="string",
name="string",
parent_id="string")
const workitemqueryResource = new azuredevops.Workitemquery("workitemqueryResource", {
projectId: "string",
wiql: "string",
area: "string",
name: "string",
parentId: "string",
});
type: azuredevops:Workitemquery
properties:
area: string
name: string
parentId: string
projectId: string
wiql: string
Workitemquery 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 Workitemquery resource accepts the following input properties:
- Project
Id string - The ID of the Project containing the query.
- Wiql string
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
- Area string
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - Name string
- The display name of the query.
- Parent
Id string - The ID of the parent query folder under which to create the query.
- Project
Id string - The ID of the Project containing the query.
- Wiql string
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
- Area string
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - Name string
- The display name of the query.
- Parent
Id string - The ID of the parent query folder under which to create the query.
- project
Id String - The ID of the Project containing the query.
- wiql String
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
- area String
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - name String
- The display name of the query.
- parent
Id String - The ID of the parent query folder under which to create the query.
- project
Id string - The ID of the Project containing the query.
- wiql string
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
- area string
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - name string
- The display name of the query.
- parent
Id string - The ID of the parent query folder under which to create the query.
- project_
id str - The ID of the Project containing the query.
- wiql str
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
- area str
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - name str
- The display name of the query.
- parent_
id str - The ID of the parent query folder under which to create the query.
- project
Id String - The ID of the Project containing the query.
- wiql String
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
- area String
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - name String
- The display name of the query.
- parent
Id String - The ID of the parent query folder under which to create the query.
Outputs
All input properties are implicitly available as output properties. Additionally, the Workitemquery 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 Workitemquery Resource
Get an existing Workitemquery 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?: WorkitemqueryState, opts?: CustomResourceOptions): Workitemquery@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,
wiql: Optional[str] = None) -> Workitemqueryfunc GetWorkitemquery(ctx *Context, name string, id IDInput, state *WorkitemqueryState, opts ...ResourceOption) (*Workitemquery, error)public static Workitemquery Get(string name, Input<string> id, WorkitemqueryState? state, CustomResourceOptions? opts = null)public static Workitemquery get(String name, Output<String> id, WorkitemqueryState state, CustomResourceOptions options)resources: _: type: azuredevops:Workitemquery 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.
- Area string
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - Name string
- The display name of the query.
- Parent
Id string - The ID of the parent query folder under which to create the query.
- Project
Id string - The ID of the Project containing the query.
- Wiql string
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
- Area string
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - Name string
- The display name of the query.
- Parent
Id string - The ID of the parent query folder under which to create the query.
- Project
Id string - The ID of the Project containing the query.
- Wiql string
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
- area String
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - name String
- The display name of the query.
- parent
Id String - The ID of the parent query folder under which to create the query.
- project
Id String - The ID of the Project containing the query.
- wiql String
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
- area string
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - name string
- The display name of the query.
- parent
Id string - The ID of the parent query folder under which to create the query.
- project
Id string - The ID of the Project containing the query.
- wiql string
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
- area str
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - name str
- The display name of the query.
- parent_
id str - The ID of the parent query folder under which to create the query.
- project_
id str - The ID of the Project containing the query.
- wiql str
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
- area String
- Root folder for the query. Must be one of
Shared QueriesorMy Queries. - name String
- The display name of the query.
- parent
Id String - The ID of the parent query folder under which to create the query.
- project
Id String - The ID of the Project containing the query.
- wiql String
- The WIQL (Work Item Query Language) statement. Length 1–32000 characters.
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
azuredevopsTerraform Provider.
