UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

139 lines (138 loc) 5.42 kB
import * as pulumi from "@pulumi/pulumi"; /** * Manages a Git Repository Branch. * * ## 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", * }); * const exampleGit = new azuredevops.Git("example", { * projectId: example.id, * name: "Example Git Repository", * initialization: { * initType: "Clean", * }, * }); * const exampleGitRepositoryBranch = new azuredevops.GitRepositoryBranch("example", { * repositoryId: exampleGit.id, * name: "example-branch-name", * refBranch: exampleGit.defaultBranch, * }); * const exampleFromCommitId = new azuredevops.GitRepositoryBranch("example_from_commit_id", { * repositoryId: exampleGit.id, * name: "example-from-commit-id", * refCommitId: exampleGitRepositoryBranch.lastCommitId, * }); * ``` */ export declare class GitRepositoryBranch extends pulumi.CustomResource { /** * Get an existing GitRepositoryBranch 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?: GitRepositoryBranchState, opts?: pulumi.CustomResourceOptions): GitRepositoryBranch; /** * Returns true if the given object is an instance of GitRepositoryBranch. 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 GitRepositoryBranch; /** * The commit object ID of last commit on the branch. */ readonly lastCommitId: pulumi.Output<string>; /** * The name of the branch in short format not prefixed with `refs/heads/`. */ readonly name: pulumi.Output<string>; /** * The reference to the source branch to create the branch from, in `<name>` or `refs/heads/<name>` format. Conflict with `refTag`, `refCommitId`. */ readonly refBranch: pulumi.Output<string | undefined>; /** * The commit object ID to create the branch from. Conflict with `refBranch`, `refTag`. */ readonly refCommitId: pulumi.Output<string | undefined>; /** * The reference to the tag to create the branch from, in `<name>` or `refs/tags/<name>` format. Conflict with `refBranch`, `refCommitId`. */ readonly refTag: pulumi.Output<string | undefined>; /** * The ID of the repository the branch is created against. */ readonly repositoryId: pulumi.Output<string>; /** * Create a GitRepositoryBranch 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: GitRepositoryBranchArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering GitRepositoryBranch resources. */ export interface GitRepositoryBranchState { /** * The commit object ID of last commit on the branch. */ lastCommitId?: pulumi.Input<string>; /** * The name of the branch in short format not prefixed with `refs/heads/`. */ name?: pulumi.Input<string>; /** * The reference to the source branch to create the branch from, in `<name>` or `refs/heads/<name>` format. Conflict with `refTag`, `refCommitId`. */ refBranch?: pulumi.Input<string>; /** * The commit object ID to create the branch from. Conflict with `refBranch`, `refTag`. */ refCommitId?: pulumi.Input<string>; /** * The reference to the tag to create the branch from, in `<name>` or `refs/tags/<name>` format. Conflict with `refBranch`, `refCommitId`. */ refTag?: pulumi.Input<string>; /** * The ID of the repository the branch is created against. */ repositoryId?: pulumi.Input<string>; } /** * The set of arguments for constructing a GitRepositoryBranch resource. */ export interface GitRepositoryBranchArgs { /** * The name of the branch in short format not prefixed with `refs/heads/`. */ name?: pulumi.Input<string>; /** * The reference to the source branch to create the branch from, in `<name>` or `refs/heads/<name>` format. Conflict with `refTag`, `refCommitId`. */ refBranch?: pulumi.Input<string>; /** * The commit object ID to create the branch from. Conflict with `refBranch`, `refTag`. */ refCommitId?: pulumi.Input<string>; /** * The reference to the tag to create the branch from, in `<name>` or `refs/tags/<name>` format. Conflict with `refBranch`, `refCommitId`. */ refTag?: pulumi.Input<string>; /** * The ID of the repository the branch is created against. */ repositoryId: pulumi.Input<string>; }