@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
123 lines (122 loc) • 3.83 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this data source to access information about an Environment.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const exampleProject = new azuredevops.Project("example", {
* name: "Example Project",
* workItemTemplate: "Agile",
* versionControl: "Git",
* visibility: "private",
* description: "Managed by Pulumi",
* });
* const exampleEnvironment = new azuredevops.Environment("example", {
* projectId: exampleProject.id,
* name: "Example Environment",
* description: "Managed by Pulumi",
* });
* const example = pulumi.all([exampleProject.id, exampleEnvironment.id]).apply(([exampleProjectId, exampleEnvironmentId]) => azuredevops.getEnvironmentOutput({
* projectId: exampleProjectId,
* environmentId: exampleEnvironmentId,
* }));
* ```
*
* ## Relevant Links
*
* * [Azure DevOps Service REST API 7.0 - Environments](https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/environments?view=azure-devops-rest-7.0)
*/
export declare function getEnvironment(args: GetEnvironmentArgs, opts?: pulumi.InvokeOptions): Promise<GetEnvironmentResult>;
/**
* A collection of arguments for invoking getEnvironment.
*/
export interface GetEnvironmentArgs {
/**
* The ID of the Environment.
*/
environmentId?: number;
/**
* Name of the Environment.
*
* > **NOTE:** One of either `environmentId` or `name` must be specified.
*/
name?: string;
/**
* The ID of the project.
*/
projectId: string;
}
/**
* A collection of values returned by getEnvironment.
*/
export interface GetEnvironmentResult {
/**
* A description for the Environment.
*/
readonly description: string;
readonly environmentId?: number;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The name of the Environment.
*/
readonly name: string;
readonly projectId: string;
}
/**
* Use this data source to access information about an Environment.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const exampleProject = new azuredevops.Project("example", {
* name: "Example Project",
* workItemTemplate: "Agile",
* versionControl: "Git",
* visibility: "private",
* description: "Managed by Pulumi",
* });
* const exampleEnvironment = new azuredevops.Environment("example", {
* projectId: exampleProject.id,
* name: "Example Environment",
* description: "Managed by Pulumi",
* });
* const example = pulumi.all([exampleProject.id, exampleEnvironment.id]).apply(([exampleProjectId, exampleEnvironmentId]) => azuredevops.getEnvironmentOutput({
* projectId: exampleProjectId,
* environmentId: exampleEnvironmentId,
* }));
* ```
*
* ## Relevant Links
*
* * [Azure DevOps Service REST API 7.0 - Environments](https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/environments?view=azure-devops-rest-7.0)
*/
export declare function getEnvironmentOutput(args: GetEnvironmentOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetEnvironmentResult>;
/**
* A collection of arguments for invoking getEnvironment.
*/
export interface GetEnvironmentOutputArgs {
/**
* The ID of the Environment.
*/
environmentId?: pulumi.Input<number>;
/**
* Name of the Environment.
*
* > **NOTE:** One of either `environmentId` or `name` must be specified.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project.
*/
projectId: pulumi.Input<string>;
}