@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
168 lines (167 loc) • 6.55 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a Exclusive Lock Check.
*
* Adding an exclusive lock will only allow a single stage to utilize this resource at a time. If multiple stages are waiting on the lock, only the latest will run. All others will be canceled.
*
* ## Example Usage
*
* ### Add Exclusive Lock to an environment
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.Project("example", {name: "Example Project"});
* const exampleServiceEndpointGeneric = new azuredevops.ServiceEndpointGeneric("example", {
* projectId: example.id,
* serverUrl: "https://some-server.example.com",
* username: "username",
* password: "password",
* serviceEndpointName: "Example Generic",
* description: "Managed by Pulumi",
* });
* const exampleCheckExclusiveLock = new azuredevops.CheckExclusiveLock("example", {
* projectId: example.id,
* targetResourceId: exampleServiceEndpointGeneric.id,
* targetResourceType: "endpoint",
* timeout: 43200,
* });
* ```
*
* ### Protect an environment
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.Project("example", {name: "Example Project"});
* const exampleEnvironment = new azuredevops.Environment("example", {
* projectId: example.id,
* name: "Example Environment",
* });
* const exampleCheckExclusiveLock = new azuredevops.CheckExclusiveLock("example", {
* projectId: example.id,
* targetResourceId: exampleEnvironment.id,
* targetResourceType: "environment",
* timeout: 43200,
* });
* ```
*
* ### Protect a repository
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.Project("example", {name: "Example Project"});
* const exampleGit = new azuredevops.Git("example", {
* projectId: example.id,
* name: "Example Repository",
* initialization: {
* initType: "Clean",
* },
* });
* const exampleCheckExclusiveLock = new azuredevops.CheckExclusiveLock("example", {
* projectId: example.id,
* targetResourceId: pulumi.interpolate`${example.id}.${exampleGit.id}`,
* targetResourceType: "repository",
* timeout: 43200,
* });
* ```
*
* ## Import
*
* Importing this resource is not supported.
*/
export declare class CheckExclusiveLock extends pulumi.CustomResource {
/**
* Get an existing CheckExclusiveLock 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?: CheckExclusiveLockState, opts?: pulumi.CustomResourceOptions): CheckExclusiveLock;
/**
* Returns true if the given object is an instance of CheckExclusiveLock. 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 CheckExclusiveLock;
/**
* The project ID. Changing this forces a new Exclusive Lock Check to be created.
*/
readonly projectId: pulumi.Output<string>;
/**
* The ID of the resource being protected by the check. Changing this forces a new Exclusive Lock to be created.
*/
readonly targetResourceId: pulumi.Output<string>;
/**
* The type of resource being protected by the check. Possible values are: `endpoint`, `environment`, `queue`, `repository`, `securefile`, `variablegroup`. Changing this forces a new Exclusive Lock to be created.
*/
readonly targetResourceType: pulumi.Output<string>;
/**
* The timeout in minutes for the exclusive lock. Defaults to `43200`.
*/
readonly timeout: pulumi.Output<number | undefined>;
/**
* The version of the check.
*/
readonly version: pulumi.Output<number>;
/**
* Create a CheckExclusiveLock 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: CheckExclusiveLockArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CheckExclusiveLock resources.
*/
export interface CheckExclusiveLockState {
/**
* The project ID. Changing this forces a new Exclusive Lock Check to be created.
*/
projectId?: pulumi.Input<string>;
/**
* The ID of the resource being protected by the check. Changing this forces a new Exclusive Lock to be created.
*/
targetResourceId?: pulumi.Input<string>;
/**
* The type of resource being protected by the check. Possible values are: `endpoint`, `environment`, `queue`, `repository`, `securefile`, `variablegroup`. Changing this forces a new Exclusive Lock to be created.
*/
targetResourceType?: pulumi.Input<string>;
/**
* The timeout in minutes for the exclusive lock. Defaults to `43200`.
*/
timeout?: pulumi.Input<number>;
/**
* The version of the check.
*/
version?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a CheckExclusiveLock resource.
*/
export interface CheckExclusiveLockArgs {
/**
* The project ID. Changing this forces a new Exclusive Lock Check to be created.
*/
projectId: pulumi.Input<string>;
/**
* The ID of the resource being protected by the check. Changing this forces a new Exclusive Lock to be created.
*/
targetResourceId: pulumi.Input<string>;
/**
* The type of resource being protected by the check. Possible values are: `endpoint`, `environment`, `queue`, `repository`, `securefile`, `variablegroup`. Changing this forces a new Exclusive Lock to be created.
*/
targetResourceType: pulumi.Input<string>;
/**
* The timeout in minutes for the exclusive lock. Defaults to `43200`.
*/
timeout?: pulumi.Input<number>;
}