UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

77 lines 2.92 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.Addon = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * With [add-ons](https://developer.pagerduty.com/api-reference/b3A6Mjc0ODEwNQ-install-an-add-on), third-party developers can write their own add-ons to PagerDuty's UI. Given a configuration containing a src parameter, that URL will be embedded in an iframe on a page that's available to users from a drop-down menu. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const example = new pagerduty.Addon("example", { * name: "Internal Status Page", * src: "https://intranet.example.com/status", * }); * ``` * * ## Import * * Add-ons can be imported using the `id`, e.g. * * ```sh * $ pulumi import pagerduty:index/addon:Addon example P3DH5M6 * ``` */ class Addon extends pulumi.CustomResource { /** * Get an existing Addon 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 Addon(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Addon. 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'] === Addon.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["name"] = state?.name; resourceInputs["src"] = state?.src; } else { const args = argsOrState; if (args?.src === undefined && !opts.urn) { throw new Error("Missing required property 'src'"); } resourceInputs["name"] = args?.name; resourceInputs["src"] = args?.src; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Addon.__pulumiType, name, resourceInputs, opts); } } exports.Addon = Addon; /** @internal */ Addon.__pulumiType = 'pagerduty:index/addon:Addon'; //# sourceMappingURL=addon.js.map