@pulumi/newrelic 4.20.0 → 5.1.0-alpha.1663018157

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +2 -2
  2. package/alertPolicyChannel.d.ts +1 -1
  3. package/alertPolicyChannel.js +1 -1
  4. package/cloud/awsIntegrations.d.ts +24 -0
  5. package/cloud/awsIntegrations.js +4 -0
  6. package/cloud/awsIntegrations.js.map +1 -1
  7. package/getAlertChannel.d.ts +9 -0
  8. package/getAlertChannel.js +1 -0
  9. package/getAlertChannel.js.map +1 -1
  10. package/getAlertPolicy.d.ts +6 -0
  11. package/getAlertPolicy.js.map +1 -1
  12. package/index.d.ts +1 -1
  13. package/index.js +5 -5
  14. package/index.js.map +1 -1
  15. package/notificationChannel.d.ts +143 -28
  16. package/notificationChannel.js +112 -17
  17. package/notificationChannel.js.map +1 -1
  18. package/notificationDestination.d.ts +124 -50
  19. package/notificationDestination.js +67 -32
  20. package/notificationDestination.js.map +1 -1
  21. package/nrqlAlertCondition.d.ts +12 -15
  22. package/nrqlAlertCondition.js +0 -3
  23. package/nrqlAlertCondition.js.map +1 -1
  24. package/package.json +2 -2
  25. package/package.json.dev +2 -2
  26. package/plugins/index.d.ts +0 -3
  27. package/plugins/index.js +0 -7
  28. package/plugins/index.js.map +1 -1
  29. package/synthetics/alertCondition.d.ts +3 -19
  30. package/synthetics/alertCondition.js +0 -16
  31. package/synthetics/alertCondition.js.map +1 -1
  32. package/synthetics/brokenLinksMonitor.d.ts +198 -0
  33. package/synthetics/brokenLinksMonitor.js +131 -0
  34. package/synthetics/brokenLinksMonitor.js.map +1 -0
  35. package/synthetics/certCheckMonitor.d.ts +203 -0
  36. package/synthetics/certCheckMonitor.js +135 -0
  37. package/synthetics/certCheckMonitor.js.map +1 -0
  38. package/synthetics/getPrivateLocation.d.ts +34 -0
  39. package/synthetics/getPrivateLocation.js +25 -0
  40. package/synthetics/getPrivateLocation.js.map +1 -0
  41. package/synthetics/getSecureCredential.d.ts +0 -4
  42. package/synthetics/getSecureCredential.js.map +1 -1
  43. package/synthetics/index.d.ts +6 -3
  44. package/synthetics/index.js +26 -7
  45. package/synthetics/index.js.map +1 -1
  46. package/synthetics/monitor.d.ts +221 -77
  47. package/synthetics/monitor.js +114 -47
  48. package/synthetics/monitor.js.map +1 -1
  49. package/synthetics/multiLocationAlertCondition.d.ts +32 -3
  50. package/synthetics/multiLocationAlertCondition.js +29 -0
  51. package/synthetics/multiLocationAlertCondition.js.map +1 -1
  52. package/synthetics/privateLocation.d.ts +139 -0
  53. package/synthetics/privateLocation.js +89 -0
  54. package/synthetics/privateLocation.js.map +1 -0
  55. package/synthetics/scriptMonitor.d.ts +341 -0
  56. package/synthetics/scriptMonitor.js +224 -0
  57. package/synthetics/scriptMonitor.js.map +1 -0
  58. package/synthetics/secureCredential.d.ts +6 -6
  59. package/synthetics/secureCredential.js +2 -2
  60. package/synthetics/stepMonitor.d.ts +192 -0
  61. package/synthetics/stepMonitor.js +115 -0
  62. package/synthetics/stepMonitor.js.map +1 -0
  63. package/types/input.d.ts +213 -126
  64. package/types/output.d.ts +213 -126
  65. package/workflow.d.ts +291 -0
  66. package/workflow.js +208 -0
  67. package/workflow.js.map +1 -0
  68. package/dashboard.d.ts +0 -139
  69. package/dashboard.js +0 -73
  70. package/dashboard.js.map +0 -1
  71. package/plugins/alertCondition.d.ts +0 -167
  72. package/plugins/alertCondition.js +0 -100
  73. package/plugins/alertCondition.js.map +0 -1
  74. package/plugins/getPlugin.d.ts +0 -29
  75. package/plugins/getPlugin.js +0 -29
  76. package/plugins/getPlugin.js.map +0 -1
  77. package/plugins/getPluginComponent.d.ts +0 -33
  78. package/plugins/getPluginComponent.js +0 -30
  79. package/plugins/getPluginComponent.js.map +0 -1
  80. package/synthetics/getMonitor.d.ts +0 -54
  81. package/synthetics/getMonitor.js +0 -41
  82. package/synthetics/getMonitor.js.map +0 -1
  83. package/synthetics/getMonitorLocation.d.ts +0 -71
  84. package/synthetics/getMonitorLocation.js +0 -46
  85. package/synthetics/getMonitorLocation.js.map +0 -1
  86. package/synthetics/monitorScript.d.ts +0 -107
  87. package/synthetics/monitorScript.js +0 -93
  88. package/synthetics/monitorScript.js.map +0 -1
@@ -6,24 +6,23 @@ exports.NotificationChannel = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
8
  /**
9
- * Use this resource to create and manage New Relic notification channels.
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
10
  *
11
11
  * ## Example Usage
12
12
  *
13
- * ##### Webhook
13
+ * ##### [Webhook](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#webhook)
14
14
  * ```typescript
15
15
  * import * as pulumi from "@pulumi/pulumi";
16
16
  * import * as newrelic from "@pulumi/newrelic";
17
17
  *
18
18
  * const foo = new newrelic.NotificationChannel("foo", {
19
- * destinationId: "1234",
19
+ * accountId: 12345678,
20
+ * destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
20
21
  * product: "IINT",
21
22
  * properties: [{
22
23
  * key: "payload",
23
24
  * label: "Payload Template",
24
- * value: `{
25
- * "name": "foo"
26
- * }`,
25
+ * value: "name: {{ foo }}",
27
26
  * }],
28
27
  * type: "WEBHOOK",
29
28
  * });
@@ -31,14 +30,15 @@ const utilities = require("./utilities");
31
30
  * See additional examples.
32
31
  * ## Additional Examples
33
32
  *
34
- * ##### ServiceNow
33
+ * ##### [ServiceNow](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#servicenow)
35
34
  * ```typescript
36
35
  * import * as pulumi from "@pulumi/pulumi";
37
36
  * import * as newrelic from "@pulumi/newrelic";
38
37
  *
39
38
  * const foo = new newrelic.NotificationChannel("foo", {
40
- * destinationId: "1234",
41
- * product: "PD",
39
+ * accountId: 12345678,
40
+ * destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
41
+ * product: "IINT",
42
42
  * properties: [
43
43
  * {
44
44
  * key: "description",
@@ -53,25 +53,62 @@ const utilities = require("./utilities");
53
53
  * });
54
54
  * ```
55
55
  *
56
- * ##### Email
56
+ * ##### [Email](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#email)
57
57
  * ```typescript
58
58
  * import * as pulumi from "@pulumi/pulumi";
59
59
  * import * as newrelic from "@pulumi/newrelic";
60
60
  *
61
61
  * const foo = new newrelic.NotificationChannel("foo", {
62
- * destinationId: "1234",
62
+ * accountId: 12345678,
63
+ * destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
63
64
  * product: "ERROR_TRACKING",
65
+ * properties: [{
66
+ * key: "subject",
67
+ * value: "New Subject Title",
68
+ * }],
64
69
  * type: "EMAIL",
65
70
  * });
66
71
  * ```
67
72
  *
68
- * ##### PagerDuty with account integration
73
+ * ##### [Jira Classic](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#jira)
69
74
  * ```typescript
70
75
  * import * as pulumi from "@pulumi/pulumi";
71
76
  * import * as newrelic from "@pulumi/newrelic";
72
77
  *
73
78
  * const foo = new newrelic.NotificationChannel("foo", {
74
- * destinationId: "1234",
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",
75
112
  * product: "IINT",
76
113
  * properties: [
77
114
  * {
@@ -80,24 +117,25 @@ const utilities = require("./utilities");
80
117
  * },
81
118
  * {
82
119
  * key: "service",
83
- * value: "1234",
120
+ * value: "PTQK3FM",
84
121
  * },
85
122
  * {
86
123
  * key: "email",
87
- * value: "test@test.com",
124
+ * value: "example@email.com",
88
125
  * },
89
126
  * ],
90
127
  * type: "PAGERDUTY_ACCOUNT_INTEGRATION",
91
128
  * });
92
129
  * ```
93
130
  *
94
- * ##### PagerDuty with service integration
131
+ * ##### [PagerDuty with service integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
95
132
  * ```typescript
96
133
  * import * as pulumi from "@pulumi/pulumi";
97
134
  * import * as newrelic from "@pulumi/newrelic";
98
135
  *
99
136
  * const foo = new newrelic.NotificationChannel("foo", {
100
- * destinationId: "1234",
137
+ * accountId: 12345678,
138
+ * destinationId: "00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
101
139
  * product: "IINT",
102
140
  * properties: [{
103
141
  * key: "summary",
@@ -108,6 +146,51 @@ const utilities = require("./utilities");
108
146
  * ```
109
147
  *
110
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).
111
194
  */
112
195
  class NotificationChannel extends pulumi.CustomResource {
113
196
  constructor(name, argsOrState, opts) {
@@ -115,28 +198,40 @@ class NotificationChannel extends pulumi.CustomResource {
115
198
  opts = opts || {};
116
199
  if (opts.id) {
117
200
  const state = argsOrState;
201
+ resourceInputs["accountId"] = state ? state.accountId : undefined;
202
+ resourceInputs["active"] = state ? state.active : undefined;
118
203
  resourceInputs["destinationId"] = state ? state.destinationId : undefined;
119
204
  resourceInputs["name"] = state ? state.name : undefined;
120
205
  resourceInputs["product"] = state ? state.product : undefined;
121
206
  resourceInputs["properties"] = state ? state.properties : undefined;
207
+ resourceInputs["status"] = state ? state.status : undefined;
122
208
  resourceInputs["type"] = state ? state.type : undefined;
123
209
  }
124
210
  else {
125
211
  const args = argsOrState;
212
+ if ((!args || args.accountId === undefined) && !opts.urn) {
213
+ throw new Error("Missing required property 'accountId'");
214
+ }
126
215
  if ((!args || args.destinationId === undefined) && !opts.urn) {
127
216
  throw new Error("Missing required property 'destinationId'");
128
217
  }
129
218
  if ((!args || args.product === undefined) && !opts.urn) {
130
219
  throw new Error("Missing required property 'product'");
131
220
  }
221
+ if ((!args || args.properties === undefined) && !opts.urn) {
222
+ throw new Error("Missing required property 'properties'");
223
+ }
132
224
  if ((!args || args.type === undefined) && !opts.urn) {
133
225
  throw new Error("Missing required property 'type'");
134
226
  }
227
+ resourceInputs["accountId"] = args ? args.accountId : undefined;
228
+ resourceInputs["active"] = args ? args.active : undefined;
135
229
  resourceInputs["destinationId"] = args ? args.destinationId : undefined;
136
230
  resourceInputs["name"] = args ? args.name : undefined;
137
231
  resourceInputs["product"] = args ? args.product : undefined;
138
232
  resourceInputs["properties"] = args ? args.properties : undefined;
139
233
  resourceInputs["type"] = args ? args.type : undefined;
234
+ resourceInputs["status"] = undefined /*out*/;
140
235
  }
141
236
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
142
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuGG;AACH,MAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;IAyD1D,YAAY,IAAY,EAAE,WAAgE,EAAE,IAAmC;QAC3H,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAmD,CAAC;YAClE,cAAc,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,a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1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import { input as inputs, output as outputs } from "./types";
3
3
  /**
4
- * Use this resource to create and manage New Relic notification destinations.
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
5
  *
6
6
  * ## Example Usage
7
7
  *
8
- * ##### Webhook
8
+ * ##### [Webhook](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/#webhook)
9
9
  * ```typescript
10
10
  * import * as pulumi from "@pulumi/pulumi";
11
11
  * import * as newrelic from "@pulumi/newrelic";
12
12
  *
13
13
  * const foo = new newrelic.NotificationDestination("foo", {
14
- * auth: {
15
- * password: "1234",
16
- * type: "BASIC",
17
- * user: "user",
14
+ * accountId: 12345678,
15
+ * authBasic: {
16
+ * password: "password",
17
+ * user: "username",
18
18
  * },
19
19
  * properties: [{
20
20
  * key: "url",
@@ -26,17 +26,17 @@ import { input as inputs, output as outputs } from "./types";
26
26
  * See additional examples.
27
27
  * ## Additional Examples
28
28
  *
29
- * ##### ServiceNow
29
+ * ##### [ServiceNow](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/#servicenow)
30
30
  *
31
31
  * ```typescript
32
32
  * import * as pulumi from "@pulumi/pulumi";
33
33
  * import * as newrelic from "@pulumi/newrelic";
34
34
  *
35
35
  * const foo = new newrelic.NotificationDestination("foo", {
36
- * auth: {
37
- * password: "pass",
38
- * type: "BASIC",
39
- * user: "user",
36
+ * accountId: 12345678,
37
+ * authBasic: {
38
+ * password: "password",
39
+ * user: "username",
40
40
  * },
41
41
  * properties: [
42
42
  * {
@@ -52,17 +52,13 @@ import { input as inputs, output as outputs } from "./types";
52
52
  * });
53
53
  * ```
54
54
  *
55
- * ##### Email
55
+ * ##### [Email](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/#email)
56
56
  * ```typescript
57
57
  * import * as pulumi from "@pulumi/pulumi";
58
58
  * import * as newrelic from "@pulumi/newrelic";
59
59
  *
60
60
  * const foo = new newrelic.NotificationDestination("foo", {
61
- * auth: {
62
- * prefix: "prefix",
63
- * token: "bearer",
64
- * type: "TOKEN",
65
- * },
61
+ * accountId: 12345678,
66
62
  * properties: [{
67
63
  * key: "email",
68
64
  * value: "email@email.com,email2@email.com",
@@ -71,41 +67,65 @@ import { input as inputs, output as outputs } from "./types";
71
67
  * });
72
68
  * ```
73
69
  *
74
- * ##### PagerDuty with service integration
70
+ * ##### [Jira](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/#jira)
75
71
  * ```typescript
76
72
  * import * as pulumi from "@pulumi/pulumi";
77
73
  * import * as newrelic from "@pulumi/newrelic";
78
74
  *
79
75
  * const foo = new newrelic.NotificationDestination("foo", {
80
- * auth: {
81
- * prefix: "prefix",
82
- * token: "bearer",
83
- * type: "TOKEN",
76
+ * accountId: 12345678,
77
+ * authBasic: {
78
+ * password: "password",
79
+ * user: "example@email.com",
84
80
  * },
85
81
  * properties: [{
86
- * key: "two_way_integration",
87
- * value: "true",
82
+ * key: "url",
83
+ * value: "https://example.atlassian.net",
88
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
+ * },
89
100
  * type: "PAGERDUTY_SERVICE_INTEGRATION",
90
101
  * });
91
102
  * ```
92
103
  *
93
- * ##### PagerDuty with account integration
104
+ * ##### [PagerDuty with account integration](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/notification-integrations/#pagerduty-ali)
94
105
  * ```typescript
95
106
  * import * as pulumi from "@pulumi/pulumi";
96
107
  * import * as newrelic from "@pulumi/newrelic";
97
108
  *
98
109
  * const foo = new newrelic.NotificationDestination("foo", {
99
- * auth: {
100
- * prefix: "prefix",
101
- * token: "bearer",
102
- * type: "TOKEN",
110
+ * accountId: 12345678,
111
+ * authToken: {
112
+ * prefix: "Token token=",
113
+ * token: "u+E8EU3MhsZwLfZ1ic1A",
103
114
  * },
115
+ * properties: [{
116
+ * key: "two_way_integration",
117
+ * value: "true",
118
+ * }],
104
119
  * type: "PAGERDUTY_ACCOUNT_INTEGRATION",
105
120
  * });
106
121
  * ```
107
122
  *
108
- * > **NOTE:** Sensitive data such as destination API keys, service keys, etc are not returned from the underlying API for security reasons and may not be set in state when importing.
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).
109
129
  */
110
130
  export declare class NotificationDestination extends pulumi.CustomResource {
111
131
  /**
@@ -124,21 +144,43 @@ export declare class NotificationDestination extends pulumi.CustomResource {
124
144
  */
125
145
  static isInstance(obj: any): obj is NotificationDestination;
126
146
  /**
127
- * A nested block that describes a notification destination authentication. Only one auth block is permitted per notification destination definition. See Nested auth blocks below for details.
147
+ * Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
148
+ */
149
+ readonly accountId: pulumi.Output<number>;
150
+ /**
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.
128
160
  */
129
- readonly auth: pulumi.Output<{
130
- [key: string]: string;
131
- } | undefined>;
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>;
132
170
  /**
133
171
  * The name of the destination.
134
172
  */
135
173
  readonly name: pulumi.Output<string>;
136
174
  /**
137
- * A nested block that describes a notification destination properties. Only one properties block is permitted per notification destination definition. See Nested properties blocks below for details.
175
+ * A nested block that describes a notification destination property. See Nested property blocks below for details.
138
176
  */
139
- readonly properties: pulumi.Output<outputs.NotificationDestinationProperty[] | undefined>;
177
+ readonly properties: pulumi.Output<outputs.NotificationDestinationProperty[]>;
140
178
  /**
141
- * The type of the auth. One of: `TOKEN` or `BASIC`.
179
+ * The status of the destination.
180
+ */
181
+ readonly status: pulumi.Output<string>;
182
+ /**
183
+ * The type of destination. One of: `EMAIL`, `SERVICE_NOW`, `WEBHOOK`, `JIRA`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `PAGERDUTY_SERVICE_INTEGRATION`.
142
184
  */
143
185
  readonly type: pulumi.Output<string>;
144
186
  /**
@@ -155,21 +197,43 @@ export declare class NotificationDestination extends pulumi.CustomResource {
155
197
  */
156
198
  export interface NotificationDestinationState {
157
199
  /**
158
- * A nested block that describes a notification destination authentication. Only one auth block is permitted per notification destination definition. See Nested auth blocks below for details.
200
+ * Determines the New Relic account where the notification destination will be created. Defaults to the account associated with the API key used.
159
201
  */
160
- auth?: pulumi.Input<{
161
- [key: string]: pulumi.Input<string>;
162
- }>;
202
+ accountId?: pulumi.Input<number>;
203
+ /**
204
+ * Indicates whether the destination is active.
205
+ */
206
+ active?: pulumi.Input<boolean>;
207
+ /**
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>;
163
223
  /**
164
224
  * The name of the destination.
165
225
  */
166
226
  name?: pulumi.Input<string>;
167
227
  /**
168
- * A nested block that describes a notification destination properties. Only one properties block is permitted per notification destination definition. See Nested properties blocks below for details.
228
+ * A nested block that describes a notification destination property. See Nested property blocks below for details.
169
229
  */
170
230
  properties?: pulumi.Input<pulumi.Input<inputs.NotificationDestinationProperty>[]>;
171
231
  /**
172
- * The type of the auth. One of: `TOKEN` or `BASIC`.
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`.
173
237
  */
174
238
  type?: pulumi.Input<string>;
175
239
  }
@@ -178,21 +242,31 @@ export interface NotificationDestinationState {
178
242
  */
179
243
  export interface NotificationDestinationArgs {
180
244
  /**
181
- * A nested block that describes a notification destination authentication. Only one auth block is permitted per notification destination definition. See Nested auth blocks below for details.
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.
182
254
  */
183
- auth?: pulumi.Input<{
184
- [key: string]: pulumi.Input<string>;
185
- }>;
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.
258
+ */
259
+ authToken?: pulumi.Input<inputs.NotificationDestinationAuthToken>;
186
260
  /**
187
261
  * The name of the destination.
188
262
  */
189
263
  name?: pulumi.Input<string>;
190
264
  /**
191
- * A nested block that describes a notification destination properties. Only one properties block is permitted per notification destination definition. See Nested properties blocks below for details.
265
+ * A nested block that describes a notification destination property. See Nested property blocks below for details.
192
266
  */
193
- properties?: pulumi.Input<pulumi.Input<inputs.NotificationDestinationProperty>[]>;
267
+ properties: pulumi.Input<pulumi.Input<inputs.NotificationDestinationProperty>[]>;
194
268
  /**
195
- * The type of the auth. One of: `TOKEN` or `BASIC`.
269
+ * The type of destination. One of: `EMAIL`, `SERVICE_NOW`, `WEBHOOK`, `JIRA`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `PAGERDUTY_SERVICE_INTEGRATION`.
196
270
  */
197
271
  type: pulumi.Input<string>;
198
272
  }