@pulumi/newrelic 4.20.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.
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
@@ -0,0 +1,341 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import { input as inputs, output as outputs } from "../types";
3
+ /**
4
+ * Use this resource to create update, and delete a Script API or Script Browser Synthetics Monitor in New Relic.
5
+ *
6
+ * ## Example Usage
7
+ *
8
+ * ##### Type: `SCRIPT_API`
9
+ *
10
+ * > **NOTE:** The preferred runtime is `NODE_16.10.0` while configuring the `SCRIPT_API` monitor. Other runtime may be deprecated in the future and receive fewer product updates.
11
+ *
12
+ * ```typescript
13
+ * import * as pulumi from "@pulumi/pulumi";
14
+ * import * as newrelic from "@pulumi/newrelic";
15
+ *
16
+ * const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
17
+ * locationsPublics: [
18
+ * "AP_SOUTH_1",
19
+ * "AP_EAST_1",
20
+ * ],
21
+ * period: "EVERY_6_HOURS",
22
+ * runtimeType: "NODE_API",
23
+ * runtimeTypeVersion: "16.10",
24
+ * script: "console.log('terraform integration test updated')",
25
+ * scriptLanguage: "JAVASCRIPT",
26
+ * status: "ENABLED",
27
+ * tags: [{
28
+ * key: "some_key",
29
+ * values: ["some_value"],
30
+ * }],
31
+ * type: "SCRIPT_API",
32
+ * });
33
+ * ```
34
+ * ##### Type: `SCRIPT_BROWSER`
35
+ *
36
+ * > **NOTE:** The preferred runtime is `CHROME_BROWSER_100` while configuring the `SCRIPT_BROWSER` monitor. Other runtime may be deprecated in the future and receive fewer product updates.
37
+ *
38
+ * ```typescript
39
+ * import * as pulumi from "@pulumi/pulumi";
40
+ * import * as newrelic from "@pulumi/newrelic";
41
+ *
42
+ * const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
43
+ * enableScreenshotOnFailureAndScript: false,
44
+ * locationsPublics: [
45
+ * "AP_SOUTH_1",
46
+ * "AP_EAST_1",
47
+ * ],
48
+ * period: "EVERY_HOUR",
49
+ * runtimeType: "CHROME_BROWSER",
50
+ * runtimeTypeVersion: "100",
51
+ * script: "$browser.get('https://one.newrelic.com')",
52
+ * scriptLanguage: "JAVASCRIPT",
53
+ * status: "DISABLED",
54
+ * tags: [{
55
+ * key: "Name",
56
+ * values: [
57
+ * "scriptedMonitor",
58
+ * "hello",
59
+ * ],
60
+ * }],
61
+ * type: "SCRIPT_BROWSER",
62
+ * });
63
+ * ```
64
+ * See additional examples.
65
+ * ## Additional Examples
66
+ *
67
+ * ### Create a monitor with a private location
68
+ *
69
+ * The below example shows how you can define a private location and attach it to a monitor.
70
+ *
71
+ * > **NOTE:** It can take up to 10 minutes for a private location to become available.
72
+ *
73
+ * > **NOTE:** Currently, it's only possible to use a private location with a monitor running on a legacy runtime. Leave `runtimeTypeVersion`, `runtimeType` & `scriptLanguage` empty to use legacy runtime. See example below.
74
+ *
75
+ * ##### Type: `SCRIPT_API`
76
+ *
77
+ * ```typescript
78
+ * import * as pulumi from "@pulumi/pulumi";
79
+ * import * as newrelic from "@pulumi/newrelic";
80
+ *
81
+ * const privateLocation = new newrelic.synthetics.PrivateLocation("private_location", {
82
+ * description: "Test Description",
83
+ * verifiedScriptExecution: true,
84
+ * });
85
+ * const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
86
+ * locationPrivates: [{
87
+ * guid: "newrelic_synthetics_private_location.private_location.id",
88
+ * vsePassword: "secret",
89
+ * }],
90
+ * period: "EVERY_6_HOURS",
91
+ * runtimeType: "",
92
+ * runtimeTypeVersion: "",
93
+ * script: "console.log('terraform integration test updated')",
94
+ * scriptLanguage: "",
95
+ * status: "ENABLED",
96
+ * tags: [{
97
+ * key: "some_key",
98
+ * values: ["some_value"],
99
+ * }],
100
+ * type: "SCRIPT_API",
101
+ * });
102
+ * ```
103
+ * ##### Type: `SCRIPT_BROWSER`
104
+ *
105
+ * > **NOTE:** Currently, it's only possible to use a private location with a monitor running on a legacy runtime. Leave `runtimeTypeVersion`, `runtimeType` & `scriptLanguage` empty to use legacy runtime. See example below.
106
+ *
107
+ * ```typescript
108
+ * import * as pulumi from "@pulumi/pulumi";
109
+ * import * as newrelic from "@pulumi/newrelic";
110
+ *
111
+ * const privateLocation = new newrelic.synthetics.PrivateLocation("private_location", {
112
+ * description: "Test Description",
113
+ * verifiedScriptExecution: true,
114
+ * });
115
+ * const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
116
+ * enableScreenshotOnFailureAndScript: false,
117
+ * locationPrivates: [{
118
+ * guid: "newrelic_synthetics_private_location.private_location.id",
119
+ * vsePassword: "secret",
120
+ * }],
121
+ * period: "EVERY_HOUR",
122
+ * runtimeType: "",
123
+ * runtimeTypeVersion: "",
124
+ * script: "$browser.get('https://one.newrelic.com')",
125
+ * scriptLanguage: "",
126
+ * status: "DISABLED",
127
+ * tags: [{
128
+ * key: "some_key",
129
+ * values: ["some_value"],
130
+ * }],
131
+ * type: "SCRIPT_BROWSER",
132
+ * });
133
+ * ```
134
+ *
135
+ * ## Import
136
+ *
137
+ * Synthetics monitor scripts can be imported using the `guid`, e.g. bash
138
+ *
139
+ * ```sh
140
+ * $ pulumi import newrelic:synthetics/scriptMonitor:ScriptMonitor bar <guid>
141
+ * ```
142
+ */
143
+ export declare class ScriptMonitor extends pulumi.CustomResource {
144
+ /**
145
+ * Get an existing ScriptMonitor resource's state with the given name, ID, and optional extra
146
+ * properties used to qualify the lookup.
147
+ *
148
+ * @param name The _unique_ name of the resulting resource.
149
+ * @param id The _unique_ provider ID of the resource to lookup.
150
+ * @param state Any extra arguments used during the lookup.
151
+ * @param opts Optional settings to control the behavior of the CustomResource.
152
+ */
153
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ScriptMonitorState, opts?: pulumi.CustomResourceOptions): ScriptMonitor;
154
+ /**
155
+ * Returns true if the given object is an instance of ScriptMonitor. This is designed to work even
156
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
157
+ */
158
+ static isInstance(obj: any): obj is ScriptMonitor;
159
+ /**
160
+ * The account in which the Synthetics monitor will be created.
161
+ */
162
+ readonly accountId: pulumi.Output<number>;
163
+ /**
164
+ * Capture a screenshot during job execution
165
+ */
166
+ readonly enableScreenshotOnFailureAndScript: pulumi.Output<boolean | undefined>;
167
+ /**
168
+ * The unique identifier for the Synthetics private location in New Relic.
169
+ */
170
+ readonly guid: pulumi.Output<string>;
171
+ /**
172
+ * The location the monitor will run from. See Nested locationPrivate blocks below for details. At least one of either `locationsPublic` or `locationPrivate` is required.
173
+ */
174
+ readonly locationPrivates: pulumi.Output<outputs.synthetics.ScriptMonitorLocationPrivate[] | undefined>;
175
+ /**
176
+ * The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. At least one of either `locationsPublic` or `locationPrivate` is required.
177
+ */
178
+ readonly locationsPublics: pulumi.Output<string[] | undefined>;
179
+ /**
180
+ * The name for the monitor.
181
+ */
182
+ readonly name: pulumi.Output<string>;
183
+ /**
184
+ * The interval at which this monitor should run. Valid values are EVERY_MINUTE, EVERY_5_MINUTES, EVERY_10_MINUTES, EVERY_15_MINUTES, EVERY_30_MINUTES, EVERY_HOUR, EVERY_6_HOURS, EVERY_12_HOURS, or EVERY_DAY.
185
+ */
186
+ readonly period: pulumi.Output<string>;
187
+ /**
188
+ * The runtime that the monitor will use to run jobs.
189
+ */
190
+ readonly runtimeType: pulumi.Output<string | undefined>;
191
+ /**
192
+ * The specific version of the runtime type selected.
193
+ */
194
+ readonly runtimeTypeVersion: pulumi.Output<string | undefined>;
195
+ /**
196
+ * The script that the monitor runs.
197
+ */
198
+ readonly script: pulumi.Output<string | undefined>;
199
+ /**
200
+ * The programing language that should execute the script.
201
+ */
202
+ readonly scriptLanguage: pulumi.Output<string | undefined>;
203
+ /**
204
+ * The run state of the monitor.
205
+ */
206
+ readonly status: pulumi.Output<string>;
207
+ /**
208
+ * The tags that will be associated with the monitor. See Nested tag blocks below for details.
209
+ */
210
+ readonly tags: pulumi.Output<outputs.synthetics.ScriptMonitorTag[] | undefined>;
211
+ /**
212
+ * The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
213
+ */
214
+ readonly type: pulumi.Output<string>;
215
+ /**
216
+ * Create a ScriptMonitor resource with the given unique name, arguments, and options.
217
+ *
218
+ * @param name The _unique_ name of the resource.
219
+ * @param args The arguments to use to populate this resource's properties.
220
+ * @param opts A bag of options that control this resource's behavior.
221
+ */
222
+ constructor(name: string, args: ScriptMonitorArgs, opts?: pulumi.CustomResourceOptions);
223
+ }
224
+ /**
225
+ * Input properties used for looking up and filtering ScriptMonitor resources.
226
+ */
227
+ export interface ScriptMonitorState {
228
+ /**
229
+ * The account in which the Synthetics monitor will be created.
230
+ */
231
+ accountId?: pulumi.Input<number>;
232
+ /**
233
+ * Capture a screenshot during job execution
234
+ */
235
+ enableScreenshotOnFailureAndScript?: pulumi.Input<boolean>;
236
+ /**
237
+ * The unique identifier for the Synthetics private location in New Relic.
238
+ */
239
+ guid?: pulumi.Input<string>;
240
+ /**
241
+ * The location the monitor will run from. See Nested locationPrivate blocks below for details. At least one of either `locationsPublic` or `locationPrivate` is required.
242
+ */
243
+ locationPrivates?: pulumi.Input<pulumi.Input<inputs.synthetics.ScriptMonitorLocationPrivate>[]>;
244
+ /**
245
+ * The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. At least one of either `locationsPublic` or `locationPrivate` is required.
246
+ */
247
+ locationsPublics?: pulumi.Input<pulumi.Input<string>[]>;
248
+ /**
249
+ * The name for the monitor.
250
+ */
251
+ name?: pulumi.Input<string>;
252
+ /**
253
+ * The interval at which this monitor should run. Valid values are EVERY_MINUTE, EVERY_5_MINUTES, EVERY_10_MINUTES, EVERY_15_MINUTES, EVERY_30_MINUTES, EVERY_HOUR, EVERY_6_HOURS, EVERY_12_HOURS, or EVERY_DAY.
254
+ */
255
+ period?: pulumi.Input<string>;
256
+ /**
257
+ * The runtime that the monitor will use to run jobs.
258
+ */
259
+ runtimeType?: pulumi.Input<string>;
260
+ /**
261
+ * The specific version of the runtime type selected.
262
+ */
263
+ runtimeTypeVersion?: pulumi.Input<string>;
264
+ /**
265
+ * The script that the monitor runs.
266
+ */
267
+ script?: pulumi.Input<string>;
268
+ /**
269
+ * The programing language that should execute the script.
270
+ */
271
+ scriptLanguage?: pulumi.Input<string>;
272
+ /**
273
+ * The run state of the monitor.
274
+ */
275
+ status?: pulumi.Input<string>;
276
+ /**
277
+ * The tags that will be associated with the monitor. See Nested tag blocks below for details.
278
+ */
279
+ tags?: pulumi.Input<pulumi.Input<inputs.synthetics.ScriptMonitorTag>[]>;
280
+ /**
281
+ * The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
282
+ */
283
+ type?: pulumi.Input<string>;
284
+ }
285
+ /**
286
+ * The set of arguments for constructing a ScriptMonitor resource.
287
+ */
288
+ export interface ScriptMonitorArgs {
289
+ /**
290
+ * The account in which the Synthetics monitor will be created.
291
+ */
292
+ accountId?: pulumi.Input<number>;
293
+ /**
294
+ * Capture a screenshot during job execution
295
+ */
296
+ enableScreenshotOnFailureAndScript?: pulumi.Input<boolean>;
297
+ /**
298
+ * The location the monitor will run from. See Nested locationPrivate blocks below for details. At least one of either `locationsPublic` or `locationPrivate` is required.
299
+ */
300
+ locationPrivates?: pulumi.Input<pulumi.Input<inputs.synthetics.ScriptMonitorLocationPrivate>[]>;
301
+ /**
302
+ * The location the monitor will run from. Valid public locations are https://docs.newrelic.com/docs/synthetics/synthetic-monitoring/administration/synthetic-public-minion-ips/. At least one of either `locationsPublic` or `locationPrivate` is required.
303
+ */
304
+ locationsPublics?: pulumi.Input<pulumi.Input<string>[]>;
305
+ /**
306
+ * The name for the monitor.
307
+ */
308
+ name?: pulumi.Input<string>;
309
+ /**
310
+ * The interval at which this monitor should run. Valid values are EVERY_MINUTE, EVERY_5_MINUTES, EVERY_10_MINUTES, EVERY_15_MINUTES, EVERY_30_MINUTES, EVERY_HOUR, EVERY_6_HOURS, EVERY_12_HOURS, or EVERY_DAY.
311
+ */
312
+ period: pulumi.Input<string>;
313
+ /**
314
+ * The runtime that the monitor will use to run jobs.
315
+ */
316
+ runtimeType?: pulumi.Input<string>;
317
+ /**
318
+ * The specific version of the runtime type selected.
319
+ */
320
+ runtimeTypeVersion?: pulumi.Input<string>;
321
+ /**
322
+ * The script that the monitor runs.
323
+ */
324
+ script?: pulumi.Input<string>;
325
+ /**
326
+ * The programing language that should execute the script.
327
+ */
328
+ scriptLanguage?: pulumi.Input<string>;
329
+ /**
330
+ * The run state of the monitor.
331
+ */
332
+ status: pulumi.Input<string>;
333
+ /**
334
+ * The tags that will be associated with the monitor. See Nested tag blocks below for details.
335
+ */
336
+ tags?: pulumi.Input<pulumi.Input<inputs.synthetics.ScriptMonitorTag>[]>;
337
+ /**
338
+ * The plaintext representing the monitor script. Valid values are SCRIPT_BROWSER or SCRIPT_API
339
+ */
340
+ type: pulumi.Input<string>;
341
+ }
@@ -0,0 +1,224 @@
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.ScriptMonitor = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("../utilities");
8
+ /**
9
+ * Use this resource to create update, and delete a Script API or Script Browser Synthetics Monitor in New Relic.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ##### Type: `SCRIPT_API`
14
+ *
15
+ * > **NOTE:** The preferred runtime is `NODE_16.10.0` while configuring the `SCRIPT_API` monitor. Other runtime may be deprecated in the future and receive fewer product updates.
16
+ *
17
+ * ```typescript
18
+ * import * as pulumi from "@pulumi/pulumi";
19
+ * import * as newrelic from "@pulumi/newrelic";
20
+ *
21
+ * const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
22
+ * locationsPublics: [
23
+ * "AP_SOUTH_1",
24
+ * "AP_EAST_1",
25
+ * ],
26
+ * period: "EVERY_6_HOURS",
27
+ * runtimeType: "NODE_API",
28
+ * runtimeTypeVersion: "16.10",
29
+ * script: "console.log('terraform integration test updated')",
30
+ * scriptLanguage: "JAVASCRIPT",
31
+ * status: "ENABLED",
32
+ * tags: [{
33
+ * key: "some_key",
34
+ * values: ["some_value"],
35
+ * }],
36
+ * type: "SCRIPT_API",
37
+ * });
38
+ * ```
39
+ * ##### Type: `SCRIPT_BROWSER`
40
+ *
41
+ * > **NOTE:** The preferred runtime is `CHROME_BROWSER_100` while configuring the `SCRIPT_BROWSER` monitor. Other runtime may be deprecated in the future and receive fewer product updates.
42
+ *
43
+ * ```typescript
44
+ * import * as pulumi from "@pulumi/pulumi";
45
+ * import * as newrelic from "@pulumi/newrelic";
46
+ *
47
+ * const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
48
+ * enableScreenshotOnFailureAndScript: false,
49
+ * locationsPublics: [
50
+ * "AP_SOUTH_1",
51
+ * "AP_EAST_1",
52
+ * ],
53
+ * period: "EVERY_HOUR",
54
+ * runtimeType: "CHROME_BROWSER",
55
+ * runtimeTypeVersion: "100",
56
+ * script: "$browser.get('https://one.newrelic.com')",
57
+ * scriptLanguage: "JAVASCRIPT",
58
+ * status: "DISABLED",
59
+ * tags: [{
60
+ * key: "Name",
61
+ * values: [
62
+ * "scriptedMonitor",
63
+ * "hello",
64
+ * ],
65
+ * }],
66
+ * type: "SCRIPT_BROWSER",
67
+ * });
68
+ * ```
69
+ * See additional examples.
70
+ * ## Additional Examples
71
+ *
72
+ * ### Create a monitor with a private location
73
+ *
74
+ * The below example shows how you can define a private location and attach it to a monitor.
75
+ *
76
+ * > **NOTE:** It can take up to 10 minutes for a private location to become available.
77
+ *
78
+ * > **NOTE:** Currently, it's only possible to use a private location with a monitor running on a legacy runtime. Leave `runtimeTypeVersion`, `runtimeType` & `scriptLanguage` empty to use legacy runtime. See example below.
79
+ *
80
+ * ##### Type: `SCRIPT_API`
81
+ *
82
+ * ```typescript
83
+ * import * as pulumi from "@pulumi/pulumi";
84
+ * import * as newrelic from "@pulumi/newrelic";
85
+ *
86
+ * const privateLocation = new newrelic.synthetics.PrivateLocation("private_location", {
87
+ * description: "Test Description",
88
+ * verifiedScriptExecution: true,
89
+ * });
90
+ * const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
91
+ * locationPrivates: [{
92
+ * guid: "newrelic_synthetics_private_location.private_location.id",
93
+ * vsePassword: "secret",
94
+ * }],
95
+ * period: "EVERY_6_HOURS",
96
+ * runtimeType: "",
97
+ * runtimeTypeVersion: "",
98
+ * script: "console.log('terraform integration test updated')",
99
+ * scriptLanguage: "",
100
+ * status: "ENABLED",
101
+ * tags: [{
102
+ * key: "some_key",
103
+ * values: ["some_value"],
104
+ * }],
105
+ * type: "SCRIPT_API",
106
+ * });
107
+ * ```
108
+ * ##### Type: `SCRIPT_BROWSER`
109
+ *
110
+ * > **NOTE:** Currently, it's only possible to use a private location with a monitor running on a legacy runtime. Leave `runtimeTypeVersion`, `runtimeType` & `scriptLanguage` empty to use legacy runtime. See example below.
111
+ *
112
+ * ```typescript
113
+ * import * as pulumi from "@pulumi/pulumi";
114
+ * import * as newrelic from "@pulumi/newrelic";
115
+ *
116
+ * const privateLocation = new newrelic.synthetics.PrivateLocation("private_location", {
117
+ * description: "Test Description",
118
+ * verifiedScriptExecution: true,
119
+ * });
120
+ * const monitor = new newrelic.synthetics.ScriptMonitor("monitor", {
121
+ * enableScreenshotOnFailureAndScript: false,
122
+ * locationPrivates: [{
123
+ * guid: "newrelic_synthetics_private_location.private_location.id",
124
+ * vsePassword: "secret",
125
+ * }],
126
+ * period: "EVERY_HOUR",
127
+ * runtimeType: "",
128
+ * runtimeTypeVersion: "",
129
+ * script: "$browser.get('https://one.newrelic.com')",
130
+ * scriptLanguage: "",
131
+ * status: "DISABLED",
132
+ * tags: [{
133
+ * key: "some_key",
134
+ * values: ["some_value"],
135
+ * }],
136
+ * type: "SCRIPT_BROWSER",
137
+ * });
138
+ * ```
139
+ *
140
+ * ## Import
141
+ *
142
+ * Synthetics monitor scripts can be imported using the `guid`, e.g. bash
143
+ *
144
+ * ```sh
145
+ * $ pulumi import newrelic:synthetics/scriptMonitor:ScriptMonitor bar <guid>
146
+ * ```
147
+ */
148
+ class ScriptMonitor extends pulumi.CustomResource {
149
+ constructor(name, argsOrState, opts) {
150
+ let resourceInputs = {};
151
+ opts = opts || {};
152
+ if (opts.id) {
153
+ const state = argsOrState;
154
+ resourceInputs["accountId"] = state ? state.accountId : undefined;
155
+ resourceInputs["enableScreenshotOnFailureAndScript"] = state ? state.enableScreenshotOnFailureAndScript : undefined;
156
+ resourceInputs["guid"] = state ? state.guid : undefined;
157
+ resourceInputs["locationPrivates"] = state ? state.locationPrivates : undefined;
158
+ resourceInputs["locationsPublics"] = state ? state.locationsPublics : undefined;
159
+ resourceInputs["name"] = state ? state.name : undefined;
160
+ resourceInputs["period"] = state ? state.period : undefined;
161
+ resourceInputs["runtimeType"] = state ? state.runtimeType : undefined;
162
+ resourceInputs["runtimeTypeVersion"] = state ? state.runtimeTypeVersion : undefined;
163
+ resourceInputs["script"] = state ? state.script : undefined;
164
+ resourceInputs["scriptLanguage"] = state ? state.scriptLanguage : undefined;
165
+ resourceInputs["status"] = state ? state.status : undefined;
166
+ resourceInputs["tags"] = state ? state.tags : undefined;
167
+ resourceInputs["type"] = state ? state.type : undefined;
168
+ }
169
+ else {
170
+ const args = argsOrState;
171
+ if ((!args || args.period === undefined) && !opts.urn) {
172
+ throw new Error("Missing required property 'period'");
173
+ }
174
+ if ((!args || args.status === undefined) && !opts.urn) {
175
+ throw new Error("Missing required property 'status'");
176
+ }
177
+ if ((!args || args.type === undefined) && !opts.urn) {
178
+ throw new Error("Missing required property 'type'");
179
+ }
180
+ resourceInputs["accountId"] = args ? args.accountId : undefined;
181
+ resourceInputs["enableScreenshotOnFailureAndScript"] = args ? args.enableScreenshotOnFailureAndScript : undefined;
182
+ resourceInputs["locationPrivates"] = args ? args.locationPrivates : undefined;
183
+ resourceInputs["locationsPublics"] = args ? args.locationsPublics : undefined;
184
+ resourceInputs["name"] = args ? args.name : undefined;
185
+ resourceInputs["period"] = args ? args.period : undefined;
186
+ resourceInputs["runtimeType"] = args ? args.runtimeType : undefined;
187
+ resourceInputs["runtimeTypeVersion"] = args ? args.runtimeTypeVersion : undefined;
188
+ resourceInputs["script"] = args ? args.script : undefined;
189
+ resourceInputs["scriptLanguage"] = args ? args.scriptLanguage : undefined;
190
+ resourceInputs["status"] = args ? args.status : undefined;
191
+ resourceInputs["tags"] = args ? args.tags : undefined;
192
+ resourceInputs["type"] = args ? args.type : undefined;
193
+ resourceInputs["guid"] = undefined /*out*/;
194
+ }
195
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
196
+ super(ScriptMonitor.__pulumiType, name, resourceInputs, opts);
197
+ }
198
+ /**
199
+ * Get an existing ScriptMonitor resource's state with the given name, ID, and optional extra
200
+ * properties used to qualify the lookup.
201
+ *
202
+ * @param name The _unique_ name of the resulting resource.
203
+ * @param id The _unique_ provider ID of the resource to lookup.
204
+ * @param state Any extra arguments used during the lookup.
205
+ * @param opts Optional settings to control the behavior of the CustomResource.
206
+ */
207
+ static get(name, id, state, opts) {
208
+ return new ScriptMonitor(name, state, Object.assign(Object.assign({}, opts), { id: id }));
209
+ }
210
+ /**
211
+ * Returns true if the given object is an instance of ScriptMonitor. This is designed to work even
212
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
213
+ */
214
+ static isInstance(obj) {
215
+ if (obj === undefined || obj === null) {
216
+ return false;
217
+ }
218
+ return obj['__pulumiType'] === ScriptMonitor.__pulumiType;
219
+ }
220
+ }
221
+ exports.ScriptMonitor = ScriptMonitor;
222
+ /** @internal */
223
+ ScriptMonitor.__pulumiType = 'newrelic:synthetics/scriptMonitor:ScriptMonitor';
224
+ //# sourceMappingURL=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40
  */
41
41
  static isInstance(obj: any): obj is SecureCredential;
42
42
  /**
43
- * The time the secure credential was created.
43
+ * Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
44
44
  */
45
- readonly createdAt: pulumi.Output<string>;
45
+ readonly accountId: pulumi.Output<number>;
46
46
  /**
47
47
  * The secure credential's description.
48
48
  */
@@ -73,9 +73,9 @@ export declare class SecureCredential extends pulumi.CustomResource {
73
73
  */
74
74
  export interface SecureCredentialState {
75
75
  /**
76
- * The time the secure credential was created.
76
+ * Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
77
77
  */
78
- createdAt?: pulumi.Input<string>;
78
+ accountId?: pulumi.Input<number>;
79
79
  /**
80
80
  * The secure credential's description.
81
81
  */
@@ -98,9 +98,9 @@ export interface SecureCredentialState {
98
98
  */
99
99
  export interface SecureCredentialArgs {
100
100
  /**
101
- * The time the secure credential was created.
101
+ * Determines the New Relic account where the secure credential will be created. Defaults to the account associated with the API key used.
102
102
  */
103
- createdAt?: pulumi.Input<string>;
103
+ accountId?: pulumi.Input<number>;
104
104
  /**
105
105
  * The secure credential's description.
106
106
  */
@@ -35,7 +35,7 @@ class SecureCredential extends pulumi.CustomResource {
35
35
  opts = opts || {};
36
36
  if (opts.id) {
37
37
  const state = argsOrState;
38
- resourceInputs["createdAt"] = state ? state.createdAt : undefined;
38
+ resourceInputs["accountId"] = state ? state.accountId : undefined;
39
39
  resourceInputs["description"] = state ? state.description : undefined;
40
40
  resourceInputs["key"] = state ? state.key : undefined;
41
41
  resourceInputs["lastUpdated"] = state ? state.lastUpdated : undefined;
@@ -49,7 +49,7 @@ class SecureCredential extends pulumi.CustomResource {
49
49
  if ((!args || args.value === undefined) && !opts.urn) {
50
50
  throw new Error("Missing required property 'value'");
51
51
  }
52
- resourceInputs["createdAt"] = args ? args.createdAt : undefined;
52
+ resourceInputs["accountId"] = args ? args.accountId : undefined;
53
53
  resourceInputs["description"] = args ? args.description : undefined;
54
54
  resourceInputs["key"] = args ? args.key : undefined;
55
55
  resourceInputs["lastUpdated"] = args ? args.lastUpdated : undefined;