UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

113 lines 4.14 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.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, { ...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?.mappedPath; resourceInputs["name"] = state?.name; resourceInputs["projectId"] = state?.projectId; resourceInputs["remoteUrl"] = state?.remoteUrl; resourceInputs["repositoryId"] = state?.repositoryId; resourceInputs["type"] = state?.type; resourceInputs["url"] = state?.url; resourceInputs["version"] = state?.version; } else { const args = argsOrState; if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["mappedPath"] = args?.mappedPath; resourceInputs["name"] = args?.name; resourceInputs["projectId"] = args?.projectId; resourceInputs["repositoryId"] = args?.repositoryId; resourceInputs["type"] = args?.type; resourceInputs["version"] = args?.version; 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