@pulumiverse/grafana 0.2.1-alpha.1709570924
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 +202 -0
- package/README.md +54 -0
- package/annotation.d.ts +151 -0
- package/annotation.js +79 -0
- package/annotation.js.map +1 -0
- package/apiKey.d.ts +77 -0
- package/apiKey.js +80 -0
- package/apiKey.js.map +1 -0
- package/cloudAccessPolicy.d.ts +156 -0
- package/cloudAccessPolicy.js +115 -0
- package/cloudAccessPolicy.js.map +1 -0
- package/cloudAccessPolicyToken.d.ts +151 -0
- package/cloudAccessPolicyToken.js +108 -0
- package/cloudAccessPolicyToken.js.map +1 -0
- package/cloudApiKey.d.ts +102 -0
- package/cloudApiKey.js +85 -0
- package/cloudApiKey.js.map +1 -0
- package/cloudPluginInstallation.d.ts +96 -0
- package/cloudPluginInstallation.js +86 -0
- package/cloudPluginInstallation.js.map +1 -0
- package/cloudStack.d.ts +291 -0
- package/cloudStack.js +142 -0
- package/cloudStack.js.map +1 -0
- package/cloudStackApiKey.d.ts +52 -0
- package/cloudStackApiKey.js +67 -0
- package/cloudStackApiKey.js.map +1 -0
- package/cloudStackServiceAccount.d.ts +97 -0
- package/cloudStackServiceAccount.js +80 -0
- package/cloudStackServiceAccount.js.map +1 -0
- package/cloudStackServiceAccountToken.d.ts +78 -0
- package/cloudStackServiceAccountToken.js +93 -0
- package/cloudStackServiceAccountToken.js.map +1 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +21 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +89 -0
- package/config/vars.js +131 -0
- package/config/vars.js.map +1 -0
- package/contactPoint.d.ts +310 -0
- package/contactPoint.js +119 -0
- package/contactPoint.js.map +1 -0
- package/dashboard.d.ts +154 -0
- package/dashboard.js +94 -0
- package/dashboard.js.map +1 -0
- package/dashboardPermission.d.ts +131 -0
- package/dashboardPermission.js +97 -0
- package/dashboardPermission.js.map +1 -0
- package/dataSource.d.ts +294 -0
- package/dataSource.js +164 -0
- package/dataSource.js.map +1 -0
- package/dataSourcePermission.d.ts +124 -0
- package/dataSourcePermission.js +109 -0
- package/dataSourcePermission.js.map +1 -0
- package/folder.d.ts +127 -0
- package/folder.js +95 -0
- package/folder.js.map +1 -0
- package/folderPermission.d.ts +106 -0
- package/folderPermission.js +91 -0
- package/folderPermission.js.map +1 -0
- package/getCloudIps.d.ts +56 -0
- package/getCloudIps.js +41 -0
- package/getCloudIps.js.map +1 -0
- package/getCloudOrganization.d.ts +37 -0
- package/getCloudOrganization.js +21 -0
- package/getCloudOrganization.js.map +1 -0
- package/getCloudStack.d.ts +130 -0
- package/getCloudStack.js +25 -0
- package/getCloudStack.js.map +1 -0
- package/getDashboard.d.ts +134 -0
- package/getDashboard.js +81 -0
- package/getDashboard.js.map +1 -0
- package/getDashboards.d.ts +74 -0
- package/getDashboards.js +36 -0
- package/getDashboards.js.map +1 -0
- package/getDataSource.d.ts +156 -0
- package/getDataSource.js +95 -0
- package/getDataSource.js.map +1 -0
- package/getFolder.d.ts +82 -0
- package/getFolder.js +59 -0
- package/getFolder.js.map +1 -0
- package/getFolders.d.ts +61 -0
- package/getFolders.js +61 -0
- package/getFolders.js.map +1 -0
- package/getLibraryPanel.d.ts +108 -0
- package/getLibraryPanel.js +28 -0
- package/getLibraryPanel.js.map +1 -0
- package/getOnCallSlackChannel.d.ts +66 -0
- package/getOnCallSlackChannel.js +47 -0
- package/getOnCallSlackChannel.js.map +1 -0
- package/getOncallAction.d.ts +46 -0
- package/getOncallAction.js +31 -0
- package/getOncallAction.js.map +1 -0
- package/getOncallEscalationChain.d.ts +62 -0
- package/getOncallEscalationChain.js +47 -0
- package/getOncallEscalationChain.js.map +1 -0
- package/getOncallOutgoingWebhook.d.ts +62 -0
- package/getOncallOutgoingWebhook.js +47 -0
- package/getOncallOutgoingWebhook.js.map +1 -0
- package/getOncallSchedule.d.ts +68 -0
- package/getOncallSchedule.js +49 -0
- package/getOncallSchedule.js.map +1 -0
- package/getOncallTeam.d.ts +60 -0
- package/getOncallTeam.js +43 -0
- package/getOncallTeam.js.map +1 -0
- package/getOncallUser.d.ts +70 -0
- package/getOncallUser.js +47 -0
- package/getOncallUser.js.map +1 -0
- package/getOncallUserGroup.d.ts +54 -0
- package/getOncallUserGroup.js +47 -0
- package/getOncallUserGroup.js.map +1 -0
- package/getOrganization.d.ts +94 -0
- package/getOrganization.js +67 -0
- package/getOrganization.js.map +1 -0
- package/getOrganizationPreferences.d.ts +62 -0
- package/getOrganizationPreferences.js +43 -0
- package/getOrganizationPreferences.js.map +1 -0
- package/getRole.d.ts +147 -0
- package/getRole.js +95 -0
- package/getRole.js.map +1 -0
- package/getSlos.d.ts +31 -0
- package/getSlos.js +31 -0
- package/getSlos.js.map +1 -0
- package/getSyntheticMonitoringProbe.d.ts +88 -0
- package/getSyntheticMonitoringProbe.js +47 -0
- package/getSyntheticMonitoringProbe.js.map +1 -0
- package/getSyntheticMonitoringProbes.d.ts +64 -0
- package/getSyntheticMonitoringProbes.js +44 -0
- package/getSyntheticMonitoringProbes.js.map +1 -0
- package/getTeam.d.ts +83 -0
- package/getTeam.js +67 -0
- package/getTeam.js.map +1 -0
- package/getUser.d.ts +128 -0
- package/getUser.js +84 -0
- package/getUser.js.map +1 -0
- package/getUsers.d.ts +61 -0
- package/getUsers.js +61 -0
- package/getUsers.js.map +1 -0
- package/index.d.ts +228 -0
- package/index.js +353 -0
- package/index.js.map +1 -0
- package/libraryPanel.d.ts +193 -0
- package/libraryPanel.js +103 -0
- package/libraryPanel.js.map +1 -0
- package/machineLearningHoliday.d.ts +103 -0
- package/machineLearningHoliday.js +62 -0
- package/machineLearningHoliday.js.map +1 -0
- package/machineLearningJob.d.ts +201 -0
- package/machineLearningJob.js +83 -0
- package/machineLearningJob.js.map +1 -0
- package/machineLearningOutlierDetector.d.ts +159 -0
- package/machineLearningOutlierDetector.js +84 -0
- package/machineLearningOutlierDetector.js.map +1 -0
- package/messageTemplate.d.ts +86 -0
- package/messageTemplate.js +80 -0
- package/messageTemplate.js.map +1 -0
- package/muteTiming.d.ts +106 -0
- package/muteTiming.js +95 -0
- package/muteTiming.js.map +1 -0
- package/notificationPolicy.d.ts +186 -0
- package/notificationPolicy.js +141 -0
- package/notificationPolicy.js.map +1 -0
- package/oncallEscalation.d.ts +227 -0
- package/oncallEscalation.js +124 -0
- package/oncallEscalation.js.map +1 -0
- package/oncallEscalationChain.d.ts +80 -0
- package/oncallEscalationChain.js +71 -0
- package/oncallEscalationChain.js.map +1 -0
- package/oncallIntegration.d.ts +116 -0
- package/oncallIntegration.js +75 -0
- package/oncallIntegration.js.map +1 -0
- package/oncallOnCallShift.d.ts +237 -0
- package/oncallOnCallShift.js +97 -0
- package/oncallOnCallShift.js.map +1 -0
- package/oncallOutgoingWebhook.d.ts +152 -0
- package/oncallOutgoingWebhook.js +88 -0
- package/oncallOutgoingWebhook.js.map +1 -0
- package/oncallRoute.d.ts +175 -0
- package/oncallRoute.js +116 -0
- package/oncallRoute.js.map +1 -0
- package/oncallSchedule.d.ts +187 -0
- package/oncallSchedule.js +109 -0
- package/oncallSchedule.js.map +1 -0
- package/organization.d.ts +193 -0
- package/organization.js +96 -0
- package/organization.js.map +1 -0
- package/organizationPreference.d.ts +125 -0
- package/organizationPreference.js +76 -0
- package/organizationPreference.js.map +1 -0
- package/package.json +30 -0
- package/package.json.bak +29 -0
- package/package.json.dev +29 -0
- package/playlist.d.ts +72 -0
- package/playlist.js +65 -0
- package/playlist.js.map +1 -0
- package/provider.d.ts +166 -0
- package/provider.js +64 -0
- package/provider.js.map +1 -0
- package/report.d.ts +241 -0
- package/report.js +110 -0
- package/report.js.map +1 -0
- package/role.d.ts +210 -0
- package/role.js +109 -0
- package/role.js.map +1 -0
- package/roleAssignment.d.ts +131 -0
- package/roleAssignment.js +95 -0
- package/roleAssignment.js.map +1 -0
- package/ruleGroup.d.ts +203 -0
- package/ruleGroup.js +174 -0
- package/ruleGroup.js.map +1 -0
- package/scripts/install-pulumi-plugin.js +21 -0
- package/serviceAccount.d.ts +102 -0
- package/serviceAccount.js +73 -0
- package/serviceAccount.js.map +1 -0
- package/serviceAccountPermission.d.ts +110 -0
- package/serviceAccountPermission.js +95 -0
- package/serviceAccountPermission.js.map +1 -0
- package/serviceAccountToken.d.ts +72 -0
- package/serviceAccountToken.js +85 -0
- package/serviceAccountToken.js.map +1 -0
- package/slo.d.ts +131 -0
- package/slo.js +77 -0
- package/slo.js.map +1 -0
- package/syntheticMonitoringCheck.d.ts +555 -0
- package/syntheticMonitoringCheck.js +464 -0
- package/syntheticMonitoringCheck.js.map +1 -0
- package/syntheticMonitoringInstallation.d.ts +112 -0
- package/syntheticMonitoringInstallation.js +95 -0
- package/syntheticMonitoringInstallation.js.map +1 -0
- package/syntheticMonitoringProbe.d.ts +164 -0
- package/syntheticMonitoringProbe.js +108 -0
- package/syntheticMonitoringProbe.js.map +1 -0
- package/team.d.ts +165 -0
- package/team.js +89 -0
- package/team.js.map +1 -0
- package/teamExternalGroup.d.ts +84 -0
- package/teamExternalGroup.js +81 -0
- package/teamExternalGroup.js.map +1 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +11 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +1914 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +2011 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/user.d.ts +132 -0
- package/user.js +95 -0
- package/user.js.map +1 -0
- package/utilities.d.ts +4 -0
- package/utilities.js +69 -0
- package/utilities.js.map +1 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Sets the global notification policy for Grafana.
|
|
6
|
+
*
|
|
7
|
+
* !> This resource manages the entire notification policy tree, and will overwrite any existing policies.
|
|
8
|
+
*
|
|
9
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/alerting/manage-notifications/)
|
|
10
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/)
|
|
11
|
+
*
|
|
12
|
+
* This resource requires Grafana 9.1.0 or later.
|
|
13
|
+
*
|
|
14
|
+
* ## Example Usage
|
|
15
|
+
*
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
18
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
19
|
+
*
|
|
20
|
+
* const aContactPoint = new grafana.ContactPoint("aContactPoint", {emails: [{
|
|
21
|
+
* addresses: [
|
|
22
|
+
* "one@company.org",
|
|
23
|
+
* "two@company.org",
|
|
24
|
+
* ],
|
|
25
|
+
* message: "{{ len .Alerts.Firing }} firing.",
|
|
26
|
+
* }]});
|
|
27
|
+
* const aMuteTiming = new grafana.MuteTiming("aMuteTiming", {intervals: [{
|
|
28
|
+
* weekdays: ["monday"],
|
|
29
|
+
* }]});
|
|
30
|
+
* const myNotificationPolicy = new grafana.NotificationPolicy("myNotificationPolicy", {
|
|
31
|
+
* groupBies: ["..."],
|
|
32
|
+
* contactPoint: aContactPoint.name,
|
|
33
|
+
* groupWait: "45s",
|
|
34
|
+
* groupInterval: "6m",
|
|
35
|
+
* repeatInterval: "3h",
|
|
36
|
+
* policies: [
|
|
37
|
+
* {
|
|
38
|
+
* matchers: [{
|
|
39
|
+
* label: "mylabel",
|
|
40
|
+
* match: "=",
|
|
41
|
+
* value: "myvalue",
|
|
42
|
+
* }],
|
|
43
|
+
* contactPoint: aContactPoint.name,
|
|
44
|
+
* "continue": true,
|
|
45
|
+
* muteTimings: [aMuteTiming.name],
|
|
46
|
+
* groupWait: "45s",
|
|
47
|
+
* groupInterval: "6m",
|
|
48
|
+
* repeatInterval: "3h",
|
|
49
|
+
* policies: [{
|
|
50
|
+
* matchers: [{
|
|
51
|
+
* label: "sublabel",
|
|
52
|
+
* match: "=",
|
|
53
|
+
* value: "subvalue",
|
|
54
|
+
* }],
|
|
55
|
+
* contactPoint: aContactPoint.name,
|
|
56
|
+
* groupBies: ["..."],
|
|
57
|
+
* }],
|
|
58
|
+
* },
|
|
59
|
+
* {
|
|
60
|
+
* matchers: [{
|
|
61
|
+
* label: "anotherlabel",
|
|
62
|
+
* match: "=~",
|
|
63
|
+
* value: "another value.*",
|
|
64
|
+
* }],
|
|
65
|
+
* contactPoint: aContactPoint.name,
|
|
66
|
+
* groupBies: ["..."],
|
|
67
|
+
* },
|
|
68
|
+
* ],
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* ## Import
|
|
73
|
+
*
|
|
74
|
+
* The policy is a singleton, so the ID is a constant "policy" value.
|
|
75
|
+
*
|
|
76
|
+
* ```sh
|
|
77
|
+
* $ pulumi import grafana:index/notificationPolicy:NotificationPolicy notification_policy_name "policy"
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export declare class NotificationPolicy extends pulumi.CustomResource {
|
|
81
|
+
/**
|
|
82
|
+
* Get an existing NotificationPolicy resource's state with the given name, ID, and optional extra
|
|
83
|
+
* properties used to qualify the lookup.
|
|
84
|
+
*
|
|
85
|
+
* @param name The _unique_ name of the resulting resource.
|
|
86
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
87
|
+
* @param state Any extra arguments used during the lookup.
|
|
88
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
89
|
+
*/
|
|
90
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NotificationPolicyState, opts?: pulumi.CustomResourceOptions): NotificationPolicy;
|
|
91
|
+
/**
|
|
92
|
+
* Returns true if the given object is an instance of NotificationPolicy. This is designed to work even
|
|
93
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
94
|
+
*/
|
|
95
|
+
static isInstance(obj: any): obj is NotificationPolicy;
|
|
96
|
+
/**
|
|
97
|
+
* The contact point to route notifications that match this rule to.
|
|
98
|
+
*/
|
|
99
|
+
readonly contactPoint: pulumi.Output<string>;
|
|
100
|
+
/**
|
|
101
|
+
* A list of alert labels to group alerts into notifications by. Use the special label `...` to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used.
|
|
102
|
+
*/
|
|
103
|
+
readonly groupBies: pulumi.Output<string[]>;
|
|
104
|
+
/**
|
|
105
|
+
* Minimum time interval between two notifications for the same group. Default is 5 minutes.
|
|
106
|
+
*/
|
|
107
|
+
readonly groupInterval: pulumi.Output<string | undefined>;
|
|
108
|
+
/**
|
|
109
|
+
* Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
|
|
110
|
+
*/
|
|
111
|
+
readonly groupWait: pulumi.Output<string | undefined>;
|
|
112
|
+
/**
|
|
113
|
+
* Routing rules for specific label sets.
|
|
114
|
+
*/
|
|
115
|
+
readonly policies: pulumi.Output<outputs.NotificationPolicyPolicy[] | undefined>;
|
|
116
|
+
/**
|
|
117
|
+
* Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
|
|
118
|
+
*/
|
|
119
|
+
readonly repeatInterval: pulumi.Output<string | undefined>;
|
|
120
|
+
/**
|
|
121
|
+
* Create a NotificationPolicy resource with the given unique name, arguments, and options.
|
|
122
|
+
*
|
|
123
|
+
* @param name The _unique_ name of the resource.
|
|
124
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
125
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
126
|
+
*/
|
|
127
|
+
constructor(name: string, args: NotificationPolicyArgs, opts?: pulumi.CustomResourceOptions);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Input properties used for looking up and filtering NotificationPolicy resources.
|
|
131
|
+
*/
|
|
132
|
+
export interface NotificationPolicyState {
|
|
133
|
+
/**
|
|
134
|
+
* The contact point to route notifications that match this rule to.
|
|
135
|
+
*/
|
|
136
|
+
contactPoint?: pulumi.Input<string>;
|
|
137
|
+
/**
|
|
138
|
+
* A list of alert labels to group alerts into notifications by. Use the special label `...` to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used.
|
|
139
|
+
*/
|
|
140
|
+
groupBies?: pulumi.Input<pulumi.Input<string>[]>;
|
|
141
|
+
/**
|
|
142
|
+
* Minimum time interval between two notifications for the same group. Default is 5 minutes.
|
|
143
|
+
*/
|
|
144
|
+
groupInterval?: pulumi.Input<string>;
|
|
145
|
+
/**
|
|
146
|
+
* Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
|
|
147
|
+
*/
|
|
148
|
+
groupWait?: pulumi.Input<string>;
|
|
149
|
+
/**
|
|
150
|
+
* Routing rules for specific label sets.
|
|
151
|
+
*/
|
|
152
|
+
policies?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyPolicy>[]>;
|
|
153
|
+
/**
|
|
154
|
+
* Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
|
|
155
|
+
*/
|
|
156
|
+
repeatInterval?: pulumi.Input<string>;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* The set of arguments for constructing a NotificationPolicy resource.
|
|
160
|
+
*/
|
|
161
|
+
export interface NotificationPolicyArgs {
|
|
162
|
+
/**
|
|
163
|
+
* The contact point to route notifications that match this rule to.
|
|
164
|
+
*/
|
|
165
|
+
contactPoint: pulumi.Input<string>;
|
|
166
|
+
/**
|
|
167
|
+
* A list of alert labels to group alerts into notifications by. Use the special label `...` to group alerts by all labels, effectively disabling grouping. Required for root policy only. If empty, the parent grouping is used.
|
|
168
|
+
*/
|
|
169
|
+
groupBies: pulumi.Input<pulumi.Input<string>[]>;
|
|
170
|
+
/**
|
|
171
|
+
* Minimum time interval between two notifications for the same group. Default is 5 minutes.
|
|
172
|
+
*/
|
|
173
|
+
groupInterval?: pulumi.Input<string>;
|
|
174
|
+
/**
|
|
175
|
+
* Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.
|
|
176
|
+
*/
|
|
177
|
+
groupWait?: pulumi.Input<string>;
|
|
178
|
+
/**
|
|
179
|
+
* Routing rules for specific label sets.
|
|
180
|
+
*/
|
|
181
|
+
policies?: pulumi.Input<pulumi.Input<inputs.NotificationPolicyPolicy>[]>;
|
|
182
|
+
/**
|
|
183
|
+
* Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.
|
|
184
|
+
*/
|
|
185
|
+
repeatInterval?: pulumi.Input<string>;
|
|
186
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.NotificationPolicy = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Sets the global notification policy for Grafana.
|
|
10
|
+
*
|
|
11
|
+
* !> This resource manages the entire notification policy tree, and will overwrite any existing policies.
|
|
12
|
+
*
|
|
13
|
+
* * [Official documentation](https://grafana.com/docs/grafana/latest/alerting/manage-notifications/)
|
|
14
|
+
* * [HTTP API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/)
|
|
15
|
+
*
|
|
16
|
+
* This resource requires Grafana 9.1.0 or later.
|
|
17
|
+
*
|
|
18
|
+
* ## Example Usage
|
|
19
|
+
*
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
22
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
23
|
+
*
|
|
24
|
+
* const aContactPoint = new grafana.ContactPoint("aContactPoint", {emails: [{
|
|
25
|
+
* addresses: [
|
|
26
|
+
* "one@company.org",
|
|
27
|
+
* "two@company.org",
|
|
28
|
+
* ],
|
|
29
|
+
* message: "{{ len .Alerts.Firing }} firing.",
|
|
30
|
+
* }]});
|
|
31
|
+
* const aMuteTiming = new grafana.MuteTiming("aMuteTiming", {intervals: [{
|
|
32
|
+
* weekdays: ["monday"],
|
|
33
|
+
* }]});
|
|
34
|
+
* const myNotificationPolicy = new grafana.NotificationPolicy("myNotificationPolicy", {
|
|
35
|
+
* groupBies: ["..."],
|
|
36
|
+
* contactPoint: aContactPoint.name,
|
|
37
|
+
* groupWait: "45s",
|
|
38
|
+
* groupInterval: "6m",
|
|
39
|
+
* repeatInterval: "3h",
|
|
40
|
+
* policies: [
|
|
41
|
+
* {
|
|
42
|
+
* matchers: [{
|
|
43
|
+
* label: "mylabel",
|
|
44
|
+
* match: "=",
|
|
45
|
+
* value: "myvalue",
|
|
46
|
+
* }],
|
|
47
|
+
* contactPoint: aContactPoint.name,
|
|
48
|
+
* "continue": true,
|
|
49
|
+
* muteTimings: [aMuteTiming.name],
|
|
50
|
+
* groupWait: "45s",
|
|
51
|
+
* groupInterval: "6m",
|
|
52
|
+
* repeatInterval: "3h",
|
|
53
|
+
* policies: [{
|
|
54
|
+
* matchers: [{
|
|
55
|
+
* label: "sublabel",
|
|
56
|
+
* match: "=",
|
|
57
|
+
* value: "subvalue",
|
|
58
|
+
* }],
|
|
59
|
+
* contactPoint: aContactPoint.name,
|
|
60
|
+
* groupBies: ["..."],
|
|
61
|
+
* }],
|
|
62
|
+
* },
|
|
63
|
+
* {
|
|
64
|
+
* matchers: [{
|
|
65
|
+
* label: "anotherlabel",
|
|
66
|
+
* match: "=~",
|
|
67
|
+
* value: "another value.*",
|
|
68
|
+
* }],
|
|
69
|
+
* contactPoint: aContactPoint.name,
|
|
70
|
+
* groupBies: ["..."],
|
|
71
|
+
* },
|
|
72
|
+
* ],
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* ## Import
|
|
77
|
+
*
|
|
78
|
+
* The policy is a singleton, so the ID is a constant "policy" value.
|
|
79
|
+
*
|
|
80
|
+
* ```sh
|
|
81
|
+
* $ pulumi import grafana:index/notificationPolicy:NotificationPolicy notification_policy_name "policy"
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
class NotificationPolicy extends pulumi.CustomResource {
|
|
85
|
+
/**
|
|
86
|
+
* Get an existing NotificationPolicy resource's state with the given name, ID, and optional extra
|
|
87
|
+
* properties used to qualify the lookup.
|
|
88
|
+
*
|
|
89
|
+
* @param name The _unique_ name of the resulting resource.
|
|
90
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
91
|
+
* @param state Any extra arguments used during the lookup.
|
|
92
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
93
|
+
*/
|
|
94
|
+
static get(name, id, state, opts) {
|
|
95
|
+
return new NotificationPolicy(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Returns true if the given object is an instance of NotificationPolicy. This is designed to work even
|
|
99
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
100
|
+
*/
|
|
101
|
+
static isInstance(obj) {
|
|
102
|
+
if (obj === undefined || obj === null) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
return obj['__pulumiType'] === NotificationPolicy.__pulumiType;
|
|
106
|
+
}
|
|
107
|
+
constructor(name, argsOrState, opts) {
|
|
108
|
+
let resourceInputs = {};
|
|
109
|
+
opts = opts || {};
|
|
110
|
+
if (opts.id) {
|
|
111
|
+
const state = argsOrState;
|
|
112
|
+
resourceInputs["contactPoint"] = state ? state.contactPoint : undefined;
|
|
113
|
+
resourceInputs["groupBies"] = state ? state.groupBies : undefined;
|
|
114
|
+
resourceInputs["groupInterval"] = state ? state.groupInterval : undefined;
|
|
115
|
+
resourceInputs["groupWait"] = state ? state.groupWait : undefined;
|
|
116
|
+
resourceInputs["policies"] = state ? state.policies : undefined;
|
|
117
|
+
resourceInputs["repeatInterval"] = state ? state.repeatInterval : undefined;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
const args = argsOrState;
|
|
121
|
+
if ((!args || args.contactPoint === undefined) && !opts.urn) {
|
|
122
|
+
throw new Error("Missing required property 'contactPoint'");
|
|
123
|
+
}
|
|
124
|
+
if ((!args || args.groupBies === undefined) && !opts.urn) {
|
|
125
|
+
throw new Error("Missing required property 'groupBies'");
|
|
126
|
+
}
|
|
127
|
+
resourceInputs["contactPoint"] = args ? args.contactPoint : undefined;
|
|
128
|
+
resourceInputs["groupBies"] = args ? args.groupBies : undefined;
|
|
129
|
+
resourceInputs["groupInterval"] = args ? args.groupInterval : undefined;
|
|
130
|
+
resourceInputs["groupWait"] = args ? args.groupWait : undefined;
|
|
131
|
+
resourceInputs["policies"] = args ? args.policies : undefined;
|
|
132
|
+
resourceInputs["repeatInterval"] = args ? args.repeatInterval : undefined;
|
|
133
|
+
}
|
|
134
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
135
|
+
super(NotificationPolicy.__pulumiType, name, resourceInputs, opts);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
exports.NotificationPolicy = NotificationPolicy;
|
|
139
|
+
/** @internal */
|
|
140
|
+
NotificationPolicy.__pulumiType = 'grafana:index/notificationPolicy:NotificationPolicy';
|
|
141
|
+
//# sourceMappingURL=notificationPolicy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationPolicy.js","sourceRoot":"","sources":["../notificationPolicy.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* * [Official documentation](https://grafana.com/docs/oncall/latest/escalation-chains-and-routes/)
|
|
4
|
+
* * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/escalation_policies/)
|
|
5
|
+
*
|
|
6
|
+
* ## Example Usage
|
|
7
|
+
*
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
10
|
+
* import * as grafana from "@pulumi/grafana";
|
|
11
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
12
|
+
*
|
|
13
|
+
* const _default = new grafana.OncallEscalationChain("default", {}, {
|
|
14
|
+
* provider: grafana.oncall,
|
|
15
|
+
* });
|
|
16
|
+
* const alex = grafana.getOncallUser({
|
|
17
|
+
* username: "alex",
|
|
18
|
+
* });
|
|
19
|
+
* // Notify step
|
|
20
|
+
* const exampleNotifyStepOncallEscalation = new grafana.OncallEscalation("exampleNotifyStepOncallEscalation", {
|
|
21
|
+
* escalationChainId: _default.id,
|
|
22
|
+
* type: "notify_persons",
|
|
23
|
+
* personsToNotifies: [alex.then(alex => alex.id)],
|
|
24
|
+
* position: 0,
|
|
25
|
+
* });
|
|
26
|
+
* // Wait step
|
|
27
|
+
* const exampleNotifyStepIndex_oncallEscalationOncallEscalation = new grafana.OncallEscalation("exampleNotifyStepIndex/oncallEscalationOncallEscalation", {
|
|
28
|
+
* escalationChainId: _default.id,
|
|
29
|
+
* type: "wait",
|
|
30
|
+
* duration: 300,
|
|
31
|
+
* position: 1,
|
|
32
|
+
* });
|
|
33
|
+
* // Important step
|
|
34
|
+
* const exampleNotifyStepGrafanaIndex_oncallEscalationOncallEscalation = new grafana.OncallEscalation("exampleNotifyStepGrafanaIndex/oncallEscalationOncallEscalation", {
|
|
35
|
+
* escalationChainId: _default.id,
|
|
36
|
+
* type: "notify_persons",
|
|
37
|
+
* important: true,
|
|
38
|
+
* personsToNotifies: [alex.then(alex => alex.id)],
|
|
39
|
+
* position: 0,
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* ## Import
|
|
44
|
+
*
|
|
45
|
+
* ```sh
|
|
46
|
+
* $ pulumi import grafana:index/oncallEscalation:OncallEscalation escalation_name {{escalation_id}}
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare class OncallEscalation extends pulumi.CustomResource {
|
|
50
|
+
/**
|
|
51
|
+
* Get an existing OncallEscalation resource's state with the given name, ID, and optional extra
|
|
52
|
+
* properties used to qualify the lookup.
|
|
53
|
+
*
|
|
54
|
+
* @param name The _unique_ name of the resulting resource.
|
|
55
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
56
|
+
* @param state Any extra arguments used during the lookup.
|
|
57
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
58
|
+
*/
|
|
59
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: OncallEscalationState, opts?: pulumi.CustomResourceOptions): OncallEscalation;
|
|
60
|
+
/**
|
|
61
|
+
* Returns true if the given object is an instance of OncallEscalation. This is designed to work even
|
|
62
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
63
|
+
*/
|
|
64
|
+
static isInstance(obj: any): obj is OncallEscalation;
|
|
65
|
+
/**
|
|
66
|
+
* The ID of an Action for triggerAction type step.
|
|
67
|
+
*/
|
|
68
|
+
readonly actionToTrigger: pulumi.Output<string | undefined>;
|
|
69
|
+
/**
|
|
70
|
+
* The duration of delay for wait type step.
|
|
71
|
+
*/
|
|
72
|
+
readonly duration: pulumi.Output<number | undefined>;
|
|
73
|
+
/**
|
|
74
|
+
* The ID of the escalation chain.
|
|
75
|
+
*/
|
|
76
|
+
readonly escalationChainId: pulumi.Output<string>;
|
|
77
|
+
/**
|
|
78
|
+
* The ID of a User Group for notify*user*group type step.
|
|
79
|
+
*/
|
|
80
|
+
readonly groupToNotify: pulumi.Output<string | undefined>;
|
|
81
|
+
/**
|
|
82
|
+
* Will activate "important" personal notification rules. Actual for steps: notify*persons, notify*on*call*from*schedule and notify*user_group
|
|
83
|
+
*/
|
|
84
|
+
readonly important: pulumi.Output<boolean | undefined>;
|
|
85
|
+
/**
|
|
86
|
+
* The beginning of the time interval for notify*if*time*from*to type step in UTC (for example 08:00:00Z).
|
|
87
|
+
*/
|
|
88
|
+
readonly notifyIfTimeFrom: pulumi.Output<string | undefined>;
|
|
89
|
+
/**
|
|
90
|
+
* The end of the time interval for notify*if*time*from*to type step in UTC (for example 18:00:00Z).
|
|
91
|
+
*/
|
|
92
|
+
readonly notifyIfTimeTo: pulumi.Output<string | undefined>;
|
|
93
|
+
/**
|
|
94
|
+
* ID of a Schedule for notify*on*call*from*schedule type step.
|
|
95
|
+
*/
|
|
96
|
+
readonly notifyOnCallFromSchedule: pulumi.Output<string | undefined>;
|
|
97
|
+
/**
|
|
98
|
+
* The list of ID's of users for notifyPersons type step.
|
|
99
|
+
*/
|
|
100
|
+
readonly personsToNotifies: pulumi.Output<string[] | undefined>;
|
|
101
|
+
/**
|
|
102
|
+
* The list of ID's of users for notify*person*next*each*time type step.
|
|
103
|
+
*/
|
|
104
|
+
readonly personsToNotifyNextEachTimes: pulumi.Output<string[] | undefined>;
|
|
105
|
+
/**
|
|
106
|
+
* The position of the escalation step (starts from 0).
|
|
107
|
+
*/
|
|
108
|
+
readonly position: pulumi.Output<number>;
|
|
109
|
+
/**
|
|
110
|
+
* The type of escalation policy. Can be wait, notify*persons, notify*person*next*each*time, notify*on*call*from*schedule, trigger*action, notify*user*group, resolve, notify*whole*channel, notify*if*time*from*to, repeat_escalation
|
|
111
|
+
*/
|
|
112
|
+
readonly type: pulumi.Output<string | undefined>;
|
|
113
|
+
/**
|
|
114
|
+
* Create a OncallEscalation resource with the given unique name, arguments, and options.
|
|
115
|
+
*
|
|
116
|
+
* @param name The _unique_ name of the resource.
|
|
117
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
118
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
119
|
+
*/
|
|
120
|
+
constructor(name: string, args: OncallEscalationArgs, opts?: pulumi.CustomResourceOptions);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Input properties used for looking up and filtering OncallEscalation resources.
|
|
124
|
+
*/
|
|
125
|
+
export interface OncallEscalationState {
|
|
126
|
+
/**
|
|
127
|
+
* The ID of an Action for triggerAction type step.
|
|
128
|
+
*/
|
|
129
|
+
actionToTrigger?: pulumi.Input<string>;
|
|
130
|
+
/**
|
|
131
|
+
* The duration of delay for wait type step.
|
|
132
|
+
*/
|
|
133
|
+
duration?: pulumi.Input<number>;
|
|
134
|
+
/**
|
|
135
|
+
* The ID of the escalation chain.
|
|
136
|
+
*/
|
|
137
|
+
escalationChainId?: pulumi.Input<string>;
|
|
138
|
+
/**
|
|
139
|
+
* The ID of a User Group for notify*user*group type step.
|
|
140
|
+
*/
|
|
141
|
+
groupToNotify?: pulumi.Input<string>;
|
|
142
|
+
/**
|
|
143
|
+
* Will activate "important" personal notification rules. Actual for steps: notify*persons, notify*on*call*from*schedule and notify*user_group
|
|
144
|
+
*/
|
|
145
|
+
important?: pulumi.Input<boolean>;
|
|
146
|
+
/**
|
|
147
|
+
* The beginning of the time interval for notify*if*time*from*to type step in UTC (for example 08:00:00Z).
|
|
148
|
+
*/
|
|
149
|
+
notifyIfTimeFrom?: pulumi.Input<string>;
|
|
150
|
+
/**
|
|
151
|
+
* The end of the time interval for notify*if*time*from*to type step in UTC (for example 18:00:00Z).
|
|
152
|
+
*/
|
|
153
|
+
notifyIfTimeTo?: pulumi.Input<string>;
|
|
154
|
+
/**
|
|
155
|
+
* ID of a Schedule for notify*on*call*from*schedule type step.
|
|
156
|
+
*/
|
|
157
|
+
notifyOnCallFromSchedule?: pulumi.Input<string>;
|
|
158
|
+
/**
|
|
159
|
+
* The list of ID's of users for notifyPersons type step.
|
|
160
|
+
*/
|
|
161
|
+
personsToNotifies?: pulumi.Input<pulumi.Input<string>[]>;
|
|
162
|
+
/**
|
|
163
|
+
* The list of ID's of users for notify*person*next*each*time type step.
|
|
164
|
+
*/
|
|
165
|
+
personsToNotifyNextEachTimes?: pulumi.Input<pulumi.Input<string>[]>;
|
|
166
|
+
/**
|
|
167
|
+
* The position of the escalation step (starts from 0).
|
|
168
|
+
*/
|
|
169
|
+
position?: pulumi.Input<number>;
|
|
170
|
+
/**
|
|
171
|
+
* The type of escalation policy. Can be wait, notify*persons, notify*person*next*each*time, notify*on*call*from*schedule, trigger*action, notify*user*group, resolve, notify*whole*channel, notify*if*time*from*to, repeat_escalation
|
|
172
|
+
*/
|
|
173
|
+
type?: pulumi.Input<string>;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* The set of arguments for constructing a OncallEscalation resource.
|
|
177
|
+
*/
|
|
178
|
+
export interface OncallEscalationArgs {
|
|
179
|
+
/**
|
|
180
|
+
* The ID of an Action for triggerAction type step.
|
|
181
|
+
*/
|
|
182
|
+
actionToTrigger?: pulumi.Input<string>;
|
|
183
|
+
/**
|
|
184
|
+
* The duration of delay for wait type step.
|
|
185
|
+
*/
|
|
186
|
+
duration?: pulumi.Input<number>;
|
|
187
|
+
/**
|
|
188
|
+
* The ID of the escalation chain.
|
|
189
|
+
*/
|
|
190
|
+
escalationChainId: pulumi.Input<string>;
|
|
191
|
+
/**
|
|
192
|
+
* The ID of a User Group for notify*user*group type step.
|
|
193
|
+
*/
|
|
194
|
+
groupToNotify?: pulumi.Input<string>;
|
|
195
|
+
/**
|
|
196
|
+
* Will activate "important" personal notification rules. Actual for steps: notify*persons, notify*on*call*from*schedule and notify*user_group
|
|
197
|
+
*/
|
|
198
|
+
important?: pulumi.Input<boolean>;
|
|
199
|
+
/**
|
|
200
|
+
* The beginning of the time interval for notify*if*time*from*to type step in UTC (for example 08:00:00Z).
|
|
201
|
+
*/
|
|
202
|
+
notifyIfTimeFrom?: pulumi.Input<string>;
|
|
203
|
+
/**
|
|
204
|
+
* The end of the time interval for notify*if*time*from*to type step in UTC (for example 18:00:00Z).
|
|
205
|
+
*/
|
|
206
|
+
notifyIfTimeTo?: pulumi.Input<string>;
|
|
207
|
+
/**
|
|
208
|
+
* ID of a Schedule for notify*on*call*from*schedule type step.
|
|
209
|
+
*/
|
|
210
|
+
notifyOnCallFromSchedule?: pulumi.Input<string>;
|
|
211
|
+
/**
|
|
212
|
+
* The list of ID's of users for notifyPersons type step.
|
|
213
|
+
*/
|
|
214
|
+
personsToNotifies?: pulumi.Input<pulumi.Input<string>[]>;
|
|
215
|
+
/**
|
|
216
|
+
* The list of ID's of users for notify*person*next*each*time type step.
|
|
217
|
+
*/
|
|
218
|
+
personsToNotifyNextEachTimes?: pulumi.Input<pulumi.Input<string>[]>;
|
|
219
|
+
/**
|
|
220
|
+
* The position of the escalation step (starts from 0).
|
|
221
|
+
*/
|
|
222
|
+
position: pulumi.Input<number>;
|
|
223
|
+
/**
|
|
224
|
+
* The type of escalation policy. Can be wait, notify*persons, notify*person*next*each*time, notify*on*call*from*schedule, trigger*action, notify*user*group, resolve, notify*whole*channel, notify*if*time*from*to, repeat_escalation
|
|
225
|
+
*/
|
|
226
|
+
type?: pulumi.Input<string>;
|
|
227
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.OncallEscalation = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* * [Official documentation](https://grafana.com/docs/oncall/latest/escalation-chains-and-routes/)
|
|
10
|
+
* * [HTTP API](https://grafana.com/docs/oncall/latest/oncall-api-reference/escalation_policies/)
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
16
|
+
* import * as grafana from "@pulumi/grafana";
|
|
17
|
+
* import * as grafana from "@pulumiverse/grafana";
|
|
18
|
+
*
|
|
19
|
+
* const _default = new grafana.OncallEscalationChain("default", {}, {
|
|
20
|
+
* provider: grafana.oncall,
|
|
21
|
+
* });
|
|
22
|
+
* const alex = grafana.getOncallUser({
|
|
23
|
+
* username: "alex",
|
|
24
|
+
* });
|
|
25
|
+
* // Notify step
|
|
26
|
+
* const exampleNotifyStepOncallEscalation = new grafana.OncallEscalation("exampleNotifyStepOncallEscalation", {
|
|
27
|
+
* escalationChainId: _default.id,
|
|
28
|
+
* type: "notify_persons",
|
|
29
|
+
* personsToNotifies: [alex.then(alex => alex.id)],
|
|
30
|
+
* position: 0,
|
|
31
|
+
* });
|
|
32
|
+
* // Wait step
|
|
33
|
+
* const exampleNotifyStepIndex_oncallEscalationOncallEscalation = new grafana.OncallEscalation("exampleNotifyStepIndex/oncallEscalationOncallEscalation", {
|
|
34
|
+
* escalationChainId: _default.id,
|
|
35
|
+
* type: "wait",
|
|
36
|
+
* duration: 300,
|
|
37
|
+
* position: 1,
|
|
38
|
+
* });
|
|
39
|
+
* // Important step
|
|
40
|
+
* const exampleNotifyStepGrafanaIndex_oncallEscalationOncallEscalation = new grafana.OncallEscalation("exampleNotifyStepGrafanaIndex/oncallEscalationOncallEscalation", {
|
|
41
|
+
* escalationChainId: _default.id,
|
|
42
|
+
* type: "notify_persons",
|
|
43
|
+
* important: true,
|
|
44
|
+
* personsToNotifies: [alex.then(alex => alex.id)],
|
|
45
|
+
* position: 0,
|
|
46
|
+
* });
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* ## Import
|
|
50
|
+
*
|
|
51
|
+
* ```sh
|
|
52
|
+
* $ pulumi import grafana:index/oncallEscalation:OncallEscalation escalation_name {{escalation_id}}
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
class OncallEscalation extends pulumi.CustomResource {
|
|
56
|
+
/**
|
|
57
|
+
* Get an existing OncallEscalation resource's state with the given name, ID, and optional extra
|
|
58
|
+
* properties used to qualify the lookup.
|
|
59
|
+
*
|
|
60
|
+
* @param name The _unique_ name of the resulting resource.
|
|
61
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
62
|
+
* @param state Any extra arguments used during the lookup.
|
|
63
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
64
|
+
*/
|
|
65
|
+
static get(name, id, state, opts) {
|
|
66
|
+
return new OncallEscalation(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Returns true if the given object is an instance of OncallEscalation. This is designed to work even
|
|
70
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
71
|
+
*/
|
|
72
|
+
static isInstance(obj) {
|
|
73
|
+
if (obj === undefined || obj === null) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return obj['__pulumiType'] === OncallEscalation.__pulumiType;
|
|
77
|
+
}
|
|
78
|
+
constructor(name, argsOrState, opts) {
|
|
79
|
+
let resourceInputs = {};
|
|
80
|
+
opts = opts || {};
|
|
81
|
+
if (opts.id) {
|
|
82
|
+
const state = argsOrState;
|
|
83
|
+
resourceInputs["actionToTrigger"] = state ? state.actionToTrigger : undefined;
|
|
84
|
+
resourceInputs["duration"] = state ? state.duration : undefined;
|
|
85
|
+
resourceInputs["escalationChainId"] = state ? state.escalationChainId : undefined;
|
|
86
|
+
resourceInputs["groupToNotify"] = state ? state.groupToNotify : undefined;
|
|
87
|
+
resourceInputs["important"] = state ? state.important : undefined;
|
|
88
|
+
resourceInputs["notifyIfTimeFrom"] = state ? state.notifyIfTimeFrom : undefined;
|
|
89
|
+
resourceInputs["notifyIfTimeTo"] = state ? state.notifyIfTimeTo : undefined;
|
|
90
|
+
resourceInputs["notifyOnCallFromSchedule"] = state ? state.notifyOnCallFromSchedule : undefined;
|
|
91
|
+
resourceInputs["personsToNotifies"] = state ? state.personsToNotifies : undefined;
|
|
92
|
+
resourceInputs["personsToNotifyNextEachTimes"] = state ? state.personsToNotifyNextEachTimes : undefined;
|
|
93
|
+
resourceInputs["position"] = state ? state.position : undefined;
|
|
94
|
+
resourceInputs["type"] = state ? state.type : undefined;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
const args = argsOrState;
|
|
98
|
+
if ((!args || args.escalationChainId === undefined) && !opts.urn) {
|
|
99
|
+
throw new Error("Missing required property 'escalationChainId'");
|
|
100
|
+
}
|
|
101
|
+
if ((!args || args.position === undefined) && !opts.urn) {
|
|
102
|
+
throw new Error("Missing required property 'position'");
|
|
103
|
+
}
|
|
104
|
+
resourceInputs["actionToTrigger"] = args ? args.actionToTrigger : undefined;
|
|
105
|
+
resourceInputs["duration"] = args ? args.duration : undefined;
|
|
106
|
+
resourceInputs["escalationChainId"] = args ? args.escalationChainId : undefined;
|
|
107
|
+
resourceInputs["groupToNotify"] = args ? args.groupToNotify : undefined;
|
|
108
|
+
resourceInputs["important"] = args ? args.important : undefined;
|
|
109
|
+
resourceInputs["notifyIfTimeFrom"] = args ? args.notifyIfTimeFrom : undefined;
|
|
110
|
+
resourceInputs["notifyIfTimeTo"] = args ? args.notifyIfTimeTo : undefined;
|
|
111
|
+
resourceInputs["notifyOnCallFromSchedule"] = args ? args.notifyOnCallFromSchedule : undefined;
|
|
112
|
+
resourceInputs["personsToNotifies"] = args ? args.personsToNotifies : undefined;
|
|
113
|
+
resourceInputs["personsToNotifyNextEachTimes"] = args ? args.personsToNotifyNextEachTimes : undefined;
|
|
114
|
+
resourceInputs["position"] = args ? args.position : undefined;
|
|
115
|
+
resourceInputs["type"] = args ? args.type : undefined;
|
|
116
|
+
}
|
|
117
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
118
|
+
super(OncallEscalation.__pulumiType, name, resourceInputs, opts);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.OncallEscalation = OncallEscalation;
|
|
122
|
+
/** @internal */
|
|
123
|
+
OncallEscalation.__pulumiType = 'grafana:index/oncallEscalation:OncallEscalation';
|
|
124
|
+
//# sourceMappingURL=oncallEscalation.js.map
|