@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
99 lines • 5.93 kB
JavaScript
;
// *** 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.OncallEscalation = 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
* $ pulumi import grafana:index/oncallEscalation:OncallEscalation name "{{ id }}"
* ```
*
* @deprecated grafana.index/oncallescalation.OncallEscalation has been deprecated in favor of grafana.oncall/escalation.Escalation
*/
class OncallEscalation extends pulumi.CustomResource {
/**
* Get an existing OncallEscalation 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) {
pulumi.log.warn("OncallEscalation is deprecated: grafana.index/oncallescalation.OncallEscalation has been deprecated in favor of grafana.oncall/escalation.Escalation");
return new OncallEscalation(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of OncallEscalation. 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'] === OncallEscalation.__pulumiType;
}
/** @deprecated grafana.index/oncallescalation.OncallEscalation has been deprecated in favor of grafana.oncall/escalation.Escalation */
constructor(name, argsOrState, opts) {
pulumi.log.warn("OncallEscalation is deprecated: grafana.index/oncallescalation.OncallEscalation has been deprecated in favor of grafana.oncall/escalation.Escalation");
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["actionToTrigger"] = state ? state.actionToTrigger : undefined;
resourceInputs["duration"] = state ? state.duration : undefined;
resourceInputs["escalationChainId"] = state ? state.escalationChainId : undefined;
resourceInputs["groupToNotify"] = state ? state.groupToNotify : undefined;
resourceInputs["important"] = state ? state.important : undefined;
resourceInputs["notifyIfTimeFrom"] = state ? state.notifyIfTimeFrom : undefined;
resourceInputs["notifyIfTimeTo"] = state ? state.notifyIfTimeTo : undefined;
resourceInputs["notifyOnCallFromSchedule"] = state ? state.notifyOnCallFromSchedule : undefined;
resourceInputs["notifyToTeamMembers"] = state ? state.notifyToTeamMembers : undefined;
resourceInputs["personsToNotifies"] = state ? state.personsToNotifies : undefined;
resourceInputs["personsToNotifyNextEachTimes"] = state ? state.personsToNotifyNextEachTimes : undefined;
resourceInputs["position"] = state ? state.position : undefined;
resourceInputs["severity"] = state ? state.severity : undefined;
resourceInputs["type"] = state ? state.type : undefined;
}
else {
const args = argsOrState;
if ((!args || args.escalationChainId === undefined) && !opts.urn) {
throw new Error("Missing required property 'escalationChainId'");
}
if ((!args || args.position === undefined) && !opts.urn) {
throw new Error("Missing required property 'position'");
}
if ((!args || args.type === undefined) && !opts.urn) {
throw new Error("Missing required property 'type'");
}
resourceInputs["actionToTrigger"] = args ? args.actionToTrigger : undefined;
resourceInputs["duration"] = args ? args.duration : undefined;
resourceInputs["escalationChainId"] = args ? args.escalationChainId : undefined;
resourceInputs["groupToNotify"] = args ? args.groupToNotify : undefined;
resourceInputs["important"] = args ? args.important : undefined;
resourceInputs["notifyIfTimeFrom"] = args ? args.notifyIfTimeFrom : undefined;
resourceInputs["notifyIfTimeTo"] = args ? args.notifyIfTimeTo : undefined;
resourceInputs["notifyOnCallFromSchedule"] = args ? args.notifyOnCallFromSchedule : undefined;
resourceInputs["notifyToTeamMembers"] = args ? args.notifyToTeamMembers : undefined;
resourceInputs["personsToNotifies"] = args ? args.personsToNotifies : undefined;
resourceInputs["personsToNotifyNextEachTimes"] = args ? args.personsToNotifyNextEachTimes : undefined;
resourceInputs["position"] = args ? args.position : undefined;
resourceInputs["severity"] = args ? args.severity : undefined;
resourceInputs["type"] = args ? args.type : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(OncallEscalation.__pulumiType, name, resourceInputs, opts);
}
}
exports.OncallEscalation = OncallEscalation;
/** @internal */
OncallEscalation.__pulumiType = 'grafana:index/oncallEscalation:OncallEscalation';
//# sourceMappingURL=oncallEscalation.js.map