AzureDevOps

Pulumi Official
Package maintained by Pulumi
v2.4.0 published on Friday, Apr 22, 2022 by Pulumi

getProjects

Deprecated:

azuredevops.core.getProjects has been deprecated in favor of azuredevops.getProjects

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

Example Usage

using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AzureDevOps.GetProjects.InvokeAsync(new AzureDevOps.GetProjectsArgs
        {
            Name = "Example Project",
            State = "wellFormed",
        }));
        this.ProjectId = 
        {
            example.Apply(example => example.Projects),
        }.Select(__item => __item?.ProjectId).ToList();
        this.Name = 
        {
            example.Apply(example => example.Projects),
        }.Select(__item => __item?.Name).ToList();
        this.ProjectUrl = 
        {
            example.Apply(example => example.Projects),
        }.Select(__item => __item?.ProjectUrl).ToList();
        this.State = 
        {
            example.Apply(example => example.Projects),
        }.Select(__item => __item?.State).ToList();
    }

    [Output("projectId")]
    public Output<string> ProjectId { get; set; }
    [Output("name")]
    public Output<string> Name { get; set; }
    [Output("projectUrl")]
    public Output<string> ProjectUrl { get; set; }
    [Output("state")]
    public Output<string> State { get; set; }
}

Coming soon!

Coming soon!

import pulumi
import pulumi_azuredevops as azuredevops

example = azuredevops.get_projects(name="Example Project",
    state="wellFormed")
pulumi.export("projectId", [__item.project_id for __item in [example.projects]])
pulumi.export("name", [__item.name for __item in [example.projects]])
pulumi.export("projectUrl", [__item.project_url for __item in [example.projects]])
pulumi.export("state", [__item.state for __item in [example.projects]])
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const example = azuredevops.getProjects({
    name: "Example Project",
    state: "wellFormed",
});
export const projectId = [example.then(example => example.projects)].map(__item => __item?.projectId);
export const name = [example.then(example => example.projects)].map(__item => __item?.name);
export const projectUrl = [example.then(example => example.projects)].map(__item => __item?.projectUrl);
export const state = [example.then(example => example.projects)].map(__item => __item?.state);

Coming soon!

Using getProjects

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 getProjects(args: GetProjectsArgs, opts?: InvokeOptions): Promise<GetProjectsResult>
function getProjectsOutput(args: GetProjectsOutputArgs, opts?: InvokeOptions): Output<GetProjectsResult>
def get_projects(name: Optional[str] = None,
                 state: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetProjectsResult
def get_projects_output(name: Optional[pulumi.Input[str]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetProjectsResult]
func GetProjects(ctx *Context, args *GetProjectsArgs, opts ...InvokeOption) (*GetProjectsResult, error)
func GetProjectsOutput(ctx *Context, args *GetProjectsOutputArgs, opts ...InvokeOption) GetProjectsResultOutput

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

public static class GetProjects 
{
    public static Task<GetProjectsResult> InvokeAsync(GetProjectsArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectsResult> Invoke(GetProjectsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectsResult> getProjects(GetProjectsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azuredevops:Core/getProjects:getProjects
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Name string

Name of the Project, if not specified all projects will be returned.

State string

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

Name string

Name of the Project, if not specified all projects will be returned.

State string

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

name String

Name of the Project, if not specified all projects will be returned.

state String

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

name string

Name of the Project, if not specified all projects will be returned.

state string

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

name str

Name of the Project, if not specified all projects will be returned.

state str

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

name String

Name of the Project, if not specified all projects will be returned.

state String

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

getProjects Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Projects List<Pulumi.AzureDevOps.Core.Outputs.GetProjectsProject>

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

Name string

Project name.

State string

Project state.

Id string

The provider-assigned unique ID for this managed resource.

Projects []GetProjectsProject

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

Name string

Project name.

State string

Project state.

id String

The provider-assigned unique ID for this managed resource.

projects List<GetProjectsProject>

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

name String

Project name.

state String

Project state.

id string

The provider-assigned unique ID for this managed resource.

projects GetProjectsProject[]

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

name string

Project name.

state string

Project state.

id str

The provider-assigned unique ID for this managed resource.

projects GetProjectsProject]

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

name str

Project name.

state str

Project state.

id String

The provider-assigned unique ID for this managed resource.

projects List<Property Map>

A list of existing projects in your Azure DevOps Organization with details about every project which includes:

name String

Project name.

state String

Project state.

Supporting Types

GetProjectsProject

Name string

Name of the Project, if not specified all projects will be returned.

ProjectId string

Project identifier.

ProjectUrl string

Url to the full version of the object.

State string

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

Name string

Name of the Project, if not specified all projects will be returned.

ProjectId string

Project identifier.

ProjectUrl string

Url to the full version of the object.

State string

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

name String

Name of the Project, if not specified all projects will be returned.

projectId String

Project identifier.

projectUrl String

Url to the full version of the object.

state String

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

name string

Name of the Project, if not specified all projects will be returned.

projectId string

Project identifier.

projectUrl string

Url to the full version of the object.

state string

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

name str

Name of the Project, if not specified all projects will be returned.

project_id str

Project identifier.

project_url str

Url to the full version of the object.

state str

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

name String

Name of the Project, if not specified all projects will be returned.

projectId String

Project identifier.

projectUrl String

Url to the full version of the object.

state String

State of the Project, if not specified all projects will be returned. Valid values are all, deleting, new, wellFormed, createPending, unchanged,deleted.

Package Details

Repository
https://github.com/pulumi/pulumi-azuredevops
License
Apache-2.0
Notes

This Pulumi package is based on the azuredevops Terraform Provider.