UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

115 lines 4.05 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.Feed = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages Feed within Azure DevOps organization. * * ## Example Usage * * ### Create Feed in the scope of whole Organization * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = new azuredevops.Feed("example", {name: "examplefeed"}); * ``` * * ### Create Feed in the scope of a Project * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = new azuredevops.Project("example", { * name: "Example Project", * visibility: "private", * versionControl: "Git", * workItemTemplate: "Agile", * description: "Managed by Pulumi", * }); * const exampleFeed = new azuredevops.Feed("example", { * name: "examplefeed", * projectId: example.id, * }); * ``` * * ### Create Feed with Soft Delete * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuredevops from "@pulumi/azuredevops"; * * const example = new azuredevops.Feed("example", { * name: "examplefeed", * features: [{ * permanentDelete: false, * }], * }); * ``` * * ## Relevant Links * * - [Azure DevOps Service REST API 7.0 - Feed Management](https://learn.microsoft.com/en-us/rest/api/azure/devops/artifacts/feed-management?view=azure-devops-rest-7.0) * * ## Import * * Azure DevOps Feed can be imported using the Project ID and Feed ID or Feed ID e.g.: * * ```sh * $ pulumi import azuredevops:index/feed:Feed example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000 * ``` * * or * * ```sh * $ pulumi import azuredevops:index/feed:Feed example 00000000-0000-0000-0000-000000000000 * ``` */ class Feed extends pulumi.CustomResource { /** * Get an existing Feed 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 Feed(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Feed. 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'] === Feed.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["features"] = state ? state.features : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["projectId"] = state ? state.projectId : undefined; } else { const args = argsOrState; resourceInputs["features"] = args ? args.features : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["projectId"] = args ? args.projectId : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Feed.__pulumiType, name, resourceInputs, opts); } } exports.Feed = Feed; /** @internal */ Feed.__pulumiType = 'azuredevops:index/feed:Feed'; //# sourceMappingURL=feed.js.map