UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

113 lines 4.46 kB
"use strict"; // *** 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.Wiki = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages Wikis within Azure DevOps project. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = new azuredevops.Project("example", { * name: "Example Project", * description: "Managed by Pulumi", * }); * const exampleGit = new azuredevops.Git("example", { * projectId: example.id, * name: "Example Repository", * initialization: { * initType: "Clean", * }, * }); * const exampleWiki = new azuredevops.Wiki("example", { * name: "Example project wiki ", * projectId: example.id, * type: "projectWiki", * }); * const example2 = new azuredevops.Wiki("example2", { * name: "Example wiki in repository", * projectId: example.id, * repositoryId: exampleGit.id, * version: "main", * type: "codeWiki", * mappedPath: "/", * }); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.1 - Wiki ](https://learn.microsoft.com/en-us/rest/api/azure/devops/wiki/wikis?view=azure-devops-rest-7.1) * * ## Import * * Azure DevOps Wiki can be imported using the `id` * * ```sh * $ pulumi import azuredevops:index/wiki:Wiki wiki 00000000-0000-0000-0000-000000000000 * ``` */ class Wiki extends pulumi.CustomResource { /** * Get an existing Wiki 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 Wiki(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Wiki. 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'] === Wiki.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["mappedPath"] = state ? state.mappedPath : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["remoteUrl"] = state ? state.remoteUrl : undefined; resourceInputs["repositoryId"] = state ? state.repositoryId : undefined; resourceInputs["type"] = state ? state.type : undefined; resourceInputs["url"] = state ? state.url : undefined; resourceInputs["version"] = state ? state.version : undefined; } else { const args = argsOrState; if ((!args || args.type === undefined) && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["mappedPath"] = args ? args.mappedPath : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["repositoryId"] = args ? args.repositoryId : undefined; resourceInputs["type"] = args ? args.type : undefined; resourceInputs["version"] = args ? args.version : undefined; resourceInputs["remoteUrl"] = undefined /*out*/; resourceInputs["url"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Wiki.__pulumiType, name, resourceInputs, opts); } } exports.Wiki = Wiki; /** @internal */ Wiki.__pulumiType = 'azuredevops:index/wiki:Wiki'; //# sourceMappingURL=wiki.js.map