@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/catalogEntry.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
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.CatalogEntry = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* This resource manages a single entry for a given catalog type. It should be used when
|
|
33
|
+
* you're loading a small number (<100) of catalog entries and want to do so with a Terraform
|
|
34
|
+
* for_each, or you don't want terraform to remove any entries that it is not managing.
|
|
35
|
+
*
|
|
36
|
+
* If you're working with a large number of entries (>100) or want to be authoritative
|
|
37
|
+
* (remove anything Terraform does not manage) then prefer `incident.CatalogEntries`.
|
|
38
|
+
*
|
|
39
|
+
* ## Managing attributes on internal catalog types
|
|
40
|
+
*
|
|
41
|
+
* Some catalog types like Schedule are managed internally by incident.io - their entries are
|
|
42
|
+
* created and maintained by the product (e.g., the on-call system). You can't create or delete
|
|
43
|
+
* these entries via Terraform, but you can extend them with custom attributes.
|
|
44
|
+
*
|
|
45
|
+
* To do this:
|
|
46
|
+
* 1. Add a custom attribute to the catalog type via the incident.io web UI
|
|
47
|
+
* 2. Use data sources to look up the existing type, attribute, and entry
|
|
48
|
+
* 3. Set `managedAttributes` to manage only your custom attribute
|
|
49
|
+
*
|
|
50
|
+
* When you run `terraform destroy`, Terraform will clear the managed attributes rather than
|
|
51
|
+
* attempting to delete the entry.
|
|
52
|
+
*
|
|
53
|
+
* ## Example Usage
|
|
54
|
+
*
|
|
55
|
+
* ```typescript
|
|
56
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
57
|
+
* import * as incident from "@incident-io/pulumi";
|
|
58
|
+
*
|
|
59
|
+
* const serviceTiers = [
|
|
60
|
+
* {
|
|
61
|
+
* name: "tier_1",
|
|
62
|
+
* description: "Critical customer-facing services",
|
|
63
|
+
* externalId: "service-tier-1",
|
|
64
|
+
* },
|
|
65
|
+
* {
|
|
66
|
+
* name: "tier_2",
|
|
67
|
+
* description: "Either customers or internal user processes are impacted if this service fails",
|
|
68
|
+
* externalId: "service-tier-2",
|
|
69
|
+
* },
|
|
70
|
+
* {
|
|
71
|
+
* name: "tier_3",
|
|
72
|
+
* description: "Non-essential services",
|
|
73
|
+
* externalId: "service-tier-3",
|
|
74
|
+
* },
|
|
75
|
+
* ];
|
|
76
|
+
* const serviceTier = new incident.CatalogType("service_tier", {
|
|
77
|
+
* name: "Service Tier",
|
|
78
|
+
* description: "Level of importance for each service",
|
|
79
|
+
* sourceRepoUrl: "",
|
|
80
|
+
* });
|
|
81
|
+
* const serviceTierDescription = new incident.CatalogTypeAttribute("service_tier_description", {
|
|
82
|
+
* catalogTypeId: serviceTier.id,
|
|
83
|
+
* name: "Description",
|
|
84
|
+
* type: "Text",
|
|
85
|
+
* });
|
|
86
|
+
* const serviceTierCatalogEntry: {[key: string]: incident.CatalogEntry} = {};
|
|
87
|
+
* for (const range of Object.entries(serviceTiers.reduce((__obj, tier) => ({ ...__obj, [tier.name]: tier }), {})).sort().map(([k, v]) => ({key: k, value: v}))) {
|
|
88
|
+
* serviceTierCatalogEntry[range.key] = new incident.CatalogEntry(`service_tier-${range.key}`, {
|
|
89
|
+
* catalogTypeId: serviceTier.id,
|
|
90
|
+
* name: range.value.name,
|
|
91
|
+
* externalId: range.value.externalId,
|
|
92
|
+
* attributeValues: [{
|
|
93
|
+
* attribute: serviceTierDescription.id,
|
|
94
|
+
* value: range.value.description,
|
|
95
|
+
* }],
|
|
96
|
+
* });
|
|
97
|
+
* }
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
class CatalogEntry extends pulumi.CustomResource {
|
|
101
|
+
/**
|
|
102
|
+
* Get an existing CatalogEntry resource's state with the given name, ID, and optional extra
|
|
103
|
+
* properties used to qualify the lookup.
|
|
104
|
+
*
|
|
105
|
+
* @param name The _unique_ name of the resulting resource.
|
|
106
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
107
|
+
* @param state Any extra arguments used during the lookup.
|
|
108
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
109
|
+
*/
|
|
110
|
+
static get(name, id, state, opts) {
|
|
111
|
+
return new CatalogEntry(name, state, { ...opts, id: id });
|
|
112
|
+
}
|
|
113
|
+
/** @internal */
|
|
114
|
+
static __pulumiType = 'incident:index/catalogEntry:CatalogEntry';
|
|
115
|
+
/**
|
|
116
|
+
* Returns true if the given object is an instance of CatalogEntry. This is designed to work even
|
|
117
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
118
|
+
*/
|
|
119
|
+
static isInstance(obj) {
|
|
120
|
+
if (obj === undefined || obj === null) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
return obj['__pulumiType'] === CatalogEntry.__pulumiType;
|
|
124
|
+
}
|
|
125
|
+
constructor(name, argsOrState, opts) {
|
|
126
|
+
let resourceInputs = {};
|
|
127
|
+
opts = opts || {};
|
|
128
|
+
if (opts.id) {
|
|
129
|
+
const state = argsOrState;
|
|
130
|
+
resourceInputs["aliases"] = state?.aliases;
|
|
131
|
+
resourceInputs["attributeValues"] = state?.attributeValues;
|
|
132
|
+
resourceInputs["catalogTypeId"] = state?.catalogTypeId;
|
|
133
|
+
resourceInputs["externalId"] = state?.externalId;
|
|
134
|
+
resourceInputs["managedAttributes"] = state?.managedAttributes;
|
|
135
|
+
resourceInputs["name"] = state?.name;
|
|
136
|
+
resourceInputs["rank"] = state?.rank;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
const args = argsOrState;
|
|
140
|
+
if (args?.attributeValues === undefined && !opts.urn) {
|
|
141
|
+
throw new Error("Missing required property 'attributeValues'");
|
|
142
|
+
}
|
|
143
|
+
if (args?.catalogTypeId === undefined && !opts.urn) {
|
|
144
|
+
throw new Error("Missing required property 'catalogTypeId'");
|
|
145
|
+
}
|
|
146
|
+
resourceInputs["aliases"] = args?.aliases;
|
|
147
|
+
resourceInputs["attributeValues"] = args?.attributeValues;
|
|
148
|
+
resourceInputs["catalogTypeId"] = args?.catalogTypeId;
|
|
149
|
+
resourceInputs["externalId"] = args?.externalId;
|
|
150
|
+
resourceInputs["managedAttributes"] = args?.managedAttributes;
|
|
151
|
+
resourceInputs["name"] = args?.name;
|
|
152
|
+
resourceInputs["rank"] = args?.rank;
|
|
153
|
+
}
|
|
154
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
155
|
+
super(CatalogEntry.__pulumiType, name, resourceInputs, opts);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
exports.CatalogEntry = CatalogEntry;
|
|
159
|
+
//# sourceMappingURL=catalogEntry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogEntry.js","sourceRoot":"","sources":["../catalogEntry.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,MAAa,YAAa,SAAQ,MAAM,CAAC,cAAc;IACnD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAyB,EAAE,IAAmC;QACvH,OAAO,IAAI,YAAY,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACnE,CAAC;IAED,gBAAgB;IACT,MA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AAC,GAAG,IAAI,EAAE,OAAO,CAAC;YAC1C,cAAc,CAAC,iBAAiB,CAAC,GAAG,IAAI,EAAE,eAAe,CAAC;YAC1D,cAAc,CAAC,eAAe,CAAC,GAAG,IAAI,EAAE,aAAa,CAAC;YACtD,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC;YAChD,cAAc,CAAC,mBAAmB,CAAC,GAAG,IAAI,EAAE,iBAAiB,CAAC;YAC9D,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,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,YAAY,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;;AA5FL,oCA6FC"}
|
package/catalogType.d.ts
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Manage and browse catalog resources.
|
|
4
|
+
*
|
|
5
|
+
* Use the incident.io catalog to track services, teams, product features and anything
|
|
6
|
+
* else that helps build a map of your organisation. These different categories of thing
|
|
7
|
+
* become catalog types, and each instance (like a particular service or team) is a
|
|
8
|
+
* catalog entry.
|
|
9
|
+
*
|
|
10
|
+
* Each type is made up of a series of attributes, and each attribute has a type. Types
|
|
11
|
+
* can even have attributes that refer to other catalog types.
|
|
12
|
+
*
|
|
13
|
+
* We automatically create catalog types when you connect an integration, such as GitHub
|
|
14
|
+
* repositories or PagerDuty services and teams. You can use this API to create custom
|
|
15
|
+
* types, that are specifically tailored to your organisation.
|
|
16
|
+
*
|
|
17
|
+
* Examples might be a 'Service' type with an 'Alert channel' which you can point at a
|
|
18
|
+
* Slack channel, or 'Team' which specifies its 'Manager' and 'Technical Lead' as Slack
|
|
19
|
+
* users. You can then use these types to create powerful new workflows.
|
|
20
|
+
*
|
|
21
|
+
* Consider using our official [catalog importer](https://github.com/incident-io/catalog-importer).
|
|
22
|
+
* It can be used to sync catalog data from sources like local files or GitHub and push
|
|
23
|
+
* them into the incident.io catalog without having to directly interact with our public API.
|
|
24
|
+
*
|
|
25
|
+
* ## Example Usage
|
|
26
|
+
*
|
|
27
|
+
* ```typescript
|
|
28
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
29
|
+
* import * as incident from "@incident-io/pulumi";
|
|
30
|
+
*
|
|
31
|
+
* // Create a catalog type for a service tier, representing how important a service is.
|
|
32
|
+
* const serviceTier = new incident.CatalogType("service_tier", {
|
|
33
|
+
* name: "ServiceTier",
|
|
34
|
+
* typeName: "Custom[\"ServiceTier\"]",
|
|
35
|
+
* description: " How critical is this service, with tier 1 being the highest and 3 the lowest.\n",
|
|
36
|
+
* categories: ["service"],
|
|
37
|
+
* sourceRepoUrl: "https://github.com/mycompany/infrastructure",
|
|
38
|
+
* owningTeamIds: ["01FCNDV6P870EA6S7TK1DSYD5H"],
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare class CatalogType extends pulumi.CustomResource {
|
|
43
|
+
/**
|
|
44
|
+
* Get an existing CatalogType resource's state with the given name, ID, and optional extra
|
|
45
|
+
* properties used to qualify the lookup.
|
|
46
|
+
*
|
|
47
|
+
* @param name The _unique_ name of the resulting resource.
|
|
48
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
49
|
+
* @param state Any extra arguments used during the lookup.
|
|
50
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
51
|
+
*/
|
|
52
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CatalogTypeState, opts?: pulumi.CustomResourceOptions): CatalogType;
|
|
53
|
+
/**
|
|
54
|
+
* Returns true if the given object is an instance of CatalogType. This is designed to work even
|
|
55
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
56
|
+
*/
|
|
57
|
+
static isInstance(obj: any): obj is CatalogType;
|
|
58
|
+
/**
|
|
59
|
+
* How to refer to this type when saying that something holds its entries: the `type` of an alert attribute or catalog attribute, or the `as` of an engine expression. Take it from here rather than writing it out - a type that one of our integrations owns is referenced by its registry name rather than its ID, so the two don't have the same shape.
|
|
60
|
+
*/
|
|
61
|
+
readonly attributeType: pulumi.Output<string>;
|
|
62
|
+
/**
|
|
63
|
+
* The categories that this type belongs to, to be shown in the web dashboard. Possible values are: `customer`, `issue-tracker`, `product-feature`, `service`, `on-call`, `team`, `user`.
|
|
64
|
+
*/
|
|
65
|
+
readonly categories: pulumi.Output<string[]>;
|
|
66
|
+
/**
|
|
67
|
+
* Human readble description of this type
|
|
68
|
+
*/
|
|
69
|
+
readonly description: pulumi.Output<string>;
|
|
70
|
+
/**
|
|
71
|
+
* Name is the human readable name of this type
|
|
72
|
+
*/
|
|
73
|
+
readonly name: pulumi.Output<string>;
|
|
74
|
+
/**
|
|
75
|
+
* IDs of the teams that own this catalog type
|
|
76
|
+
*/
|
|
77
|
+
readonly owningTeamIds: pulumi.Output<string[] | undefined>;
|
|
78
|
+
/**
|
|
79
|
+
* The url of the external repository where this type is managed. Users will not be able to edit the catalog type (or its entries) via the UI, and will instead be provided a link to this URL.
|
|
80
|
+
*/
|
|
81
|
+
readonly sourceRepoUrl: pulumi.Output<string>;
|
|
82
|
+
/**
|
|
83
|
+
* The type name of this catalog type, to be used when defining attributes. This is immutable once a CatalogType has been created. For non-externally sync types, it must follow the pattern Custom["SomeName"]
|
|
84
|
+
*/
|
|
85
|
+
readonly typeName: pulumi.Output<string>;
|
|
86
|
+
/**
|
|
87
|
+
* If enabled, you can refer to entries of this type by their name, as well as their external ID and any aliases.
|
|
88
|
+
*/
|
|
89
|
+
readonly useNameAsIdentifier: pulumi.Output<boolean>;
|
|
90
|
+
/**
|
|
91
|
+
* Create a CatalogType resource with the given unique name, arguments, and options.
|
|
92
|
+
*
|
|
93
|
+
* @param name The _unique_ name of the resource.
|
|
94
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
95
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
96
|
+
*/
|
|
97
|
+
constructor(name: string, args: CatalogTypeArgs, opts?: pulumi.CustomResourceOptions);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Input properties used for looking up and filtering CatalogType resources.
|
|
101
|
+
*/
|
|
102
|
+
export interface CatalogTypeState {
|
|
103
|
+
/**
|
|
104
|
+
* How to refer to this type when saying that something holds its entries: the `type` of an alert attribute or catalog attribute, or the `as` of an engine expression. Take it from here rather than writing it out - a type that one of our integrations owns is referenced by its registry name rather than its ID, so the two don't have the same shape.
|
|
105
|
+
*/
|
|
106
|
+
attributeType?: pulumi.Input<string | undefined>;
|
|
107
|
+
/**
|
|
108
|
+
* The categories that this type belongs to, to be shown in the web dashboard. Possible values are: `customer`, `issue-tracker`, `product-feature`, `service`, `on-call`, `team`, `user`.
|
|
109
|
+
*/
|
|
110
|
+
categories?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
111
|
+
/**
|
|
112
|
+
* Human readble description of this type
|
|
113
|
+
*/
|
|
114
|
+
description?: pulumi.Input<string | undefined>;
|
|
115
|
+
/**
|
|
116
|
+
* Name is the human readable name of this type
|
|
117
|
+
*/
|
|
118
|
+
name?: pulumi.Input<string | undefined>;
|
|
119
|
+
/**
|
|
120
|
+
* IDs of the teams that own this catalog type
|
|
121
|
+
*/
|
|
122
|
+
owningTeamIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
123
|
+
/**
|
|
124
|
+
* The url of the external repository where this type is managed. Users will not be able to edit the catalog type (or its entries) via the UI, and will instead be provided a link to this URL.
|
|
125
|
+
*/
|
|
126
|
+
sourceRepoUrl?: pulumi.Input<string | undefined>;
|
|
127
|
+
/**
|
|
128
|
+
* The type name of this catalog type, to be used when defining attributes. This is immutable once a CatalogType has been created. For non-externally sync types, it must follow the pattern Custom["SomeName"]
|
|
129
|
+
*/
|
|
130
|
+
typeName?: pulumi.Input<string | undefined>;
|
|
131
|
+
/**
|
|
132
|
+
* If enabled, you can refer to entries of this type by their name, as well as their external ID and any aliases.
|
|
133
|
+
*/
|
|
134
|
+
useNameAsIdentifier?: pulumi.Input<boolean | undefined>;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The set of arguments for constructing a CatalogType resource.
|
|
138
|
+
*/
|
|
139
|
+
export interface CatalogTypeArgs {
|
|
140
|
+
/**
|
|
141
|
+
* The categories that this type belongs to, to be shown in the web dashboard. Possible values are: `customer`, `issue-tracker`, `product-feature`, `service`, `on-call`, `team`, `user`.
|
|
142
|
+
*/
|
|
143
|
+
categories?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
144
|
+
/**
|
|
145
|
+
* Human readble description of this type
|
|
146
|
+
*/
|
|
147
|
+
description: pulumi.Input<string>;
|
|
148
|
+
/**
|
|
149
|
+
* Name is the human readable name of this type
|
|
150
|
+
*/
|
|
151
|
+
name?: pulumi.Input<string | undefined>;
|
|
152
|
+
/**
|
|
153
|
+
* IDs of the teams that own this catalog type
|
|
154
|
+
*/
|
|
155
|
+
owningTeamIds?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
156
|
+
/**
|
|
157
|
+
* The url of the external repository where this type is managed. Users will not be able to edit the catalog type (or its entries) via the UI, and will instead be provided a link to this URL.
|
|
158
|
+
*/
|
|
159
|
+
sourceRepoUrl: pulumi.Input<string>;
|
|
160
|
+
/**
|
|
161
|
+
* The type name of this catalog type, to be used when defining attributes. This is immutable once a CatalogType has been created. For non-externally sync types, it must follow the pattern Custom["SomeName"]
|
|
162
|
+
*/
|
|
163
|
+
typeName?: pulumi.Input<string | undefined>;
|
|
164
|
+
/**
|
|
165
|
+
* If enabled, you can refer to entries of this type by their name, as well as their external ID and any aliases.
|
|
166
|
+
*/
|
|
167
|
+
useNameAsIdentifier?: pulumi.Input<boolean | undefined>;
|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;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;IACjE;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CAC3D"}
|
package/catalogType.js
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
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.CatalogType = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* Manage and browse catalog resources.
|
|
33
|
+
*
|
|
34
|
+
* Use the incident.io catalog to track services, teams, product features and anything
|
|
35
|
+
* else that helps build a map of your organisation. These different categories of thing
|
|
36
|
+
* become catalog types, and each instance (like a particular service or team) is a
|
|
37
|
+
* catalog entry.
|
|
38
|
+
*
|
|
39
|
+
* Each type is made up of a series of attributes, and each attribute has a type. Types
|
|
40
|
+
* can even have attributes that refer to other catalog types.
|
|
41
|
+
*
|
|
42
|
+
* We automatically create catalog types when you connect an integration, such as GitHub
|
|
43
|
+
* repositories or PagerDuty services and teams. You can use this API to create custom
|
|
44
|
+
* types, that are specifically tailored to your organisation.
|
|
45
|
+
*
|
|
46
|
+
* Examples might be a 'Service' type with an 'Alert channel' which you can point at a
|
|
47
|
+
* Slack channel, or 'Team' which specifies its 'Manager' and 'Technical Lead' as Slack
|
|
48
|
+
* users. You can then use these types to create powerful new workflows.
|
|
49
|
+
*
|
|
50
|
+
* Consider using our official [catalog importer](https://github.com/incident-io/catalog-importer).
|
|
51
|
+
* It can be used to sync catalog data from sources like local files or GitHub and push
|
|
52
|
+
* them into the incident.io catalog without having to directly interact with our public API.
|
|
53
|
+
*
|
|
54
|
+
* ## Example Usage
|
|
55
|
+
*
|
|
56
|
+
* ```typescript
|
|
57
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
58
|
+
* import * as incident from "@incident-io/pulumi";
|
|
59
|
+
*
|
|
60
|
+
* // Create a catalog type for a service tier, representing how important a service is.
|
|
61
|
+
* const serviceTier = new incident.CatalogType("service_tier", {
|
|
62
|
+
* name: "ServiceTier",
|
|
63
|
+
* typeName: "Custom[\"ServiceTier\"]",
|
|
64
|
+
* description: " How critical is this service, with tier 1 being the highest and 3 the lowest.\n",
|
|
65
|
+
* categories: ["service"],
|
|
66
|
+
* sourceRepoUrl: "https://github.com/mycompany/infrastructure",
|
|
67
|
+
* owningTeamIds: ["01FCNDV6P870EA6S7TK1DSYD5H"],
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
class CatalogType extends pulumi.CustomResource {
|
|
72
|
+
/**
|
|
73
|
+
* Get an existing CatalogType resource's state with the given name, ID, and optional extra
|
|
74
|
+
* properties used to qualify the lookup.
|
|
75
|
+
*
|
|
76
|
+
* @param name The _unique_ name of the resulting resource.
|
|
77
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
78
|
+
* @param state Any extra arguments used during the lookup.
|
|
79
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
80
|
+
*/
|
|
81
|
+
static get(name, id, state, opts) {
|
|
82
|
+
return new CatalogType(name, state, { ...opts, id: id });
|
|
83
|
+
}
|
|
84
|
+
/** @internal */
|
|
85
|
+
static __pulumiType = 'incident:index/catalogType:CatalogType';
|
|
86
|
+
/**
|
|
87
|
+
* Returns true if the given object is an instance of CatalogType. This is designed to work even
|
|
88
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
89
|
+
*/
|
|
90
|
+
static isInstance(obj) {
|
|
91
|
+
if (obj === undefined || obj === null) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
return obj['__pulumiType'] === CatalogType.__pulumiType;
|
|
95
|
+
}
|
|
96
|
+
constructor(name, argsOrState, opts) {
|
|
97
|
+
let resourceInputs = {};
|
|
98
|
+
opts = opts || {};
|
|
99
|
+
if (opts.id) {
|
|
100
|
+
const state = argsOrState;
|
|
101
|
+
resourceInputs["attributeType"] = state?.attributeType;
|
|
102
|
+
resourceInputs["categories"] = state?.categories;
|
|
103
|
+
resourceInputs["description"] = state?.description;
|
|
104
|
+
resourceInputs["name"] = state?.name;
|
|
105
|
+
resourceInputs["owningTeamIds"] = state?.owningTeamIds;
|
|
106
|
+
resourceInputs["sourceRepoUrl"] = state?.sourceRepoUrl;
|
|
107
|
+
resourceInputs["typeName"] = state?.typeName;
|
|
108
|
+
resourceInputs["useNameAsIdentifier"] = state?.useNameAsIdentifier;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
const args = argsOrState;
|
|
112
|
+
if (args?.description === undefined && !opts.urn) {
|
|
113
|
+
throw new Error("Missing required property 'description'");
|
|
114
|
+
}
|
|
115
|
+
if (args?.sourceRepoUrl === undefined && !opts.urn) {
|
|
116
|
+
throw new Error("Missing required property 'sourceRepoUrl'");
|
|
117
|
+
}
|
|
118
|
+
resourceInputs["categories"] = args?.categories;
|
|
119
|
+
resourceInputs["description"] = args?.description;
|
|
120
|
+
resourceInputs["name"] = args?.name;
|
|
121
|
+
resourceInputs["owningTeamIds"] = args?.owningTeamIds;
|
|
122
|
+
resourceInputs["sourceRepoUrl"] = args?.sourceRepoUrl;
|
|
123
|
+
resourceInputs["typeName"] = args?.typeName;
|
|
124
|
+
resourceInputs["useNameAsIdentifier"] = args?.useNameAsIdentifier;
|
|
125
|
+
resourceInputs["attributeType"] = undefined /*out*/;
|
|
126
|
+
}
|
|
127
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
128
|
+
super(CatalogType.__pulumiType, name, resourceInputs, opts);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.CatalogType = CatalogType;
|
|
132
|
+
//# sourceMappingURL=catalogType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogType.js","sourceRoot":"","sources":["../catalogType.ts"],"names":[],"mappings":";AAAA,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|
+
/**
|
|
3
|
+
* Manage and browse catalog resources.
|
|
4
|
+
*
|
|
5
|
+
* Use the incident.io catalog to track services, teams, product features and anything
|
|
6
|
+
* else that helps build a map of your organisation. These different categories of thing
|
|
7
|
+
* become catalog types, and each instance (like a particular service or team) is a
|
|
8
|
+
* catalog entry.
|
|
9
|
+
*
|
|
10
|
+
* Each type is made up of a series of attributes, and each attribute has a type. Types
|
|
11
|
+
* can even have attributes that refer to other catalog types.
|
|
12
|
+
*
|
|
13
|
+
* We automatically create catalog types when you connect an integration, such as GitHub
|
|
14
|
+
* repositories or PagerDuty services and teams. You can use this API to create custom
|
|
15
|
+
* types, that are specifically tailored to your organisation.
|
|
16
|
+
*
|
|
17
|
+
* Examples might be a 'Service' type with an 'Alert channel' which you can point at a
|
|
18
|
+
* Slack channel, or 'Team' which specifies its 'Manager' and 'Technical Lead' as Slack
|
|
19
|
+
* users. You can then use these types to create powerful new workflows.
|
|
20
|
+
*
|
|
21
|
+
* Consider using our official [catalog importer](https://github.com/incident-io/catalog-importer).
|
|
22
|
+
* It can be used to sync catalog data from sources like local files or GitHub and push
|
|
23
|
+
* them into the incident.io catalog without having to directly interact with our public API.
|
|
24
|
+
*
|
|
25
|
+
* ## Example Usage
|
|
26
|
+
*
|
|
27
|
+
* ```typescript
|
|
28
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
29
|
+
* import * as incident from "@incident-io/pulumi";
|
|
30
|
+
*
|
|
31
|
+
* const service = new incident.CatalogType("service", {
|
|
32
|
+
* name: "Service",
|
|
33
|
+
* description: "All services that we run across our product",
|
|
34
|
+
* sourceRepoUrl: "",
|
|
35
|
+
* });
|
|
36
|
+
* const serviceTier = new incident.CatalogType("service_tier", {
|
|
37
|
+
* name: "Service Tier",
|
|
38
|
+
* description: "Level of importance for each service",
|
|
39
|
+
* sourceRepoUrl: "",
|
|
40
|
+
* });
|
|
41
|
+
* const serviceDescription = new incident.CatalogTypeAttribute("service_description", {
|
|
42
|
+
* catalogTypeId: service.id,
|
|
43
|
+
* name: "Description",
|
|
44
|
+
* type: "Text",
|
|
45
|
+
* });
|
|
46
|
+
* const serviceTeam = new incident.CatalogTypeAttribute("service_team", {
|
|
47
|
+
* catalogTypeId: service.id,
|
|
48
|
+
* name: "Team",
|
|
49
|
+
* type: "Text",
|
|
50
|
+
* });
|
|
51
|
+
* const serviceServiceTier = new incident.CatalogTypeAttribute("service_service_tier", {
|
|
52
|
+
* catalogTypeId: service.id,
|
|
53
|
+
* name: "Tier",
|
|
54
|
+
* type: serviceTier.typeName,
|
|
55
|
+
* });
|
|
56
|
+
* // To create a backlink (i.e. Service tier -> Services)
|
|
57
|
+
* const serviceTierServices = new incident.CatalogTypeAttribute("service_tier_services", {
|
|
58
|
+
* catalogTypeId: serviceTier.id,
|
|
59
|
+
* name: "Services",
|
|
60
|
+
* type: service.typeName,
|
|
61
|
+
* backlinkAttribute: serviceServiceTier.id,
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export declare class CatalogTypeAttribute extends pulumi.CustomResource {
|
|
66
|
+
/**
|
|
67
|
+
* Get an existing CatalogTypeAttribute 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: string, id: pulumi.Input<pulumi.ID>, state?: CatalogTypeAttributeState, opts?: pulumi.CustomResourceOptions): CatalogTypeAttribute;
|
|
76
|
+
/**
|
|
77
|
+
* Returns true if the given object is an instance of CatalogTypeAttribute. This is designed to work even
|
|
78
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
79
|
+
*/
|
|
80
|
+
static isInstance(obj: any): obj is CatalogTypeAttribute;
|
|
81
|
+
/**
|
|
82
|
+
* Whether this attribute is an array or scalar.
|
|
83
|
+
*/
|
|
84
|
+
readonly array: pulumi.Output<boolean>;
|
|
85
|
+
/**
|
|
86
|
+
* If this is a backlink, the id of the attribute that it's linked from
|
|
87
|
+
*/
|
|
88
|
+
readonly backlinkAttribute: pulumi.Output<string | undefined>;
|
|
89
|
+
/**
|
|
90
|
+
* ID of this catalog type
|
|
91
|
+
*/
|
|
92
|
+
readonly catalogTypeId: pulumi.Output<string>;
|
|
93
|
+
/**
|
|
94
|
+
* The name of this attribute.
|
|
95
|
+
*/
|
|
96
|
+
readonly name: pulumi.Output<string>;
|
|
97
|
+
/**
|
|
98
|
+
* If this is a path attribute, the path that we should use to pull the data
|
|
99
|
+
*/
|
|
100
|
+
readonly paths: pulumi.Output<string[] | undefined>;
|
|
101
|
+
/**
|
|
102
|
+
* If true, Terraform will only manage the schema of the attribute. Values for this attribute can be managed from the incident.io web dashboard.
|
|
103
|
+
*
|
|
104
|
+
* NOTE: When enabled, you should use the `managedAttributes` argument on either `incident.CatalogEntry` or `incident.CatalogEntries` to manage the values of other attributes on this type, without Terraform overwriting values set in the dashboard.
|
|
105
|
+
*/
|
|
106
|
+
readonly schemaOnly: pulumi.Output<boolean>;
|
|
107
|
+
/**
|
|
108
|
+
* The type of this attribute. This is either one of the primitive types below, or a reference to any catalog type in your organisation.
|
|
109
|
+
*/
|
|
110
|
+
readonly type: pulumi.Output<string>;
|
|
111
|
+
/**
|
|
112
|
+
* Create a CatalogTypeAttribute resource with the given unique name, arguments, and options.
|
|
113
|
+
*
|
|
114
|
+
* @param name The _unique_ name of the resource.
|
|
115
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
116
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
117
|
+
*/
|
|
118
|
+
constructor(name: string, args: CatalogTypeAttributeArgs, opts?: pulumi.CustomResourceOptions);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Input properties used for looking up and filtering CatalogTypeAttribute resources.
|
|
122
|
+
*/
|
|
123
|
+
export interface CatalogTypeAttributeState {
|
|
124
|
+
/**
|
|
125
|
+
* Whether this attribute is an array or scalar.
|
|
126
|
+
*/
|
|
127
|
+
array?: pulumi.Input<boolean | undefined>;
|
|
128
|
+
/**
|
|
129
|
+
* If this is a backlink, the id of the attribute that it's linked from
|
|
130
|
+
*/
|
|
131
|
+
backlinkAttribute?: pulumi.Input<string | undefined>;
|
|
132
|
+
/**
|
|
133
|
+
* ID of this catalog type
|
|
134
|
+
*/
|
|
135
|
+
catalogTypeId?: pulumi.Input<string | undefined>;
|
|
136
|
+
/**
|
|
137
|
+
* The name of this attribute.
|
|
138
|
+
*/
|
|
139
|
+
name?: pulumi.Input<string | undefined>;
|
|
140
|
+
/**
|
|
141
|
+
* If this is a path attribute, the path that we should use to pull the data
|
|
142
|
+
*/
|
|
143
|
+
paths?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
144
|
+
/**
|
|
145
|
+
* If true, Terraform will only manage the schema of the attribute. Values for this attribute can be managed from the incident.io web dashboard.
|
|
146
|
+
*
|
|
147
|
+
* NOTE: When enabled, you should use the `managedAttributes` argument on either `incident.CatalogEntry` or `incident.CatalogEntries` to manage the values of other attributes on this type, without Terraform overwriting values set in the dashboard.
|
|
148
|
+
*/
|
|
149
|
+
schemaOnly?: pulumi.Input<boolean | undefined>;
|
|
150
|
+
/**
|
|
151
|
+
* The type of this attribute. This is either one of the primitive types below, or a reference to any catalog type in your organisation.
|
|
152
|
+
*/
|
|
153
|
+
type?: pulumi.Input<string | undefined>;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The set of arguments for constructing a CatalogTypeAttribute resource.
|
|
157
|
+
*/
|
|
158
|
+
export interface CatalogTypeAttributeArgs {
|
|
159
|
+
/**
|
|
160
|
+
* Whether this attribute is an array or scalar.
|
|
161
|
+
*/
|
|
162
|
+
array?: pulumi.Input<boolean | undefined>;
|
|
163
|
+
/**
|
|
164
|
+
* If this is a backlink, the id of the attribute that it's linked from
|
|
165
|
+
*/
|
|
166
|
+
backlinkAttribute?: pulumi.Input<string | undefined>;
|
|
167
|
+
/**
|
|
168
|
+
* ID of this catalog type
|
|
169
|
+
*/
|
|
170
|
+
catalogTypeId: pulumi.Input<string>;
|
|
171
|
+
/**
|
|
172
|
+
* The name of this attribute.
|
|
173
|
+
*/
|
|
174
|
+
name?: pulumi.Input<string | undefined>;
|
|
175
|
+
/**
|
|
176
|
+
* If this is a path attribute, the path that we should use to pull the data
|
|
177
|
+
*/
|
|
178
|
+
paths?: pulumi.Input<pulumi.Input<string>[] | undefined>;
|
|
179
|
+
/**
|
|
180
|
+
* If true, Terraform will only manage the schema of the attribute. Values for this attribute can be managed from the incident.io web dashboard.
|
|
181
|
+
*
|
|
182
|
+
* NOTE: When enabled, you should use the `managedAttributes` argument on either `incident.CatalogEntry` or `incident.CatalogEntries` to manage the values of other attributes on this type, without Terraform overwriting values set in the dashboard.
|
|
183
|
+
*/
|
|
184
|
+
schemaOnly?: pulumi.Input<boolean | undefined>;
|
|
185
|
+
/**
|
|
186
|
+
* The type of this attribute. This is either one of the primitive types below, or a reference to any catalog type in your organisation.
|
|
187
|
+
*/
|
|
188
|
+
type: pulumi.Input<string>;
|
|
189
|
+
}
|
|
190
|
+
//# sourceMappingURL=catalogTypeAttribute.d.ts.map
|