@pulumi/azuredevops
Version: 
A Pulumi package for creating and managing Azure DevOps.
133 lines (132 loc) • 4.85 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
 * Manages authorization of resources, e.g. for access in build pipelines.
 *
 * Currently supported resources: service endpoint (aka service connection, endpoint).
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azuredevops from "@pulumi/azuredevops";
 *
 * const example = new azuredevops.Project("example", {
 *     name: "Example Project",
 *     visibility: "private",
 *     versionControl: "Git",
 *     workItemTemplate: "Agile",
 *     description: "Managed by Pulumi",
 * });
 * const exampleServiceEndpointBitBucket = new azuredevops.ServiceEndpointBitBucket("example", {
 *     projectId: example.id,
 *     username: "username",
 *     password: "password",
 *     serviceEndpointName: "example-bitbucket",
 *     description: "Managed by Pulumi",
 * });
 * const exampleResourceAuthorization = new azuredevops.ResourceAuthorization("example", {
 *     projectId: example.id,
 *     resourceId: exampleServiceEndpointBitBucket.id,
 *     authorized: true,
 * });
 * ```
 *
 * ## Relevant Links
 *
 * - [Azure DevOps Service REST API 7.0 - Authorize Definition Resource](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/resources/authorize%20definition%20resources?view=azure-devops-rest-7.0)
 */
export declare class ResourceAuthorization extends pulumi.CustomResource {
    /**
     * Get an existing ResourceAuthorization 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?: ResourceAuthorizationState, opts?: pulumi.CustomResourceOptions): ResourceAuthorization;
    /**
     * Returns true if the given object is an instance of ResourceAuthorization.  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 ResourceAuthorization;
    /**
     * Set to true to allow public access in the project.
     */
    readonly authorized: pulumi.Output<boolean>;
    /**
     * The ID of the build definition to authorize.
     */
    readonly definitionId: pulumi.Output<number | undefined>;
    /**
     * The project ID or project name.
     */
    readonly projectId: pulumi.Output<string>;
    /**
     * The ID of the resource to authorize.
     */
    readonly resourceId: pulumi.Output<string>;
    /**
     * The type of the resource to authorize. Possible values: `endpoint`, `queue`, `variablegroup`. Defaults to value: `endpoint`.
     */
    readonly type: pulumi.Output<string | undefined>;
    /**
     * Create a ResourceAuthorization 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: ResourceAuthorizationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering ResourceAuthorization resources.
 */
export interface ResourceAuthorizationState {
    /**
     * Set to true to allow public access in the project.
     */
    authorized?: pulumi.Input<boolean>;
    /**
     * The ID of the build definition to authorize.
     */
    definitionId?: pulumi.Input<number>;
    /**
     * The project ID or project name.
     */
    projectId?: pulumi.Input<string>;
    /**
     * The ID of the resource to authorize.
     */
    resourceId?: pulumi.Input<string>;
    /**
     * The type of the resource to authorize. Possible values: `endpoint`, `queue`, `variablegroup`. Defaults to value: `endpoint`.
     */
    type?: pulumi.Input<string>;
}
/**
 * The set of arguments for constructing a ResourceAuthorization resource.
 */
export interface ResourceAuthorizationArgs {
    /**
     * Set to true to allow public access in the project.
     */
    authorized: pulumi.Input<boolean>;
    /**
     * The ID of the build definition to authorize.
     */
    definitionId?: pulumi.Input<number>;
    /**
     * The project ID or project name.
     */
    projectId: pulumi.Input<string>;
    /**
     * The ID of the resource to authorize.
     */
    resourceId: pulumi.Input<string>;
    /**
     * The type of the resource to authorize. Possible values: `endpoint`, `queue`, `variablegroup`. Defaults to value: `endpoint`.
     */
    type?: pulumi.Input<string>;
}