UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

114 lines 5.53 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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.EventOrchestrationIntegration = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * An Event Orchestration Integration allows you to create and manage multiple Integrations (and Routing Keys) per Event Orchestration _and_ will allow you to move (migrate) Integrations _between_ two Event Orchestrations. * * ## Example of configuring an Integration for an Event Orchestration * * This example shows creating `Event Orchestration` and `Team` resources followed by creating an Event Orchestration Integration to handle Events sent to that Event Orchestration. * * > When a new Event Orchestration is created there will be one Integration (and Routing Key) included by default. Example below shows how to create an extra Integration associated with this Event Orchestration. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const databaseTeam = new pagerduty.Team("database_team", {name: "Database Team"}); * const eventOrchestration = new pagerduty.EventOrchestration("event_orchestration", { * name: "Example Orchestration", * team: databaseTeam.id, * }); * const integration = new pagerduty.EventOrchestrationIntegration("integration", { * eventOrchestration: eventOrchestration.id, * label: "Example integration", * }); * ``` * * ## Import * * Event Orchestration Integration can be imported using colon-separated IDs, which is the combination of the Event Orchestration ID followed by the Event Orchestration Integration ID, e.g. * * ```sh * $ pulumi import pagerduty:index/eventOrchestrationIntegration:EventOrchestrationIntegration integration 19acac92-027a-4ea0-b06c-bbf516519601:1b49abe7-26db-4439-a715-c6d883acfb3e * ``` */ class EventOrchestrationIntegration extends pulumi.CustomResource { /** * Get an existing EventOrchestrationIntegration 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 EventOrchestrationIntegration(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'pagerduty:index/eventOrchestrationIntegration:EventOrchestrationIntegration'; /** * Returns true if the given object is an instance of EventOrchestrationIntegration. 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'] === EventOrchestrationIntegration.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["eventOrchestration"] = state?.eventOrchestration; resourceInputs["label"] = state?.label; resourceInputs["parameters"] = state?.parameters; } else { const args = argsOrState; if (args?.eventOrchestration === undefined && !opts.urn) { throw new Error("Missing required property 'eventOrchestration'"); } if (args?.label === undefined && !opts.urn) { throw new Error("Missing required property 'label'"); } resourceInputs["eventOrchestration"] = args?.eventOrchestration; resourceInputs["label"] = args?.label; resourceInputs["parameters"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EventOrchestrationIntegration.__pulumiType, name, resourceInputs, opts); } } exports.EventOrchestrationIntegration = EventOrchestrationIntegration; //# sourceMappingURL=eventOrchestrationIntegration.js.map