@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/customField.js ADDED
@@ -0,0 +1,226 @@
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.CustomField = void 0;
29
+ const pulumi = __importStar(require("@pulumi/pulumi"));
30
+ const utilities = __importStar(require("./utilities"));
31
+ /**
32
+ * Manage custom fields.
33
+ *
34
+ * Custom fields are used to attach metadata to incidents, which you can use when searching
35
+ * for incidents in the dashboard, triggering workflows, building announcement rules or for
36
+ * your own data needs.
37
+ *
38
+ * Each field has a type:
39
+ *
40
+ * - Single-select, single value selected from a predefined list of options (e.g. Detection Method)
41
+ * - Multi-select, as above but you can pick more than one option (e.g. Affected Teams)
42
+ * - Text, freeform text field (e.g. Customer ID)
43
+ * - Link, link URL that is synced to Slack bookmarks on the incident channel (e.g. External Status Page)
44
+ * - Number, integer or fractional numbers (e.g. # Customers Affected)
45
+ *
46
+ * We may add more custom field types in the future - we'd love to hear any other types you'd like to use!
47
+ *
48
+ * ## Example - Single-select
49
+ *
50
+ * ```typescript
51
+ * import * as pulumi from "@pulumi/pulumi";
52
+ * import * as incident from "@incident-io/pulumi";
53
+ *
54
+ * // Single-select: one value from a predefined list of options (e.g. Detection Method).
55
+ * // Options are managed separately with incident_custom_field_option.
56
+ * const detectionMethod = new incident.CustomField("detection_method", {
57
+ * name: "Detection Method",
58
+ * description: "How this incident was detected.",
59
+ * fieldType: "single_select",
60
+ * });
61
+ * ```
62
+ *
63
+ * ## Example - Multi-select
64
+ *
65
+ * ```typescript
66
+ * import * as pulumi from "@pulumi/pulumi";
67
+ * import * as incident from "@incident-io/pulumi";
68
+ *
69
+ * // Multi-select: like single-select, but more than one option can be picked
70
+ * // (e.g. Affected Teams). Options are managed separately with
71
+ * // incident_custom_field_option.
72
+ * const affectedTeams = new incident.CustomField("affected_teams", {
73
+ * name: "Affected Teams",
74
+ * description: "The teams that are affected by this incident.",
75
+ * fieldType: "multi_select",
76
+ * });
77
+ * ```
78
+ *
79
+ * ## Example - Text
80
+ *
81
+ * ```typescript
82
+ * import * as pulumi from "@pulumi/pulumi";
83
+ * import * as incident from "@incident-io/pulumi";
84
+ *
85
+ * // Text: a freeform text field (e.g. Customer ID).
86
+ * const customerId = new incident.CustomField("customer_id", {
87
+ * name: "Customer ID",
88
+ * description: "The customer identifier associated with this incident.",
89
+ * fieldType: "text",
90
+ * });
91
+ * ```
92
+ *
93
+ * ## Example - Link
94
+ *
95
+ * ```typescript
96
+ * import * as pulumi from "@pulumi/pulumi";
97
+ * import * as incident from "@incident-io/pulumi";
98
+ *
99
+ * // Link: a URL synced to Slack bookmarks on the incident channel
100
+ * // (e.g. External Status Page).
101
+ * const externalStatusPage = new incident.CustomField("external_status_page", {
102
+ * name: "External Status Page",
103
+ * description: "Link to the external status page for this incident.",
104
+ * fieldType: "link",
105
+ * });
106
+ * ```
107
+ *
108
+ * ## Example - Numeric
109
+ *
110
+ * ```typescript
111
+ * import * as pulumi from "@pulumi/pulumi";
112
+ * import * as incident from "@incident-io/pulumi";
113
+ *
114
+ * // Numeric: an integer or fractional number (e.g. Customers Affected).
115
+ * const customersAffected = new incident.CustomField("customers_affected", {
116
+ * name: "Customers Affected",
117
+ * description: "How many customers are affected by this incident.",
118
+ * fieldType: "numeric",
119
+ * });
120
+ * ```
121
+ *
122
+ * ## Example - Catalog-backed with a fixed filter
123
+ *
124
+ * ```typescript
125
+ * import * as pulumi from "@pulumi/pulumi";
126
+ * import * as incident from "@incident-io/pulumi";
127
+ *
128
+ * // Catalog-backed fields can offer a restricted set of options, rather than every
129
+ * // entry of their catalog type.
130
+ * const service = new incident.CatalogType("service", {
131
+ * name: "Service",
132
+ * description: "All services that we run across our product",
133
+ * sourceRepoUrl: "",
134
+ * });
135
+ * const serviceTier = new incident.CatalogType("service_tier", {
136
+ * name: "Service Tier",
137
+ * description: "Level of importance for each service",
138
+ * sourceRepoUrl: "",
139
+ * });
140
+ * const serviceServiceTier = new incident.CatalogTypeAttribute("service_service_tier", {
141
+ * catalogTypeId: service.id,
142
+ * name: "Tier",
143
+ * type: serviceTier.typeName,
144
+ * });
145
+ * const tierOne = new incident.CatalogEntry("tier_one", {
146
+ * catalogTypeId: serviceTier.id,
147
+ * name: "Tier 1",
148
+ * attributeValues: [],
149
+ * });
150
+ * // Offer only our tier 1 services, on every incident. `fixed_filter` restricts the
151
+ * // options to entries whose Tier attribute is one of the listed values - unlike
152
+ * // `filter_by`, which follows another custom field's value on the incident.
153
+ * const affectedTierOneService = new incident.CustomField("affected_tier_one_service", {
154
+ * name: "Affected tier 1 service",
155
+ * description: "The tier 1 service that is affected by this incident.",
156
+ * fieldType: "single_select",
157
+ * catalogTypeId: service.id,
158
+ * fixedFilter: {
159
+ * catalogAttributeId: serviceServiceTier.id,
160
+ * values: [tierOne.id],
161
+ * },
162
+ * });
163
+ * ```
164
+ */
165
+ class CustomField extends pulumi.CustomResource {
166
+ /**
167
+ * Get an existing CustomField resource's state with the given name, ID, and optional extra
168
+ * properties used to qualify the lookup.
169
+ *
170
+ * @param name The _unique_ name of the resulting resource.
171
+ * @param id The _unique_ provider ID of the resource to lookup.
172
+ * @param state Any extra arguments used during the lookup.
173
+ * @param opts Optional settings to control the behavior of the CustomResource.
174
+ */
175
+ static get(name, id, state, opts) {
176
+ return new CustomField(name, state, { ...opts, id: id });
177
+ }
178
+ /** @internal */
179
+ static __pulumiType = 'incident:index/customField:CustomField';
180
+ /**
181
+ * Returns true if the given object is an instance of CustomField. This is designed to work even
182
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
183
+ */
184
+ static isInstance(obj) {
185
+ if (obj === undefined || obj === null) {
186
+ return false;
187
+ }
188
+ return obj['__pulumiType'] === CustomField.__pulumiType;
189
+ }
190
+ constructor(name, argsOrState, opts) {
191
+ let resourceInputs = {};
192
+ opts = opts || {};
193
+ if (opts.id) {
194
+ const state = argsOrState;
195
+ resourceInputs["catalogTypeId"] = state?.catalogTypeId;
196
+ resourceInputs["description"] = state?.description;
197
+ resourceInputs["fieldType"] = state?.fieldType;
198
+ resourceInputs["filterBy"] = state?.filterBy;
199
+ resourceInputs["fixedFilter"] = state?.fixedFilter;
200
+ resourceInputs["groupByCatalogAttributeId"] = state?.groupByCatalogAttributeId;
201
+ resourceInputs["helptextCatalogAttributeId"] = state?.helptextCatalogAttributeId;
202
+ resourceInputs["name"] = state?.name;
203
+ }
204
+ else {
205
+ const args = argsOrState;
206
+ if (args?.description === undefined && !opts.urn) {
207
+ throw new Error("Missing required property 'description'");
208
+ }
209
+ if (args?.fieldType === undefined && !opts.urn) {
210
+ throw new Error("Missing required property 'fieldType'");
211
+ }
212
+ resourceInputs["catalogTypeId"] = args?.catalogTypeId;
213
+ resourceInputs["description"] = args?.description;
214
+ resourceInputs["fieldType"] = args?.fieldType;
215
+ resourceInputs["filterBy"] = args?.filterBy;
216
+ resourceInputs["fixedFilter"] = args?.fixedFilter;
217
+ resourceInputs["groupByCatalogAttributeId"] = args?.groupByCatalogAttributeId;
218
+ resourceInputs["helptextCatalogAttributeId"] = args?.helptextCatalogAttributeId;
219
+ resourceInputs["name"] = args?.name;
220
+ }
221
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
222
+ super(CustomField.__pulumiType, name, resourceInputs, opts);
223
+ }
224
+ }
225
+ exports.CustomField = CustomField;
226
+ //# sourceMappingURL=customField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customField.js","sourceRoot":"","sources":["../customField.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqIG;AACH,MAAa,WAAY,SAAQ,MAAM,CAAC,cAAc;IAClD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAwB,EAAE,IAAmC;QACtH,OAAO,IAAI,WAAW,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,gBAAgB;IACT,MAAM,CAAU,YAAY,GAAG,wCAAwC,CAAC;IAE/E;;;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,WAAW,CAAC,YAAY,CAAC;IAC5D,CAAC;IAwCD,YAAY,IAAY,EAAE,WAAgD,EAAE,IAAmC;QAC3G,IAAI,c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GAAG,IAAI,EAAE,WAAW,CAAC;YAClD,cAAc,CAAC,2BAA2B,CAAC,GAAG,IAAI,EAAE,yBAAyB,CAAC;YAC9E,cAAc,CAAC,4BAA4B,CAAC,GAAG,IAAI,EAAE,0BAA0B,CAAC;YAChF,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;SACvC;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;;AAlGL,kCAmGC"}
@@ -0,0 +1,107 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * Manage custom field options.
4
+ *
5
+ * Single- and multi-select custom fields have a list of all available options,
6
+ * which have a value, and a sort key. The value must be unique to the custom
7
+ * field. For example, you might have an Incident Type custom field, with options
8
+ * "Data breach", "Performance degradation", "API downtime", etc.
9
+ *
10
+ * ## Example Usage
11
+ *
12
+ * ```typescript
13
+ * import * as pulumi from "@pulumi/pulumi";
14
+ * import * as incident from "@incident-io/pulumi";
15
+ *
16
+ * // Create an Affected Teams custom field that we'll create options against.
17
+ * const affectedTeams = new incident.CustomField("affected_teams", {
18
+ * name: "Affected Teams",
19
+ * description: "The teams that are affected by this incident.",
20
+ * fieldType: "multi_select",
21
+ * });
22
+ * // Create several teams against the parent custom field.
23
+ * const teams: {[key: string]: incident.CustomFieldOption} = {};
24
+ * for (const range of Object.entries([
25
+ * "Payments",
26
+ * "Dashboard",
27
+ * "API",
28
+ * ].reduce((__obj, entry) => ({ ...__obj, [entry]: entry }), {})).sort().map(([k, v]) => ({key: k, value: v}))) {
29
+ * teams[range.key] = new incident.CustomFieldOption(`teams-${range.key}`, {
30
+ * customFieldId: affectedTeams.id,
31
+ * value: range.value,
32
+ * });
33
+ * }
34
+ * ```
35
+ */
36
+ export declare class CustomFieldOption extends pulumi.CustomResource {
37
+ /**
38
+ * Get an existing CustomFieldOption resource's state with the given name, ID, and optional extra
39
+ * properties used to qualify the lookup.
40
+ *
41
+ * @param name The _unique_ name of the resulting resource.
42
+ * @param id The _unique_ provider ID of the resource to lookup.
43
+ * @param state Any extra arguments used during the lookup.
44
+ * @param opts Optional settings to control the behavior of the CustomResource.
45
+ */
46
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CustomFieldOptionState, opts?: pulumi.CustomResourceOptions): CustomFieldOption;
47
+ /**
48
+ * Returns true if the given object is an instance of CustomFieldOption. This is designed to work even
49
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
50
+ */
51
+ static isInstance(obj: any): obj is CustomFieldOption;
52
+ /**
53
+ * ID of the custom field this option belongs to
54
+ */
55
+ readonly customFieldId: pulumi.Output<string>;
56
+ /**
57
+ * Sort key used to order the custom field options correctly
58
+ */
59
+ readonly sortKey: pulumi.Output<number>;
60
+ /**
61
+ * Human readable name for the custom field option. Values must not start or end with whitespace, or contain tabs or newlines.
62
+ */
63
+ readonly value: pulumi.Output<string>;
64
+ /**
65
+ * Create a CustomFieldOption resource with the given unique name, arguments, and options.
66
+ *
67
+ * @param name The _unique_ name of the resource.
68
+ * @param args The arguments to use to populate this resource's properties.
69
+ * @param opts A bag of options that control this resource's behavior.
70
+ */
71
+ constructor(name: string, args: CustomFieldOptionArgs, opts?: pulumi.CustomResourceOptions);
72
+ }
73
+ /**
74
+ * Input properties used for looking up and filtering CustomFieldOption resources.
75
+ */
76
+ export interface CustomFieldOptionState {
77
+ /**
78
+ * ID of the custom field this option belongs to
79
+ */
80
+ customFieldId?: pulumi.Input<string | undefined>;
81
+ /**
82
+ * Sort key used to order the custom field options correctly
83
+ */
84
+ sortKey?: pulumi.Input<number | undefined>;
85
+ /**
86
+ * Human readable name for the custom field option. Values must not start or end with whitespace, or contain tabs or newlines.
87
+ */
88
+ value?: pulumi.Input<string | undefined>;
89
+ }
90
+ /**
91
+ * The set of arguments for constructing a CustomFieldOption resource.
92
+ */
93
+ export interface CustomFieldOptionArgs {
94
+ /**
95
+ * ID of the custom field this option belongs to
96
+ */
97
+ customFieldId: pulumi.Input<string>;
98
+ /**
99
+ * Sort key used to order the custom field options correctly
100
+ */
101
+ sortKey?: pulumi.Input<number | undefined>;
102
+ /**
103
+ * Human readable name for the custom field option. Values must not start or end with whitespace, or contain tabs or newlines.
104
+ */
105
+ value: pulumi.Input<string>;
106
+ }
107
+ //# sourceMappingURL=customFieldOption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customFieldOption.d.ts","sourceRoot":"","sources":["../customFieldOption.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,iBAAkB,SAAQ,MAAM,CAAC,cAAc;IACxD;;;;;;;;OAQG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,sBAAsB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,iBAAiB;IAOpJ;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,iBAAiB;IAO5D;;OAEG;IACH,SAAwB,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7D;;OAEG;IACH,SAAwB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACvD;;OAEG;IACH,SAAwB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAErD;;;;;;OAMG;gBACS,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB;CAwB7F;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACjD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC3C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAC/B"}
@@ -0,0 +1,116 @@
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.CustomFieldOption = void 0;
29
+ const pulumi = __importStar(require("@pulumi/pulumi"));
30
+ const utilities = __importStar(require("./utilities"));
31
+ /**
32
+ * Manage custom field options.
33
+ *
34
+ * Single- and multi-select custom fields have a list of all available options,
35
+ * which have a value, and a sort key. The value must be unique to the custom
36
+ * field. For example, you might have an Incident Type custom field, with options
37
+ * "Data breach", "Performance degradation", "API downtime", etc.
38
+ *
39
+ * ## Example Usage
40
+ *
41
+ * ```typescript
42
+ * import * as pulumi from "@pulumi/pulumi";
43
+ * import * as incident from "@incident-io/pulumi";
44
+ *
45
+ * // Create an Affected Teams custom field that we'll create options against.
46
+ * const affectedTeams = new incident.CustomField("affected_teams", {
47
+ * name: "Affected Teams",
48
+ * description: "The teams that are affected by this incident.",
49
+ * fieldType: "multi_select",
50
+ * });
51
+ * // Create several teams against the parent custom field.
52
+ * const teams: {[key: string]: incident.CustomFieldOption} = {};
53
+ * for (const range of Object.entries([
54
+ * "Payments",
55
+ * "Dashboard",
56
+ * "API",
57
+ * ].reduce((__obj, entry) => ({ ...__obj, [entry]: entry }), {})).sort().map(([k, v]) => ({key: k, value: v}))) {
58
+ * teams[range.key] = new incident.CustomFieldOption(`teams-${range.key}`, {
59
+ * customFieldId: affectedTeams.id,
60
+ * value: range.value,
61
+ * });
62
+ * }
63
+ * ```
64
+ */
65
+ class CustomFieldOption extends pulumi.CustomResource {
66
+ /**
67
+ * Get an existing CustomFieldOption resource's state with the given name, ID, and optional extra
68
+ * properties used to qualify the lookup.
69
+ *
70
+ * @param name The _unique_ name of the resulting resource.
71
+ * @param id The _unique_ provider ID of the resource to lookup.
72
+ * @param state Any extra arguments used during the lookup.
73
+ * @param opts Optional settings to control the behavior of the CustomResource.
74
+ */
75
+ static get(name, id, state, opts) {
76
+ return new CustomFieldOption(name, state, { ...opts, id: id });
77
+ }
78
+ /** @internal */
79
+ static __pulumiType = 'incident:index/customFieldOption:CustomFieldOption';
80
+ /**
81
+ * Returns true if the given object is an instance of CustomFieldOption. This is designed to work even
82
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
83
+ */
84
+ static isInstance(obj) {
85
+ if (obj === undefined || obj === null) {
86
+ return false;
87
+ }
88
+ return obj['__pulumiType'] === CustomFieldOption.__pulumiType;
89
+ }
90
+ constructor(name, argsOrState, opts) {
91
+ let resourceInputs = {};
92
+ opts = opts || {};
93
+ if (opts.id) {
94
+ const state = argsOrState;
95
+ resourceInputs["customFieldId"] = state?.customFieldId;
96
+ resourceInputs["sortKey"] = state?.sortKey;
97
+ resourceInputs["value"] = state?.value;
98
+ }
99
+ else {
100
+ const args = argsOrState;
101
+ if (args?.customFieldId === undefined && !opts.urn) {
102
+ throw new Error("Missing required property 'customFieldId'");
103
+ }
104
+ if (args?.value === undefined && !opts.urn) {
105
+ throw new Error("Missing required property 'value'");
106
+ }
107
+ resourceInputs["customFieldId"] = args?.customFieldId;
108
+ resourceInputs["sortKey"] = args?.sortKey;
109
+ resourceInputs["value"] = args?.value;
110
+ }
111
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
112
+ super(CustomFieldOption.__pulumiType, name, resourceInputs, opts);
113
+ }
114
+ }
115
+ exports.CustomFieldOption = CustomFieldOption;
116
+ //# sourceMappingURL=customFieldOption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customFieldOption.js","sourceRoot":"","sources":["../customFieldOption.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AACzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAa,iBAAkB,SAAQ,MAAM,CAAC,cAAc;IACxD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC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