UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

167 lines (166 loc) 5.6 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages Dashboard within Azure DevOps project. * * > **NOTE:** Project level Dashboard allows to be created with the same name. Dashboard held by a team must have a different name. * * ## Example Usage * * ### Manage Project dashboard * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = new azuredevops.Project("example", { * name: "Example Project", * description: "Managed by Pulumi", * }); * const exampleDashboard = new azuredevops.Dashboard("example", { * projectId: example.id, * name: "Example dashboard", * }); * ``` * * ### Manage Team dashboard * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = new azuredevops.Project("example", { * name: "Example Project", * description: "Managed by Pulumi", * }); * const exampleTeam = new azuredevops.Team("example", { * projectId: example.id, * name: "Example team", * }); * const exampleDashboard = new azuredevops.Dashboard("example", { * projectId: example.id, * name: "Example dashboard", * teamId: exampleTeam.id, * }); * ``` * * ## Relevant Links * * - [Azure DevOps dashboards REST API 7.1 - Dashboard ](https://learn.microsoft.com/en-us/rest/api/azure/devops/dashboard/dashboards?view=azure-devops-rest-7.1) * * ## Import * * Azure DevOps Dashboard can be imported using the `projectId/dasboardId` or `projectId/teamId/dasboardId` * * ```sh * $ pulumi import azuredevops:index/dashboard:Dashboard dashboard 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000 * ``` * * or * * ```sh * $ pulumi import azuredevops:index/dashboard:Dashboard dashboard 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000 * ``` */ export declare class Dashboard extends pulumi.CustomResource { /** * Get an existing Dashboard 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?: DashboardState, opts?: pulumi.CustomResourceOptions): Dashboard; /** * Returns true if the given object is an instance of Dashboard. 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 Dashboard; /** * The description of the dashboard. */ readonly description: pulumi.Output<string | undefined>; /** * The name of the Dashboard. */ readonly name: pulumi.Output<string>; /** * The owner of the Dashboard, could be the project or a team. */ readonly ownerId: pulumi.Output<string>; /** * The ID of the Project. Changing this forces a new resource to be created. */ readonly projectId: pulumi.Output<string>; /** * The interval for client to automatically refresh the dashboard. Expressed in minutes. Possible values are: `0`, `5`.Defaults to `0`. */ readonly refreshInterval: pulumi.Output<number | undefined>; /** * The ID of the Team. */ readonly teamId: pulumi.Output<string | undefined>; /** * Create a Dashboard 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: DashboardArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Dashboard resources. */ export interface DashboardState { /** * The description of the dashboard. */ description?: pulumi.Input<string>; /** * The name of the Dashboard. */ name?: pulumi.Input<string>; /** * The owner of the Dashboard, could be the project or a team. */ ownerId?: pulumi.Input<string>; /** * The ID of the Project. Changing this forces a new resource to be created. */ projectId?: pulumi.Input<string>; /** * The interval for client to automatically refresh the dashboard. Expressed in minutes. Possible values are: `0`, `5`.Defaults to `0`. */ refreshInterval?: pulumi.Input<number>; /** * The ID of the Team. */ teamId?: pulumi.Input<string>; } /** * The set of arguments for constructing a Dashboard resource. */ export interface DashboardArgs { /** * The description of the dashboard. */ description?: pulumi.Input<string>; /** * The name of the Dashboard. */ name?: pulumi.Input<string>; /** * The ID of the Project. Changing this forces a new resource to be created. */ projectId: pulumi.Input<string>; /** * The interval for client to automatically refresh the dashboard. Expressed in minutes. Possible values are: `0`, `5`.Defaults to `0`. */ refreshInterval?: pulumi.Input<number>; /** * The ID of the Team. */ teamId?: pulumi.Input<string>; }