UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

91 lines 4.65 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.EventOrchestrationIntegration = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = 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, Object.assign(Object.assign({}, opts), { id: id })); } /** * 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 ? state.eventOrchestration : undefined; resourceInputs["label"] = state ? state.label : undefined; resourceInputs["parameters"] = state ? state.parameters : undefined; } else { const args = argsOrState; if ((!args || args.eventOrchestration === undefined) && !opts.urn) { throw new Error("Missing required property 'eventOrchestration'"); } if ((!args || args.label === undefined) && !opts.urn) { throw new Error("Missing required property 'label'"); } resourceInputs["eventOrchestration"] = args ? args.eventOrchestration : undefined; resourceInputs["label"] = args ? args.label : undefined; resourceInputs["parameters"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EventOrchestrationIntegration.__pulumiType, name, resourceInputs, opts); } } exports.EventOrchestrationIntegration = EventOrchestrationIntegration; /** @internal */ EventOrchestrationIntegration.__pulumiType = 'pagerduty:index/eventOrchestrationIntegration:EventOrchestrationIntegration'; //# sourceMappingURL=eventOrchestrationIntegration.js.map