1. Packages
  2. Azure DevOps Provider
  3. API Docs
  4. getProject
Azure DevOps v3.8.0 published on Monday, Mar 17, 2025 by Pulumi

azuredevops.getProject

Explore with Pulumi AI

Use this data source to access information about an existing Project within Azure DevOps.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const example = azuredevops.getProject({
    name: "Example Project",
});
export const project = example;
Copy
import pulumi
import pulumi_azuredevops as azuredevops

example = azuredevops.get_project(name="Example Project")
pulumi.export("project", example)
Copy
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.LookupProject(ctx, &azuredevops.LookupProjectArgs{
			Name: pulumi.StringRef("Example Project"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("project", example)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

return await Deployment.RunAsync(() => 
{
    var example = AzureDevOps.GetProject.Invoke(new()
    {
        Name = "Example Project",
    });

    return new Dictionary<string, object?>
    {
        ["project"] = example,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuredevops.AzuredevopsFunctions;
import com.pulumi.azuredevops.inputs.GetProjectArgs;
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) {
        final var example = AzuredevopsFunctions.getProject(GetProjectArgs.builder()
            .name("Example Project")
            .build());

        ctx.export("project", example.applyValue(getProjectResult -> getProjectResult));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azuredevops:getProject
      arguments:
        name: Example Project
outputs:
  project: ${example}
Copy

PAT Permissions Required

  • Project & Team: Read
  • Work Items: Read

Using getProject

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 getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
function getProjectOutput(args: GetProjectOutputArgs, opts?: InvokeOptions): Output<GetProjectResult>
Copy
def get_project(name: Optional[str] = None,
                project_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetProjectResult
def get_project_output(name: Optional[pulumi.Input[str]] = None,
                project_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetProjectResult]
Copy
func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput
Copy

> Note: This function is named LookupProject in the Go SDK.

public static class GetProject 
{
    public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectResult> Invoke(GetProjectInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
public static Output<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azuredevops:index/getProject:getProject
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name string
Name of the Project.
ProjectId string

ID of the Project.

NOTE: One of either project_id or name must be specified.

Name string
Name of the Project.
ProjectId string

ID of the Project.

NOTE: One of either project_id or name must be specified.

name String
Name of the Project.
projectId String

ID of the Project.

NOTE: One of either project_id or name must be specified.

name string
Name of the Project.
projectId string

ID of the Project.

NOTE: One of either project_id or name must be specified.

name str
Name of the Project.
project_id str

ID of the Project.

NOTE: One of either project_id or name must be specified.

name String
Name of the Project.
projectId String

ID of the Project.

NOTE: One of either project_id or name must be specified.

getProject Result

The following output properties are available:

Description string
The description of the project.
Features Dictionary<string, string>
Id string
The provider-assigned unique ID for this managed resource.
ProcessTemplateId string
The process template ID for the project.
VersionControl string
The version control of the project.
Visibility string
The visibility of the project.
WorkItemTemplate string
The work item template for the project.
Name string
The name of the project.
ProjectId string
Description string
The description of the project.
Features map[string]string
Id string
The provider-assigned unique ID for this managed resource.
ProcessTemplateId string
The process template ID for the project.
VersionControl string
The version control of the project.
Visibility string
The visibility of the project.
WorkItemTemplate string
The work item template for the project.
Name string
The name of the project.
ProjectId string
description String
The description of the project.
features Map<String,String>
id String
The provider-assigned unique ID for this managed resource.
processTemplateId String
The process template ID for the project.
versionControl String
The version control of the project.
visibility String
The visibility of the project.
workItemTemplate String
The work item template for the project.
name String
The name of the project.
projectId String
description string
The description of the project.
features {[key: string]: string}
id string
The provider-assigned unique ID for this managed resource.
processTemplateId string
The process template ID for the project.
versionControl string
The version control of the project.
visibility string
The visibility of the project.
workItemTemplate string
The work item template for the project.
name string
The name of the project.
projectId string
description str
The description of the project.
features Mapping[str, str]
id str
The provider-assigned unique ID for this managed resource.
process_template_id str
The process template ID for the project.
version_control str
The version control of the project.
visibility str
The visibility of the project.
work_item_template str
The work item template for the project.
name str
The name of the project.
project_id str
description String
The description of the project.
features Map<String>
id String
The provider-assigned unique ID for this managed resource.
processTemplateId String
The process template ID for the project.
versionControl String
The version control of the project.
visibility String
The visibility of the project.
workItemTemplate String
The work item template for the project.
name String
The name of the project.
projectId String

Package Details

Repository
Azure DevOps pulumi/pulumi-azuredevops
License
Apache-2.0
Notes
This Pulumi package is based on the azuredevops Terraform Provider.