@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
171 lines (170 loc) • 6.41 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a Approval Check.
*
* ## Example Usage
*
* ### 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 exampleGroup = new azuredevops.Group("example", {displayName: "some-azdo-group"});
* const exampleCheckApproval = new azuredevops.CheckApproval("example", {
* projectId: example.id,
* targetResourceId: exampleEnvironment.id,
* targetResourceType: "environment",
* requesterCanApprove: true,
* approvers: [exampleGroup.originId],
* });
* ```
*
* ## Import
*
* Importing this resource is not supported.
*/
export declare class CheckApproval extends pulumi.CustomResource {
/**
* Get an existing CheckApproval 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?: CheckApprovalState, opts?: pulumi.CustomResourceOptions): CheckApproval;
/**
* Returns true if the given object is an instance of CheckApproval. 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 CheckApproval;
/**
* Specifies a list of approver IDs.
*/
readonly approvers: pulumi.Output<string[]>;
/**
* The instructions for the approvers.
*/
readonly instructions: pulumi.Output<string | undefined>;
/**
* The minimum number of approvers. This property is applicable when there is more than 1 approver.
*/
readonly minimumRequiredApprovers: pulumi.Output<number | undefined>;
/**
* The project ID. Changing this forces a new Approval Check to be created.
*/
readonly projectId: pulumi.Output<string>;
/**
* Can the requestor approve? Defaults to `false`.
*/
readonly requesterCanApprove: pulumi.Output<boolean | undefined>;
/**
* The ID of the resource being protected by the check. Changing this forces a new Approval Check to be created.
*/
readonly targetResourceId: pulumi.Output<string>;
/**
* The type of resource being protected by the check. Valid values: `endpoint`, `environment`, `queue`, `repository`, `securefile`, `variablegroup`. Changing this forces a new Approval Check to be created.
*/
readonly targetResourceType: pulumi.Output<string>;
/**
* The timeout in minutes for the approval. Defaults to `43200`.
*/
readonly timeout: pulumi.Output<number | undefined>;
/**
* The version of the check.
*/
readonly version: pulumi.Output<number>;
/**
* Create a CheckApproval 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: CheckApprovalArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CheckApproval resources.
*/
export interface CheckApprovalState {
/**
* Specifies a list of approver IDs.
*/
approvers?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The instructions for the approvers.
*/
instructions?: pulumi.Input<string>;
/**
* The minimum number of approvers. This property is applicable when there is more than 1 approver.
*/
minimumRequiredApprovers?: pulumi.Input<number>;
/**
* The project ID. Changing this forces a new Approval Check to be created.
*/
projectId?: pulumi.Input<string>;
/**
* Can the requestor approve? Defaults to `false`.
*/
requesterCanApprove?: pulumi.Input<boolean>;
/**
* The ID of the resource being protected by the check. Changing this forces a new Approval Check to be created.
*/
targetResourceId?: pulumi.Input<string>;
/**
* The type of resource being protected by the check. Valid values: `endpoint`, `environment`, `queue`, `repository`, `securefile`, `variablegroup`. Changing this forces a new Approval Check to be created.
*/
targetResourceType?: pulumi.Input<string>;
/**
* The timeout in minutes for the approval. Defaults to `43200`.
*/
timeout?: pulumi.Input<number>;
/**
* The version of the check.
*/
version?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a CheckApproval resource.
*/
export interface CheckApprovalArgs {
/**
* Specifies a list of approver IDs.
*/
approvers: pulumi.Input<pulumi.Input<string>[]>;
/**
* The instructions for the approvers.
*/
instructions?: pulumi.Input<string>;
/**
* The minimum number of approvers. This property is applicable when there is more than 1 approver.
*/
minimumRequiredApprovers?: pulumi.Input<number>;
/**
* The project ID. Changing this forces a new Approval Check to be created.
*/
projectId: pulumi.Input<string>;
/**
* Can the requestor approve? Defaults to `false`.
*/
requesterCanApprove?: pulumi.Input<boolean>;
/**
* The ID of the resource being protected by the check. Changing this forces a new Approval Check to be created.
*/
targetResourceId: pulumi.Input<string>;
/**
* The type of resource being protected by the check. Valid values: `endpoint`, `environment`, `queue`, `repository`, `securefile`, `variablegroup`. Changing this forces a new Approval Check to be created.
*/
targetResourceType: pulumi.Input<string>;
/**
* The timeout in minutes for the approval. Defaults to `43200`.
*/
timeout?: pulumi.Input<number>;
}