1. Packages
  2. Azuredevops Provider
  3. API Docs
  4. getProject
Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi

azuredevops.getProject

Explore with Pulumi AI

azuredevops logo
Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi

    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;
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    example = azuredevops.get_project(name="Example Project")
    pulumi.export("project", example)
    
    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
    	})
    }
    
    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,
        };
    });
    
    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));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azuredevops:getProject
          Arguments:
            name: Example Project
    outputs:
      project: ${example}
    

    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>
    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]
    func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
    func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput

    > 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)
    }
    public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azuredevops:index/getProject:getProject
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the Project.
    ProjectId string
    ID of the Project.
    Name string
    Name of the Project.
    ProjectId string
    ID of the Project.
    name String
    Name of the Project.
    projectId String
    ID of the Project.
    name string
    Name of the Project.
    projectId string
    ID of the Project.
    name str
    Name of the Project.
    project_id str
    ID of the Project.
    name String
    Name of the Project.
    projectId String
    ID of the Project.

    getProject Result

    The following output properties are available:

    Description string
    Features Dictionary<string, string>
    Id string
    The provider-assigned unique ID for this managed resource.
    ProcessTemplateId string
    VersionControl string
    Visibility string
    WorkItemTemplate string
    Name string
    ProjectId string
    Description string
    Features map[string]string
    Id string
    The provider-assigned unique ID for this managed resource.
    ProcessTemplateId string
    VersionControl string
    Visibility string
    WorkItemTemplate string
    Name string
    ProjectId string
    description String
    features Map<String,String>
    id String
    The provider-assigned unique ID for this managed resource.
    processTemplateId String
    versionControl String
    visibility String
    workItemTemplate String
    name String
    projectId String
    description string
    features {[key: string]: string}
    id string
    The provider-assigned unique ID for this managed resource.
    processTemplateId string
    versionControl string
    visibility string
    workItemTemplate string
    name string
    projectId string
    description str
    features Mapping[str, str]
    id str
    The provider-assigned unique ID for this managed resource.
    process_template_id str
    version_control str
    visibility str
    work_item_template str
    name str
    project_id str
    description String
    features Map<String>
    id String
    The provider-assigned unique ID for this managed resource.
    processTemplateId String
    versionControl String
    visibility String
    workItemTemplate String
    name String
    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.
    azuredevops logo
    Azure DevOps v3.4.0 published on Wednesday, Oct 30, 2024 by Pulumi