UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

102 lines (101 loc) 3.9 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "./types/output"; /** * Use this data source to access information about existing Projects within Azure DevOps. * * ## Example Usage * * ```typescript * 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)); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.0 - Projects - Get](https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/get?view=azure-devops-rest-7.0) */ export declare function getProjects(args?: GetProjectsArgs, opts?: pulumi.InvokeOptions): Promise<GetProjectsResult>; /** * A collection of arguments for invoking getProjects. */ export interface GetProjectsArgs { /** * Name of the Project, if not specified all projects will be returned. */ name?: string; /** * State of the Project, if not specified all projects will be returned. Valid values are `all`, `deleting`, `new`, `wellFormed`, `createPending`, `unchanged`,`deleted`. * * > **NOTE:** DataSource without specifying any arguments will return all projects. */ state?: string; } /** * A collection of values returned by getProjects. */ export interface GetProjectsResult { /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * The name of the Project. */ readonly name?: string; /** * A list of `projects` blocks as documented below. A list of existing projects in your Azure DevOps Organization with details about every project which includes: */ readonly projects: outputs.GetProjectsProject[]; /** * The state of the Project. */ readonly state?: string; } /** * Use this data source to access information about existing Projects within Azure DevOps. * * ## Example Usage * * ```typescript * 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)); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.0 - Projects - Get](https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/get?view=azure-devops-rest-7.0) */ export declare function getProjectsOutput(args?: GetProjectsOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetProjectsResult>; /** * A collection of arguments for invoking getProjects. */ export interface GetProjectsOutputArgs { /** * Name of the Project, if not specified all projects will be returned. */ name?: pulumi.Input<string>; /** * State of the Project, if not specified all projects will be returned. Valid values are `all`, `deleting`, `new`, `wellFormed`, `createPending`, `unchanged`,`deleted`. * * > **NOTE:** DataSource without specifying any arguments will return all projects. */ state?: pulumi.Input<string>; }