UNPKG

@pulumiverse/grafana

Version:

A Pulumi package for creating and managing grafana.

98 lines 4.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.Escalation = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * * [Official documentation](https://grafana.com/docs/oncall/latest/configure/escalation-chains-and-routes/) * * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/escalation_policies/) * * ## Import * * ```sh * terraform import grafana_oncall_escalation.name "{{ id }}" * ``` */ class Escalation extends pulumi.CustomResource { /** * Get an existing Escalation 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 Escalation(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Escalation. 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'] === Escalation.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["actionToTrigger"] = state?.actionToTrigger; resourceInputs["duration"] = state?.duration; resourceInputs["escalationChainId"] = state?.escalationChainId; resourceInputs["groupToNotify"] = state?.groupToNotify; resourceInputs["important"] = state?.important; resourceInputs["notifyIfTimeFrom"] = state?.notifyIfTimeFrom; resourceInputs["notifyIfTimeTo"] = state?.notifyIfTimeTo; resourceInputs["notifyOnCallFromSchedule"] = state?.notifyOnCallFromSchedule; resourceInputs["notifyToTeamMembers"] = state?.notifyToTeamMembers; resourceInputs["numAlertsInWindow"] = state?.numAlertsInWindow; resourceInputs["numMinutesInWindow"] = state?.numMinutesInWindow; resourceInputs["personsToNotifies"] = state?.personsToNotifies; resourceInputs["personsToNotifyNextEachTimes"] = state?.personsToNotifyNextEachTimes; resourceInputs["position"] = state?.position; resourceInputs["severity"] = state?.severity; resourceInputs["type"] = state?.type; } else { const args = argsOrState; if (args?.escalationChainId === undefined && !opts.urn) { throw new Error("Missing required property 'escalationChainId'"); } if (args?.position === undefined && !opts.urn) { throw new Error("Missing required property 'position'"); } if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["actionToTrigger"] = args?.actionToTrigger; resourceInputs["duration"] = args?.duration; resourceInputs["escalationChainId"] = args?.escalationChainId; resourceInputs["groupToNotify"] = args?.groupToNotify; resourceInputs["important"] = args?.important; resourceInputs["notifyIfTimeFrom"] = args?.notifyIfTimeFrom; resourceInputs["notifyIfTimeTo"] = args?.notifyIfTimeTo; resourceInputs["notifyOnCallFromSchedule"] = args?.notifyOnCallFromSchedule; resourceInputs["notifyToTeamMembers"] = args?.notifyToTeamMembers; resourceInputs["numAlertsInWindow"] = args?.numAlertsInWindow; resourceInputs["numMinutesInWindow"] = args?.numMinutesInWindow; resourceInputs["personsToNotifies"] = args?.personsToNotifies; resourceInputs["personsToNotifyNextEachTimes"] = args?.personsToNotifyNextEachTimes; resourceInputs["position"] = args?.position; resourceInputs["severity"] = args?.severity; resourceInputs["type"] = args?.type; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Escalation.__pulumiType, name, resourceInputs, opts); } } exports.Escalation = Escalation; /** @internal */ Escalation.__pulumiType = 'grafana:onCall/escalation:Escalation'; //# sourceMappingURL=escalation.js.map