@incident-io/pulumi 0.1.2 → 0.3.0
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/alertRoute.d.ts +12 -0
- package/alertRoute.d.ts.map +1 -1
- package/alertRoute.js +2 -0
- package/alertRoute.js.map +1 -1
- package/alertSource.d.ts +15 -3
- package/alertSource.d.ts.map +1 -1
- package/alertSource.js +2 -0
- package/alertSource.js.map +1 -1
- package/alertSourceBeta.d.ts +15 -3
- package/alertSourceBeta.d.ts.map +1 -1
- package/alertSourceBeta.js +2 -0
- package/alertSourceBeta.js.map +1 -1
- package/announcementRule.d.ts +247 -0
- package/announcementRule.d.ts.map +1 -0
- package/announcementRule.js +175 -0
- package/announcementRule.js.map +1 -0
- package/announcementTemplate.d.ts +157 -0
- package/announcementTemplate.d.ts.map +1 -0
- package/announcementTemplate.js +148 -0
- package/announcementTemplate.js.map +1 -0
- package/apiKey.d.ts +12 -0
- package/apiKey.d.ts.map +1 -1
- package/apiKey.js +2 -0
- package/apiKey.js.map +1 -1
- package/catalogType.d.ts +12 -0
- package/catalogType.d.ts.map +1 -1
- package/catalogType.js +2 -0
- package/catalogType.js.map +1 -1
- package/config/vars.d.ts +1 -1
- package/escalationPath.d.ts +69 -15
- package/escalationPath.d.ts.map +1 -1
- package/escalationPath.js +8 -6
- package/escalationPath.js.map +1 -1
- package/escalationPathBeta.d.ts +69 -15
- package/escalationPathBeta.d.ts.map +1 -1
- package/escalationPathBeta.js +8 -6
- package/escalationPathBeta.js.map +1 -1
- package/escalationPathTemplate.d.ts +318 -0
- package/escalationPathTemplate.d.ts.map +1 -0
- package/escalationPathTemplate.js +253 -0
- package/escalationPathTemplate.js.map +1 -0
- package/getAlertSource.d.ts +5 -1
- package/getAlertSource.d.ts.map +1 -1
- package/getAlertSource.js.map +1 -1
- package/getAnnouncementRule.d.ts +138 -0
- package/getAnnouncementRule.d.ts.map +1 -0
- package/getAnnouncementRule.js +99 -0
- package/getAnnouncementRule.js.map +1 -0
- package/getAnnouncementTemplate.d.ts +148 -0
- package/getAnnouncementTemplate.d.ts.map +1 -0
- package/getAnnouncementTemplate.js +137 -0
- package/getAnnouncementTemplate.js.map +1 -0
- package/getCatalogType.d.ts +4 -0
- package/getCatalogType.d.ts.map +1 -1
- package/getCatalogType.js.map +1 -1
- package/getEscalationPath.d.ts +19 -1
- package/getEscalationPath.d.ts.map +1 -1
- package/getEscalationPath.js.map +1 -1
- package/getEscalationPathBeta.d.ts +19 -1
- package/getEscalationPathBeta.d.ts.map +1 -1
- package/getEscalationPathBeta.js.map +1 -1
- package/getIncidentForm.d.ts +96 -0
- package/getIncidentForm.d.ts.map +1 -0
- package/getIncidentForm.js +89 -0
- package/getIncidentForm.js.map +1 -0
- package/getIncidentTemplate.d.ts +4 -0
- package/getIncidentTemplate.d.ts.map +1 -1
- package/getIncidentTemplate.js.map +1 -1
- package/getPayConfig.d.ts +130 -0
- package/getPayConfig.d.ts.map +1 -0
- package/getPayConfig.js +99 -0
- package/getPayConfig.js.map +1 -0
- package/getPolicy.d.ts +1 -1
- package/getScheduleSyncRule.d.ts +4 -0
- package/getScheduleSyncRule.d.ts.map +1 -1
- package/getScheduleSyncRule.js.map +1 -1
- package/getStatusPage.d.ts +95 -0
- package/getStatusPage.d.ts.map +1 -0
- package/getStatusPage.js +93 -0
- package/getStatusPage.js.map +1 -0
- package/getStatusPageComponent.d.ts +75 -0
- package/getStatusPageComponent.d.ts.map +1 -0
- package/getStatusPageComponent.js +81 -0
- package/getStatusPageComponent.js.map +1 -0
- package/getUser.d.ts +24 -6
- package/getUser.d.ts.map +1 -1
- package/getUser.js.map +1 -1
- package/getWorkflow.d.ts +1 -0
- package/getWorkflow.d.ts.map +1 -1
- package/getWorkflow.js.map +1 -1
- package/incidentForm.d.ts +424 -0
- package/incidentForm.d.ts.map +1 -0
- package/incidentForm.js +408 -0
- package/incidentForm.js.map +1 -0
- package/incidentTemplate.d.ts +12 -0
- package/incidentTemplate.d.ts.map +1 -1
- package/incidentTemplate.js +2 -0
- package/incidentTemplate.js.map +1 -1
- package/index.d.ts +42 -0
- package/index.d.ts.map +1 -1
- package/index.js +61 -2
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/payConfig.d.ts +258 -0
- package/payConfig.d.ts.map +1 -0
- package/payConfig.js +213 -0
- package/payConfig.js.map +1 -0
- package/policy.d.ts +73 -17
- package/policy.d.ts.map +1 -1
- package/policy.js +42 -6
- package/policy.js.map +1 -1
- package/provider.d.ts +1 -1
- package/schedule.d.ts +12 -0
- package/schedule.d.ts.map +1 -1
- package/schedule.js +2 -0
- package/schedule.js.map +1 -1
- package/scheduleBeta.d.ts +12 -0
- package/scheduleBeta.d.ts.map +1 -1
- package/scheduleBeta.js +2 -0
- package/scheduleBeta.js.map +1 -1
- package/scheduleSyncRule.d.ts +12 -0
- package/scheduleSyncRule.d.ts.map +1 -1
- package/scheduleSyncRule.js +2 -0
- package/scheduleSyncRule.js.map +1 -1
- package/scheduleSyncTarget.d.ts +12 -0
- package/scheduleSyncTarget.d.ts.map +1 -1
- package/scheduleSyncTarget.js +2 -0
- package/scheduleSyncTarget.js.map +1 -1
- package/secret.d.ts +12 -0
- package/secret.d.ts.map +1 -1
- package/secret.js +2 -0
- package/secret.js.map +1 -1
- package/statusPageComponent.d.ts +120 -0
- package/statusPageComponent.d.ts.map +1 -0
- package/statusPageComponent.js +123 -0
- package/statusPageComponent.js.map +1 -0
- package/statusPageStructure.d.ts +151 -0
- package/statusPageStructure.d.ts.map +1 -0
- package/statusPageStructure.js +148 -0
- package/statusPageStructure.js.map +1 -0
- package/teamGroupingPreference.d.ts +164 -0
- package/teamGroupingPreference.d.ts.map +1 -0
- package/teamGroupingPreference.js +165 -0
- package/teamGroupingPreference.js.map +1 -0
- package/types/input.d.ts +5722 -4067
- package/types/input.d.ts.map +1 -1
- package/types/output.d.ts +4932 -2641
- package/types/output.d.ts.map +1 -1
- package/workflow.d.ts +12 -0
- package/workflow.d.ts.map +1 -1
- package/workflow.js +2 -0
- package/workflow.js.map +1 -1
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Manages the structure of a standalone status page: which components it shows, in what order, how they are grouped, and how each is displayed. The page itself is created in the incident.io dashboard; look it up with the `incident.getStatusPage` data source. Components come from `incident.StatusPageComponent`.
|
|
6
|
+
*
|
|
7
|
+
* A group keeps its ID across applies as long as its name does, so links to it stay valid. Renaming a group creates a new one. Display settings left out of the configuration keep whatever the page already has, so a structure adopted from the dashboard keeps its hidden components and uptime settings until the configuration says otherwise.
|
|
8
|
+
*
|
|
9
|
+
* Terraform claims the structure, so it cannot be edited in the dashboard; set `unlockInDashboard` to leave it editable there. Destroying this resource leaves the page's structure in place, since a page always has one; it only stops Terraform managing it. The API key needs the "Configure status pages" permission. Parent and customer pages build their structure from the catalog and cannot be managed here.
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as incident from "@incident-io/pulumi";
|
|
16
|
+
*
|
|
17
|
+
* // The page itself is created in the dashboard. Its components can be managed here.
|
|
18
|
+
* const _public = incident.getStatusPage({
|
|
19
|
+
* name: "Our public status page",
|
|
20
|
+
* });
|
|
21
|
+
* const website = new incident.StatusPageComponent("website", {name: "Website"});
|
|
22
|
+
* const api = new incident.StatusPageComponent("api", {name: "API"});
|
|
23
|
+
* const database = new incident.StatusPageComponent("database", {name: "Database"});
|
|
24
|
+
* // The structure is the page's layout: items appear in the order listed, each one either a
|
|
25
|
+
* // single component or a named group of components. Display settings are optional; one left
|
|
26
|
+
* // out keeps whatever the dashboard has.
|
|
27
|
+
* const publicStatusPageStructure = new incident.StatusPageStructure("public", {
|
|
28
|
+
* statusPageId: _public.then(_public => _public.id),
|
|
29
|
+
* displayUptimeMode: "chart_and_percentage",
|
|
30
|
+
* items: [
|
|
31
|
+
* {
|
|
32
|
+
* componentId: website.id,
|
|
33
|
+
* },
|
|
34
|
+
* {
|
|
35
|
+
* group: {
|
|
36
|
+
* name: "Backend",
|
|
37
|
+
* description: "The services behind the website",
|
|
38
|
+
* components: [
|
|
39
|
+
* {
|
|
40
|
+
* componentId: api.id,
|
|
41
|
+
* },
|
|
42
|
+
* {
|
|
43
|
+
* componentId: database.id,
|
|
44
|
+
* displayUptime: false,
|
|
45
|
+
* },
|
|
46
|
+
* ],
|
|
47
|
+
* },
|
|
48
|
+
* },
|
|
49
|
+
* ],
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* ## Import
|
|
54
|
+
*
|
|
55
|
+
* Import is supported using an `import` block or the `pulumi import` command:
|
|
56
|
+
*
|
|
57
|
+
* The `pulumi import` command can be used, for example:
|
|
58
|
+
*
|
|
59
|
+
* !/bin/bash
|
|
60
|
+
*
|
|
61
|
+
* Import a status page's structure using the status page's ID
|
|
62
|
+
* Replace the ID with a real ID from your incident.io organization
|
|
63
|
+
*
|
|
64
|
+
* ```sh
|
|
65
|
+
* $ pulumi import incident:index/statusPageStructure:StatusPageStructure example 01ABC123DEF456GHI789JKL
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare class StatusPageStructure extends pulumi.CustomResource {
|
|
69
|
+
/**
|
|
70
|
+
* Get an existing StatusPageStructure resource's state with the given name, ID, and optional extra
|
|
71
|
+
* properties used to qualify the lookup.
|
|
72
|
+
*
|
|
73
|
+
* @param name The _unique_ name of the resulting resource.
|
|
74
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
75
|
+
* @param state Any extra arguments used during the lookup.
|
|
76
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
77
|
+
*/
|
|
78
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: StatusPageStructureState, opts?: pulumi.CustomResourceOptions): StatusPageStructure;
|
|
79
|
+
/**
|
|
80
|
+
* Returns true if the given object is an instance of StatusPageStructure. This is designed to work even
|
|
81
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
82
|
+
*/
|
|
83
|
+
static isInstance(obj: any): obj is StatusPageStructure;
|
|
84
|
+
/**
|
|
85
|
+
* How the page shows uptime against its components: `chartAndPercentage`, `chartOnly` or `nothing`. Left out, the page keeps its current setting.
|
|
86
|
+
*/
|
|
87
|
+
readonly displayUptimeMode: pulumi.Output<string>;
|
|
88
|
+
/**
|
|
89
|
+
* The components and groups the page shows, in display order. Each item is either a single `componentId`, with its own `hidden` and `displayUptime`, or a `group`, not both.
|
|
90
|
+
*/
|
|
91
|
+
readonly items: pulumi.Output<outputs.StatusPageStructureItem[]>;
|
|
92
|
+
/**
|
|
93
|
+
* The ID of the status page whose structure this is. Changing it manages a different page's structure.
|
|
94
|
+
*/
|
|
95
|
+
readonly statusPageId: pulumi.Output<string>;
|
|
96
|
+
/**
|
|
97
|
+
* Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to `false`: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to `true` to leave the resource unclaimed — pair that with `lifecycle { ignoreChanges = [...] }` naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
|
|
98
|
+
*/
|
|
99
|
+
readonly unlockInDashboard: pulumi.Output<boolean | undefined>;
|
|
100
|
+
/**
|
|
101
|
+
* Create a StatusPageStructure resource with the given unique name, arguments, and options.
|
|
102
|
+
*
|
|
103
|
+
* @param name The _unique_ name of the resource.
|
|
104
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
105
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
106
|
+
*/
|
|
107
|
+
constructor(name: string, args: StatusPageStructureArgs, opts?: pulumi.CustomResourceOptions);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Input properties used for looking up and filtering StatusPageStructure resources.
|
|
111
|
+
*/
|
|
112
|
+
export interface StatusPageStructureState {
|
|
113
|
+
/**
|
|
114
|
+
* How the page shows uptime against its components: `chartAndPercentage`, `chartOnly` or `nothing`. Left out, the page keeps its current setting.
|
|
115
|
+
*/
|
|
116
|
+
displayUptimeMode?: pulumi.Input<string | undefined>;
|
|
117
|
+
/**
|
|
118
|
+
* The components and groups the page shows, in display order. Each item is either a single `componentId`, with its own `hidden` and `displayUptime`, or a `group`, not both.
|
|
119
|
+
*/
|
|
120
|
+
items?: pulumi.Input<pulumi.Input<inputs.StatusPageStructureItem>[] | undefined>;
|
|
121
|
+
/**
|
|
122
|
+
* The ID of the status page whose structure this is. Changing it manages a different page's structure.
|
|
123
|
+
*/
|
|
124
|
+
statusPageId?: pulumi.Input<string | undefined>;
|
|
125
|
+
/**
|
|
126
|
+
* Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to `false`: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to `true` to leave the resource unclaimed — pair that with `lifecycle { ignoreChanges = [...] }` naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
|
|
127
|
+
*/
|
|
128
|
+
unlockInDashboard?: pulumi.Input<boolean | undefined>;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* The set of arguments for constructing a StatusPageStructure resource.
|
|
132
|
+
*/
|
|
133
|
+
export interface StatusPageStructureArgs {
|
|
134
|
+
/**
|
|
135
|
+
* How the page shows uptime against its components: `chartAndPercentage`, `chartOnly` or `nothing`. Left out, the page keeps its current setting.
|
|
136
|
+
*/
|
|
137
|
+
displayUptimeMode?: pulumi.Input<string | undefined>;
|
|
138
|
+
/**
|
|
139
|
+
* The components and groups the page shows, in display order. Each item is either a single `componentId`, with its own `hidden` and `displayUptime`, or a `group`, not both.
|
|
140
|
+
*/
|
|
141
|
+
items: pulumi.Input<pulumi.Input<inputs.StatusPageStructureItem>[]>;
|
|
142
|
+
/**
|
|
143
|
+
* The ID of the status page whose structure this is. Changing it manages a different page's structure.
|
|
144
|
+
*/
|
|
145
|
+
statusPageId: pulumi.Input<string>;
|
|
146
|
+
/**
|
|
147
|
+
* Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to `false`: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to `true` to leave the resource unclaimed — pair that with `lifecycle { ignoreChanges = [...] }` naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
|
|
148
|
+
*/
|
|
149
|
+
unlockInDashboard?: pulumi.Input<boolean | undefined>;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=statusPageStructure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusPageStructure.d.ts","sourceRoot":"","sources":["../statusPageStructure.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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,qBAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;IAC1D;;;;;;;;OAQG;WACW,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,wBAAwB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,qBAAqB,GAAG,mBAAmB;IAOxJ;;;OAGG;WACW,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,mBAAmB;IAO9D;;OAEG;IACH,SAAwB,iBAAiB,EAAE,MAAM,CAAC,MAAM,CAAC,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EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,148 @@
|
|
|
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.StatusPageStructure = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* Manages the structure of a standalone status page: which components it shows, in what order, how they are grouped, and how each is displayed. The page itself is created in the incident.io dashboard; look it up with the `incident.getStatusPage` data source. Components come from `incident.StatusPageComponent`.
|
|
33
|
+
*
|
|
34
|
+
* A group keeps its ID across applies as long as its name does, so links to it stay valid. Renaming a group creates a new one. Display settings left out of the configuration keep whatever the page already has, so a structure adopted from the dashboard keeps its hidden components and uptime settings until the configuration says otherwise.
|
|
35
|
+
*
|
|
36
|
+
* Terraform claims the structure, so it cannot be edited in the dashboard; set `unlockInDashboard` to leave it editable there. Destroying this resource leaves the page's structure in place, since a page always has one; it only stops Terraform managing it. The API key needs the "Configure status pages" permission. Parent and customer pages build their structure from the catalog and cannot be managed here.
|
|
37
|
+
*
|
|
38
|
+
* ## Example Usage
|
|
39
|
+
*
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
42
|
+
* import * as incident from "@incident-io/pulumi";
|
|
43
|
+
*
|
|
44
|
+
* // The page itself is created in the dashboard. Its components can be managed here.
|
|
45
|
+
* const _public = incident.getStatusPage({
|
|
46
|
+
* name: "Our public status page",
|
|
47
|
+
* });
|
|
48
|
+
* const website = new incident.StatusPageComponent("website", {name: "Website"});
|
|
49
|
+
* const api = new incident.StatusPageComponent("api", {name: "API"});
|
|
50
|
+
* const database = new incident.StatusPageComponent("database", {name: "Database"});
|
|
51
|
+
* // The structure is the page's layout: items appear in the order listed, each one either a
|
|
52
|
+
* // single component or a named group of components. Display settings are optional; one left
|
|
53
|
+
* // out keeps whatever the dashboard has.
|
|
54
|
+
* const publicStatusPageStructure = new incident.StatusPageStructure("public", {
|
|
55
|
+
* statusPageId: _public.then(_public => _public.id),
|
|
56
|
+
* displayUptimeMode: "chart_and_percentage",
|
|
57
|
+
* items: [
|
|
58
|
+
* {
|
|
59
|
+
* componentId: website.id,
|
|
60
|
+
* },
|
|
61
|
+
* {
|
|
62
|
+
* group: {
|
|
63
|
+
* name: "Backend",
|
|
64
|
+
* description: "The services behind the website",
|
|
65
|
+
* components: [
|
|
66
|
+
* {
|
|
67
|
+
* componentId: api.id,
|
|
68
|
+
* },
|
|
69
|
+
* {
|
|
70
|
+
* componentId: database.id,
|
|
71
|
+
* displayUptime: false,
|
|
72
|
+
* },
|
|
73
|
+
* ],
|
|
74
|
+
* },
|
|
75
|
+
* },
|
|
76
|
+
* ],
|
|
77
|
+
* });
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* ## Import
|
|
81
|
+
*
|
|
82
|
+
* Import is supported using an `import` block or the `pulumi import` command:
|
|
83
|
+
*
|
|
84
|
+
* The `pulumi import` command can be used, for example:
|
|
85
|
+
*
|
|
86
|
+
* !/bin/bash
|
|
87
|
+
*
|
|
88
|
+
* Import a status page's structure using the status page's ID
|
|
89
|
+
* Replace the ID with a real ID from your incident.io organization
|
|
90
|
+
*
|
|
91
|
+
* ```sh
|
|
92
|
+
* $ pulumi import incident:index/statusPageStructure:StatusPageStructure example 01ABC123DEF456GHI789JKL
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
class StatusPageStructure extends pulumi.CustomResource {
|
|
96
|
+
/**
|
|
97
|
+
* Get an existing StatusPageStructure resource's state with the given name, ID, and optional extra
|
|
98
|
+
* properties used to qualify the lookup.
|
|
99
|
+
*
|
|
100
|
+
* @param name The _unique_ name of the resulting resource.
|
|
101
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
102
|
+
* @param state Any extra arguments used during the lookup.
|
|
103
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
104
|
+
*/
|
|
105
|
+
static get(name, id, state, opts) {
|
|
106
|
+
return new StatusPageStructure(name, state, { ...opts, id: id });
|
|
107
|
+
}
|
|
108
|
+
/** @internal */
|
|
109
|
+
static __pulumiType = 'incident:index/statusPageStructure:StatusPageStructure';
|
|
110
|
+
/**
|
|
111
|
+
* Returns true if the given object is an instance of StatusPageStructure. This is designed to work even
|
|
112
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
113
|
+
*/
|
|
114
|
+
static isInstance(obj) {
|
|
115
|
+
if (obj === undefined || obj === null) {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
return obj['__pulumiType'] === StatusPageStructure.__pulumiType;
|
|
119
|
+
}
|
|
120
|
+
constructor(name, argsOrState, opts) {
|
|
121
|
+
let resourceInputs = {};
|
|
122
|
+
opts = opts || {};
|
|
123
|
+
if (opts.id) {
|
|
124
|
+
const state = argsOrState;
|
|
125
|
+
resourceInputs["displayUptimeMode"] = state?.displayUptimeMode;
|
|
126
|
+
resourceInputs["items"] = state?.items;
|
|
127
|
+
resourceInputs["statusPageId"] = state?.statusPageId;
|
|
128
|
+
resourceInputs["unlockInDashboard"] = state?.unlockInDashboard;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
const args = argsOrState;
|
|
132
|
+
if (args?.items === undefined && !opts.urn) {
|
|
133
|
+
throw new Error("Missing required property 'items'");
|
|
134
|
+
}
|
|
135
|
+
if (args?.statusPageId === undefined && !opts.urn) {
|
|
136
|
+
throw new Error("Missing required property 'statusPageId'");
|
|
137
|
+
}
|
|
138
|
+
resourceInputs["displayUptimeMode"] = args?.displayUptimeMode;
|
|
139
|
+
resourceInputs["items"] = args?.items;
|
|
140
|
+
resourceInputs["statusPageId"] = args?.statusPageId;
|
|
141
|
+
resourceInputs["unlockInDashboard"] = args?.unlockInDashboard;
|
|
142
|
+
}
|
|
143
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
144
|
+
super(StatusPageStructure.__pulumiType, name, resourceInputs, opts);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.StatusPageStructure = StatusPageStructure;
|
|
148
|
+
//# sourceMappingURL=statusPageStructure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusPageStructure.js","sourceRoot":"","sources":["../statusPageStructure.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEj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AAG,EAAE;gBACxC,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;aACxD;YACD,IAAI,IAAI,EAAE,YAAY,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC/C,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;aAC/D;YACD,cAAc,CAAC,mBAAmB,CAAC,GAAG,IAAI,EAAE,iBAAiB,CAAC;YAC9D,cAAc,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC;YACtC,cAAc,CAAC,cAAc,CAAC,GAAG,IAAI,EAAE,YAAY,CAAC;YACpD,cAAc,CAAC,mBAAmB,CAAC,GAAG,IAAI,EAAE,iBAAiB,CAAC;SACjE;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,mBAAmB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;;AA7EL,kDA8EC"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Manage how each team's alerts are grouped, on every alert route.
|
|
6
|
+
*
|
|
7
|
+
* A team's grouping preference takes priority over the default grouping of any alert route its alerts match. A team without one groups by each route's own settings.
|
|
8
|
+
*
|
|
9
|
+
* A team has at most one preference, and it cannot move to another team: changing `teamId` destroys the
|
|
10
|
+
* preference and creates one for the new team. The settings use the field names of an alert route's
|
|
11
|
+
* `groupingConfig`, so a team's preference can be written by copying the route block it replaces.
|
|
12
|
+
*
|
|
13
|
+
* Writing a preference needs team grouping preferences enabled for your organisation. Until then the
|
|
14
|
+
* API refuses to create, update or delete one, and this resource fails at apply with that message.
|
|
15
|
+
*
|
|
16
|
+
* ## Example Usage
|
|
17
|
+
*
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
20
|
+
* import * as incident from "@incident-io/pulumi";
|
|
21
|
+
*
|
|
22
|
+
* // A team's grouping preference applies to that team's alerts on every alert route they
|
|
23
|
+
* // match, ahead of each route's own grouping. Teams are catalog entries of your Team type,
|
|
24
|
+
* // so look the team up rather than hardcoding its ID.
|
|
25
|
+
* const team = incident.getCatalogType({
|
|
26
|
+
* name: "Team",
|
|
27
|
+
* });
|
|
28
|
+
* const platform = team.then(team => incident.getCatalogEntry({
|
|
29
|
+
* catalogTypeId: team.id,
|
|
30
|
+
* identifier: "Platform",
|
|
31
|
+
* }));
|
|
32
|
+
* // Group the Platform team's alerts by title and service, in a rolling 30 minute window.
|
|
33
|
+
* // The settings take the same field names as an alert route's grouping_config.
|
|
34
|
+
* const platformTeamGroupingPreference = new incident.TeamGroupingPreference("platform", {
|
|
35
|
+
* teamId: platform.then(platform => platform.id),
|
|
36
|
+
* "default": {
|
|
37
|
+
* settings: {
|
|
38
|
+
* enabled: true,
|
|
39
|
+
* windowType: "rolling",
|
|
40
|
+
* windowSeconds: 1800,
|
|
41
|
+
* groupingKeys: [
|
|
42
|
+
* {
|
|
43
|
+
* reference: "alert.title",
|
|
44
|
+
* },
|
|
45
|
+
* {
|
|
46
|
+
* reference: "alert.attributes.01H5EXAMPLESERVICEATTRIBUTE",
|
|
47
|
+
* },
|
|
48
|
+
* ],
|
|
49
|
+
* },
|
|
50
|
+
* },
|
|
51
|
+
* });
|
|
52
|
+
* // A preference can also switch grouping off for a team, so none of its alerts group
|
|
53
|
+
* // however the routes they match are configured. A disabled preference carries no window
|
|
54
|
+
* // or keys.
|
|
55
|
+
* const payments = team.then(team => incident.getCatalogEntry({
|
|
56
|
+
* catalogTypeId: team.id,
|
|
57
|
+
* identifier: "Payments",
|
|
58
|
+
* }));
|
|
59
|
+
* const paymentsTeamGroupingPreference = new incident.TeamGroupingPreference("payments", {
|
|
60
|
+
* teamId: payments.then(payments => payments.id),
|
|
61
|
+
* "default": {
|
|
62
|
+
* settings: {
|
|
63
|
+
* enabled: false,
|
|
64
|
+
* },
|
|
65
|
+
* },
|
|
66
|
+
* });
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* ## Import
|
|
70
|
+
*
|
|
71
|
+
* Import is supported using an `import` block or the `pulumi import` command:
|
|
72
|
+
*
|
|
73
|
+
* The `pulumi import` command can be used, for example:
|
|
74
|
+
*
|
|
75
|
+
* !/bin/bash
|
|
76
|
+
*
|
|
77
|
+
* Import a team grouping preference using its ID. Replace the ID with a real ID from your
|
|
78
|
+
* incident.io organization: the Grouping tab of alert routing lists each team's preference,
|
|
79
|
+
* and the public API's list endpoint filters them by team_id.
|
|
80
|
+
*
|
|
81
|
+
* ```sh
|
|
82
|
+
* $ pulumi import incident:index/teamGroupingPreference:TeamGroupingPreference example 01ABC123DEF456GHI789JKL
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export declare class TeamGroupingPreference extends pulumi.CustomResource {
|
|
86
|
+
/**
|
|
87
|
+
* Get an existing TeamGroupingPreference resource's state with the given name, ID, and optional extra
|
|
88
|
+
* properties used to qualify the lookup.
|
|
89
|
+
*
|
|
90
|
+
* @param name The _unique_ name of the resulting resource.
|
|
91
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
92
|
+
* @param state Any extra arguments used during the lookup.
|
|
93
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
94
|
+
*/
|
|
95
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TeamGroupingPreferenceState, opts?: pulumi.CustomResourceOptions): TeamGroupingPreference;
|
|
96
|
+
/**
|
|
97
|
+
* Returns true if the given object is an instance of TeamGroupingPreference. This is designed to work even
|
|
98
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
99
|
+
*/
|
|
100
|
+
static isInstance(obj: any): obj is TeamGroupingPreference;
|
|
101
|
+
/**
|
|
102
|
+
* The grouping settings applied to this team's alerts on every alert route they match.
|
|
103
|
+
*/
|
|
104
|
+
readonly default: pulumi.Output<outputs.TeamGroupingPreferenceDefault>;
|
|
105
|
+
/**
|
|
106
|
+
* The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
|
|
107
|
+
*/
|
|
108
|
+
readonly teamId: pulumi.Output<string>;
|
|
109
|
+
/**
|
|
110
|
+
* Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to `false`: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to `true` to leave the resource unclaimed — pair that with `lifecycle { ignoreChanges = [...] }` naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
|
|
111
|
+
*/
|
|
112
|
+
readonly unlockInDashboard: pulumi.Output<boolean | undefined>;
|
|
113
|
+
/**
|
|
114
|
+
* The current version number, incremented on each update
|
|
115
|
+
*/
|
|
116
|
+
readonly version: pulumi.Output<number>;
|
|
117
|
+
/**
|
|
118
|
+
* Create a TeamGroupingPreference resource with the given unique name, arguments, and options.
|
|
119
|
+
*
|
|
120
|
+
* @param name The _unique_ name of the resource.
|
|
121
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
122
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
123
|
+
*/
|
|
124
|
+
constructor(name: string, args: TeamGroupingPreferenceArgs, opts?: pulumi.CustomResourceOptions);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Input properties used for looking up and filtering TeamGroupingPreference resources.
|
|
128
|
+
*/
|
|
129
|
+
export interface TeamGroupingPreferenceState {
|
|
130
|
+
/**
|
|
131
|
+
* The grouping settings applied to this team's alerts on every alert route they match.
|
|
132
|
+
*/
|
|
133
|
+
default?: pulumi.Input<inputs.TeamGroupingPreferenceDefault | undefined>;
|
|
134
|
+
/**
|
|
135
|
+
* The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
|
|
136
|
+
*/
|
|
137
|
+
teamId?: pulumi.Input<string | undefined>;
|
|
138
|
+
/**
|
|
139
|
+
* Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to `false`: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to `true` to leave the resource unclaimed — pair that with `lifecycle { ignoreChanges = [...] }` naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
|
|
140
|
+
*/
|
|
141
|
+
unlockInDashboard?: pulumi.Input<boolean | undefined>;
|
|
142
|
+
/**
|
|
143
|
+
* The current version number, incremented on each update
|
|
144
|
+
*/
|
|
145
|
+
version?: pulumi.Input<number | undefined>;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The set of arguments for constructing a TeamGroupingPreference resource.
|
|
149
|
+
*/
|
|
150
|
+
export interface TeamGroupingPreferenceArgs {
|
|
151
|
+
/**
|
|
152
|
+
* The grouping settings applied to this team's alerts on every alert route they match.
|
|
153
|
+
*/
|
|
154
|
+
default: pulumi.Input<inputs.TeamGroupingPreferenceDefault>;
|
|
155
|
+
/**
|
|
156
|
+
* The catalog entry ID of the team this preference belongs to A preference cannot move to another team, so changing this replaces it.
|
|
157
|
+
*/
|
|
158
|
+
teamId: pulumi.Input<string>;
|
|
159
|
+
/**
|
|
160
|
+
* Whether to leave this resource unlocked in the incident.io dashboard, so people can edit it there. Defaults to `false`: Terraform claims what it manages, and a claimed resource cannot be edited in the dashboard. Set it to `true` to leave the resource unclaimed — pair that with `lifecycle { ignoreChanges = [...] }` naming the attributes people edit, or the next apply reverts them. Setting it on a resource Terraform already claimed hands that resource back, and someone disconnecting one in the dashboard shows as no change.
|
|
161
|
+
*/
|
|
162
|
+
unlockInDashboard?: pulumi.Input<boolean | undefined>;
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=teamGroupingPreference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+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AAC,6BAA6B,GAAG,SAAS,CAAC,CAAC;IACzE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC1C;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IACtD;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,6BAA6B,CAAC,CAAC;IAC5D;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,165 @@
|
|
|
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.TeamGroupingPreference = void 0;
|
|
29
|
+
const pulumi = __importStar(require("@pulumi/pulumi"));
|
|
30
|
+
const utilities = __importStar(require("./utilities"));
|
|
31
|
+
/**
|
|
32
|
+
* Manage how each team's alerts are grouped, on every alert route.
|
|
33
|
+
*
|
|
34
|
+
* A team's grouping preference takes priority over the default grouping of any alert route its alerts match. A team without one groups by each route's own settings.
|
|
35
|
+
*
|
|
36
|
+
* A team has at most one preference, and it cannot move to another team: changing `teamId` destroys the
|
|
37
|
+
* preference and creates one for the new team. The settings use the field names of an alert route's
|
|
38
|
+
* `groupingConfig`, so a team's preference can be written by copying the route block it replaces.
|
|
39
|
+
*
|
|
40
|
+
* Writing a preference needs team grouping preferences enabled for your organisation. Until then the
|
|
41
|
+
* API refuses to create, update or delete one, and this resource fails at apply with that message.
|
|
42
|
+
*
|
|
43
|
+
* ## Example Usage
|
|
44
|
+
*
|
|
45
|
+
* ```typescript
|
|
46
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
47
|
+
* import * as incident from "@incident-io/pulumi";
|
|
48
|
+
*
|
|
49
|
+
* // A team's grouping preference applies to that team's alerts on every alert route they
|
|
50
|
+
* // match, ahead of each route's own grouping. Teams are catalog entries of your Team type,
|
|
51
|
+
* // so look the team up rather than hardcoding its ID.
|
|
52
|
+
* const team = incident.getCatalogType({
|
|
53
|
+
* name: "Team",
|
|
54
|
+
* });
|
|
55
|
+
* const platform = team.then(team => incident.getCatalogEntry({
|
|
56
|
+
* catalogTypeId: team.id,
|
|
57
|
+
* identifier: "Platform",
|
|
58
|
+
* }));
|
|
59
|
+
* // Group the Platform team's alerts by title and service, in a rolling 30 minute window.
|
|
60
|
+
* // The settings take the same field names as an alert route's grouping_config.
|
|
61
|
+
* const platformTeamGroupingPreference = new incident.TeamGroupingPreference("platform", {
|
|
62
|
+
* teamId: platform.then(platform => platform.id),
|
|
63
|
+
* "default": {
|
|
64
|
+
* settings: {
|
|
65
|
+
* enabled: true,
|
|
66
|
+
* windowType: "rolling",
|
|
67
|
+
* windowSeconds: 1800,
|
|
68
|
+
* groupingKeys: [
|
|
69
|
+
* {
|
|
70
|
+
* reference: "alert.title",
|
|
71
|
+
* },
|
|
72
|
+
* {
|
|
73
|
+
* reference: "alert.attributes.01H5EXAMPLESERVICEATTRIBUTE",
|
|
74
|
+
* },
|
|
75
|
+
* ],
|
|
76
|
+
* },
|
|
77
|
+
* },
|
|
78
|
+
* });
|
|
79
|
+
* // A preference can also switch grouping off for a team, so none of its alerts group
|
|
80
|
+
* // however the routes they match are configured. A disabled preference carries no window
|
|
81
|
+
* // or keys.
|
|
82
|
+
* const payments = team.then(team => incident.getCatalogEntry({
|
|
83
|
+
* catalogTypeId: team.id,
|
|
84
|
+
* identifier: "Payments",
|
|
85
|
+
* }));
|
|
86
|
+
* const paymentsTeamGroupingPreference = new incident.TeamGroupingPreference("payments", {
|
|
87
|
+
* teamId: payments.then(payments => payments.id),
|
|
88
|
+
* "default": {
|
|
89
|
+
* settings: {
|
|
90
|
+
* enabled: false,
|
|
91
|
+
* },
|
|
92
|
+
* },
|
|
93
|
+
* });
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* ## Import
|
|
97
|
+
*
|
|
98
|
+
* Import is supported using an `import` block or the `pulumi import` command:
|
|
99
|
+
*
|
|
100
|
+
* The `pulumi import` command can be used, for example:
|
|
101
|
+
*
|
|
102
|
+
* !/bin/bash
|
|
103
|
+
*
|
|
104
|
+
* Import a team grouping preference using its ID. Replace the ID with a real ID from your
|
|
105
|
+
* incident.io organization: the Grouping tab of alert routing lists each team's preference,
|
|
106
|
+
* and the public API's list endpoint filters them by team_id.
|
|
107
|
+
*
|
|
108
|
+
* ```sh
|
|
109
|
+
* $ pulumi import incident:index/teamGroupingPreference:TeamGroupingPreference example 01ABC123DEF456GHI789JKL
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
class TeamGroupingPreference extends pulumi.CustomResource {
|
|
113
|
+
/**
|
|
114
|
+
* Get an existing TeamGroupingPreference resource's state with the given name, ID, and optional extra
|
|
115
|
+
* properties used to qualify the lookup.
|
|
116
|
+
*
|
|
117
|
+
* @param name The _unique_ name of the resulting resource.
|
|
118
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
119
|
+
* @param state Any extra arguments used during the lookup.
|
|
120
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
121
|
+
*/
|
|
122
|
+
static get(name, id, state, opts) {
|
|
123
|
+
return new TeamGroupingPreference(name, state, { ...opts, id: id });
|
|
124
|
+
}
|
|
125
|
+
/** @internal */
|
|
126
|
+
static __pulumiType = 'incident:index/teamGroupingPreference:TeamGroupingPreference';
|
|
127
|
+
/**
|
|
128
|
+
* Returns true if the given object is an instance of TeamGroupingPreference. This is designed to work even
|
|
129
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
130
|
+
*/
|
|
131
|
+
static isInstance(obj) {
|
|
132
|
+
if (obj === undefined || obj === null) {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
return obj['__pulumiType'] === TeamGroupingPreference.__pulumiType;
|
|
136
|
+
}
|
|
137
|
+
constructor(name, argsOrState, opts) {
|
|
138
|
+
let resourceInputs = {};
|
|
139
|
+
opts = opts || {};
|
|
140
|
+
if (opts.id) {
|
|
141
|
+
const state = argsOrState;
|
|
142
|
+
resourceInputs["default"] = state?.default;
|
|
143
|
+
resourceInputs["teamId"] = state?.teamId;
|
|
144
|
+
resourceInputs["unlockInDashboard"] = state?.unlockInDashboard;
|
|
145
|
+
resourceInputs["version"] = state?.version;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
const args = argsOrState;
|
|
149
|
+
if (args?.default === undefined && !opts.urn) {
|
|
150
|
+
throw new Error("Missing required property 'default'");
|
|
151
|
+
}
|
|
152
|
+
if (args?.teamId === undefined && !opts.urn) {
|
|
153
|
+
throw new Error("Missing required property 'teamId'");
|
|
154
|
+
}
|
|
155
|
+
resourceInputs["default"] = args?.default;
|
|
156
|
+
resourceInputs["teamId"] = args?.teamId;
|
|
157
|
+
resourceInputs["unlockInDashboard"] = args?.unlockInDashboard;
|
|
158
|
+
resourceInputs["version"] = undefined /*out*/;
|
|
159
|
+
}
|
|
160
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
161
|
+
super(TeamGroupingPreference.__pulumiType, name, resourceInputs, opts);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
exports.TeamGroupingPreference = TeamGroupingPreference;
|
|
165
|
+
//# sourceMappingURL=teamGroupingPreference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teamGroupingPreference.js","sourceRoot":"","sources":["../teamGroupingPreference.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEjF,uDAAyC;AAGzC,uDAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AACH,MAAa,sBAAuB,SAAQ,MAAM,CAAC,cAAc;IAC7D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAmC,EAAE,IAAmC;QACjI,OAAO,IAAI,sBAAsB,CAAC,IAAI,EAAO,KA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