UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

256 lines (255 loc) 8.91 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Manages a Work Item in Azure Devops. * * ## Example Usage * * ### Basic 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 exampleWorkitem = new azuredevops.Workitem("example", { * projectId: exampleAzuredevopsProject.id, * title: "Example Work Item", * type: "Issue", * state: "Active", * tags: ["Tag"], * }); * ``` * * ### With custom fields * * ```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 exampleWorkitem = new azuredevops.Workitem("example", { * projectId: exampleAzuredevopsProject.id, * title: "Example Work Item", * type: "Issue", * state: "Active", * tags: ["Tag"], * customFields: { * example: "example", * }, * }); * ``` * ### With Parent Work Item * * ```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", * }); * const epic = new azuredevops.Workitem("epic", { * projectId: example.id, * title: "Example EPIC Title", * type: "Epic", * state: "New", * }); * const exampleWorkitem = new azuredevops.Workitem("example", { * projectId: example.id, * title: "Example Work Item", * type: "Issue", * state: "Active", * tags: ["Tag"], * parentId: epic.id, * }); * ``` * * ## Import * * Azure DevOps Work Item can be imported using the Project ID and Work Item ID, e.g. * * ```sh * $ pulumi import azuredevops:index/workitem:Workitem example 00000000-0000-0000-0000-000000000000/0 * ``` */ export declare class Workitem extends pulumi.CustomResource { /** * Get an existing Workitem resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: WorkitemState, opts?: pulumi.CustomResourceOptions): Workitem; /** * Returns true if the given object is an instance of Workitem. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Workitem; /** * Specifies the area where the Work Item is used. */ readonly areaPath: pulumi.Output<string>; /** * Specifies a list with Custom Fields for the Work Item. */ readonly customFields: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Specifies the iteration in which the Work Item is used. */ readonly iterationPath: pulumi.Output<string>; /** * The parent work item. */ readonly parentId: pulumi.Output<number | undefined>; /** * The ID of the Project. */ readonly projectId: pulumi.Output<string>; /** * A `relations` blocks as documented below. */ readonly relations: pulumi.Output<outputs.WorkitemRelation[]>; /** * The state of the Work Item. The four main states that are defined for the User Story (`Agile`) are `New`, `Active`, `Resolved`, and `Closed`. See [Workflow states](https://learn.microsoft.com/en-us/azure/devops/boards/work-items/workflow-and-state-categories?view=azure-devops&tabs=agile-process#workflow-states) for more details. */ readonly state: pulumi.Output<string>; /** * Specifies a list of Tags. */ readonly tags: pulumi.Output<string[] | undefined>; /** * The Title of the Work Item. */ readonly title: pulumi.Output<string>; /** * The Type of the Work Item. The work item type varies depending on the process used when creating the project(`Agile`, `Basic`, `Scrum`, `Scrum`). See [Work Item Types](https://learn.microsoft.com/en-us/azure/devops/boards/work-items/about-work-items?view=azure-devops) for more details. */ readonly type: pulumi.Output<string>; /** * The URL of the Work Item. */ readonly url: pulumi.Output<string>; /** * Create a Workitem resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: WorkitemArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Workitem resources. */ export interface WorkitemState { /** * Specifies the area where the Work Item is used. */ areaPath?: pulumi.Input<string>; /** * Specifies a list with Custom Fields for the Work Item. */ customFields?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Specifies the iteration in which the Work Item is used. */ iterationPath?: pulumi.Input<string>; /** * The parent work item. */ parentId?: pulumi.Input<number>; /** * The ID of the Project. */ projectId?: pulumi.Input<string>; /** * A `relations` blocks as documented below. */ relations?: pulumi.Input<pulumi.Input<inputs.WorkitemRelation>[]>; /** * The state of the Work Item. The four main states that are defined for the User Story (`Agile`) are `New`, `Active`, `Resolved`, and `Closed`. See [Workflow states](https://learn.microsoft.com/en-us/azure/devops/boards/work-items/workflow-and-state-categories?view=azure-devops&tabs=agile-process#workflow-states) for more details. */ state?: pulumi.Input<string>; /** * Specifies a list of Tags. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * The Title of the Work Item. */ title?: pulumi.Input<string>; /** * The Type of the Work Item. The work item type varies depending on the process used when creating the project(`Agile`, `Basic`, `Scrum`, `Scrum`). See [Work Item Types](https://learn.microsoft.com/en-us/azure/devops/boards/work-items/about-work-items?view=azure-devops) for more details. */ type?: pulumi.Input<string>; /** * The URL of the Work Item. */ url?: pulumi.Input<string>; } /** * The set of arguments for constructing a Workitem resource. */ export interface WorkitemArgs { /** * Specifies the area where the Work Item is used. */ areaPath?: pulumi.Input<string>; /** * Specifies a list with Custom Fields for the Work Item. */ customFields?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Specifies the iteration in which the Work Item is used. */ iterationPath?: pulumi.Input<string>; /** * The parent work item. */ parentId?: pulumi.Input<number>; /** * The ID of the Project. */ projectId: pulumi.Input<string>; /** * The state of the Work Item. The four main states that are defined for the User Story (`Agile`) are `New`, `Active`, `Resolved`, and `Closed`. See [Workflow states](https://learn.microsoft.com/en-us/azure/devops/boards/work-items/workflow-and-state-categories?view=azure-devops&tabs=agile-process#workflow-states) for more details. */ state?: pulumi.Input<string>; /** * Specifies a list of Tags. */ tags?: pulumi.Input<pulumi.Input<string>[]>; /** * The Title of the Work Item. */ title: pulumi.Input<string>; /** * The Type of the Work Item. The work item type varies depending on the process used when creating the project(`Agile`, `Basic`, `Scrum`, `Scrum`). See [Work Item Types](https://learn.microsoft.com/en-us/azure/devops/boards/work-items/about-work-items?view=azure-devops) for more details. */ type: pulumi.Input<string>; }