@pulumi/newrelic 4.19.0 → 5.0.0-alpha.1663005924
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/README.md +2 -2
- package/alertPolicyChannel.d.ts +1 -1
- package/alertPolicyChannel.js +1 -1
- package/cloud/awsIntegrations.d.ts +24 -0
- package/cloud/awsIntegrations.js +4 -0
- package/cloud/awsIntegrations.js.map +1 -1
- package/getAlertChannel.d.ts +9 -0
- package/getAlertChannel.js +1 -0
- package/getAlertChannel.js.map +1 -1
- package/getAlertPolicy.d.ts +6 -0
- package/getAlertPolicy.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +5 -5
- package/index.js.map +1 -1
- package/notificationChannel.d.ts +236 -20
- package/notificationChannel.js +199 -0
- package/notificationChannel.js.map +1 -1
- package/notificationDestination.d.ts +204 -26
- package/notificationDestination.js +144 -2
- package/notificationDestination.js.map +1 -1
- package/nrqlAlertCondition.d.ts +12 -15
- package/nrqlAlertCondition.js +0 -3
- package/nrqlAlertCondition.js.map +1 -1
- package/package.json +4 -3
- package/package.json.bak +2 -1
- package/package.json.dev +4 -3
- package/plugins/index.d.ts +0 -3
- package/plugins/index.js +0 -7
- package/plugins/index.js.map +1 -1
- package/synthetics/alertCondition.d.ts +3 -19
- package/synthetics/alertCondition.js +0 -16
- package/synthetics/alertCondition.js.map +1 -1
- package/synthetics/brokenLinksMonitor.d.ts +198 -0
- package/synthetics/brokenLinksMonitor.js +131 -0
- package/synthetics/brokenLinksMonitor.js.map +1 -0
- package/synthetics/certCheckMonitor.d.ts +203 -0
- package/synthetics/certCheckMonitor.js +135 -0
- package/synthetics/certCheckMonitor.js.map +1 -0
- package/synthetics/getPrivateLocation.d.ts +34 -0
- package/synthetics/getPrivateLocation.js +25 -0
- package/synthetics/getPrivateLocation.js.map +1 -0
- package/synthetics/getSecureCredential.d.ts +0 -4
- package/synthetics/getSecureCredential.js.map +1 -1
- package/synthetics/index.d.ts +6 -3
- package/synthetics/index.js +26 -7
- package/synthetics/index.js.map +1 -1
- package/synthetics/monitor.d.ts +221 -77
- package/synthetics/monitor.js +114 -47
- package/synthetics/monitor.js.map +1 -1
- package/synthetics/multiLocationAlertCondition.d.ts +32 -3
- package/synthetics/multiLocationAlertCondition.js +29 -0
- package/synthetics/multiLocationAlertCondition.js.map +1 -1
- package/synthetics/privateLocation.d.ts +139 -0
- package/synthetics/privateLocation.js +89 -0
- package/synthetics/privateLocation.js.map +1 -0
- package/synthetics/scriptMonitor.d.ts +341 -0
- package/synthetics/scriptMonitor.js +224 -0
- package/synthetics/scriptMonitor.js.map +1 -0
- package/synthetics/secureCredential.d.ts +6 -6
- package/synthetics/secureCredential.js +2 -2
- package/synthetics/stepMonitor.d.ts +192 -0
- package/synthetics/stepMonitor.js +115 -0
- package/synthetics/stepMonitor.js.map +1 -0
- package/types/input.d.ts +217 -130
- package/types/output.d.ts +213 -126
- package/workflow.d.ts +291 -0
- package/workflow.js +208 -0
- package/workflow.js.map +1 -0
- package/dashboard.d.ts +0 -139
- package/dashboard.js +0 -73
- package/dashboard.js.map +0 -1
- package/plugins/alertCondition.d.ts +0 -167
- package/plugins/alertCondition.js +0 -100
- package/plugins/alertCondition.js.map +0 -1
- package/plugins/getPlugin.d.ts +0 -29
- package/plugins/getPlugin.js +0 -29
- package/plugins/getPlugin.js.map +0 -1
- package/plugins/getPluginComponent.d.ts +0 -33
- package/plugins/getPluginComponent.js +0 -30
- package/plugins/getPluginComponent.js.map +0 -1
- package/synthetics/getMonitor.d.ts +0 -54
- package/synthetics/getMonitor.js +0 -41
- package/synthetics/getMonitor.js.map +0 -1
- package/synthetics/getMonitorLocation.d.ts +0 -71
- package/synthetics/getMonitorLocation.js +0 -46
- package/synthetics/getMonitorLocation.js.map +0 -1
- package/synthetics/monitorScript.d.ts +0 -107
- package/synthetics/monitorScript.js +0 -93
- package/synthetics/monitorScript.js.map +0 -1
package/notificationChannel.js
CHANGED
|
@@ -5,34 +5,233 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.NotificationChannel = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Use this resource to create and manage New Relic notification channels. Details regarding supported products and permissions can be found [here](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/destinations).
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ##### [Webhook](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#webhook)
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
16
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
17
|
+
*
|
|
18
|
+
* const foo = new newrelic.NotificationChannel("foo", {
|
|
19
|
+
* accountId: 12345678,
|
|
20
|
+
* destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
21
|
+
* product: "IINT",
|
|
22
|
+
* properties: [{
|
|
23
|
+
* key: "payload",
|
|
24
|
+
* label: "Payload Template",
|
|
25
|
+
* value: "name: {{ foo }}",
|
|
26
|
+
* }],
|
|
27
|
+
* type: "WEBHOOK",
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
* See additional examples.
|
|
31
|
+
* ## Additional Examples
|
|
32
|
+
*
|
|
33
|
+
* ##### [ServiceNow](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#servicenow)
|
|
34
|
+
* ```typescript
|
|
35
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
36
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
37
|
+
*
|
|
38
|
+
* const foo = new newrelic.NotificationChannel("foo", {
|
|
39
|
+
* accountId: 12345678,
|
|
40
|
+
* destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
41
|
+
* product: "IINT",
|
|
42
|
+
* properties: [
|
|
43
|
+
* {
|
|
44
|
+
* key: "description",
|
|
45
|
+
* value: "General description",
|
|
46
|
+
* },
|
|
47
|
+
* {
|
|
48
|
+
* key: "short_description",
|
|
49
|
+
* value: "Short description",
|
|
50
|
+
* },
|
|
51
|
+
* ],
|
|
52
|
+
* type: "SERVICENOW_INCIDENTS",
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* ##### [Email](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#email)
|
|
57
|
+
* ```typescript
|
|
58
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
59
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
60
|
+
*
|
|
61
|
+
* const foo = new newrelic.NotificationChannel("foo", {
|
|
62
|
+
* accountId: 12345678,
|
|
63
|
+
* destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
64
|
+
* product: "ERROR_TRACKING",
|
|
65
|
+
* properties: [{
|
|
66
|
+
* key: "subject",
|
|
67
|
+
* value: "New Subject Title",
|
|
68
|
+
* }],
|
|
69
|
+
* type: "EMAIL",
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* ##### [Jira Classic](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#jira)
|
|
74
|
+
* ```typescript
|
|
75
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
76
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
77
|
+
*
|
|
78
|
+
* const foo = new newrelic.NotificationChannel("foo", {
|
|
79
|
+
* accountId: 12345678,
|
|
80
|
+
* destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
81
|
+
* product: "ERROR_TRACKING",
|
|
82
|
+
* properties: [
|
|
83
|
+
* {
|
|
84
|
+
* key: "project",
|
|
85
|
+
* value: "10000",
|
|
86
|
+
* },
|
|
87
|
+
* {
|
|
88
|
+
* key: "issuetype",
|
|
89
|
+
* value: "10004",
|
|
90
|
+
* },
|
|
91
|
+
* {
|
|
92
|
+
* key: "description",
|
|
93
|
+
* value: "Issue ID: {{ issueId }}",
|
|
94
|
+
* },
|
|
95
|
+
* {
|
|
96
|
+
* key: "summary",
|
|
97
|
+
* value: "{{ annotations.title.[0] }}",
|
|
98
|
+
* },
|
|
99
|
+
* ],
|
|
100
|
+
* type: "JIRA_CLASSIC",
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* ##### [PagerDuty with account integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
|
|
105
|
+
* ```typescript
|
|
106
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
107
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
108
|
+
*
|
|
109
|
+
* const foo = new newrelic.NotificationChannel("foo", {
|
|
110
|
+
* accountId: 12345678,
|
|
111
|
+
* destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
112
|
+
* product: "IINT",
|
|
113
|
+
* properties: [
|
|
114
|
+
* {
|
|
115
|
+
* key: "summary",
|
|
116
|
+
* value: "General summary",
|
|
117
|
+
* },
|
|
118
|
+
* {
|
|
119
|
+
* key: "service",
|
|
120
|
+
* value: "PTQK3FM",
|
|
121
|
+
* },
|
|
122
|
+
* {
|
|
123
|
+
* key: "email",
|
|
124
|
+
* value: "example@email.com",
|
|
125
|
+
* },
|
|
126
|
+
* ],
|
|
127
|
+
* type: "PAGERDUTY_ACCOUNT_INTEGRATION",
|
|
128
|
+
* });
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* ##### [PagerDuty with service integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
|
|
132
|
+
* ```typescript
|
|
133
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
134
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
135
|
+
*
|
|
136
|
+
* const foo = new newrelic.NotificationChannel("foo", {
|
|
137
|
+
* accountId: 12345678,
|
|
138
|
+
* destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
139
|
+
* product: "IINT",
|
|
140
|
+
* properties: [{
|
|
141
|
+
* key: "summary",
|
|
142
|
+
* value: "General summary",
|
|
143
|
+
* }],
|
|
144
|
+
* type: "PAGERDUTY_SERVICE_INTEGRATION",
|
|
145
|
+
* });
|
|
146
|
+
* ```
|
|
147
|
+
*
|
|
148
|
+
* > **NOTE:** Sensitive data such as channel API keys, service keys, etc are not returned from the underlying API for security reasons and may not be set in state when importing.
|
|
149
|
+
*
|
|
150
|
+
* ## Full Scenario Example
|
|
151
|
+
*
|
|
152
|
+
* Create a destination resource and reference that destination to the channel resource:
|
|
153
|
+
*
|
|
154
|
+
* ### Create a destination
|
|
155
|
+
* ```typescript
|
|
156
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
157
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
158
|
+
*
|
|
159
|
+
* const webhook_destination = new newrelic.NotificationDestination("webhook-destination", {
|
|
160
|
+
* accountId: 12345678,
|
|
161
|
+
* authBasic: {
|
|
162
|
+
* password: "password",
|
|
163
|
+
* user: "username",
|
|
164
|
+
* },
|
|
165
|
+
* properties: [{
|
|
166
|
+
* key: "url",
|
|
167
|
+
* value: "https://webhook.site/94193c01-4a81-4782-8f1b-554d5230395b",
|
|
168
|
+
* }],
|
|
169
|
+
* type: "WEBHOOK",
|
|
170
|
+
* });
|
|
171
|
+
* ```
|
|
172
|
+
*
|
|
173
|
+
* ### Create a channel
|
|
174
|
+
* ```typescript
|
|
175
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
176
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
177
|
+
*
|
|
178
|
+
* const webhook_channel = new newrelic.NotificationChannel("webhook-channel", {
|
|
179
|
+
* accountId: 12345678,
|
|
180
|
+
* type: "WEBHOOK",
|
|
181
|
+
* destinationId: newrelic_notification_destination["webhook-destination"].id,
|
|
182
|
+
* product: "IINT",
|
|
183
|
+
* properties: [{
|
|
184
|
+
* key: "payload",
|
|
185
|
+
* value: "{name: foo}",
|
|
186
|
+
* label: "Payload Template",
|
|
187
|
+
* }],
|
|
188
|
+
* });
|
|
189
|
+
* ```
|
|
190
|
+
*
|
|
191
|
+
* ## Additional Information
|
|
192
|
+
*
|
|
193
|
+
* More details about the channels API can be found [here](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels).
|
|
194
|
+
*/
|
|
8
195
|
class NotificationChannel extends pulumi.CustomResource {
|
|
9
196
|
constructor(name, argsOrState, opts) {
|
|
10
197
|
let resourceInputs = {};
|
|
11
198
|
opts = opts || {};
|
|
12
199
|
if (opts.id) {
|
|
13
200
|
const state = argsOrState;
|
|
201
|
+
resourceInputs["accountId"] = state ? state.accountId : undefined;
|
|
202
|
+
resourceInputs["active"] = state ? state.active : undefined;
|
|
14
203
|
resourceInputs["destinationId"] = state ? state.destinationId : undefined;
|
|
15
204
|
resourceInputs["name"] = state ? state.name : undefined;
|
|
16
205
|
resourceInputs["product"] = state ? state.product : undefined;
|
|
17
206
|
resourceInputs["properties"] = state ? state.properties : undefined;
|
|
207
|
+
resourceInputs["status"] = state ? state.status : undefined;
|
|
18
208
|
resourceInputs["type"] = state ? state.type : undefined;
|
|
19
209
|
}
|
|
20
210
|
else {
|
|
21
211
|
const args = argsOrState;
|
|
212
|
+
if ((!args || args.accountId === undefined) && !opts.urn) {
|
|
213
|
+
throw new Error("Missing required property 'accountId'");
|
|
214
|
+
}
|
|
22
215
|
if ((!args || args.destinationId === undefined) && !opts.urn) {
|
|
23
216
|
throw new Error("Missing required property 'destinationId'");
|
|
24
217
|
}
|
|
25
218
|
if ((!args || args.product === undefined) && !opts.urn) {
|
|
26
219
|
throw new Error("Missing required property 'product'");
|
|
27
220
|
}
|
|
221
|
+
if ((!args || args.properties === undefined) && !opts.urn) {
|
|
222
|
+
throw new Error("Missing required property 'properties'");
|
|
223
|
+
}
|
|
28
224
|
if ((!args || args.type === undefined) && !opts.urn) {
|
|
29
225
|
throw new Error("Missing required property 'type'");
|
|
30
226
|
}
|
|
227
|
+
resourceInputs["accountId"] = args ? args.accountId : undefined;
|
|
228
|
+
resourceInputs["active"] = args ? args.active : undefined;
|
|
31
229
|
resourceInputs["destinationId"] = args ? args.destinationId : undefined;
|
|
32
230
|
resourceInputs["name"] = args ? args.name : undefined;
|
|
33
231
|
resourceInputs["product"] = args ? args.product : undefined;
|
|
34
232
|
resourceInputs["properties"] = args ? args.properties : undefined;
|
|
35
233
|
resourceInputs["type"] = args ? args.type : undefined;
|
|
234
|
+
resourceInputs["status"] = undefined /*out*/;
|
|
36
235
|
}
|
|
37
236
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
38
237
|
super(NotificationChannel.__pulumiType, name, resourceInputs, opts);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notificationChannel.js","sourceRoot":"","sources":["../notificationChannel.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC,MAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;
|
|
1
|
+
{"version":3,"file":"notificationChannel.js","sourceRoot":"","sources":["../notificationChannel.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0LG;AACH,MAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;IAqE1D,YAAY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CAAC,SAAS,CAAC;YAC5D,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;YAClE,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAChD;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;IA7GD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAgC,EAAE,IAAmC;QAC9H,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC1E,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,mBAAmB,CAAC,YAAY,CAAC;IACpE,CAAC;;AA1BL,kDA+GC;AAjGG,gBAAgB;AACO,gCAAY,GAAG,wDAAwD,CAAC"}
|
|
@@ -1,5 +1,132 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
import { input as inputs, output as outputs } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Use this resource to create and manage New Relic notification destinations. Details regarding supported products and permissions can be found [here](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/destinations).
|
|
5
|
+
*
|
|
6
|
+
* ## Example Usage
|
|
7
|
+
*
|
|
8
|
+
* ##### [Webhook](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/#webhook)
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
12
|
+
*
|
|
13
|
+
* const foo = new newrelic.NotificationDestination("foo", {
|
|
14
|
+
* accountId: 12345678,
|
|
15
|
+
* authBasic: {
|
|
16
|
+
* password: "password",
|
|
17
|
+
* user: "username",
|
|
18
|
+
* },
|
|
19
|
+
* properties: [{
|
|
20
|
+
* key: "url",
|
|
21
|
+
* value: "https://webhook.site/",
|
|
22
|
+
* }],
|
|
23
|
+
* type: "WEBHOOK",
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
* See additional examples.
|
|
27
|
+
* ## Additional Examples
|
|
28
|
+
*
|
|
29
|
+
* ##### [ServiceNow](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/#servicenow)
|
|
30
|
+
*
|
|
31
|
+
* ```typescript
|
|
32
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
33
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
34
|
+
*
|
|
35
|
+
* const foo = new newrelic.NotificationDestination("foo", {
|
|
36
|
+
* accountId: 12345678,
|
|
37
|
+
* authBasic: {
|
|
38
|
+
* password: "password",
|
|
39
|
+
* user: "username",
|
|
40
|
+
* },
|
|
41
|
+
* properties: [
|
|
42
|
+
* {
|
|
43
|
+
* key: "url",
|
|
44
|
+
* value: "https://service-now.com/",
|
|
45
|
+
* },
|
|
46
|
+
* {
|
|
47
|
+
* key: "two_way_integration",
|
|
48
|
+
* value: "true",
|
|
49
|
+
* },
|
|
50
|
+
* ],
|
|
51
|
+
* type: "SERVICE_NOW",
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* ##### [Email](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/#email)
|
|
56
|
+
* ```typescript
|
|
57
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
58
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
59
|
+
*
|
|
60
|
+
* const foo = new newrelic.NotificationDestination("foo", {
|
|
61
|
+
* accountId: 12345678,
|
|
62
|
+
* properties: [{
|
|
63
|
+
* key: "email",
|
|
64
|
+
* value: "email@email.com,email2@email.com",
|
|
65
|
+
* }],
|
|
66
|
+
* type: "EMAIL",
|
|
67
|
+
* });
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* ##### [Jira](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/#jira)
|
|
71
|
+
* ```typescript
|
|
72
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
73
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
74
|
+
*
|
|
75
|
+
* const foo = new newrelic.NotificationDestination("foo", {
|
|
76
|
+
* accountId: 12345678,
|
|
77
|
+
* authBasic: {
|
|
78
|
+
* password: "password",
|
|
79
|
+
* user: "example@email.com",
|
|
80
|
+
* },
|
|
81
|
+
* properties: [{
|
|
82
|
+
* key: "url",
|
|
83
|
+
* value: "https://example.atlassian.net",
|
|
84
|
+
* }],
|
|
85
|
+
* type: "JIRA",
|
|
86
|
+
* });
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* ##### [PagerDuty with service integration](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/#pagerduty-sli)
|
|
90
|
+
* ```typescript
|
|
91
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
92
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
93
|
+
*
|
|
94
|
+
* const foo = new newrelic.NotificationDestination("foo", {
|
|
95
|
+
* accountId: 12345678,
|
|
96
|
+
* authToken: {
|
|
97
|
+
* prefix: "Token token=",
|
|
98
|
+
* token: "10567a689d984d03c021034b22a789e2",
|
|
99
|
+
* },
|
|
100
|
+
* type: "PAGERDUTY_SERVICE_INTEGRATION",
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
103
|
+
*
|
|
104
|
+
* ##### [PagerDuty with account integration](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/#pagerduty-ali)
|
|
105
|
+
* ```typescript
|
|
106
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
107
|
+
* import * as newrelic from "@pulumi/newrelic";
|
|
108
|
+
*
|
|
109
|
+
* const foo = new newrelic.NotificationDestination("foo", {
|
|
110
|
+
* accountId: 12345678,
|
|
111
|
+
* authToken: {
|
|
112
|
+
* prefix: "Token token=",
|
|
113
|
+
* token: "u+E8EU3MhsZwLfZ1ic1A",
|
|
114
|
+
* },
|
|
115
|
+
* properties: [{
|
|
116
|
+
* key: "two_way_integration",
|
|
117
|
+
* value: "true",
|
|
118
|
+
* }],
|
|
119
|
+
* type: "PAGERDUTY_ACCOUNT_INTEGRATION",
|
|
120
|
+
* });
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
* > **NOTE:** Sensitive data such as destination API keys, service keys, auth object, etc are not returned from the underlying API for security reasons and may not be set in state when importing.
|
|
124
|
+
*
|
|
125
|
+
* ## Additional Information
|
|
126
|
+
*
|
|
127
|
+
* More information about destinations integrations can be found in NewRelic [documentation](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/).
|
|
128
|
+
* More details about the destinations API can be found [here](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-destinations).
|
|
129
|
+
*/
|
|
3
130
|
export declare class NotificationDestination extends pulumi.CustomResource {
|
|
4
131
|
/**
|
|
5
132
|
* Get an existing NotificationDestination resource's state with the given name, ID, and optional extra
|
|
@@ -17,22 +144,43 @@ export declare class NotificationDestination extends pulumi.CustomResource {
|
|
|
17
144
|
*/
|
|
18
145
|
static isInstance(obj: any): obj is NotificationDestination;
|
|
19
146
|
/**
|
|
20
|
-
*
|
|
147
|
+
* Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
|
|
21
148
|
*/
|
|
22
|
-
readonly
|
|
23
|
-
[key: string]: string;
|
|
24
|
-
} | undefined>;
|
|
149
|
+
readonly accountId: pulumi.Output<number>;
|
|
25
150
|
/**
|
|
26
|
-
*
|
|
151
|
+
* Indicates whether the destination is active.
|
|
152
|
+
*/
|
|
153
|
+
readonly active: pulumi.Output<boolean | undefined>;
|
|
154
|
+
/**
|
|
155
|
+
* A nested block that describes a basic username and password authentication credentials. Only one authBasic block is permitted per notification destination definition. See Nested authBasic blocks below for details.
|
|
156
|
+
*/
|
|
157
|
+
readonly authBasic: pulumi.Output<outputs.NotificationDestinationAuthBasic | undefined>;
|
|
158
|
+
/**
|
|
159
|
+
* A nested block that describes a token authentication credentials. Only one authToken block is permitted per notification destination definition. See Nested authToken blocks below for details.
|
|
160
|
+
*/
|
|
161
|
+
readonly authToken: pulumi.Output<outputs.NotificationDestinationAuthToken | undefined>;
|
|
162
|
+
/**
|
|
163
|
+
* Indicates whether the user is authenticated with the destination.
|
|
164
|
+
*/
|
|
165
|
+
readonly isUserAuthenticated: pulumi.Output<boolean>;
|
|
166
|
+
/**
|
|
167
|
+
* The last time a notification was sent.
|
|
168
|
+
*/
|
|
169
|
+
readonly lastSent: pulumi.Output<string>;
|
|
170
|
+
/**
|
|
171
|
+
* The name of the destination.
|
|
27
172
|
*/
|
|
28
173
|
readonly name: pulumi.Output<string>;
|
|
29
174
|
/**
|
|
30
|
-
*
|
|
175
|
+
* A nested block that describes a notification destination property. See Nested property blocks below for details.
|
|
176
|
+
*/
|
|
177
|
+
readonly properties: pulumi.Output<outputs.NotificationDestinationProperty[]>;
|
|
178
|
+
/**
|
|
179
|
+
* The status of the destination.
|
|
31
180
|
*/
|
|
32
|
-
readonly
|
|
181
|
+
readonly status: pulumi.Output<string>;
|
|
33
182
|
/**
|
|
34
|
-
*
|
|
35
|
-
* PAGERDUTY_SERVICE_INTEGRATION).
|
|
183
|
+
* The type of destination. One of: `EMAIL`, `SERVICE_NOW`, `WEBHOOK`, `JIRA`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `PAGERDUTY_SERVICE_INTEGRATION`.
|
|
36
184
|
*/
|
|
37
185
|
readonly type: pulumi.Output<string>;
|
|
38
186
|
/**
|
|
@@ -49,22 +197,43 @@ export declare class NotificationDestination extends pulumi.CustomResource {
|
|
|
49
197
|
*/
|
|
50
198
|
export interface NotificationDestinationState {
|
|
51
199
|
/**
|
|
52
|
-
*
|
|
200
|
+
* Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
|
|
201
|
+
*/
|
|
202
|
+
accountId?: pulumi.Input<number>;
|
|
203
|
+
/**
|
|
204
|
+
* Indicates whether the destination is active.
|
|
53
205
|
*/
|
|
54
|
-
|
|
55
|
-
[key: string]: pulumi.Input<string>;
|
|
56
|
-
}>;
|
|
206
|
+
active?: pulumi.Input<boolean>;
|
|
57
207
|
/**
|
|
58
|
-
*
|
|
208
|
+
* A nested block that describes a basic username and password authentication credentials. Only one authBasic block is permitted per notification destination definition. See Nested authBasic blocks below for details.
|
|
209
|
+
*/
|
|
210
|
+
authBasic?: pulumi.Input<inputs.NotificationDestinationAuthBasic>;
|
|
211
|
+
/**
|
|
212
|
+
* A nested block that describes a token authentication credentials. Only one authToken block is permitted per notification destination definition. See Nested authToken blocks below for details.
|
|
213
|
+
*/
|
|
214
|
+
authToken?: pulumi.Input<inputs.NotificationDestinationAuthToken>;
|
|
215
|
+
/**
|
|
216
|
+
* Indicates whether the user is authenticated with the destination.
|
|
217
|
+
*/
|
|
218
|
+
isUserAuthenticated?: pulumi.Input<boolean>;
|
|
219
|
+
/**
|
|
220
|
+
* The last time a notification was sent.
|
|
221
|
+
*/
|
|
222
|
+
lastSent?: pulumi.Input<string>;
|
|
223
|
+
/**
|
|
224
|
+
* The name of the destination.
|
|
59
225
|
*/
|
|
60
226
|
name?: pulumi.Input<string>;
|
|
61
227
|
/**
|
|
62
|
-
*
|
|
228
|
+
* A nested block that describes a notification destination property. See Nested property blocks below for details.
|
|
63
229
|
*/
|
|
64
230
|
properties?: pulumi.Input<pulumi.Input<inputs.NotificationDestinationProperty>[]>;
|
|
65
231
|
/**
|
|
66
|
-
*
|
|
67
|
-
|
|
232
|
+
* The status of the destination.
|
|
233
|
+
*/
|
|
234
|
+
status?: pulumi.Input<string>;
|
|
235
|
+
/**
|
|
236
|
+
* The type of destination. One of: `EMAIL`, `SERVICE_NOW`, `WEBHOOK`, `JIRA`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `PAGERDUTY_SERVICE_INTEGRATION`.
|
|
68
237
|
*/
|
|
69
238
|
type?: pulumi.Input<string>;
|
|
70
239
|
}
|
|
@@ -73,22 +242,31 @@ export interface NotificationDestinationState {
|
|
|
73
242
|
*/
|
|
74
243
|
export interface NotificationDestinationArgs {
|
|
75
244
|
/**
|
|
76
|
-
*
|
|
245
|
+
* Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
|
|
246
|
+
*/
|
|
247
|
+
accountId?: pulumi.Input<number>;
|
|
248
|
+
/**
|
|
249
|
+
* Indicates whether the destination is active.
|
|
250
|
+
*/
|
|
251
|
+
active?: pulumi.Input<boolean>;
|
|
252
|
+
/**
|
|
253
|
+
* A nested block that describes a basic username and password authentication credentials. Only one authBasic block is permitted per notification destination definition. See Nested authBasic blocks below for details.
|
|
254
|
+
*/
|
|
255
|
+
authBasic?: pulumi.Input<inputs.NotificationDestinationAuthBasic>;
|
|
256
|
+
/**
|
|
257
|
+
* A nested block that describes a token authentication credentials. Only one authToken block is permitted per notification destination definition. See Nested authToken blocks below for details.
|
|
77
258
|
*/
|
|
78
|
-
|
|
79
|
-
[key: string]: pulumi.Input<string>;
|
|
80
|
-
}>;
|
|
259
|
+
authToken?: pulumi.Input<inputs.NotificationDestinationAuthToken>;
|
|
81
260
|
/**
|
|
82
|
-
*
|
|
261
|
+
* The name of the destination.
|
|
83
262
|
*/
|
|
84
263
|
name?: pulumi.Input<string>;
|
|
85
264
|
/**
|
|
86
|
-
*
|
|
265
|
+
* A nested block that describes a notification destination property. See Nested property blocks below for details.
|
|
87
266
|
*/
|
|
88
|
-
properties
|
|
267
|
+
properties: pulumi.Input<pulumi.Input<inputs.NotificationDestinationProperty>[]>;
|
|
89
268
|
/**
|
|
90
|
-
*
|
|
91
|
-
* PAGERDUTY_SERVICE_INTEGRATION).
|
|
269
|
+
* The type of destination. One of: `EMAIL`, `SERVICE_NOW`, `WEBHOOK`, `JIRA`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `PAGERDUTY_SERVICE_INTEGRATION`.
|
|
92
270
|
*/
|
|
93
271
|
type: pulumi.Input<string>;
|
|
94
272
|
}
|