UNPKG

@pulumi/pagerduty

Version:

A Pulumi package for creating and managing pagerduty cloud resources.

133 lines 5.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! *** 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.EventOrchestrationUnrouted = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * An Unrouted Orchestration allows users to create a set of Event Rules that will be evaluated against all events that don't match any rules in the Orchestration's Router. * * The Unrouted Orchestration evaluates events sent to it against each of its rules, beginning with the rules in the "start" set. When a matching rule is found, it can modify and enhance the event and can route the event to another set of rules within this Unrouted Orchestration for further processing. * * ## Example of configuring Unrouted Rules for an Orchestration * * In this example of an Unrouted Orchestration, the rule matches only if the condition is matched. * Alerts created for events that do not match the rule will have severity level set to `info` as defined in `catchAll` block. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pagerduty from "@pulumi/pagerduty"; * * const unrouted = new pagerduty.EventOrchestrationUnrouted("unrouted", { * eventOrchestration: myMonitor.id, * sets: [{ * id: "start", * rules: [{ * label: "Update the summary of un-matched Critical alerts so they're easier to spot", * conditions: [{ * expression: "event.severity matches 'critical'", * }], * actions: { * severity: "critical", * extractions: [{ * target: "event.summary", * template: "[Critical Unrouted] {{event.summary}}", * }], * }, * }], * }], * catchAll: { * actions: { * severity: "info", * }, * }, * }); * ``` * * ## Import * * Unrouted Orchestration can be imported using the `id` of the Event Orchestration, e.g. * * ```sh * $ pulumi import pagerduty:index/eventOrchestrationUnrouted:EventOrchestrationUnrouted unrouted 1b49abe7-26db-4439-a715-c6d883acfb3e * ``` */ class EventOrchestrationUnrouted extends pulumi.CustomResource { /** * Get an existing EventOrchestrationUnrouted 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 EventOrchestrationUnrouted(name, state, { ...opts, id: id }); } /** @internal */ static __pulumiType = 'pagerduty:index/eventOrchestrationUnrouted:EventOrchestrationUnrouted'; /** * Returns true if the given object is an instance of EventOrchestrationUnrouted. 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'] === EventOrchestrationUnrouted.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["catchAll"] = state?.catchAll; resourceInputs["eventOrchestration"] = state?.eventOrchestration; resourceInputs["sets"] = state?.sets; } else { const args = argsOrState; if (args?.catchAll === undefined && !opts.urn) { throw new Error("Missing required property 'catchAll'"); } if (args?.eventOrchestration === undefined && !opts.urn) { throw new Error("Missing required property 'eventOrchestration'"); } if (args?.sets === undefined && !opts.urn) { throw new Error("Missing required property 'sets'"); } resourceInputs["catchAll"] = args?.catchAll; resourceInputs["eventOrchestration"] = args?.eventOrchestration; resourceInputs["sets"] = args?.sets; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(EventOrchestrationUnrouted.__pulumiType, name, resourceInputs, opts); } } exports.EventOrchestrationUnrouted = EventOrchestrationUnrouted; //# sourceMappingURL=eventOrchestrationUnrouted.js.map