@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.
Files changed (279) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +69 -0
  3. package/alertAttribute.d.ts +230 -0
  4. package/alertAttribute.d.ts.map +1 -0
  5. package/alertAttribute.js +219 -0
  6. package/alertAttribute.js.map +1 -0
  7. package/alertRoute.d.ts +511 -0
  8. package/alertRoute.d.ts.map +1 -0
  9. package/alertRoute.js +432 -0
  10. package/alertRoute.js.map +1 -0
  11. package/alertSource.d.ts +347 -0
  12. package/alertSource.d.ts.map +1 -0
  13. package/alertSource.js +241 -0
  14. package/alertSource.js.map +1 -0
  15. package/alertSourceAttribute.d.ts +180 -0
  16. package/alertSourceAttribute.d.ts.map +1 -0
  17. package/alertSourceAttribute.js +107 -0
  18. package/alertSourceAttribute.js.map +1 -0
  19. package/alertSourceAttributeBeta.d.ts +188 -0
  20. package/alertSourceAttributeBeta.d.ts.map +1 -0
  21. package/alertSourceAttributeBeta.js +115 -0
  22. package/alertSourceAttributeBeta.js.map +1 -0
  23. package/alertSourceBeta.d.ts +244 -0
  24. package/alertSourceBeta.d.ts.map +1 -0
  25. package/alertSourceBeta.js +138 -0
  26. package/alertSourceBeta.js.map +1 -0
  27. package/apiKey.d.ts +276 -0
  28. package/apiKey.d.ts.map +1 -0
  29. package/apiKey.js +211 -0
  30. package/apiKey.js.map +1 -0
  31. package/catalogEntries.d.ts +241 -0
  32. package/catalogEntries.d.ts.map +1 -0
  33. package/catalogEntries.js +242 -0
  34. package/catalogEntries.js.map +1 -0
  35. package/catalogEntry.d.ts +183 -0
  36. package/catalogEntry.d.ts.map +1 -0
  37. package/catalogEntry.js +159 -0
  38. package/catalogEntry.js.map +1 -0
  39. package/catalogType.d.ts +169 -0
  40. package/catalogType.d.ts.map +1 -0
  41. package/catalogType.js +132 -0
  42. package/catalogType.js.map +1 -0
  43. package/catalogTypeAttribute.d.ts +190 -0
  44. package/catalogTypeAttribute.d.ts.map +1 -0
  45. package/catalogTypeAttribute.js +153 -0
  46. package/catalogTypeAttribute.js.map +1 -0
  47. package/config/index.d.ts +2 -0
  48. package/config/index.d.ts.map +1 -0
  49. package/config/index.js +21 -0
  50. package/config/index.js.map +1 -0
  51. package/config/vars.d.ts +13 -0
  52. package/config/vars.d.ts.map +1 -0
  53. package/config/vars.js +49 -0
  54. package/config/vars.js.map +1 -0
  55. package/customField.d.ts +260 -0
  56. package/customField.d.ts.map +1 -0
  57. package/customField.js +226 -0
  58. package/customField.js.map +1 -0
  59. package/customFieldOption.d.ts +107 -0
  60. package/customFieldOption.d.ts.map +1 -0
  61. package/customFieldOption.js +116 -0
  62. package/customFieldOption.js.map +1 -0
  63. package/escalationPath.d.ts +257 -0
  64. package/escalationPath.d.ts.map +1 -0
  65. package/escalationPath.js +228 -0
  66. package/escalationPath.js.map +1 -0
  67. package/escalationPathBeta.d.ts +134 -0
  68. package/escalationPathBeta.d.ts.map +1 -0
  69. package/escalationPathBeta.js +105 -0
  70. package/escalationPathBeta.js.map +1 -0
  71. package/getAlertAttribute.d.ts +81 -0
  72. package/getAlertAttribute.d.ts.map +1 -0
  73. package/getAlertAttribute.js +75 -0
  74. package/getAlertAttribute.js.map +1 -0
  75. package/getAlertSource.d.ts +169 -0
  76. package/getAlertSource.d.ts.map +1 -0
  77. package/getAlertSource.js +103 -0
  78. package/getAlertSource.js.map +1 -0
  79. package/getAlertSourceAttribute.d.ts +131 -0
  80. package/getAlertSourceAttribute.d.ts.map +1 -0
  81. package/getAlertSourceAttribute.js +85 -0
  82. package/getAlertSourceAttribute.js.map +1 -0
  83. package/getAlertSourceAttributeBeta.d.ts +131 -0
  84. package/getAlertSourceAttributeBeta.d.ts.map +1 -0
  85. package/getAlertSourceAttributeBeta.js +85 -0
  86. package/getAlertSourceAttributeBeta.js.map +1 -0
  87. package/getApiKey.d.ts +167 -0
  88. package/getApiKey.d.ts.map +1 -0
  89. package/getApiKey.js +145 -0
  90. package/getApiKey.js.map +1 -0
  91. package/getCatalogEntry.d.ts +77 -0
  92. package/getCatalogEntry.d.ts.map +1 -0
  93. package/getCatalogEntry.js +59 -0
  94. package/getCatalogEntry.js.map +1 -0
  95. package/getCatalogType.d.ts +163 -0
  96. package/getCatalogType.d.ts.map +1 -0
  97. package/getCatalogType.js +135 -0
  98. package/getCatalogType.js.map +1 -0
  99. package/getCatalogTypeAttribute.d.ts +73 -0
  100. package/getCatalogTypeAttribute.d.ts.map +1 -0
  101. package/getCatalogTypeAttribute.js +53 -0
  102. package/getCatalogTypeAttribute.js.map +1 -0
  103. package/getCustomField.d.ts +67 -0
  104. package/getCustomField.d.ts.map +1 -0
  105. package/getCustomField.js +51 -0
  106. package/getCustomField.js.map +1 -0
  107. package/getCustomFieldOption.d.ts +65 -0
  108. package/getCustomFieldOption.d.ts.map +1 -0
  109. package/getCustomFieldOption.js +55 -0
  110. package/getCustomFieldOption.js.map +1 -0
  111. package/getEscalationPath.d.ts +100 -0
  112. package/getEscalationPath.d.ts.map +1 -0
  113. package/getEscalationPath.js +83 -0
  114. package/getEscalationPath.js.map +1 -0
  115. package/getEscalationPathBeta.d.ts +100 -0
  116. package/getEscalationPathBeta.d.ts.map +1 -0
  117. package/getEscalationPathBeta.js +83 -0
  118. package/getEscalationPathBeta.js.map +1 -0
  119. package/getIncidentRole.d.ts +111 -0
  120. package/getIncidentRole.d.ts.map +1 -0
  121. package/getIncidentRole.js +105 -0
  122. package/getIncidentRole.js.map +1 -0
  123. package/getIncidentTemplate.d.ts +98 -0
  124. package/getIncidentTemplate.d.ts.map +1 -0
  125. package/getIncidentTemplate.js +95 -0
  126. package/getIncidentTemplate.js.map +1 -0
  127. package/getIncidentTimestamp.d.ts +107 -0
  128. package/getIncidentTimestamp.d.ts.map +1 -0
  129. package/getIncidentTimestamp.js +109 -0
  130. package/getIncidentTimestamp.js.map +1 -0
  131. package/getIncidentType.d.ts +121 -0
  132. package/getIncidentType.d.ts.map +1 -0
  133. package/getIncidentType.js +107 -0
  134. package/getIncidentType.js.map +1 -0
  135. package/getIpAllowlist.d.ts +62 -0
  136. package/getIpAllowlist.d.ts.map +1 -0
  137. package/getIpAllowlist.js +77 -0
  138. package/getIpAllowlist.js.map +1 -0
  139. package/getPolicy.d.ts +97 -0
  140. package/getPolicy.d.ts.map +1 -0
  141. package/getPolicy.js +91 -0
  142. package/getPolicy.js.map +1 -0
  143. package/getRichText.d.ts +111 -0
  144. package/getRichText.d.ts.map +1 -0
  145. package/getRichText.js +107 -0
  146. package/getRichText.js.map +1 -0
  147. package/getSchedule.d.ts +89 -0
  148. package/getSchedule.d.ts.map +1 -0
  149. package/getSchedule.js +87 -0
  150. package/getSchedule.js.map +1 -0
  151. package/getScheduleBeta.d.ts +85 -0
  152. package/getScheduleBeta.d.ts.map +1 -0
  153. package/getScheduleBeta.js +83 -0
  154. package/getScheduleBeta.js.map +1 -0
  155. package/getScheduleReplica.d.ts +116 -0
  156. package/getScheduleReplica.d.ts.map +1 -0
  157. package/getScheduleReplica.js +79 -0
  158. package/getScheduleReplica.js.map +1 -0
  159. package/getScheduleRotation.d.ts +166 -0
  160. package/getScheduleRotation.d.ts.map +1 -0
  161. package/getScheduleRotation.js +127 -0
  162. package/getScheduleRotation.js.map +1 -0
  163. package/getScheduleRotationBeta.d.ts +122 -0
  164. package/getScheduleRotationBeta.d.ts.map +1 -0
  165. package/getScheduleRotationBeta.js +83 -0
  166. package/getScheduleRotationBeta.js.map +1 -0
  167. package/getScheduleSyncRule.d.ts +91 -0
  168. package/getScheduleSyncRule.d.ts.map +1 -0
  169. package/getScheduleSyncRule.js +79 -0
  170. package/getScheduleSyncRule.js.map +1 -0
  171. package/getScheduleSyncTarget.d.ts +100 -0
  172. package/getScheduleSyncTarget.d.ts.map +1 -0
  173. package/getScheduleSyncTarget.js +93 -0
  174. package/getScheduleSyncTarget.js.map +1 -0
  175. package/getSecret.d.ts +115 -0
  176. package/getSecret.d.ts.map +1 -0
  177. package/getSecret.js +97 -0
  178. package/getSecret.js.map +1 -0
  179. package/getSeverity.d.ts +117 -0
  180. package/getSeverity.d.ts.map +1 -0
  181. package/getSeverity.js +115 -0
  182. package/getSeverity.js.map +1 -0
  183. package/getStatus.d.ts +125 -0
  184. package/getStatus.d.ts.map +1 -0
  185. package/getStatus.js +119 -0
  186. package/getStatus.js.map +1 -0
  187. package/getUser.d.ts +52 -0
  188. package/getUser.d.ts.map +1 -0
  189. package/getUser.js +61 -0
  190. package/getUser.js.map +1 -0
  191. package/getWorkflow.d.ts +103 -0
  192. package/getWorkflow.d.ts.map +1 -0
  193. package/getWorkflow.js +77 -0
  194. package/getWorkflow.js.map +1 -0
  195. package/incidentRole.d.ts +109 -0
  196. package/incidentRole.d.ts.map +1 -0
  197. package/incidentRole.js +111 -0
  198. package/incidentRole.js.map +1 -0
  199. package/incidentTemplate.d.ts +200 -0
  200. package/incidentTemplate.d.ts.map +1 -0
  201. package/incidentTemplate.js +207 -0
  202. package/incidentTemplate.js.map +1 -0
  203. package/index.d.ts +188 -0
  204. package/index.d.ts.map +1 -0
  205. package/index.js +303 -0
  206. package/index.js.map +1 -0
  207. package/maintenanceWindow.d.ts +255 -0
  208. package/maintenanceWindow.d.ts.map +1 -0
  209. package/maintenanceWindow.js +148 -0
  210. package/maintenanceWindow.js.map +1 -0
  211. package/package.json +33 -0
  212. package/policy.d.ts +476 -0
  213. package/policy.d.ts.map +1 -0
  214. package/policy.js +387 -0
  215. package/policy.js.map +1 -0
  216. package/provider.d.ts +62 -0
  217. package/provider.d.ts.map +1 -0
  218. package/provider.js +80 -0
  219. package/provider.js.map +1 -0
  220. package/schedule.d.ts +120 -0
  221. package/schedule.d.ts.map +1 -0
  222. package/schedule.js +114 -0
  223. package/schedule.js.map +1 -0
  224. package/scheduleBeta.d.ts +104 -0
  225. package/scheduleBeta.d.ts.map +1 -0
  226. package/scheduleBeta.js +98 -0
  227. package/scheduleBeta.js.map +1 -0
  228. package/scheduleReplica.d.ts +178 -0
  229. package/scheduleReplica.d.ts.map +1 -0
  230. package/scheduleReplica.js +134 -0
  231. package/scheduleReplica.js.map +1 -0
  232. package/scheduleRotation.d.ts +287 -0
  233. package/scheduleRotation.d.ts.map +1 -0
  234. package/scheduleRotation.js +224 -0
  235. package/scheduleRotation.js.map +1 -0
  236. package/scheduleRotationBeta.d.ts +184 -0
  237. package/scheduleRotationBeta.d.ts.map +1 -0
  238. package/scheduleRotationBeta.js +121 -0
  239. package/scheduleRotationBeta.js.map +1 -0
  240. package/scheduleSyncRule.d.ts +154 -0
  241. package/scheduleSyncRule.d.ts.map +1 -0
  242. package/scheduleSyncRule.js +146 -0
  243. package/scheduleSyncRule.js.map +1 -0
  244. package/scheduleSyncTarget.d.ts +108 -0
  245. package/scheduleSyncTarget.d.ts.map +1 -0
  246. package/scheduleSyncTarget.js +106 -0
  247. package/scheduleSyncTarget.js.map +1 -0
  248. package/secret.d.ts +276 -0
  249. package/secret.d.ts.map +1 -0
  250. package/secret.js +234 -0
  251. package/secret.js.map +1 -0
  252. package/severity.d.ts +96 -0
  253. package/severity.d.ts.map +1 -0
  254. package/severity.js +102 -0
  255. package/severity.js.map +1 -0
  256. package/status.d.ts +121 -0
  257. package/status.d.ts.map +1 -0
  258. package/status.js +120 -0
  259. package/status.js.map +1 -0
  260. package/types/index.d.ts +4 -0
  261. package/types/index.d.ts.map +1 -0
  262. package/types/index.js +34 -0
  263. package/types/index.js.map +1 -0
  264. package/types/input.d.ts +23630 -0
  265. package/types/input.d.ts.map +1 -0
  266. package/types/input.js +5 -0
  267. package/types/input.js.map +1 -0
  268. package/types/output.d.ts +19726 -0
  269. package/types/output.d.ts.map +1 -0
  270. package/types/output.js +5 -0
  271. package/types/output.js.map +1 -0
  272. package/utilities.d.ts +5 -0
  273. package/utilities.d.ts.map +1 -0
  274. package/utilities.js +114 -0
  275. package/utilities.js.map +1 -0
  276. package/workflow.d.ts +736 -0
  277. package/workflow.d.ts.map +1 -0
  278. package/workflow.js +608 -0
  279. package/workflow.js.map +1 -0
package/policy.js ADDED
@@ -0,0 +1,387 @@
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.Policy = void 0;
29
+ const pulumi = __importStar(require("@pulumi/pulumi"));
30
+ const utilities = __importStar(require("./utilities"));
31
+ /**
32
+ * Manage the policies that encode how your organisation should handle incidents.
33
+ *
34
+ * A policy scopes itself to a set of resources with `conditionGroups`, states the
35
+ * requirements those resources must meet, and describes who to chase when they fall short.
36
+ *
37
+ * `policyType` selects exactly one matching config block: a `followUp` policy
38
+ * carries `followUp` config, a `schedule` policy carries `schedule`
39
+ * config, and so on. A `vacationConflict` policy has no configuration of its own and
40
+ * so carries no block.
41
+ *
42
+ * ## Example - Require a post-mortem within five working days
43
+ *
44
+ * ```typescript
45
+ * import * as pulumi from "@pulumi/pulumi";
46
+ * import * as incident from "@incident-io/pulumi";
47
+ *
48
+ * // The person to chase when a post-mortem falls due. Assignees can also be a
49
+ * // reference, such as the incident lead; see `assignment_rules.bindings`.
50
+ * const postmortemOwner = incident.getUser({
51
+ * email: "quality@example.com",
52
+ * });
53
+ * // Look the timestamp up by name rather than pinning an ID, which differs between
54
+ * // organisations.
55
+ * const closed = incident.getIncidentTimestamp({
56
+ * name: "Closed at",
57
+ * });
58
+ * // A post-mortem policy: which incidents it covers, what they must satisfy, and
59
+ * // when that falls due.
60
+ * //
61
+ * // There is no policy_type attribute to set. The post_mortem block below is what
62
+ * // makes this a post-mortem policy, and policy_type is computed from it.
63
+ * const postmortems = new incident.Policy("postmortems", {
64
+ * name: "Post-mortems within 5 working days",
65
+ * description: "Major and above incidents need a post-mortem once they close.",
66
+ * conditionGroups: [{
67
+ * conditions: [{
68
+ * subject: "incident.severity",
69
+ * operation: "gte",
70
+ * paramBindings: [{
71
+ * valueLiteral: "01FCNDV6P870EA6S7TK1DSYD5H",
72
+ * }],
73
+ * }],
74
+ * }],
75
+ * assignmentRules: {
76
+ * bindings: [{
77
+ * valueLiteral: postmortemOwner.then(postmortemOwner => postmortemOwner.id),
78
+ * }],
79
+ * reminderDueDateOffsetHours: [
80
+ * -24,
81
+ * 0,
82
+ * 24,
83
+ * ],
84
+ * },
85
+ * postMortem: {
86
+ * requirements: [{
87
+ * conditions: [{
88
+ * subject: "post_mortem.status",
89
+ * operation: "one_of",
90
+ * paramBindings: [{
91
+ * values: ["complete"],
92
+ * }],
93
+ * }],
94
+ * }],
95
+ * dueDateConfig: {
96
+ * incidentTimestampId: closed.then(closed => closed.id),
97
+ * days: {
98
+ * valueLiteral: "5",
99
+ * },
100
+ * calculationType: "weekdays",
101
+ * },
102
+ * },
103
+ * });
104
+ * ```
105
+ *
106
+ * ## Example - Action follow-ups within 30 days
107
+ *
108
+ * ```typescript
109
+ * import * as pulumi from "@pulumi/pulumi";
110
+ * import * as incident from "@incident-io/pulumi";
111
+ *
112
+ * // Who to chase when a follow-up is overdue.
113
+ * const followupsOwner = incident.getUser({
114
+ * email: "engineering-manager@example.com",
115
+ * });
116
+ * const followupsClosed = incident.getIncidentTimestamp({
117
+ * name: "Closed at",
118
+ * });
119
+ * // A follow-up policy: the follow-ups left behind by an incident have to be dealt
120
+ * // with, rather than sitting open indefinitely.
121
+ * const followUps = new incident.Policy("follow_ups", {
122
+ * name: "Follow-ups actioned within 30 days",
123
+ * description: "Follow-ups from an incident shouldn't be left open once it closes.",
124
+ * conditionGroups: [],
125
+ * assignmentRules: {
126
+ * bindings: [{
127
+ * valueLiteral: followupsOwner.then(followupsOwner => followupsOwner.id),
128
+ * }],
129
+ * reminderDueDateOffsetHours: [
130
+ * -24,
131
+ * 24,
132
+ * ],
133
+ * reminderCadenceBefore: {
134
+ * interval: "weekly",
135
+ * },
136
+ * reminderCadenceAfter: {
137
+ * interval: "daily",
138
+ * },
139
+ * },
140
+ * followUp: {
141
+ * requirements: [{
142
+ * conditions: [{
143
+ * subject: "follow_up.status",
144
+ * operation: "not_one_of",
145
+ * paramBindings: [{
146
+ * values: ["open"],
147
+ * }],
148
+ * }],
149
+ * }],
150
+ * dueDateConfig: {
151
+ * incidentTimestampId: followupsClosed.then(followupsClosed => followupsClosed.id),
152
+ * days: {
153
+ * valueLiteral: "30",
154
+ * },
155
+ * calculationType: "seven_days",
156
+ * },
157
+ * },
158
+ * });
159
+ * ```
160
+ *
161
+ * ## Example - Book a debrief for major incidents
162
+ *
163
+ * ```typescript
164
+ * import * as pulumi from "@pulumi/pulumi";
165
+ * import * as incident from "@incident-io/pulumi";
166
+ *
167
+ * const debriefsOwner = incident.getUser({
168
+ * email: "incident-manager@example.com",
169
+ * });
170
+ * const debriefsClosed = incident.getIncidentTimestamp({
171
+ * name: "Closed at",
172
+ * });
173
+ * // A debrief policy: major incidents need a debrief booked in, not just promised.
174
+ * //
175
+ * // This one scopes itself with condition_groups rather than applying to every
176
+ * // incident, so only the incidents that warrant a debrief are held to it.
177
+ * const debriefs = new incident.Policy("debriefs", {
178
+ * name: "Debriefs booked for major incidents",
179
+ * description: "Anything at major severity or above needs a debrief in the calendar.",
180
+ * conditionGroups: [{
181
+ * conditions: [{
182
+ * subject: "incident.severity",
183
+ * operation: "gte",
184
+ * paramBindings: [{
185
+ * valueLiteral: "01FCNDV6P870EA6S7TK1DSYD5H",
186
+ * }],
187
+ * }],
188
+ * }],
189
+ * assignmentRules: {
190
+ * bindings: [{
191
+ * valueLiteral: debriefsOwner.then(debriefsOwner => debriefsOwner.id),
192
+ * }],
193
+ * reminderDueDateOffsetHours: [-24],
194
+ * },
195
+ * debrief: {
196
+ * requirements: [{
197
+ * conditions: [{
198
+ * subject: "debrief.is_scheduled",
199
+ * operation: "is_set",
200
+ * paramBindings: [],
201
+ * }],
202
+ * }],
203
+ * dueDateConfig: {
204
+ * incidentTimestampId: debriefsClosed.then(debriefsClosed => debriefsClosed.id),
205
+ * days: {
206
+ * valueLiteral: "5",
207
+ * },
208
+ * calculationType: "weekdays",
209
+ * },
210
+ * },
211
+ * });
212
+ * ```
213
+ *
214
+ * ## Example - Find gaps in on-call coverage
215
+ *
216
+ * ```typescript
217
+ * import * as pulumi from "@pulumi/pulumi";
218
+ * import * as incident from "@incident-io/pulumi";
219
+ *
220
+ * const scheduleOwner = incident.getUser({
221
+ * email: "on-call-manager@example.com",
222
+ * });
223
+ * // A schedule policy, which finds gaps in on-call coverage.
224
+ * //
225
+ * // Unlike follow-up, debrief and post-mortem policies this one takes no
226
+ * // due_date_config: a coverage gap is a finding the moment it's spotted, so
227
+ * // there is no due date to count from. It's the one type that instead supports
228
+ * // reminders measured from when the gap was detected.
229
+ * const scheduleCoverage = new incident.Policy("schedule_coverage", {
230
+ * name: "On-call schedules have no gaps",
231
+ * description: "Every rotation should have someone on call at all times.",
232
+ * conditionGroups: [],
233
+ * assignmentRules: {
234
+ * bindings: [{
235
+ * valueLiteral: scheduleOwner.then(scheduleOwner => scheduleOwner.id),
236
+ * }],
237
+ * reminderDueDateOffsetHours: [],
238
+ * reminderDetectedDateOffsetHours: [
239
+ * 0,
240
+ * 48,
241
+ * ],
242
+ * },
243
+ * schedule: {
244
+ * requirementType: "contiguous",
245
+ * evaluationLevel: "rotation",
246
+ * },
247
+ * });
248
+ * ```
249
+ *
250
+ * ## Example - Check that on-call responders can be reached
251
+ *
252
+ * ```typescript
253
+ * import * as pulumi from "@pulumi/pulumi";
254
+ * import * as incident from "@incident-io/pulumi";
255
+ *
256
+ * // An on-call readiness policy, which checks that responders have a notification
257
+ * // method that reaches them quickly enough.
258
+ * //
259
+ * // It takes no assignment_rules: this type always assigns the user the finding is
260
+ * // about, and the API picks that assignee itself.
261
+ * const respondersCanBeReached = new incident.Policy("responders_can_be_reached", {
262
+ * name: "Responders carry a phone",
263
+ * description: "Anyone on call needs a notification method that reaches them quickly.",
264
+ * conditionGroups: [],
265
+ * onCallReadiness: {
266
+ * highUrgencies: [{
267
+ * methodTypes: [
268
+ * "phone",
269
+ * "sms",
270
+ * ],
271
+ * maxDelaySeconds: 300,
272
+ * }],
273
+ * lowUrgencies: [{
274
+ * methodTypes: ["email"],
275
+ * maxDelaySeconds: 900,
276
+ * }],
277
+ * },
278
+ * });
279
+ * ```
280
+ *
281
+ * ## Example - Flag responders rota'd on while they are away
282
+ *
283
+ * ```typescript
284
+ * import * as pulumi from "@pulumi/pulumi";
285
+ * import * as incident from "@incident-io/pulumi";
286
+ *
287
+ * // A vacation conflict policy, which flags responders rota'd on while they are
288
+ * // away. The type has nothing to configure, so its block is empty: it is only
289
+ * // there to say which type this is.
290
+ * //
291
+ * // Like on-call readiness, it takes no assignment_rules: the API assigns the user
292
+ * // the finding is about.
293
+ * const vacationConflicts = new incident.Policy("vacation_conflicts", {
294
+ * name: "No on-call during vacation",
295
+ * description: "Flag anyone scheduled on call while they are on leave.",
296
+ * conditionGroups: [],
297
+ * vacationConflict: {},
298
+ * });
299
+ * ```
300
+ *
301
+ * ## Import
302
+ *
303
+ * Import is supported using an `import` block or the `pulumi import` command:
304
+ *
305
+ * The `pulumi import` command can be used, for example:
306
+ *
307
+ * !/bin/bash
308
+ *
309
+ * Import a policy using its ID
310
+ * Replace the ID with a real ID from your incident.io organization
311
+ *
312
+ * ```sh
313
+ * $ pulumi import incident:index/policy:Policy example 01ABC123DEF456GHI789JKL
314
+ * ```
315
+ */
316
+ class Policy extends pulumi.CustomResource {
317
+ /**
318
+ * Get an existing Policy resource's state with the given name, ID, and optional extra
319
+ * properties used to qualify the lookup.
320
+ *
321
+ * @param name The _unique_ name of the resulting resource.
322
+ * @param id The _unique_ provider ID of the resource to lookup.
323
+ * @param state Any extra arguments used during the lookup.
324
+ * @param opts Optional settings to control the behavior of the CustomResource.
325
+ */
326
+ static get(name, id, state, opts) {
327
+ return new Policy(name, state, { ...opts, id: id });
328
+ }
329
+ /** @internal */
330
+ static __pulumiType = 'incident:index/policy:Policy';
331
+ /**
332
+ * Returns true if the given object is an instance of Policy. This is designed to work even
333
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
334
+ */
335
+ static isInstance(obj) {
336
+ if (obj === undefined || obj === null) {
337
+ return false;
338
+ }
339
+ return obj['__pulumiType'] === Policy.__pulumiType;
340
+ }
341
+ constructor(name, argsOrState, opts) {
342
+ let resourceInputs = {};
343
+ opts = opts || {};
344
+ if (opts.id) {
345
+ const state = argsOrState;
346
+ resourceInputs["assignmentRules"] = state?.assignmentRules;
347
+ resourceInputs["conditionGroups"] = state?.conditionGroups;
348
+ resourceInputs["debrief"] = state?.debrief;
349
+ resourceInputs["description"] = state?.description;
350
+ resourceInputs["expressions"] = state?.expressions;
351
+ resourceInputs["followUp"] = state?.followUp;
352
+ resourceInputs["name"] = state?.name;
353
+ resourceInputs["onCallReadiness"] = state?.onCallReadiness;
354
+ resourceInputs["policyType"] = state?.policyType;
355
+ resourceInputs["postMortem"] = state?.postMortem;
356
+ resourceInputs["schedule"] = state?.schedule;
357
+ resourceInputs["status"] = state?.status;
358
+ resourceInputs["vacationConflict"] = state?.vacationConflict;
359
+ }
360
+ else {
361
+ const args = argsOrState;
362
+ if (args?.conditionGroups === undefined && !opts.urn) {
363
+ throw new Error("Missing required property 'conditionGroups'");
364
+ }
365
+ if (args?.description === undefined && !opts.urn) {
366
+ throw new Error("Missing required property 'description'");
367
+ }
368
+ resourceInputs["assignmentRules"] = args?.assignmentRules;
369
+ resourceInputs["conditionGroups"] = args?.conditionGroups;
370
+ resourceInputs["debrief"] = args?.debrief;
371
+ resourceInputs["description"] = args?.description;
372
+ resourceInputs["expressions"] = args?.expressions;
373
+ resourceInputs["followUp"] = args?.followUp;
374
+ resourceInputs["name"] = args?.name;
375
+ resourceInputs["onCallReadiness"] = args?.onCallReadiness;
376
+ resourceInputs["postMortem"] = args?.postMortem;
377
+ resourceInputs["schedule"] = args?.schedule;
378
+ resourceInputs["status"] = args?.status;
379
+ resourceInputs["vacationConflict"] = args?.vacationConflict;
380
+ resourceInputs["policyType"] = undefined /*out*/;
381
+ }
382
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
383
+ super(Policy.__pulumiType, name, resourceInputs, opts);
384
+ }
385
+ }
386
+ exports.Policy = Policy;
387
+ //# sourceMappingURL=policy.js.map
package/policy.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.js","sourceRoot":"","sources":["../policy.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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U,CAAC;YAChD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC;YAC5C,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC;YACxC,cAAc,CAAC,kBAAkB,CAAC,GAAG,IAAI,EAAE,gBAAgB,CAAC;YAC5D,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SACpD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;;AAnIL,wBAoIC"}
package/provider.d.ts ADDED
@@ -0,0 +1,62 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * The provider type for the incident package. By default, resources use package-wide configuration
4
+ * settings, however an explicit `Provider` instance may be created and passed during resource
5
+ * construction to achieve fine-grained programmatic control over provider settings. See the
6
+ * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
7
+ */
8
+ export declare class Provider extends pulumi.ProviderResource {
9
+ /**
10
+ * Returns true if the given object is an instance of Provider. This is designed to work even
11
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
12
+ */
13
+ static isInstance(obj: any): obj is Provider;
14
+ /**
15
+ * API key for incident.io (https://app.incident.io/settings/api-keys). Sourced from the `INCIDENT_API_KEY` environment variable, if set.
16
+ */
17
+ readonly apiKey: pulumi.Output<string | undefined>;
18
+ /**
19
+ * URL of the incident.io API
20
+ */
21
+ readonly endpoint: pulumi.Output<string | undefined>;
22
+ /**
23
+ * Create a Provider resource with the given unique name, arguments, and options.
24
+ *
25
+ * @param name The _unique_ name of the resource.
26
+ * @param args The arguments to use to populate this resource's properties.
27
+ * @param opts A bag of options that control this resource's behavior.
28
+ */
29
+ constructor(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions);
30
+ /**
31
+ * This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
32
+ */
33
+ terraformConfig(): pulumi.Output<Provider.TerraformConfigResult>;
34
+ }
35
+ /**
36
+ * The set of arguments for constructing a Provider resource.
37
+ */
38
+ export interface ProviderArgs {
39
+ /**
40
+ * API key for incident.io (https://app.incident.io/settings/api-keys). Sourced from the `INCIDENT_API_KEY` environment variable, if set.
41
+ */
42
+ apiKey?: pulumi.Input<string | undefined>;
43
+ /**
44
+ * URL of the incident.io API
45
+ */
46
+ endpoint?: pulumi.Input<string | undefined>;
47
+ /**
48
+ * Whether importing a resource claims it as managed by Terraform, which is what stops people editing it in the incident.io dashboard. Defaults to `true`. Terraform runs imports during `plan` rather than apply, so this claim is a write to your account during an operation you may expect to be read-only: set this to `false` if plans must leave your account untouched. Creating or updating a resource claims it regardless of this setting, so a resource imported with this off is claimed by the first apply that changes it. It stays editable in the dashboard until then, and indefinitely if its configuration already matches the account and so never produces a change to apply.
49
+ */
50
+ markImportedResourcesAsManaged?: pulumi.Input<boolean | undefined>;
51
+ }
52
+ export declare namespace Provider {
53
+ /**
54
+ * The results of the Provider.terraformConfig method.
55
+ */
56
+ interface TerraformConfigResult {
57
+ readonly result: {
58
+ [key: string]: any;
59
+ };
60
+ }
61
+ }
62
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC;;;;;GAKG;AACH,qBAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IAIjD;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,QAAQ;IAOnD;;OAEG;IACH,SAAwB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAClE;;OAEG;IACH,SAAwB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAEpE;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,eAAe;IAc5E;;OAEG;IACH,eAAe,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAC;CAKnE;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C;;OAEG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CACtE;AAED,yBAAiB,QAAQ,CAAC;IACtB;;OAEG;IACH,UAAiB,qBAAqB;QAClC,QAAQ,CAAC,MAAM,EAAE;YAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;SAAC,CAAC;KACzC;CAEJ"}
package/provider.js ADDED
@@ -0,0 +1,80 @@
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.Provider = void 0;
29
+ const pulumi = __importStar(require("@pulumi/pulumi"));
30
+ const utilities = __importStar(require("./utilities"));
31
+ /**
32
+ * The provider type for the incident package. By default, resources use package-wide configuration
33
+ * settings, however an explicit `Provider` instance may be created and passed during resource
34
+ * construction to achieve fine-grained programmatic control over provider settings. See the
35
+ * [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
36
+ */
37
+ class Provider extends pulumi.ProviderResource {
38
+ /** @internal */
39
+ static __pulumiType = 'incident';
40
+ /**
41
+ * Returns true if the given object is an instance of Provider. This is designed to work even
42
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
43
+ */
44
+ static isInstance(obj) {
45
+ if (obj === undefined || obj === null) {
46
+ return false;
47
+ }
48
+ return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType;
49
+ }
50
+ /**
51
+ * Create a Provider resource with the given unique name, arguments, and options.
52
+ *
53
+ * @param name The _unique_ name of the resource.
54
+ * @param args The arguments to use to populate this resource's properties.
55
+ * @param opts A bag of options that control this resource's behavior.
56
+ */
57
+ constructor(name, args, opts) {
58
+ let resourceInputs = {};
59
+ opts = opts || {};
60
+ {
61
+ resourceInputs["apiKey"] = (args?.apiKey ? pulumi.secret(args.apiKey) : undefined) ?? utilities.getEnv("INCIDENT_API_KEY");
62
+ resourceInputs["endpoint"] = args?.endpoint;
63
+ resourceInputs["markImportedResourcesAsManaged"] = pulumi.output(args?.markImportedResourcesAsManaged).apply(JSON.stringify);
64
+ }
65
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
66
+ const secretOpts = { additionalSecretOutputs: ["apiKey"] };
67
+ opts = pulumi.mergeOptions(opts, secretOpts);
68
+ super(Provider.__pulumiType, name, resourceInputs, opts);
69
+ }
70
+ /**
71
+ * This function returns a Terraform config object with terraform-namecased keys,to be used with the Terraform Module Provider.
72
+ */
73
+ terraformConfig() {
74
+ return pulumi.runtime.call("pulumi:providers:incident/terraformConfig", {
75
+ "__self__": this,
76
+ }, this);
77
+ }
78
+ }
79
+ exports.Provider = Provider;
80
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,uDAAyC;AAEzC;;;;;GAKG;AACH,MAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IACjD,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,UAAU,CAAC;IAEjD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAAC;IAC/E,CAAC;IAWD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAmB,EAAE,IAA6B;QACxE,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB;YACI,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;YAC3H,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC;YAC5C,cAAc,CAAC,gCAAgC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,8BAA8B,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAChI;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,EAAE,uBAAuB,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7C,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,eAAe;QACX,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,2CAA2C,EAAE;YACpE,UAAU,EAAE,IAAI;SACnB,EAAE,IAAI,CAAC,CAAC;IACb,CAAC;;AApDL,4BAqDC"}
package/schedule.d.ts ADDED
@@ -0,0 +1,120 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "./types/input";
3
+ import * as outputs from "./types/output";
4
+ /**
5
+ * Manage an on-call schedule.
6
+ *
7
+ * A schedule holds the rotations that decide who is on call. This resource manages
8
+ * only the schedule itself — its name, timezone, owning teams and public holidays.
9
+ * Rotations are managed separately, as `incident.ScheduleRotation`, so
10
+ * adding or editing one never means rewriting the whole schedule.
11
+ *
12
+ * A schedule created here starts with no rotations, and nobody is on call until one
13
+ * is added.
14
+ *
15
+ * ## Example Usage
16
+ *
17
+ * ```typescript
18
+ * import * as pulumi from "@pulumi/pulumi";
19
+ * import * as incident from "@incident-io/pulumi";
20
+ *
21
+ * // A schedule holds the rotations that decide who is on call. This resource covers
22
+ * // the schedule itself; rotations are managed separately, so a schedule created
23
+ * // here has none and nobody is on call until one is added.
24
+ * const platform = new incident.Schedule("platform", {
25
+ * name: "Platform on-call",
26
+ * timezone: "Europe/London",
27
+ * teamIds: [platformTeam.id],
28
+ * holidaysPublicConfig: {
29
+ * countryCodes: [
30
+ * "GB",
31
+ * "FR",
32
+ * ],
33
+ * },
34
+ * });
35
+ * ```
36
+ */
37
+ export declare class Schedule extends pulumi.CustomResource {
38
+ /**
39
+ * Get an existing Schedule resource's state with the given name, ID, and optional extra
40
+ * properties used to qualify the lookup.
41
+ *
42
+ * @param name The _unique_ name of the resulting resource.
43
+ * @param id The _unique_ provider ID of the resource to lookup.
44
+ * @param state Any extra arguments used during the lookup.
45
+ * @param opts Optional settings to control the behavior of the CustomResource.
46
+ */
47
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ScheduleState, opts?: pulumi.CustomResourceOptions): Schedule;
48
+ /**
49
+ * Returns true if the given object is an instance of Schedule. This is designed to work even
50
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
51
+ */
52
+ static isInstance(obj: any): obj is Schedule;
53
+ /**
54
+ * Public holidays to show on this schedule. Omit the block entirely to show none.
55
+ */
56
+ readonly holidaysPublicConfig: pulumi.Output<outputs.ScheduleHolidaysPublicConfig | undefined>;
57
+ /**
58
+ * Human readable name for the schedule
59
+ */
60
+ readonly name: pulumi.Output<string>;
61
+ /**
62
+ * IDs of teams that own this schedule
63
+ */
64
+ readonly teamIds: pulumi.Output<string[] | undefined>;
65
+ /**
66
+ * Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
67
+ */
68
+ readonly timezone: pulumi.Output<string>;
69
+ /**
70
+ * Create a Schedule resource with the given unique name, arguments, and options.
71
+ *
72
+ * @param name The _unique_ name of the resource.
73
+ * @param args The arguments to use to populate this resource's properties.
74
+ * @param opts A bag of options that control this resource's behavior.
75
+ */
76
+ constructor(name: string, args: ScheduleArgs, opts?: pulumi.CustomResourceOptions);
77
+ }
78
+ /**
79
+ * Input properties used for looking up and filtering Schedule resources.
80
+ */
81
+ export interface ScheduleState {
82
+ /**
83
+ * Public holidays to show on this schedule. Omit the block entirely to show none.
84
+ */
85
+ holidaysPublicConfig?: pulumi.Input<inputs.ScheduleHolidaysPublicConfig | undefined>;
86
+ /**
87
+ * Human readable name for the schedule
88
+ */
89
+ name?: pulumi.Input<string | undefined>;
90
+ /**
91
+ * IDs of teams that own this schedule
92
+ */
93
+ teamIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
94
+ /**
95
+ * Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
96
+ */
97
+ timezone?: pulumi.Input<string | undefined>;
98
+ }
99
+ /**
100
+ * The set of arguments for constructing a Schedule resource.
101
+ */
102
+ export interface ScheduleArgs {
103
+ /**
104
+ * Public holidays to show on this schedule. Omit the block entirely to show none.
105
+ */
106
+ holidaysPublicConfig?: pulumi.Input<inputs.ScheduleHolidaysPublicConfig | undefined>;
107
+ /**
108
+ * Human readable name for the schedule
109
+ */
110
+ name?: pulumi.Input<string | undefined>;
111
+ /**
112
+ * IDs of teams that own this schedule
113
+ */
114
+ teamIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
115
+ /**
116
+ * Timezone the schedule's rotations are anchored to, as an IANA name. Changing this replaces the schedule: a timezone is what its rotations are anchored to, and we don't support moving an existing schedule to another one.
117
+ */
118
+ timezone: pulumi.Input<string>;
119
+ }
120
+ //# sourceMappingURL=schedule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule.d.ts","sourceRoot":"","sources":["../schedule.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAG1C;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