@pulumi/datadog 4.0.0 → 4.2.0-alpha.1632753173

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 (67) hide show
  1. package/README.md +2 -2
  2. package/apiKey.d.ts +77 -0
  3. package/apiKey.js +76 -0
  4. package/apiKey.js.map +1 -0
  5. package/applicationKey.d.ts +77 -0
  6. package/applicationKey.js +76 -0
  7. package/applicationKey.js.map +1 -0
  8. package/aws/integrationLambdaArn.d.ts +3 -3
  9. package/aws/integrationLogCollection.d.ts +4 -4
  10. package/aws/integrationLogCollection.js +1 -1
  11. package/aws/integrationTagFilter.d.ts +4 -3
  12. package/aws/integrationTagFilter.js +1 -0
  13. package/aws/integrationTagFilter.js.map +1 -1
  14. package/childOrganization.d.ts +112 -0
  15. package/childOrganization.js +80 -0
  16. package/childOrganization.js.map +1 -0
  17. package/dashboard.d.ts +8 -8
  18. package/getApiKey.d.ts +46 -0
  19. package/getApiKey.js +35 -0
  20. package/getApiKey.js.map +1 -0
  21. package/getApplicationKey.d.ts +46 -0
  22. package/getApplicationKey.js +35 -0
  23. package/getApplicationKey.js.map +1 -0
  24. package/getDashboardList.d.ts +16 -0
  25. package/getDashboardList.js +16 -0
  26. package/getDashboardList.js.map +1 -1
  27. package/getMonitor.d.ts +5 -0
  28. package/getSecurityMonitoringFilters.d.ts +32 -0
  29. package/getSecurityMonitoringFilters.js +29 -0
  30. package/getSecurityMonitoringFilters.js.map +1 -0
  31. package/getSyntheticsGlobalVariable.d.ts +31 -0
  32. package/getSyntheticsGlobalVariable.js +22 -0
  33. package/getSyntheticsGlobalVariable.js.map +1 -0
  34. package/getUser.d.ts +35 -0
  35. package/getUser.js +22 -0
  36. package/getUser.js.map +1 -0
  37. package/index.d.ts +10 -0
  38. package/index.js +30 -0
  39. package/index.js.map +1 -1
  40. package/logsIndex.d.ts +12 -36
  41. package/logsIndex.js +2 -36
  42. package/logsIndex.js.map +1 -1
  43. package/monitor.d.ts +30 -3
  44. package/monitor.js +2 -0
  45. package/monitor.js.map +1 -1
  46. package/organizationSettings.d.ts +98 -0
  47. package/organizationSettings.js +77 -0
  48. package/organizationSettings.js.map +1 -0
  49. package/package.json +2 -2
  50. package/package.json.dev +1 -1
  51. package/securityMonitoringFilter.d.ts +139 -0
  52. package/securityMonitoringFilter.js +103 -0
  53. package/securityMonitoringFilter.js.map +1 -0
  54. package/securityMonitoringRule.d.ts +26 -0
  55. package/securityMonitoringRule.js +6 -0
  56. package/securityMonitoringRule.js.map +1 -1
  57. package/slack/channel.d.ts +9 -1
  58. package/slack/channel.js +9 -1
  59. package/slack/channel.js.map +1 -1
  60. package/syntheticsGlobalVariable.d.ts +15 -3
  61. package/syntheticsGlobalVariable.js +2 -0
  62. package/syntheticsGlobalVariable.js.map +1 -1
  63. package/syntheticsTest.d.ts +160 -82
  64. package/syntheticsTest.js +157 -79
  65. package/syntheticsTest.js.map +1 -1
  66. package/types/input.d.ts +567 -5
  67. package/types/output.d.ts +591 -5
@@ -3,6 +3,34 @@ import { input as inputs, output as outputs } from "./types";
3
3
  /**
4
4
  * Provides a Datadog synthetics test resource. This can be used to create and manage Datadog synthetics test.
5
5
  *
6
+ * #### *Warning*
7
+ * Starting from version 3.1.0+, the direct usage of global variables in the configuration is deprecated, in favor of
8
+ * local variables of type `global`. As an example, if you were previously using `{{ GLOBAL_VAR }}` directly in your
9
+ * configuration, add a `configVariable` of type `global` with the `id` matching the `id` of the global variable `GLOBAL_VAR`, which can be found in the Synthetics UI or from the output of the `datadog.SyntheticsGlobalVariable` resource. The name can be chosen freely.
10
+ *
11
+ * In practice, it means going from (simplified configuration):
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * ```
16
+ *
17
+ * to
18
+ *
19
+ * ```typescript
20
+ * import * as pulumi from "@pulumi/pulumi";
21
+ *
22
+ * const config_variable = {
23
+ * name: "LOCAL_VAR",
24
+ * id: [your_global_variable_id],
25
+ * type: "global",
26
+ * };
27
+ * ```
28
+ *
29
+ * which you can now use in your request definition:
30
+ * ```typescript
31
+ * import * as pulumi from "@pulumi/pulumi";
32
+ * ```
33
+ *
6
34
  * ## Example Usage
7
35
  *
8
36
  * ```typescript
@@ -11,169 +39,219 @@ import { input as inputs, output as outputs } from "./types";
11
39
  *
12
40
  * // Example Usage (Synthetics API test)
13
41
  * // Create a new Datadog Synthetics API/HTTP test on https://www.example.org
14
- * const testApi = new datadog.SyntheticsTest("testApi", {
15
- * type: "api",
16
- * subtype: "http",
17
- * requestDefinition: {
18
- * method: "GET",
19
- * url: "https://www.example.org",
20
- * },
21
- * requestHeaders: {
22
- * "Content-Type": "application/json",
23
- * Authentication: "Token: 1234566789",
24
- * },
42
+ * const testApi = new datadog.SyntheticsTest("test_api", {
25
43
  * assertions: [{
26
- * type: "statusCode",
27
44
  * operator: "is",
28
45
  * target: "200",
46
+ * type: "statusCode",
29
47
  * }],
30
48
  * locations: ["aws:eu-central-1"],
49
+ * message: "Notify @pagerduty",
50
+ * name: "An API test on example.org",
31
51
  * optionsList: {
32
- * tickEvery: 900,
52
+ * monitorOptions: {
53
+ * renotifyInterval: 100,
54
+ * },
33
55
  * retry: {
34
56
  * count: 2,
35
57
  * interval: 300,
36
58
  * },
37
- * monitorOptions: {
38
- * renotifyInterval: 100,
39
- * },
59
+ * tickEvery: 900,
40
60
  * },
41
- * name: "An API test on example.org",
42
- * message: "Notify @pagerduty",
61
+ * requestDefinition: {
62
+ * method: "GET",
63
+ * url: "https://www.example.org",
64
+ * },
65
+ * requestHeaders: {
66
+ * Authentication: "Token: 1234566789",
67
+ * "Content-Type": "application/json",
68
+ * },
69
+ * status: "live",
70
+ * subtype: "http",
43
71
  * tags: [
44
72
  * "foo:bar",
45
73
  * "foo",
46
74
  * "env:test",
47
75
  * ],
48
- * status: "live",
76
+ * type: "api",
49
77
  * });
50
78
  * // Example Usage (Synthetics SSL test)
51
79
  * // Create a new Datadog Synthetics API/SSL test on example.org
52
- * const testSsl = new datadog.SyntheticsTest("testSsl", {
53
- * type: "api",
54
- * subtype: "ssl",
55
- * requestDefinition: {
56
- * host: "example.org",
57
- * port: 443,
58
- * },
80
+ * const testSsl = new datadog.SyntheticsTest("test_ssl", {
59
81
  * assertions: [{
60
- * type: "certificate",
61
82
  * operator: "isInMoreThan",
62
- * target: 30,
83
+ * target: "30",
84
+ * type: "certificate",
63
85
  * }],
64
86
  * locations: ["aws:eu-central-1"],
87
+ * message: "Notify @pagerduty",
88
+ * name: "An API test on example.org",
65
89
  * optionsList: {
66
- * tickEvery: 900,
67
90
  * acceptSelfSigned: true,
91
+ * tickEvery: 900,
68
92
  * },
69
- * name: "An API test on example.org",
70
- * message: "Notify @pagerduty",
93
+ * requestDefinition: {
94
+ * host: "example.org",
95
+ * port: 443,
96
+ * },
97
+ * status: "live",
98
+ * subtype: "ssl",
71
99
  * tags: [
72
100
  * "foo:bar",
73
101
  * "foo",
74
102
  * "env:test",
75
103
  * ],
76
- * status: "live",
104
+ * type: "api",
77
105
  * });
78
106
  * // Example Usage (Synthetics TCP test)
79
107
  * // Create a new Datadog Synthetics API/TCP test on example.org
80
- * const testTcp = new datadog.SyntheticsTest("testTcp", {
81
- * type: "api",
82
- * subtype: "tcp",
83
- * requestDefinition: {
84
- * host: "example.org",
85
- * port: 443,
86
- * },
108
+ * const testTcp = new datadog.SyntheticsTest("test_tcp", {
87
109
  * assertions: [{
88
- * type: "responseTime",
89
110
  * operator: "lessThan",
90
- * target: 2000,
111
+ * target: "2000",
112
+ * type: "responseTime",
113
+ * }],
114
+ * configVariables: [{
115
+ * id: "76636cd1-82e2-4aeb-9cfe-51366a8198a2",
116
+ * name: "MY_GLOBAL_VAR",
117
+ * type: "global",
91
118
  * }],
92
119
  * locations: ["aws:eu-central-1"],
120
+ * message: "Notify @pagerduty",
121
+ * name: "An API test on example.org",
93
122
  * optionsList: {
94
123
  * tickEvery: 900,
95
124
  * },
96
- * name: "An API test on example.org",
97
- * message: "Notify @pagerduty",
125
+ * requestDefinition: {
126
+ * host: "example.org",
127
+ * port: 443,
128
+ * },
129
+ * status: "live",
130
+ * subtype: "tcp",
98
131
  * tags: [
99
132
  * "foo:bar",
100
133
  * "foo",
101
134
  * "env:test",
102
135
  * ],
103
- * status: "live",
136
+ * type: "api",
104
137
  * });
105
138
  * // Example Usage (Synthetics DNS test)
106
139
  * // Create a new Datadog Synthetics API/DNS test on example.org
107
- * const testDns = new datadog.SyntheticsTest("testDns", {
108
- * type: "api",
109
- * subtype: "dns",
110
- * requestDefinition: {
111
- * host: "example.org",
112
- * },
140
+ * const testDns = new datadog.SyntheticsTest("test_dns", {
113
141
  * assertions: [{
114
- * type: "recordSome",
115
142
  * operator: "is",
116
143
  * property: "A",
117
144
  * target: "0.0.0.0",
145
+ * type: "recordSome",
118
146
  * }],
119
147
  * locations: ["aws:eu-central-1"],
148
+ * message: "Notify @pagerduty",
149
+ * name: "An API test on example.org",
120
150
  * optionsList: {
121
151
  * tickEvery: 900,
122
152
  * },
123
- * name: "An API test on example.org",
124
- * message: "Notify @pagerduty",
153
+ * requestDefinition: {
154
+ * host: "example.org",
155
+ * },
156
+ * status: "live",
157
+ * subtype: "dns",
125
158
  * tags: [
126
159
  * "foo:bar",
127
160
  * "foo",
128
161
  * "env:test",
129
162
  * ],
163
+ * type: "api",
164
+ * });
165
+ * // Example Usage (Synthetics Multistep API test)
166
+ * // Create a new Datadog Synthetics Multistep API test
167
+ * const test = new datadog.SyntheticsTest("test", {
168
+ * apiSteps: [
169
+ * {
170
+ * assertions: [{
171
+ * operator: "is",
172
+ * target: "200",
173
+ * type: "statusCode",
174
+ * }],
175
+ * name: "An API test on example.org",
176
+ * requestDefinition: {
177
+ * method: "GET",
178
+ * url: "https://example.org",
179
+ * },
180
+ * requestHeaders: {
181
+ * Authentication: "Token: 1234566789",
182
+ * "Content-Type": "application/json",
183
+ * },
184
+ * subtype: "http",
185
+ * },
186
+ * {
187
+ * assertions: [{
188
+ * operator: "is",
189
+ * target: "200",
190
+ * type: "statusCode",
191
+ * }],
192
+ * name: "An API test on example.org",
193
+ * requestDefinition: {
194
+ * method: "GET",
195
+ * url: "http://example.org",
196
+ * },
197
+ * subtype: "http",
198
+ * },
199
+ * ],
200
+ * locations: ["aws:eu-central-1"],
201
+ * name: "Multistep API test",
202
+ * optionsList: {
203
+ * acceptSelfSigned: true,
204
+ * tickEvery: 900,
205
+ * },
130
206
  * status: "live",
207
+ * subtype: "multi",
208
+ * type: "api",
131
209
  * });
132
210
  * // Example Usage (Synthetics Browser test)
133
211
  * // Support for Synthetics Browser test steps is limited (see below)
134
212
  * // Create a new Datadog Synthetics Browser test starting on https://www.example.org
135
- * const testBrowser = new datadog.SyntheticsTest("testBrowser", {
136
- * type: "browser",
137
- * requestDefinition: {
138
- * method: "GET",
139
- * url: "https://app.datadoghq.com",
140
- * },
141
- * deviceIds: ["laptop_large"],
142
- * locations: ["aws:eu-central-1"],
143
- * optionsList: {
144
- * tickEvery: 3600,
145
- * },
146
- * name: "A Browser test on example.org",
147
- * message: "Notify @qa",
148
- * tags: [],
149
- * status: "paused",
150
- * step: [{
213
+ * const testBrowser = new datadog.SyntheticsTest("test_browser", {
214
+ * browserSteps: [{
151
215
  * name: "Check current url",
152
- * type: "assertCurrentUrl",
153
- * params: JSON.stringify({
216
+ * params: {
154
217
  * check: "contains",
155
218
  * value: "datadoghq",
156
- * }),
219
+ * },
220
+ * type: "assertCurrentUrl",
157
221
  * }],
158
- * variable: [
222
+ * browserVariables: [
159
223
  * {
160
- * type: "text",
224
+ * example: "597",
161
225
  * name: "MY_PATTERN_VAR",
162
226
  * pattern: "{{numeric(3)}}",
163
- * example: "597",
227
+ * type: "text",
164
228
  * },
165
229
  * {
166
- * type: "email",
230
+ * example: "jd8-afe-ydv.4546132139@synthetics.dtdg.co",
167
231
  * name: "MY_EMAIL_VAR",
168
232
  * pattern: "jd8-afe-ydv.{{ numeric(10) }}@synthetics.dtdg.co",
169
- * example: "jd8-afe-ydv.4546132139@synthetics.dtdg.co",
233
+ * type: "email",
170
234
  * },
171
235
  * {
172
- * type: "global",
173
- * name: "MY_GLOBAL_VAR",
174
236
  * id: "76636cd1-82e2-4aeb-9cfe-51366a8198a2",
237
+ * name: "MY_GLOBAL_VAR",
238
+ * type: "global",
175
239
  * },
176
240
  * ],
241
+ * deviceIds: ["laptop_large"],
242
+ * locations: ["aws:eu-central-1"],
243
+ * message: "Notify @qa",
244
+ * name: "A Browser test on example.org",
245
+ * optionsList: {
246
+ * tickEvery: 3600,
247
+ * },
248
+ * requestDefinition: {
249
+ * method: "GET",
250
+ * url: "https://app.datadoghq.com",
251
+ * },
252
+ * status: "paused",
253
+ * tags: [],
254
+ * type: "browser",
177
255
  * });
178
256
  * ```
179
257
  *
@@ -222,7 +300,7 @@ export declare class SyntheticsTest extends pulumi.CustomResource {
222
300
  */
223
301
  readonly configVariables: pulumi.Output<outputs.SyntheticsTestConfigVariable[] | undefined>;
224
302
  /**
225
- * Array with the different device IDs used to run the test (only for `browser` tests). Valid values are `laptopLarge`, `tablet`, `mobileSmall`, `chrome.laptop_large`, `chrome.tablet`, `chrome.mobile_small`, `firefox.laptop_large`, `firefox.tablet`, `firefox.mobile_small`.
303
+ * Array with the different device IDs used to run the test (only for `browser` tests). Valid values are `laptopLarge`, `tablet`, `mobileSmall`, `chrome.laptop_large`, `chrome.tablet`, `chrome.mobile_small`, `firefox.laptop_large`, `firefox.tablet`, `firefox.mobile_small`, `edge.laptop_large`, `edge.tablet`, `edge.mobile_small`.
226
304
  */
227
305
  readonly deviceIds: pulumi.Output<string[] | undefined>;
228
306
  /**
@@ -320,7 +398,7 @@ export interface SyntheticsTestState {
320
398
  */
321
399
  configVariables?: pulumi.Input<pulumi.Input<inputs.SyntheticsTestConfigVariable>[]>;
322
400
  /**
323
- * Array with the different device IDs used to run the test (only for `browser` tests). Valid values are `laptopLarge`, `tablet`, `mobileSmall`, `chrome.laptop_large`, `chrome.tablet`, `chrome.mobile_small`, `firefox.laptop_large`, `firefox.tablet`, `firefox.mobile_small`.
401
+ * Array with the different device IDs used to run the test (only for `browser` tests). Valid values are `laptopLarge`, `tablet`, `mobileSmall`, `chrome.laptop_large`, `chrome.tablet`, `chrome.mobile_small`, `firefox.laptop_large`, `firefox.tablet`, `firefox.mobile_small`, `edge.laptop_large`, `edge.tablet`, `edge.mobile_small`.
324
402
  */
325
403
  deviceIds?: pulumi.Input<pulumi.Input<string>[]>;
326
404
  /**
@@ -410,7 +488,7 @@ export interface SyntheticsTestArgs {
410
488
  */
411
489
  configVariables?: pulumi.Input<pulumi.Input<inputs.SyntheticsTestConfigVariable>[]>;
412
490
  /**
413
- * Array with the different device IDs used to run the test (only for `browser` tests). Valid values are `laptopLarge`, `tablet`, `mobileSmall`, `chrome.laptop_large`, `chrome.tablet`, `chrome.mobile_small`, `firefox.laptop_large`, `firefox.tablet`, `firefox.mobile_small`.
491
+ * Array with the different device IDs used to run the test (only for `browser` tests). Valid values are `laptopLarge`, `tablet`, `mobileSmall`, `chrome.laptop_large`, `chrome.tablet`, `chrome.mobile_small`, `firefox.laptop_large`, `firefox.tablet`, `firefox.mobile_small`, `edge.laptop_large`, `edge.tablet`, `edge.mobile_small`.
414
492
  */
415
493
  deviceIds?: pulumi.Input<pulumi.Input<string>[]>;
416
494
  /**
package/syntheticsTest.js CHANGED
@@ -7,6 +7,34 @@ const utilities = require("./utilities");
7
7
  /**
8
8
  * Provides a Datadog synthetics test resource. This can be used to create and manage Datadog synthetics test.
9
9
  *
10
+ * #### *Warning*
11
+ * Starting from version 3.1.0+, the direct usage of global variables in the configuration is deprecated, in favor of
12
+ * local variables of type `global`. As an example, if you were previously using `{{ GLOBAL_VAR }}` directly in your
13
+ * configuration, add a `configVariable` of type `global` with the `id` matching the `id` of the global variable `GLOBAL_VAR`, which can be found in the Synthetics UI or from the output of the `datadog.SyntheticsGlobalVariable` resource. The name can be chosen freely.
14
+ *
15
+ * In practice, it means going from (simplified configuration):
16
+ *
17
+ * ```typescript
18
+ * import * as pulumi from "@pulumi/pulumi";
19
+ * ```
20
+ *
21
+ * to
22
+ *
23
+ * ```typescript
24
+ * import * as pulumi from "@pulumi/pulumi";
25
+ *
26
+ * const config_variable = {
27
+ * name: "LOCAL_VAR",
28
+ * id: [your_global_variable_id],
29
+ * type: "global",
30
+ * };
31
+ * ```
32
+ *
33
+ * which you can now use in your request definition:
34
+ * ```typescript
35
+ * import * as pulumi from "@pulumi/pulumi";
36
+ * ```
37
+ *
10
38
  * ## Example Usage
11
39
  *
12
40
  * ```typescript
@@ -15,169 +43,219 @@ const utilities = require("./utilities");
15
43
  *
16
44
  * // Example Usage (Synthetics API test)
17
45
  * // Create a new Datadog Synthetics API/HTTP test on https://www.example.org
18
- * const testApi = new datadog.SyntheticsTest("testApi", {
19
- * type: "api",
20
- * subtype: "http",
21
- * requestDefinition: {
22
- * method: "GET",
23
- * url: "https://www.example.org",
24
- * },
25
- * requestHeaders: {
26
- * "Content-Type": "application/json",
27
- * Authentication: "Token: 1234566789",
28
- * },
46
+ * const testApi = new datadog.SyntheticsTest("test_api", {
29
47
  * assertions: [{
30
- * type: "statusCode",
31
48
  * operator: "is",
32
49
  * target: "200",
50
+ * type: "statusCode",
33
51
  * }],
34
52
  * locations: ["aws:eu-central-1"],
53
+ * message: "Notify @pagerduty",
54
+ * name: "An API test on example.org",
35
55
  * optionsList: {
36
- * tickEvery: 900,
56
+ * monitorOptions: {
57
+ * renotifyInterval: 100,
58
+ * },
37
59
  * retry: {
38
60
  * count: 2,
39
61
  * interval: 300,
40
62
  * },
41
- * monitorOptions: {
42
- * renotifyInterval: 100,
43
- * },
63
+ * tickEvery: 900,
44
64
  * },
45
- * name: "An API test on example.org",
46
- * message: "Notify @pagerduty",
65
+ * requestDefinition: {
66
+ * method: "GET",
67
+ * url: "https://www.example.org",
68
+ * },
69
+ * requestHeaders: {
70
+ * Authentication: "Token: 1234566789",
71
+ * "Content-Type": "application/json",
72
+ * },
73
+ * status: "live",
74
+ * subtype: "http",
47
75
  * tags: [
48
76
  * "foo:bar",
49
77
  * "foo",
50
78
  * "env:test",
51
79
  * ],
52
- * status: "live",
80
+ * type: "api",
53
81
  * });
54
82
  * // Example Usage (Synthetics SSL test)
55
83
  * // Create a new Datadog Synthetics API/SSL test on example.org
56
- * const testSsl = new datadog.SyntheticsTest("testSsl", {
57
- * type: "api",
58
- * subtype: "ssl",
59
- * requestDefinition: {
60
- * host: "example.org",
61
- * port: 443,
62
- * },
84
+ * const testSsl = new datadog.SyntheticsTest("test_ssl", {
63
85
  * assertions: [{
64
- * type: "certificate",
65
86
  * operator: "isInMoreThan",
66
- * target: 30,
87
+ * target: "30",
88
+ * type: "certificate",
67
89
  * }],
68
90
  * locations: ["aws:eu-central-1"],
91
+ * message: "Notify @pagerduty",
92
+ * name: "An API test on example.org",
69
93
  * optionsList: {
70
- * tickEvery: 900,
71
94
  * acceptSelfSigned: true,
95
+ * tickEvery: 900,
72
96
  * },
73
- * name: "An API test on example.org",
74
- * message: "Notify @pagerduty",
97
+ * requestDefinition: {
98
+ * host: "example.org",
99
+ * port: 443,
100
+ * },
101
+ * status: "live",
102
+ * subtype: "ssl",
75
103
  * tags: [
76
104
  * "foo:bar",
77
105
  * "foo",
78
106
  * "env:test",
79
107
  * ],
80
- * status: "live",
108
+ * type: "api",
81
109
  * });
82
110
  * // Example Usage (Synthetics TCP test)
83
111
  * // Create a new Datadog Synthetics API/TCP test on example.org
84
- * const testTcp = new datadog.SyntheticsTest("testTcp", {
85
- * type: "api",
86
- * subtype: "tcp",
87
- * requestDefinition: {
88
- * host: "example.org",
89
- * port: 443,
90
- * },
112
+ * const testTcp = new datadog.SyntheticsTest("test_tcp", {
91
113
  * assertions: [{
92
- * type: "responseTime",
93
114
  * operator: "lessThan",
94
- * target: 2000,
115
+ * target: "2000",
116
+ * type: "responseTime",
117
+ * }],
118
+ * configVariables: [{
119
+ * id: "76636cd1-82e2-4aeb-9cfe-51366a8198a2",
120
+ * name: "MY_GLOBAL_VAR",
121
+ * type: "global",
95
122
  * }],
96
123
  * locations: ["aws:eu-central-1"],
124
+ * message: "Notify @pagerduty",
125
+ * name: "An API test on example.org",
97
126
  * optionsList: {
98
127
  * tickEvery: 900,
99
128
  * },
100
- * name: "An API test on example.org",
101
- * message: "Notify @pagerduty",
129
+ * requestDefinition: {
130
+ * host: "example.org",
131
+ * port: 443,
132
+ * },
133
+ * status: "live",
134
+ * subtype: "tcp",
102
135
  * tags: [
103
136
  * "foo:bar",
104
137
  * "foo",
105
138
  * "env:test",
106
139
  * ],
107
- * status: "live",
140
+ * type: "api",
108
141
  * });
109
142
  * // Example Usage (Synthetics DNS test)
110
143
  * // Create a new Datadog Synthetics API/DNS test on example.org
111
- * const testDns = new datadog.SyntheticsTest("testDns", {
112
- * type: "api",
113
- * subtype: "dns",
114
- * requestDefinition: {
115
- * host: "example.org",
116
- * },
144
+ * const testDns = new datadog.SyntheticsTest("test_dns", {
117
145
  * assertions: [{
118
- * type: "recordSome",
119
146
  * operator: "is",
120
147
  * property: "A",
121
148
  * target: "0.0.0.0",
149
+ * type: "recordSome",
122
150
  * }],
123
151
  * locations: ["aws:eu-central-1"],
152
+ * message: "Notify @pagerduty",
153
+ * name: "An API test on example.org",
124
154
  * optionsList: {
125
155
  * tickEvery: 900,
126
156
  * },
127
- * name: "An API test on example.org",
128
- * message: "Notify @pagerduty",
157
+ * requestDefinition: {
158
+ * host: "example.org",
159
+ * },
160
+ * status: "live",
161
+ * subtype: "dns",
129
162
  * tags: [
130
163
  * "foo:bar",
131
164
  * "foo",
132
165
  * "env:test",
133
166
  * ],
167
+ * type: "api",
168
+ * });
169
+ * // Example Usage (Synthetics Multistep API test)
170
+ * // Create a new Datadog Synthetics Multistep API test
171
+ * const test = new datadog.SyntheticsTest("test", {
172
+ * apiSteps: [
173
+ * {
174
+ * assertions: [{
175
+ * operator: "is",
176
+ * target: "200",
177
+ * type: "statusCode",
178
+ * }],
179
+ * name: "An API test on example.org",
180
+ * requestDefinition: {
181
+ * method: "GET",
182
+ * url: "https://example.org",
183
+ * },
184
+ * requestHeaders: {
185
+ * Authentication: "Token: 1234566789",
186
+ * "Content-Type": "application/json",
187
+ * },
188
+ * subtype: "http",
189
+ * },
190
+ * {
191
+ * assertions: [{
192
+ * operator: "is",
193
+ * target: "200",
194
+ * type: "statusCode",
195
+ * }],
196
+ * name: "An API test on example.org",
197
+ * requestDefinition: {
198
+ * method: "GET",
199
+ * url: "http://example.org",
200
+ * },
201
+ * subtype: "http",
202
+ * },
203
+ * ],
204
+ * locations: ["aws:eu-central-1"],
205
+ * name: "Multistep API test",
206
+ * optionsList: {
207
+ * acceptSelfSigned: true,
208
+ * tickEvery: 900,
209
+ * },
134
210
  * status: "live",
211
+ * subtype: "multi",
212
+ * type: "api",
135
213
  * });
136
214
  * // Example Usage (Synthetics Browser test)
137
215
  * // Support for Synthetics Browser test steps is limited (see below)
138
216
  * // Create a new Datadog Synthetics Browser test starting on https://www.example.org
139
- * const testBrowser = new datadog.SyntheticsTest("testBrowser", {
140
- * type: "browser",
141
- * requestDefinition: {
142
- * method: "GET",
143
- * url: "https://app.datadoghq.com",
144
- * },
145
- * deviceIds: ["laptop_large"],
146
- * locations: ["aws:eu-central-1"],
147
- * optionsList: {
148
- * tickEvery: 3600,
149
- * },
150
- * name: "A Browser test on example.org",
151
- * message: "Notify @qa",
152
- * tags: [],
153
- * status: "paused",
154
- * step: [{
217
+ * const testBrowser = new datadog.SyntheticsTest("test_browser", {
218
+ * browserSteps: [{
155
219
  * name: "Check current url",
156
- * type: "assertCurrentUrl",
157
- * params: JSON.stringify({
220
+ * params: {
158
221
  * check: "contains",
159
222
  * value: "datadoghq",
160
- * }),
223
+ * },
224
+ * type: "assertCurrentUrl",
161
225
  * }],
162
- * variable: [
226
+ * browserVariables: [
163
227
  * {
164
- * type: "text",
228
+ * example: "597",
165
229
  * name: "MY_PATTERN_VAR",
166
230
  * pattern: "{{numeric(3)}}",
167
- * example: "597",
231
+ * type: "text",
168
232
  * },
169
233
  * {
170
- * type: "email",
234
+ * example: "jd8-afe-ydv.4546132139@synthetics.dtdg.co",
171
235
  * name: "MY_EMAIL_VAR",
172
236
  * pattern: "jd8-afe-ydv.{{ numeric(10) }}@synthetics.dtdg.co",
173
- * example: "jd8-afe-ydv.4546132139@synthetics.dtdg.co",
237
+ * type: "email",
174
238
  * },
175
239
  * {
176
- * type: "global",
177
- * name: "MY_GLOBAL_VAR",
178
240
  * id: "76636cd1-82e2-4aeb-9cfe-51366a8198a2",
241
+ * name: "MY_GLOBAL_VAR",
242
+ * type: "global",
179
243
  * },
180
244
  * ],
245
+ * deviceIds: ["laptop_large"],
246
+ * locations: ["aws:eu-central-1"],
247
+ * message: "Notify @qa",
248
+ * name: "A Browser test on example.org",
249
+ * optionsList: {
250
+ * tickEvery: 3600,
251
+ * },
252
+ * requestDefinition: {
253
+ * method: "GET",
254
+ * url: "https://app.datadoghq.com",
255
+ * },
256
+ * status: "paused",
257
+ * tags: [],
258
+ * type: "browser",
181
259
  * });
182
260
  * ```
183
261
  *