UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

99 lines 4.11 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.WikiPage = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages Wiki pages 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 exampleWiki = new azuredevops.Wiki("example", { * projectId: example.id, * name: "Example project wiki ", * type: "projectWiki", * }); * const exampleWikiPage = new azuredevops.WikiPage("example", { * projectId: example.id, * wikiId: exampleWiki.id, * path: "/page", * content: "content", * }); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.1 - Wiki Page](https://learn.microsoft.com/en-us/rest/api/azure/devops/wiki/pages?view=azure-devops-rest-7.1) */ class WikiPage extends pulumi.CustomResource { /** * Get an existing WikiPage 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 WikiPage(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of WikiPage. 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'] === WikiPage.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["content"] = state ? state.content : undefined; resourceInputs["etag"] = state ? state.etag : undefined; resourceInputs["path"] = state ? state.path : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; resourceInputs["wikiId"] = state ? state.wikiId : undefined; } else { const args = argsOrState; if ((!args || args.content === undefined) && !opts.urn) { throw new Error("Missing required property 'content'"); } if ((!args || args.path === undefined) && !opts.urn) { throw new Error("Missing required property 'path'"); } if ((!args || args.projectId === undefined) && !opts.urn) { throw new Error("Missing required property 'projectId'"); } if ((!args || args.wikiId === undefined) && !opts.urn) { throw new Error("Missing required property 'wikiId'"); } resourceInputs["content"] = args ? args.content : undefined; resourceInputs["etag"] = args ? args.etag : undefined; resourceInputs["path"] = args ? args.path : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; resourceInputs["wikiId"] = args ? args.wikiId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(WikiPage.__pulumiType, name, resourceInputs, opts); } } exports.WikiPage = WikiPage; /** @internal */ WikiPage.__pulumiType = 'azuredevops:index/wikiPage:WikiPage'; //# sourceMappingURL=wikiPage.js.map