UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

141 lines (140 loc) 4.86 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "./types/output"; /** * Use this data source to access information about an existing Iteration (Sprint) within Azure DevOps. * * ## Example Usage * * ```typescript * 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", * description: "Managed by Pulumi", * }); * const example_root_iteration = azuredevops.getIterationOutput({ * projectId: example.id, * path: "/", * fetchChildren: true, * }); * const example_child_iteration = azuredevops.getIterationOutput({ * projectId: example.id, * path: "/Iteration 1", * fetchChildren: true, * }); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.0 - Classification Nodes - Get Classification Nodes](https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/classification-nodes/get-classification-nodes?view=azure-devops-rest-7.0) * * ## PAT Permissions Required * * - **Project & Team**: vso.work - Grants the ability to read work items, queries, boards, area and iterations paths, and other work item tracking related metadata. Also grants the ability to execute queries, search work items and to receive notifications about work item events via service hooks. */ export declare function getIteration(args: GetIterationArgs, opts?: pulumi.InvokeOptions): Promise<GetIterationResult>; /** * A collection of arguments for invoking getIteration. */ export interface GetIterationArgs { /** * Read children nodes, _Depth_: 1, _Default_: `true` */ fetchChildren?: boolean; /** * The path to the Iteration, _Format_: URL relative; if omitted, or value `"/"` is used, the root Iteration will be returned */ path?: string; /** * The project ID. */ projectId: string; } /** * A collection of values returned by getIteration. */ export interface GetIterationResult { /** * A list of `children` blocks as defined below, empty if `hasChildren == false` */ readonly childrens: outputs.GetIterationChildren[]; readonly fetchChildren?: boolean; /** * Indicator if the child Iteration node has child nodes */ readonly hasChildren: boolean; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * The name of the child Iteration node */ readonly name: string; /** * The complete path (in relative URL format) of the child Iteration */ readonly path: string; /** * The project ID of the child Iteration node */ readonly projectId: string; } /** * Use this data source to access information about an existing Iteration (Sprint) within Azure DevOps. * * ## Example Usage * * ```typescript * 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", * description: "Managed by Pulumi", * }); * const example_root_iteration = azuredevops.getIterationOutput({ * projectId: example.id, * path: "/", * fetchChildren: true, * }); * const example_child_iteration = azuredevops.getIterationOutput({ * projectId: example.id, * path: "/Iteration 1", * fetchChildren: true, * }); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.0 - Classification Nodes - Get Classification Nodes](https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/classification-nodes/get-classification-nodes?view=azure-devops-rest-7.0) * * ## PAT Permissions Required * * - **Project & Team**: vso.work - Grants the ability to read work items, queries, boards, area and iterations paths, and other work item tracking related metadata. Also grants the ability to execute queries, search work items and to receive notifications about work item events via service hooks. */ export declare function getIterationOutput(args: GetIterationOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetIterationResult>; /** * A collection of arguments for invoking getIteration. */ export interface GetIterationOutputArgs { /** * Read children nodes, _Depth_: 1, _Default_: `true` */ fetchChildren?: pulumi.Input<boolean>; /** * The path to the Iteration, _Format_: URL relative; if omitted, or value `"/"` is used, the root Iteration will be returned */ path?: pulumi.Input<string>; /** * The project ID. */ projectId: pulumi.Input<string>; }