@incident-io/pulumi 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +7 -0
- package/README.md +69 -0
- package/alertAttribute.d.ts +230 -0
- package/alertAttribute.d.ts.map +1 -0
- package/alertAttribute.js +219 -0
- package/alertAttribute.js.map +1 -0
- package/alertRoute.d.ts +511 -0
- package/alertRoute.d.ts.map +1 -0
- package/alertRoute.js +432 -0
- package/alertRoute.js.map +1 -0
- package/alertSource.d.ts +347 -0
- package/alertSource.d.ts.map +1 -0
- package/alertSource.js +241 -0
- package/alertSource.js.map +1 -0
- package/alertSourceAttribute.d.ts +180 -0
- package/alertSourceAttribute.d.ts.map +1 -0
- package/alertSourceAttribute.js +107 -0
- package/alertSourceAttribute.js.map +1 -0
- package/alertSourceAttributeBeta.d.ts +188 -0
- package/alertSourceAttributeBeta.d.ts.map +1 -0
- package/alertSourceAttributeBeta.js +115 -0
- package/alertSourceAttributeBeta.js.map +1 -0
- package/alertSourceBeta.d.ts +244 -0
- package/alertSourceBeta.d.ts.map +1 -0
- package/alertSourceBeta.js +138 -0
- package/alertSourceBeta.js.map +1 -0
- package/apiKey.d.ts +276 -0
- package/apiKey.d.ts.map +1 -0
- package/apiKey.js +211 -0
- package/apiKey.js.map +1 -0
- package/catalogEntries.d.ts +241 -0
- package/catalogEntries.d.ts.map +1 -0
- package/catalogEntries.js +242 -0
- package/catalogEntries.js.map +1 -0
- package/catalogEntry.d.ts +183 -0
- package/catalogEntry.d.ts.map +1 -0
- package/catalogEntry.js +159 -0
- package/catalogEntry.js.map +1 -0
- package/catalogType.d.ts +169 -0
- package/catalogType.d.ts.map +1 -0
- package/catalogType.js +132 -0
- package/catalogType.js.map +1 -0
- package/catalogTypeAttribute.d.ts +190 -0
- package/catalogTypeAttribute.d.ts.map +1 -0
- package/catalogTypeAttribute.js +153 -0
- package/catalogTypeAttribute.js.map +1 -0
- package/config/index.d.ts +2 -0
- package/config/index.d.ts.map +1 -0
- package/config/index.js +21 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +13 -0
- package/config/vars.d.ts.map +1 -0
- package/config/vars.js +49 -0
- package/config/vars.js.map +1 -0
- package/customField.d.ts +260 -0
- package/customField.d.ts.map +1 -0
- package/customField.js +226 -0
- package/customField.js.map +1 -0
- package/customFieldOption.d.ts +107 -0
- package/customFieldOption.d.ts.map +1 -0
- package/customFieldOption.js +116 -0
- package/customFieldOption.js.map +1 -0
- package/escalationPath.d.ts +257 -0
- package/escalationPath.d.ts.map +1 -0
- package/escalationPath.js +228 -0
- package/escalationPath.js.map +1 -0
- package/escalationPathBeta.d.ts +134 -0
- package/escalationPathBeta.d.ts.map +1 -0
- package/escalationPathBeta.js +105 -0
- package/escalationPathBeta.js.map +1 -0
- package/getAlertAttribute.d.ts +81 -0
- package/getAlertAttribute.d.ts.map +1 -0
- package/getAlertAttribute.js +75 -0
- package/getAlertAttribute.js.map +1 -0
- package/getAlertSource.d.ts +169 -0
- package/getAlertSource.d.ts.map +1 -0
- package/getAlertSource.js +103 -0
- package/getAlertSource.js.map +1 -0
- package/getAlertSourceAttribute.d.ts +131 -0
- package/getAlertSourceAttribute.d.ts.map +1 -0
- package/getAlertSourceAttribute.js +85 -0
- package/getAlertSourceAttribute.js.map +1 -0
- package/getAlertSourceAttributeBeta.d.ts +131 -0
- package/getAlertSourceAttributeBeta.d.ts.map +1 -0
- package/getAlertSourceAttributeBeta.js +85 -0
- package/getAlertSourceAttributeBeta.js.map +1 -0
- package/getApiKey.d.ts +167 -0
- package/getApiKey.d.ts.map +1 -0
- package/getApiKey.js +145 -0
- package/getApiKey.js.map +1 -0
- package/getCatalogEntry.d.ts +77 -0
- package/getCatalogEntry.d.ts.map +1 -0
- package/getCatalogEntry.js +59 -0
- package/getCatalogEntry.js.map +1 -0
- package/getCatalogType.d.ts +163 -0
- package/getCatalogType.d.ts.map +1 -0
- package/getCatalogType.js +135 -0
- package/getCatalogType.js.map +1 -0
- package/getCatalogTypeAttribute.d.ts +73 -0
- package/getCatalogTypeAttribute.d.ts.map +1 -0
- package/getCatalogTypeAttribute.js +53 -0
- package/getCatalogTypeAttribute.js.map +1 -0
- package/getCustomField.d.ts +67 -0
- package/getCustomField.d.ts.map +1 -0
- package/getCustomField.js +51 -0
- package/getCustomField.js.map +1 -0
- package/getCustomFieldOption.d.ts +65 -0
- package/getCustomFieldOption.d.ts.map +1 -0
- package/getCustomFieldOption.js +55 -0
- package/getCustomFieldOption.js.map +1 -0
- package/getEscalationPath.d.ts +100 -0
- package/getEscalationPath.d.ts.map +1 -0
- package/getEscalationPath.js +83 -0
- package/getEscalationPath.js.map +1 -0
- package/getEscalationPathBeta.d.ts +100 -0
- package/getEscalationPathBeta.d.ts.map +1 -0
- package/getEscalationPathBeta.js +83 -0
- package/getEscalationPathBeta.js.map +1 -0
- package/getIncidentRole.d.ts +111 -0
- package/getIncidentRole.d.ts.map +1 -0
- package/getIncidentRole.js +105 -0
- package/getIncidentRole.js.map +1 -0
- package/getIncidentTemplate.d.ts +98 -0
- package/getIncidentTemplate.d.ts.map +1 -0
- package/getIncidentTemplate.js +95 -0
- package/getIncidentTemplate.js.map +1 -0
- package/getIncidentTimestamp.d.ts +107 -0
- package/getIncidentTimestamp.d.ts.map +1 -0
- package/getIncidentTimestamp.js +109 -0
- package/getIncidentTimestamp.js.map +1 -0
- package/getIncidentType.d.ts +121 -0
- package/getIncidentType.d.ts.map +1 -0
- package/getIncidentType.js +107 -0
- package/getIncidentType.js.map +1 -0
- package/getIpAllowlist.d.ts +62 -0
- package/getIpAllowlist.d.ts.map +1 -0
- package/getIpAllowlist.js +77 -0
- package/getIpAllowlist.js.map +1 -0
- package/getPolicy.d.ts +97 -0
- package/getPolicy.d.ts.map +1 -0
- package/getPolicy.js +91 -0
- package/getPolicy.js.map +1 -0
- package/getRichText.d.ts +111 -0
- package/getRichText.d.ts.map +1 -0
- package/getRichText.js +107 -0
- package/getRichText.js.map +1 -0
- package/getSchedule.d.ts +89 -0
- package/getSchedule.d.ts.map +1 -0
- package/getSchedule.js +87 -0
- package/getSchedule.js.map +1 -0
- package/getScheduleBeta.d.ts +85 -0
- package/getScheduleBeta.d.ts.map +1 -0
- package/getScheduleBeta.js +83 -0
- package/getScheduleBeta.js.map +1 -0
- package/getScheduleReplica.d.ts +116 -0
- package/getScheduleReplica.d.ts.map +1 -0
- package/getScheduleReplica.js +79 -0
- package/getScheduleReplica.js.map +1 -0
- package/getScheduleRotation.d.ts +166 -0
- package/getScheduleRotation.d.ts.map +1 -0
- package/getScheduleRotation.js +127 -0
- package/getScheduleRotation.js.map +1 -0
- package/getScheduleRotationBeta.d.ts +122 -0
- package/getScheduleRotationBeta.d.ts.map +1 -0
- package/getScheduleRotationBeta.js +83 -0
- package/getScheduleRotationBeta.js.map +1 -0
- package/getScheduleSyncRule.d.ts +91 -0
- package/getScheduleSyncRule.d.ts.map +1 -0
- package/getScheduleSyncRule.js +79 -0
- package/getScheduleSyncRule.js.map +1 -0
- package/getScheduleSyncTarget.d.ts +100 -0
- package/getScheduleSyncTarget.d.ts.map +1 -0
- package/getScheduleSyncTarget.js +93 -0
- package/getScheduleSyncTarget.js.map +1 -0
- package/getSecret.d.ts +115 -0
- package/getSecret.d.ts.map +1 -0
- package/getSecret.js +97 -0
- package/getSecret.js.map +1 -0
- package/getSeverity.d.ts +117 -0
- package/getSeverity.d.ts.map +1 -0
- package/getSeverity.js +115 -0
- package/getSeverity.js.map +1 -0
- package/getStatus.d.ts +125 -0
- package/getStatus.d.ts.map +1 -0
- package/getStatus.js +119 -0
- package/getStatus.js.map +1 -0
- package/getUser.d.ts +52 -0
- package/getUser.d.ts.map +1 -0
- package/getUser.js +61 -0
- package/getUser.js.map +1 -0
- package/getWorkflow.d.ts +103 -0
- package/getWorkflow.d.ts.map +1 -0
- package/getWorkflow.js +77 -0
- package/getWorkflow.js.map +1 -0
- package/incidentRole.d.ts +109 -0
- package/incidentRole.d.ts.map +1 -0
- package/incidentRole.js +111 -0
- package/incidentRole.js.map +1 -0
- package/incidentTemplate.d.ts +200 -0
- package/incidentTemplate.d.ts.map +1 -0
- package/incidentTemplate.js +207 -0
- package/incidentTemplate.js.map +1 -0
- package/index.d.ts +188 -0
- package/index.d.ts.map +1 -0
- package/index.js +303 -0
- package/index.js.map +1 -0
- package/maintenanceWindow.d.ts +255 -0
- package/maintenanceWindow.d.ts.map +1 -0
- package/maintenanceWindow.js +148 -0
- package/maintenanceWindow.js.map +1 -0
- package/package.json +33 -0
- package/policy.d.ts +476 -0
- package/policy.d.ts.map +1 -0
- package/policy.js +387 -0
- package/policy.js.map +1 -0
- package/provider.d.ts +62 -0
- package/provider.d.ts.map +1 -0
- package/provider.js +80 -0
- package/provider.js.map +1 -0
- package/schedule.d.ts +120 -0
- package/schedule.d.ts.map +1 -0
- package/schedule.js +114 -0
- package/schedule.js.map +1 -0
- package/scheduleBeta.d.ts +104 -0
- package/scheduleBeta.d.ts.map +1 -0
- package/scheduleBeta.js +98 -0
- package/scheduleBeta.js.map +1 -0
- package/scheduleReplica.d.ts +178 -0
- package/scheduleReplica.d.ts.map +1 -0
- package/scheduleReplica.js +134 -0
- package/scheduleReplica.js.map +1 -0
- package/scheduleRotation.d.ts +287 -0
- package/scheduleRotation.d.ts.map +1 -0
- package/scheduleRotation.js +224 -0
- package/scheduleRotation.js.map +1 -0
- package/scheduleRotationBeta.d.ts +184 -0
- package/scheduleRotationBeta.d.ts.map +1 -0
- package/scheduleRotationBeta.js +121 -0
- package/scheduleRotationBeta.js.map +1 -0
- package/scheduleSyncRule.d.ts +154 -0
- package/scheduleSyncRule.d.ts.map +1 -0
- package/scheduleSyncRule.js +146 -0
- package/scheduleSyncRule.js.map +1 -0
- package/scheduleSyncTarget.d.ts +108 -0
- package/scheduleSyncTarget.d.ts.map +1 -0
- package/scheduleSyncTarget.js +106 -0
- package/scheduleSyncTarget.js.map +1 -0
- package/secret.d.ts +276 -0
- package/secret.d.ts.map +1 -0
- package/secret.js +234 -0
- package/secret.js.map +1 -0
- package/severity.d.ts +96 -0
- package/severity.d.ts.map +1 -0
- package/severity.js +102 -0
- package/severity.js.map +1 -0
- package/status.d.ts +121 -0
- package/status.d.ts.map +1 -0
- package/status.js +120 -0
- package/status.js.map +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +34 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +23630 -0
- package/types/input.d.ts.map +1 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +19726 -0
- package/types/output.d.ts.map +1 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/utilities.d.ts +5 -0
- package/utilities.d.ts.map +1 -0
- package/utilities.js +114 -0
- package/utilities.js.map +1 -0
- package/workflow.d.ts +736 -0
- package/workflow.d.ts.map +1 -0
- package/workflow.js +608 -0
- package/workflow.js.map +1 -0
package/alertRoute.js
ADDED
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
21
|
+
if (mod && mod.__esModule) return mod;
|
|
22
|
+
var result = {};
|
|
23
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
24
|
+
__setModuleDefault(result, mod);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.AlertRoute = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* Configure your alert routes in incident.io.
|
|
33
|
+
*
|
|
34
|
+
* Alert routes define how alerts from different sources are processed, grouped, and routed to the right teams and people.
|
|
35
|
+
*
|
|
36
|
+
* We'd generally recommend building alert routes in our [web dashboard](https://app.incident.io/~/alerts/configuration), and using the 'Export' flow to generate your Terraform, as it's easier to see what you've configured. You can also make changes to an existing alert route and copy the resulting Terraform without persisting it.
|
|
37
|
+
*
|
|
38
|
+
* ## Example - Inline incident template
|
|
39
|
+
*
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
42
|
+
* import * as incident from "@incident-io/pulumi";
|
|
43
|
+
*
|
|
44
|
+
* //# Defines the incident template inline, under incident_config.template. This is
|
|
45
|
+
* //# the most self-contained option: the template lives with the route and is not
|
|
46
|
+
* //# shared with any other route. See the other examples for reusing a standalone
|
|
47
|
+
* //# incident_incident_template, or falling back to the organisation's default.
|
|
48
|
+
* const serviceAlerts = new incident.AlertRoute("service_alerts", {
|
|
49
|
+
* name: "Testing Alert Routes",
|
|
50
|
+
* enabled: true,
|
|
51
|
+
* isPrivate: false,
|
|
52
|
+
* alertSources: [{
|
|
53
|
+
* alertSourceId: http.id,
|
|
54
|
+
* conditionGroups: [{
|
|
55
|
+
* conditions: [{
|
|
56
|
+
* subject: "alert.title",
|
|
57
|
+
* operation: "is_set",
|
|
58
|
+
* paramBindings: [],
|
|
59
|
+
* }],
|
|
60
|
+
* }],
|
|
61
|
+
* }],
|
|
62
|
+
* conditionGroups: [{
|
|
63
|
+
* conditions: [{
|
|
64
|
+
* subject: "alert.title",
|
|
65
|
+
* operation: "is_set",
|
|
66
|
+
* paramBindings: [],
|
|
67
|
+
* }],
|
|
68
|
+
* }],
|
|
69
|
+
* expressions: [],
|
|
70
|
+
* groupingConfig: {
|
|
71
|
+
* "default": {
|
|
72
|
+
* enabled: true,
|
|
73
|
+
* groupingKeys: [],
|
|
74
|
+
* windowSeconds: 300,
|
|
75
|
+
* windowType: "rolling",
|
|
76
|
+
* },
|
|
77
|
+
* },
|
|
78
|
+
* messageConfig: {
|
|
79
|
+
* destinations: [{
|
|
80
|
+
* conditionGroups: [{
|
|
81
|
+
* conditions: [{
|
|
82
|
+
* subject: "alert.title",
|
|
83
|
+
* operation: "contains",
|
|
84
|
+
* paramBindings: [{
|
|
85
|
+
* value: {
|
|
86
|
+
* literal: "critical",
|
|
87
|
+
* },
|
|
88
|
+
* }],
|
|
89
|
+
* }],
|
|
90
|
+
* }],
|
|
91
|
+
* slackTargets: {
|
|
92
|
+
* binding: {
|
|
93
|
+
* arrayValue: [{
|
|
94
|
+
* literal: "C01234567",
|
|
95
|
+
* }],
|
|
96
|
+
* },
|
|
97
|
+
* channelVisibility: "public",
|
|
98
|
+
* groupAlertsSummary: true,
|
|
99
|
+
* },
|
|
100
|
+
* }],
|
|
101
|
+
* template: {
|
|
102
|
+
* value: {
|
|
103
|
+
* literal: "01KHJTJR4FZJJZQ6G02EBFJAAY",
|
|
104
|
+
* },
|
|
105
|
+
* },
|
|
106
|
+
* },
|
|
107
|
+
* escalationConfig: {
|
|
108
|
+
* autoCancelEscalations: true,
|
|
109
|
+
* escalationTargets: [
|
|
110
|
+
* {
|
|
111
|
+
* escalationPaths: {
|
|
112
|
+
* arrayValue: [{
|
|
113
|
+
* reference: "alert.attributes.escalation_path",
|
|
114
|
+
* }],
|
|
115
|
+
* },
|
|
116
|
+
* },
|
|
117
|
+
* {
|
|
118
|
+
* escalationPaths: {
|
|
119
|
+
* arrayValue: [{
|
|
120
|
+
* literal: "01JPQNFD3RWAAY2V83QQ80D1ZV",
|
|
121
|
+
* }],
|
|
122
|
+
* },
|
|
123
|
+
* },
|
|
124
|
+
* {
|
|
125
|
+
* users: {
|
|
126
|
+
* arrayValue: [{
|
|
127
|
+
* literal: "01GX3C1TK13RQSEGP59XZ3MYP0",
|
|
128
|
+
* }],
|
|
129
|
+
* },
|
|
130
|
+
* },
|
|
131
|
+
* ],
|
|
132
|
+
* whenAlertJoinsGroup: {
|
|
133
|
+
* mode: "on_each_new_alert",
|
|
134
|
+
* gracePeriodSeconds: 60,
|
|
135
|
+
* },
|
|
136
|
+
* },
|
|
137
|
+
* incidentConfig: {
|
|
138
|
+
* autoDeclineEnabled: false,
|
|
139
|
+
* enabled: true,
|
|
140
|
+
* conditionGroups: [],
|
|
141
|
+
* template: {
|
|
142
|
+
* customFields: [{
|
|
143
|
+
* customFieldId: typeField.id,
|
|
144
|
+
* mergeStrategy: "first-wins",
|
|
145
|
+
* binding: {
|
|
146
|
+
* value: {
|
|
147
|
+
* literal: "Test incident",
|
|
148
|
+
* },
|
|
149
|
+
* },
|
|
150
|
+
* }],
|
|
151
|
+
* name: {
|
|
152
|
+
* autogenerated: true,
|
|
153
|
+
* value: {
|
|
154
|
+
* literal: JSON.stringify({
|
|
155
|
+
* content: [{
|
|
156
|
+
* content: [{
|
|
157
|
+
* attrs: {
|
|
158
|
+
* label: "Alert → Title",
|
|
159
|
+
* missing: false,
|
|
160
|
+
* name: "alert.title",
|
|
161
|
+
* },
|
|
162
|
+
* type: "varSpec",
|
|
163
|
+
* }],
|
|
164
|
+
* type: "paragraph",
|
|
165
|
+
* }],
|
|
166
|
+
* type: "doc",
|
|
167
|
+
* }),
|
|
168
|
+
* },
|
|
169
|
+
* },
|
|
170
|
+
* summary: {
|
|
171
|
+
* autogenerated: true,
|
|
172
|
+
* value: {
|
|
173
|
+
* literal: JSON.stringify({
|
|
174
|
+
* content: [{
|
|
175
|
+
* content: [{
|
|
176
|
+
* attrs: {
|
|
177
|
+
* label: "Alert → Description",
|
|
178
|
+
* missing: false,
|
|
179
|
+
* name: "alert.description",
|
|
180
|
+
* },
|
|
181
|
+
* type: "varSpec",
|
|
182
|
+
* }],
|
|
183
|
+
* type: "paragraph",
|
|
184
|
+
* }],
|
|
185
|
+
* type: "doc",
|
|
186
|
+
* }),
|
|
187
|
+
* },
|
|
188
|
+
* },
|
|
189
|
+
* startInTriage: {
|
|
190
|
+
* value: {
|
|
191
|
+
* literal: "true",
|
|
192
|
+
* },
|
|
193
|
+
* },
|
|
194
|
+
* severity: {
|
|
195
|
+
* mergeStrategy: "first-wins",
|
|
196
|
+
* },
|
|
197
|
+
* },
|
|
198
|
+
* },
|
|
199
|
+
* });
|
|
200
|
+
* ```
|
|
201
|
+
*
|
|
202
|
+
* ## Example - Reusing a standalone incident template
|
|
203
|
+
*
|
|
204
|
+
* ```typescript
|
|
205
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
206
|
+
* import * as incident from "@incident-io/pulumi";
|
|
207
|
+
*
|
|
208
|
+
* //# References a standalone incident_incident_template instead of defining the
|
|
209
|
+
* //# template inline. This is the better option when several routes should share
|
|
210
|
+
* //# one template: edit the template once and every route that references it picks
|
|
211
|
+
* //# up the change.
|
|
212
|
+
* const payments = new incident.IncidentTemplate("payments", {
|
|
213
|
+
* name: "Payments incidents",
|
|
214
|
+
* expressions: [],
|
|
215
|
+
* template: {
|
|
216
|
+
* name: {
|
|
217
|
+
* autogenerated: false,
|
|
218
|
+
* value: {
|
|
219
|
+
* literal: "Payments incident",
|
|
220
|
+
* },
|
|
221
|
+
* },
|
|
222
|
+
* summary: {
|
|
223
|
+
* autogenerated: true,
|
|
224
|
+
* },
|
|
225
|
+
* severity: {
|
|
226
|
+
* mergeStrategy: "max",
|
|
227
|
+
* },
|
|
228
|
+
* },
|
|
229
|
+
* });
|
|
230
|
+
* const paymentsAlerts = new incident.AlertRoute("payments_alerts", {
|
|
231
|
+
* name: "Payments alerts",
|
|
232
|
+
* enabled: true,
|
|
233
|
+
* isPrivate: false,
|
|
234
|
+
* alertSources: [{
|
|
235
|
+
* alertSourceId: http.id,
|
|
236
|
+
* conditionGroups: [],
|
|
237
|
+
* }],
|
|
238
|
+
* conditionGroups: [],
|
|
239
|
+
* expressions: [],
|
|
240
|
+
* groupingConfig: {
|
|
241
|
+
* "default": {
|
|
242
|
+
* enabled: true,
|
|
243
|
+
* groupingKeys: [],
|
|
244
|
+
* windowSeconds: 300,
|
|
245
|
+
* windowType: "rolling",
|
|
246
|
+
* },
|
|
247
|
+
* },
|
|
248
|
+
* messageConfig: {
|
|
249
|
+
* destinations: [{
|
|
250
|
+
* conditionGroups: [],
|
|
251
|
+
* slackTargets: {
|
|
252
|
+
* binding: {
|
|
253
|
+
* arrayValue: [{
|
|
254
|
+
* literal: "C01234567",
|
|
255
|
+
* }],
|
|
256
|
+
* },
|
|
257
|
+
* channelVisibility: "public",
|
|
258
|
+
* groupAlertsSummary: true,
|
|
259
|
+
* },
|
|
260
|
+
* }],
|
|
261
|
+
* },
|
|
262
|
+
* escalationConfig: {
|
|
263
|
+
* autoCancelEscalations: true,
|
|
264
|
+
* escalationTargets: [{
|
|
265
|
+
* escalationPaths: {
|
|
266
|
+
* arrayValue: [{
|
|
267
|
+
* literal: "01JPQNFD3RWAAY2V83QQ80D1ZV",
|
|
268
|
+
* }],
|
|
269
|
+
* },
|
|
270
|
+
* }],
|
|
271
|
+
* },
|
|
272
|
+
* incidentConfig: {
|
|
273
|
+
* autoDeclineEnabled: false,
|
|
274
|
+
* enabled: true,
|
|
275
|
+
* conditionGroups: [],
|
|
276
|
+
* incidentTemplate: {
|
|
277
|
+
* value: {
|
|
278
|
+
* literal: payments.id,
|
|
279
|
+
* },
|
|
280
|
+
* },
|
|
281
|
+
* },
|
|
282
|
+
* });
|
|
283
|
+
* ```
|
|
284
|
+
*
|
|
285
|
+
* ## Example - Using the organisation's default template
|
|
286
|
+
*
|
|
287
|
+
* ```typescript
|
|
288
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
289
|
+
* import * as incident from "@incident-io/pulumi";
|
|
290
|
+
*
|
|
291
|
+
* //# Sets no incident template at all. Both the inline template and the standalone
|
|
292
|
+
* //# incident_template reference are optional, so when neither is set the incidents
|
|
293
|
+
* //# this route creates use the organisation's default incident template.
|
|
294
|
+
* const defaultTemplateAlerts = new incident.AlertRoute("default_template_alerts", {
|
|
295
|
+
* name: "Default template alerts",
|
|
296
|
+
* enabled: true,
|
|
297
|
+
* isPrivate: false,
|
|
298
|
+
* alertSources: [{
|
|
299
|
+
* alertSourceId: http.id,
|
|
300
|
+
* conditionGroups: [],
|
|
301
|
+
* }],
|
|
302
|
+
* conditionGroups: [],
|
|
303
|
+
* expressions: [],
|
|
304
|
+
* groupingConfig: {
|
|
305
|
+
* "default": {
|
|
306
|
+
* enabled: true,
|
|
307
|
+
* groupingKeys: [],
|
|
308
|
+
* windowSeconds: 300,
|
|
309
|
+
* windowType: "rolling",
|
|
310
|
+
* },
|
|
311
|
+
* },
|
|
312
|
+
* messageConfig: {
|
|
313
|
+
* destinations: [{
|
|
314
|
+
* conditionGroups: [],
|
|
315
|
+
* slackTargets: {
|
|
316
|
+
* binding: {
|
|
317
|
+
* arrayValue: [{
|
|
318
|
+
* literal: "C01234567",
|
|
319
|
+
* }],
|
|
320
|
+
* },
|
|
321
|
+
* channelVisibility: "public",
|
|
322
|
+
* groupAlertsSummary: true,
|
|
323
|
+
* },
|
|
324
|
+
* }],
|
|
325
|
+
* },
|
|
326
|
+
* escalationConfig: {
|
|
327
|
+
* autoCancelEscalations: true,
|
|
328
|
+
* escalationTargets: [{
|
|
329
|
+
* escalationPaths: {
|
|
330
|
+
* arrayValue: [{
|
|
331
|
+
* literal: "01JPQNFD3RWAAY2V83QQ80D1ZV",
|
|
332
|
+
* }],
|
|
333
|
+
* },
|
|
334
|
+
* }],
|
|
335
|
+
* },
|
|
336
|
+
* incidentConfig: {
|
|
337
|
+
* autoDeclineEnabled: false,
|
|
338
|
+
* enabled: true,
|
|
339
|
+
* conditionGroups: [],
|
|
340
|
+
* },
|
|
341
|
+
* });
|
|
342
|
+
* ```
|
|
343
|
+
*/
|
|
344
|
+
class AlertRoute extends pulumi.CustomResource {
|
|
345
|
+
/**
|
|
346
|
+
* Get an existing AlertRoute resource's state with the given name, ID, and optional extra
|
|
347
|
+
* properties used to qualify the lookup.
|
|
348
|
+
*
|
|
349
|
+
* @param name The _unique_ name of the resulting resource.
|
|
350
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
351
|
+
* @param state Any extra arguments used during the lookup.
|
|
352
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
353
|
+
*/
|
|
354
|
+
static get(name, id, state, opts) {
|
|
355
|
+
return new AlertRoute(name, state, { ...opts, id: id });
|
|
356
|
+
}
|
|
357
|
+
/** @internal */
|
|
358
|
+
static __pulumiType = 'incident:index/alertRoute:AlertRoute';
|
|
359
|
+
/**
|
|
360
|
+
* Returns true if the given object is an instance of AlertRoute. This is designed to work even
|
|
361
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
362
|
+
*/
|
|
363
|
+
static isInstance(obj) {
|
|
364
|
+
if (obj === undefined || obj === null) {
|
|
365
|
+
return false;
|
|
366
|
+
}
|
|
367
|
+
return obj['__pulumiType'] === AlertRoute.__pulumiType;
|
|
368
|
+
}
|
|
369
|
+
constructor(name, argsOrState, opts) {
|
|
370
|
+
let resourceInputs = {};
|
|
371
|
+
opts = opts || {};
|
|
372
|
+
if (opts.id) {
|
|
373
|
+
const state = argsOrState;
|
|
374
|
+
resourceInputs["alertSources"] = state?.alertSources;
|
|
375
|
+
resourceInputs["channelConfigs"] = state?.channelConfigs;
|
|
376
|
+
resourceInputs["conditionGroups"] = state?.conditionGroups;
|
|
377
|
+
resourceInputs["enabled"] = state?.enabled;
|
|
378
|
+
resourceInputs["escalationConfig"] = state?.escalationConfig;
|
|
379
|
+
resourceInputs["expressions"] = state?.expressions;
|
|
380
|
+
resourceInputs["groupingConfig"] = state?.groupingConfig;
|
|
381
|
+
resourceInputs["incidentConfig"] = state?.incidentConfig;
|
|
382
|
+
resourceInputs["incidentTemplate"] = state?.incidentTemplate;
|
|
383
|
+
resourceInputs["isPrivate"] = state?.isPrivate;
|
|
384
|
+
resourceInputs["messageConfig"] = state?.messageConfig;
|
|
385
|
+
resourceInputs["messageTemplate"] = state?.messageTemplate;
|
|
386
|
+
resourceInputs["name"] = state?.name;
|
|
387
|
+
resourceInputs["owningTeamIds"] = state?.owningTeamIds;
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
const args = argsOrState;
|
|
391
|
+
if (args?.alertSources === undefined && !opts.urn) {
|
|
392
|
+
throw new Error("Missing required property 'alertSources'");
|
|
393
|
+
}
|
|
394
|
+
if (args?.conditionGroups === undefined && !opts.urn) {
|
|
395
|
+
throw new Error("Missing required property 'conditionGroups'");
|
|
396
|
+
}
|
|
397
|
+
if (args?.enabled === undefined && !opts.urn) {
|
|
398
|
+
throw new Error("Missing required property 'enabled'");
|
|
399
|
+
}
|
|
400
|
+
if (args?.escalationConfig === undefined && !opts.urn) {
|
|
401
|
+
throw new Error("Missing required property 'escalationConfig'");
|
|
402
|
+
}
|
|
403
|
+
if (args?.expressions === undefined && !opts.urn) {
|
|
404
|
+
throw new Error("Missing required property 'expressions'");
|
|
405
|
+
}
|
|
406
|
+
if (args?.incidentConfig === undefined && !opts.urn) {
|
|
407
|
+
throw new Error("Missing required property 'incidentConfig'");
|
|
408
|
+
}
|
|
409
|
+
if (args?.isPrivate === undefined && !opts.urn) {
|
|
410
|
+
throw new Error("Missing required property 'isPrivate'");
|
|
411
|
+
}
|
|
412
|
+
resourceInputs["alertSources"] = args?.alertSources;
|
|
413
|
+
resourceInputs["channelConfigs"] = args?.channelConfigs;
|
|
414
|
+
resourceInputs["conditionGroups"] = args?.conditionGroups;
|
|
415
|
+
resourceInputs["enabled"] = args?.enabled;
|
|
416
|
+
resourceInputs["escalationConfig"] = args?.escalationConfig;
|
|
417
|
+
resourceInputs["expressions"] = args?.expressions;
|
|
418
|
+
resourceInputs["groupingConfig"] = args?.groupingConfig;
|
|
419
|
+
resourceInputs["incidentConfig"] = args?.incidentConfig;
|
|
420
|
+
resourceInputs["incidentTemplate"] = args?.incidentTemplate;
|
|
421
|
+
resourceInputs["isPrivate"] = args?.isPrivate;
|
|
422
|
+
resourceInputs["messageConfig"] = args?.messageConfig;
|
|
423
|
+
resourceInputs["messageTemplate"] = args?.messageTemplate;
|
|
424
|
+
resourceInputs["name"] = args?.name;
|
|
425
|
+
resourceInputs["owningTeamIds"] = args?.owningTeamIds;
|
|
426
|
+
}
|
|
427
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
428
|
+
super(AlertRoute.__pulumiType, name, resourceInputs, opts);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
exports.AlertRoute = AlertRoute;
|
|
432
|
+
//# sourceMappingURL=alertRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alertRoute.js","sourceRoot":"","sources":["../alertRoute.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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