UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

92 lines 3.87 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Git = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Import * * Azure DevOps Repositories can be imported using the repo name or by the repo Guid e.g. * * ```sh * $ pulumi import azuredevops:index/git:Git example projectName/repoName * ``` * * or * * ```sh * $ pulumi import azuredevops:index/git:Git example projectName/00000000-0000-0000-0000-000000000000 * ``` */ class Git extends pulumi.CustomResource { /** * Get an existing Git 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, id, state, opts) { return new Git(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Git. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Git.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["defaultBranch"] = state?.defaultBranch; resourceInputs["disabled"] = state?.disabled; resourceInputs["initialization"] = state?.initialization; resourceInputs["isFork"] = state?.isFork; resourceInputs["name"] = state?.name; resourceInputs["parentRepositoryId"] = state?.parentRepositoryId; resourceInputs["projectId"] = state?.projectId; resourceInputs["remoteUrl"] = state?.remoteUrl; resourceInputs["size"] = state?.size; resourceInputs["sshUrl"] = state?.sshUrl; resourceInputs["url"] = state?.url; resourceInputs["webUrl"] = state?.webUrl; } else { const args = argsOrState; if (args?.initialization === undefined && !opts.urn) { throw new Error("Missing required property 'initialization'"); } if (args?.projectId === undefined && !opts.urn) { throw new Error("Missing required property 'projectId'"); } resourceInputs["defaultBranch"] = args?.defaultBranch; resourceInputs["disabled"] = args?.disabled; resourceInputs["initialization"] = args?.initialization; resourceInputs["name"] = args?.name; resourceInputs["parentRepositoryId"] = args?.parentRepositoryId; resourceInputs["projectId"] = args?.projectId; resourceInputs["isFork"] = undefined /*out*/; resourceInputs["remoteUrl"] = undefined /*out*/; resourceInputs["size"] = undefined /*out*/; resourceInputs["sshUrl"] = undefined /*out*/; resourceInputs["url"] = undefined /*out*/; resourceInputs["webUrl"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Git.__pulumiType, name, resourceInputs, opts); } } exports.Git = Git; /** @internal */ Git.__pulumiType = 'azuredevops:index/git:Git'; //# sourceMappingURL=git.js.map