@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
92 lines • 4.27 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** 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, Object.assign(Object.assign({}, 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 ? state.defaultBranch : undefined;
resourceInputs["disabled"] = state ? state.disabled : undefined;
resourceInputs["initialization"] = state ? state.initialization : undefined;
resourceInputs["isFork"] = state ? state.isFork : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["parentRepositoryId"] = state ? state.parentRepositoryId : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["remoteUrl"] = state ? state.remoteUrl : undefined;
resourceInputs["size"] = state ? state.size : undefined;
resourceInputs["sshUrl"] = state ? state.sshUrl : undefined;
resourceInputs["url"] = state ? state.url : undefined;
resourceInputs["webUrl"] = state ? state.webUrl : undefined;
}
else {
const args = argsOrState;
if ((!args || args.initialization === undefined) && !opts.urn) {
throw new Error("Missing required property 'initialization'");
}
if ((!args || args.projectId === undefined) && !opts.urn) {
throw new Error("Missing required property 'projectId'");
}
resourceInputs["defaultBranch"] = args ? args.defaultBranch : undefined;
resourceInputs["disabled"] = args ? args.disabled : undefined;
resourceInputs["initialization"] = args ? args.initialization : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["parentRepositoryId"] = args ? args.parentRepositoryId : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
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