@pulumi/datadog 4.30.0-alpha.1721194263 → 4.30.0-alpha.1721252536

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.
@@ -15,6 +15,451 @@ import * as outputs from "./types/output";
15
15
  *
16
16
  * which you can now use in your request definition:
17
17
  *
18
+ * ## Example Usage
19
+ *
20
+ * ```typescript
21
+ * import * as pulumi from "@pulumi/pulumi";
22
+ * import * as datadog from "@pulumi/datadog";
23
+ *
24
+ * // Example Usage (Synthetics API test)
25
+ * // Create a new Datadog Synthetics API/HTTP test on https://www.example.org
26
+ * const testUptime = new datadog.SyntheticsTest("test_uptime", {
27
+ * name: "An Uptime test on example.org",
28
+ * type: "api",
29
+ * subtype: "http",
30
+ * status: "live",
31
+ * message: "Notify @pagerduty",
32
+ * locations: ["aws:eu-central-1"],
33
+ * tags: [
34
+ * "foo:bar",
35
+ * "foo",
36
+ * "env:test",
37
+ * ],
38
+ * requestDefinition: {
39
+ * method: "GET",
40
+ * url: "https://www.example.org",
41
+ * },
42
+ * requestHeaders: {
43
+ * "Content-Type": "application/json",
44
+ * },
45
+ * assertions: [{
46
+ * type: "statusCode",
47
+ * operator: "is",
48
+ * target: "200",
49
+ * }],
50
+ * optionsList: {
51
+ * tickEvery: 900,
52
+ * retry: {
53
+ * count: 2,
54
+ * interval: 300,
55
+ * },
56
+ * monitorOptions: {
57
+ * renotifyInterval: 120,
58
+ * },
59
+ * },
60
+ * });
61
+ * // Example Usage (Authenticated API test)
62
+ * // Create a new Datadog Synthetics API/HTTP test on https://www.example.org
63
+ * const testApi = new datadog.SyntheticsTest("test_api", {
64
+ * name: "An API test on example.org",
65
+ * type: "api",
66
+ * subtype: "http",
67
+ * status: "live",
68
+ * message: "Notify @pagerduty",
69
+ * locations: ["aws:eu-central-1"],
70
+ * tags: [
71
+ * "foo:bar",
72
+ * "foo",
73
+ * "env:test",
74
+ * ],
75
+ * requestDefinition: {
76
+ * method: "GET",
77
+ * url: "https://www.example.org",
78
+ * },
79
+ * requestHeaders: {
80
+ * "Content-Type": "application/json",
81
+ * Authentication: "Token: 1234566789",
82
+ * },
83
+ * assertions: [{
84
+ * type: "statusCode",
85
+ * operator: "is",
86
+ * target: "200",
87
+ * }],
88
+ * optionsList: {
89
+ * tickEvery: 900,
90
+ * retry: {
91
+ * count: 2,
92
+ * interval: 300,
93
+ * },
94
+ * monitorOptions: {
95
+ * renotifyInterval: 120,
96
+ * },
97
+ * },
98
+ * });
99
+ * // Example Usage (Synthetics SSL test)
100
+ * // Create a new Datadog Synthetics API/SSL test on example.org
101
+ * const testSsl = new datadog.SyntheticsTest("test_ssl", {
102
+ * name: "An API test on example.org",
103
+ * type: "api",
104
+ * subtype: "ssl",
105
+ * status: "live",
106
+ * message: "Notify @pagerduty",
107
+ * locations: ["aws:eu-central-1"],
108
+ * tags: [
109
+ * "foo:bar",
110
+ * "foo",
111
+ * "env:test",
112
+ * ],
113
+ * requestDefinition: {
114
+ * host: "example.org",
115
+ * port: 443,
116
+ * },
117
+ * assertions: [{
118
+ * type: "certificate",
119
+ * operator: "isInMoreThan",
120
+ * target: "30",
121
+ * }],
122
+ * optionsList: {
123
+ * tickEvery: 900,
124
+ * acceptSelfSigned: true,
125
+ * },
126
+ * });
127
+ * // Example Usage (Synthetics TCP test)
128
+ * // Create a new Datadog Synthetics API/TCP test on example.org
129
+ * const testTcp = new datadog.SyntheticsTest("test_tcp", {
130
+ * name: "An API test on example.org",
131
+ * type: "api",
132
+ * subtype: "tcp",
133
+ * status: "live",
134
+ * message: "Notify @pagerduty",
135
+ * locations: ["aws:eu-central-1"],
136
+ * tags: [
137
+ * "foo:bar",
138
+ * "foo",
139
+ * "env:test",
140
+ * ],
141
+ * requestDefinition: {
142
+ * host: "example.org",
143
+ * port: 443,
144
+ * },
145
+ * assertions: [{
146
+ * type: "responseTime",
147
+ * operator: "lessThan",
148
+ * target: "2000",
149
+ * }],
150
+ * configVariables: [{
151
+ * type: "global",
152
+ * name: "MY_GLOBAL_VAR",
153
+ * id: "76636cd1-82e2-4aeb-9cfe-51366a8198a2",
154
+ * }],
155
+ * optionsList: {
156
+ * tickEvery: 900,
157
+ * },
158
+ * });
159
+ * // Example Usage (Synthetics DNS test)
160
+ * // Create a new Datadog Synthetics API/DNS test on example.org
161
+ * const testDns = new datadog.SyntheticsTest("test_dns", {
162
+ * name: "An API test on example.org",
163
+ * type: "api",
164
+ * subtype: "dns",
165
+ * status: "live",
166
+ * message: "Notify @pagerduty",
167
+ * locations: ["aws:eu-central-1"],
168
+ * tags: [
169
+ * "foo:bar",
170
+ * "foo",
171
+ * "env:test",
172
+ * ],
173
+ * requestDefinition: {
174
+ * host: "example.org",
175
+ * },
176
+ * assertions: [{
177
+ * type: "recordSome",
178
+ * operator: "is",
179
+ * property: "A",
180
+ * target: "0.0.0.0",
181
+ * }],
182
+ * optionsList: {
183
+ * tickEvery: 900,
184
+ * },
185
+ * });
186
+ * // Example Usage (Synthetics Multistep API test)
187
+ * // Create a new Datadog Synthetics Multistep API test
188
+ * const testMultiStep = new datadog.SyntheticsTest("test_multi_step", {
189
+ * name: "Multistep API test",
190
+ * type: "api",
191
+ * subtype: "multi",
192
+ * status: "live",
193
+ * locations: ["aws:eu-central-1"],
194
+ * tags: [
195
+ * "foo:bar",
196
+ * "foo",
197
+ * "env:test",
198
+ * ],
199
+ * apiSteps: [
200
+ * {
201
+ * name: "An API test on example.org",
202
+ * subtype: "http",
203
+ * assertions: [{
204
+ * type: "statusCode",
205
+ * operator: "is",
206
+ * target: "200",
207
+ * }],
208
+ * requestDefinition: {
209
+ * method: "GET",
210
+ * url: "https://www.example.org",
211
+ * },
212
+ * requestHeaders: {
213
+ * "Content-Type": "application/json",
214
+ * Authentication: "Token: 1234566789",
215
+ * },
216
+ * },
217
+ * {
218
+ * name: "An API test on example.org",
219
+ * subtype: "http",
220
+ * assertions: [{
221
+ * type: "statusCode",
222
+ * operator: "is",
223
+ * target: "200",
224
+ * }],
225
+ * requestDefinition: {
226
+ * method: "GET",
227
+ * url: "http://example.org",
228
+ * },
229
+ * },
230
+ * {
231
+ * name: "A gRPC health check on example.org",
232
+ * subtype: "grpc",
233
+ * assertions: [{
234
+ * type: "statusCode",
235
+ * operator: "is",
236
+ * target: "200",
237
+ * }],
238
+ * requestDefinition: {
239
+ * host: "example.org",
240
+ * port: 443,
241
+ * callType: "healthcheck",
242
+ * service: "greeter.Greeter",
243
+ * },
244
+ * },
245
+ * {
246
+ * name: "A gRPC behavior check on example.org",
247
+ * subtype: "grpc",
248
+ * assertions: [{
249
+ * type: "statusCode",
250
+ * operator: "is",
251
+ * target: "200",
252
+ * }],
253
+ * requestDefinition: {
254
+ * host: "example.org",
255
+ * port: 443,
256
+ * callType: "unary",
257
+ * service: "greeter.Greeter",
258
+ * method: "SayHello",
259
+ * message: "{\"name\": \"John\"}",
260
+ * plainProtoFile: `syntax = "proto3";
261
+ *
262
+ * package greeter;
263
+ *
264
+ * // The greeting service definition.
265
+ * service Greeter {
266
+ * // Sends a greeting
267
+ * rpc SayHello (HelloRequest) returns (HelloReply) {}
268
+ * }
269
+ *
270
+ * // The request message containing the user's name.
271
+ * message HelloRequest {
272
+ * string name = 1;
273
+ * }
274
+ *
275
+ * // The response message containing the greetings
276
+ * message HelloReply {
277
+ * string message = 1;
278
+ * }
279
+ * `,
280
+ * },
281
+ * },
282
+ * ],
283
+ * optionsList: {
284
+ * tickEvery: 900,
285
+ * acceptSelfSigned: true,
286
+ * },
287
+ * });
288
+ * // Example Usage (Synthetics Browser test)
289
+ * // Create a new Datadog Synthetics Browser test starting on https://www.example.org
290
+ * const testBrowser = new datadog.SyntheticsTest("test_browser", {
291
+ * name: "A Browser test on example.org",
292
+ * type: "browser",
293
+ * status: "paused",
294
+ * message: "Notify @qa",
295
+ * deviceIds: ["laptop_large"],
296
+ * locations: ["aws:eu-central-1"],
297
+ * tags: [],
298
+ * requestDefinition: {
299
+ * method: "GET",
300
+ * url: "https://www.example.org",
301
+ * },
302
+ * browserSteps: [
303
+ * {
304
+ * name: "Check current url",
305
+ * type: "assertCurrentUrl",
306
+ * params: {
307
+ * check: "contains",
308
+ * value: "datadoghq",
309
+ * },
310
+ * },
311
+ * {
312
+ * name: "Test a downloaded file",
313
+ * type: "assertFileDownload",
314
+ * params: {
315
+ * file: JSON.stringify({
316
+ * md5: "abcdef1234567890",
317
+ * sizeCheck: {
318
+ * type: "equals",
319
+ * value: 1,
320
+ * },
321
+ * nameCheck: {
322
+ * type: "contains",
323
+ * value: ".xls",
324
+ * },
325
+ * }),
326
+ * },
327
+ * },
328
+ * ],
329
+ * browserVariables: [
330
+ * {
331
+ * type: "text",
332
+ * name: "MY_PATTERN_VAR",
333
+ * pattern: "{{numeric(3)}}",
334
+ * example: "597",
335
+ * },
336
+ * {
337
+ * type: "email",
338
+ * name: "MY_EMAIL_VAR",
339
+ * pattern: "jd8-afe-ydv.{{ numeric(10) }}@synthetics.dtdg.co",
340
+ * example: "jd8-afe-ydv.4546132139@synthetics.dtdg.co",
341
+ * },
342
+ * {
343
+ * type: "global",
344
+ * name: "MY_GLOBAL_VAR",
345
+ * id: "76636cd1-82e2-4aeb-9cfe-51366a8198a2",
346
+ * },
347
+ * ],
348
+ * optionsList: {
349
+ * tickEvery: 3600,
350
+ * },
351
+ * });
352
+ * // Example Usage (GRPC API behavior check test)
353
+ * // Create a new Datadog GRPC API test calling host example.org on port 443
354
+ * // targeting service `greeter.Greeter` with the method `SayHello`
355
+ * // and the message {"name": "John"}
356
+ * const testGrpcUnary = new datadog.SyntheticsTest("test_grpc_unary", {
357
+ * name: "GRPC API behavior check test",
358
+ * type: "api",
359
+ * subtype: "grpc",
360
+ * status: "live",
361
+ * locations: ["aws:eu-central-1"],
362
+ * tags: [
363
+ * "foo:bar",
364
+ * "foo",
365
+ * "env:test",
366
+ * ],
367
+ * requestDefinition: {
368
+ * host: "example.org",
369
+ * port: 443,
370
+ * callType: "unary",
371
+ * service: "greeter.Greeter",
372
+ * method: "SayHello",
373
+ * message: "{\"name\": \"John\"}",
374
+ * plainProtoFile: `syntax = "proto3";
375
+ *
376
+ * package greeter;
377
+ *
378
+ * // The greeting service definition.
379
+ * service Greeter {
380
+ * // Sends a greeting
381
+ * rpc SayHello (HelloRequest) returns (HelloReply) {}
382
+ * }
383
+ *
384
+ * // The request message containing the user's name.
385
+ * message HelloRequest {
386
+ * string name = 1;
387
+ * }
388
+ *
389
+ * // The response message containing the greetings
390
+ * message HelloReply {
391
+ * string message = 1;
392
+ * }
393
+ * `,
394
+ * },
395
+ * requestMetadata: {
396
+ * header: "value",
397
+ * },
398
+ * assertions: [
399
+ * {
400
+ * type: "responseTime",
401
+ * operator: "lessThan",
402
+ * target: "2000",
403
+ * },
404
+ * {
405
+ * operator: "is",
406
+ * type: "grpcHealthcheckStatus",
407
+ * target: "1",
408
+ * },
409
+ * {
410
+ * operator: "is",
411
+ * type: "grpcProto",
412
+ * target: "proto target",
413
+ * },
414
+ * {
415
+ * operator: "is",
416
+ * property: "property",
417
+ * type: "grpcMetadata",
418
+ * target: "123",
419
+ * },
420
+ * ],
421
+ * optionsList: {
422
+ * tickEvery: 900,
423
+ * },
424
+ * });
425
+ * // Example Usage (GRPC API health check test)
426
+ * // Create a new Datadog GRPC API test calling host example.org on port 443
427
+ * // testing the overall health of the service
428
+ * const testGrpcHealth = new datadog.SyntheticsTest("test_grpc_health", {
429
+ * name: "GRPC API health check test",
430
+ * type: "api",
431
+ * subtype: "grpc",
432
+ * status: "live",
433
+ * locations: ["aws:eu-central-1"],
434
+ * tags: [
435
+ * "foo:bar",
436
+ * "foo",
437
+ * "env:test",
438
+ * ],
439
+ * requestDefinition: {
440
+ * host: "example.org",
441
+ * port: 443,
442
+ * callType: "healthcheck",
443
+ * service: "greeter.Greeter",
444
+ * },
445
+ * assertions: [
446
+ * {
447
+ * type: "responseTime",
448
+ * operator: "lessThan",
449
+ * target: "2000",
450
+ * },
451
+ * {
452
+ * operator: "is",
453
+ * type: "grpcHealthcheckStatus",
454
+ * target: "1",
455
+ * },
456
+ * ],
457
+ * optionsList: {
458
+ * tickEvery: 900,
459
+ * },
460
+ * });
461
+ * ```
462
+ *
18
463
  * ## Import
19
464
  *
20
465
  * Synthetics tests can be imported using their public string ID, e.g.
@@ -107,7 +552,7 @@ export declare class SyntheticsTest extends pulumi.CustomResource {
107
552
  [key: string]: any;
108
553
  } | undefined>;
109
554
  /**
110
- * Metadata to include when performing the gRPC test.
555
+ * Metadata to include when performing the gRPC request.
111
556
  */
112
557
  readonly requestMetadata: pulumi.Output<{
113
558
  [key: string]: any;
@@ -227,7 +672,7 @@ export interface SyntheticsTestState {
227
672
  [key: string]: any;
228
673
  }>;
229
674
  /**
230
- * Metadata to include when performing the gRPC test.
675
+ * Metadata to include when performing the gRPC request.
231
676
  */
232
677
  requestMetadata?: pulumi.Input<{
233
678
  [key: string]: any;
@@ -335,7 +780,7 @@ export interface SyntheticsTestArgs {
335
780
  [key: string]: any;
336
781
  }>;
337
782
  /**
338
- * Metadata to include when performing the gRPC test.
783
+ * Metadata to include when performing the gRPC request.
339
784
  */
340
785
  requestMetadata?: pulumi.Input<{
341
786
  [key: string]: any;