-
Notifications
You must be signed in to change notification settings - Fork 2
/
serviceIntegration.go
627 lines (569 loc) · 28.9 KB
/
serviceIntegration.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package pagerduty
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// A [service integration](<https://developer.pagerduty.com/api-reference/reference/REST/openapiv3.json/paths/~1services~1%!B(MISSING)id%!D(MISSING)~1integrations/post>) is an integration that belongs to a service.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-pagerduty/sdk/v4/go/pagerduty"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// exampleUser, err := pagerduty.NewUser(ctx, "exampleUser", &pagerduty.UserArgs{
// Email: pulumi.String("125.greenholt.earline@graham.name"),
// Teams: pulumi.StringArray{
// pagerduty_team.Example.Id,
// },
// })
// if err != nil {
// return err
// }
// _, err = pagerduty.NewEscalationPolicy(ctx, "foo", &pagerduty.EscalationPolicyArgs{
// NumLoops: pulumi.Int(2),
// Rules: pagerduty.EscalationPolicyRuleArray{
// &pagerduty.EscalationPolicyRuleArgs{
// EscalationDelayInMinutes: pulumi.Int(10),
// Targets: pagerduty.EscalationPolicyRuleTargetArray{
// &pagerduty.EscalationPolicyRuleTargetArgs{
// Type: pulumi.String("user"),
// Id: exampleUser.ID(),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// exampleService, err := pagerduty.NewService(ctx, "exampleService", &pagerduty.ServiceArgs{
// AutoResolveTimeout: pulumi.String("14400"),
// AcknowledgementTimeout: pulumi.String("600"),
// EscalationPolicy: pulumi.Any(pagerduty_escalation_policy.Example.Id),
// })
// if err != nil {
// return err
// }
// _, err = pagerduty.NewServiceIntegration(ctx, "exampleServiceIntegration", &pagerduty.ServiceIntegrationArgs{
// Type: pulumi.String("generic_events_api_inbound_integration"),
// Service: exampleService.ID(),
// })
// if err != nil {
// return err
// }
// _, err = pagerduty.NewServiceIntegration(ctx, "apiv2", &pagerduty.ServiceIntegrationArgs{
// Type: pulumi.String("events_api_v2_inbound_integration"),
// Service: exampleService.ID(),
// })
// if err != nil {
// return err
// }
// _, err = pagerduty.NewServiceIntegration(ctx, "emailX", &pagerduty.ServiceIntegrationArgs{
// Type: pulumi.String("generic_email_inbound_integration"),
// IntegrationEmail: pulumi.String("ecommerce@subdomain.pagerduty.com"),
// Service: exampleService.ID(),
// })
// if err != nil {
// return err
// }
// datadogVendor, err := pagerduty.GetVendor(ctx, &pagerduty.GetVendorArgs{
// Name: "Datadog",
// }, nil)
// if err != nil {
// return err
// }
// _, err = pagerduty.NewServiceIntegration(ctx, "datadogServiceIntegration", &pagerduty.ServiceIntegrationArgs{
// Service: exampleService.ID(),
// Vendor: pulumi.String(datadogVendor.Id),
// })
// if err != nil {
// return err
// }
// cloudwatchVendor, err := pagerduty.GetVendor(ctx, &pagerduty.GetVendorArgs{
// Name: "Cloudwatch",
// }, nil)
// if err != nil {
// return err
// }
// _, err = pagerduty.NewServiceIntegration(ctx, "cloudwatchServiceIntegration", &pagerduty.ServiceIntegrationArgs{
// Service: exampleService.ID(),
// Vendor: pulumi.String(cloudwatchVendor.Id),
// })
// if err != nil {
// return err
// }
// emailVendor, err := pagerduty.GetVendor(ctx, &pagerduty.GetVendorArgs{
// Name: "Email",
// }, nil)
// if err != nil {
// return err
// }
// _, err = pagerduty.NewServiceIntegration(ctx, "emailServiceIntegration", &pagerduty.ServiceIntegrationArgs{
// Service: exampleService.ID(),
// Vendor: pulumi.String(emailVendor.Id),
// IntegrationEmail: pulumi.String("s1@your_account.pagerduty.com"),
// EmailIncidentCreation: pulumi.String("use_rules"),
// EmailFilterMode: pulumi.String("and-rules-email"),
// EmailFilters: pagerduty.ServiceIntegrationEmailFilterArray{
// &pagerduty.ServiceIntegrationEmailFilterArgs{
// BodyMode: pulumi.String("always"),
// BodyRegex: nil,
// FromEmailMode: pulumi.String("match"),
// FromEmailRegex: pulumi.String("(@foo.test*)"),
// SubjectMode: pulumi.String("match"),
// SubjectRegex: pulumi.String("(CRITICAL*)"),
// },
// &pagerduty.ServiceIntegrationEmailFilterArgs{
// BodyMode: pulumi.String("always"),
// BodyRegex: nil,
// FromEmailMode: pulumi.String("match"),
// FromEmailRegex: pulumi.String("(@bar.com*)"),
// SubjectMode: pulumi.String("match"),
// SubjectRegex: pulumi.String("(CRITICAL*)"),
// },
// },
// EmailParsers: pagerduty.ServiceIntegrationEmailParserArray{
// &pagerduty.ServiceIntegrationEmailParserArgs{
// Action: pulumi.String("resolve"),
// MatchPredicate: &pagerduty.ServiceIntegrationEmailParserMatchPredicateArgs{
// Type: pulumi.String("any"),
// Predicates: pagerduty.ServiceIntegrationEmailParserMatchPredicatePredicateArray{
// &pagerduty.ServiceIntegrationEmailParserMatchPredicatePredicateArgs{
// Matcher: pulumi.String("foo"),
// Part: pulumi.String("subject"),
// Type: pulumi.String("contains"),
// },
// &pagerduty.ServiceIntegrationEmailParserMatchPredicatePredicateArgs{
// Type: pulumi.String("not"),
// Predicates: pagerduty.ServiceIntegrationEmailParserMatchPredicatePredicatePredicateArray{
// &pagerduty.ServiceIntegrationEmailParserMatchPredicatePredicatePredicateArgs{
// Matcher: pulumi.String("(bar*)"),
// Part: pulumi.String("body"),
// Type: pulumi.String("regex"),
// },
// },
// },
// },
// },
// ValueExtractors: pagerduty.ServiceIntegrationEmailParserValueExtractorArray{
// &pagerduty.ServiceIntegrationEmailParserValueExtractorArgs{
// EndsBefore: pulumi.String("end"),
// Part: pulumi.String("subject"),
// StartsAfter: pulumi.String("start"),
// Type: pulumi.String("between"),
// ValueName: pulumi.String("incident_key"),
// },
// &pagerduty.ServiceIntegrationEmailParserValueExtractorArgs{
// EndsBefore: pulumi.String("end"),
// Part: pulumi.String("subject"),
// StartsAfter: pulumi.String("start"),
// Type: pulumi.String("between"),
// ValueName: pulumi.String("FieldName1"),
// },
// },
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// ## Import
//
// Services can be imported using their related `service` id and service integration `id` separated by a dot, e.g.
//
// ```sh
// $ pulumi import pagerduty:index/serviceIntegration:ServiceIntegration main PLSSSSS.PLIIIII
// ```
type ServiceIntegration struct {
pulumi.CustomResourceState
// Mode of Emails Filters feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#configure-a-regex-filter)). Can be `all-email`, `or-rules-email` or `and-rules-email`.
EmailFilterMode pulumi.StringOutput `pulumi:"emailFilterMode"`
EmailFilters ServiceIntegrationEmailFilterArrayOutput `pulumi:"emailFilters"`
// Behaviour of Email Management feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#control-when-a-new-incident-or-alert-is-triggered)). Can be `onNewEmail`, `onNewEmailSubject`, `onlyIfNoOpenIncidents` or `useRules`.
EmailIncidentCreation pulumi.StringOutput `pulumi:"emailIncidentCreation"`
EmailParsers ServiceIntegrationEmailParserArrayOutput `pulumi:"emailParsers"`
// Can be `openNewIncident` or `discard`.
EmailParsingFallback pulumi.StringOutput `pulumi:"emailParsingFallback"`
// URL at which the entity is uniquely displayed in the Web app.
HtmlUrl pulumi.StringOutput `pulumi:"htmlUrl"`
// This is the unique fully-qualified email address used for routing emails to this integration for processing.
IntegrationEmail pulumi.StringOutput `pulumi:"integrationEmail"`
// (Deprecated) This is the unique key used to route events to this integration when received via the PagerDuty Events API.
IntegrationKey pulumi.StringOutput `pulumi:"integrationKey"`
// The name of the service integration.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the service the integration should belong to.
Service pulumi.StringOutput `pulumi:"service"`
// The service type. Can be:
// `awsCloudwatchInboundIntegration`,
// `cloudkickInboundIntegration`,
// `eventTransformerApiInboundIntegration`,
// `eventsApiV2InboundIntegration` (requires service `alertCreation` to be `createAlertsAndIncidents`),
// `genericEmailInboundIntegration`,
// `genericEventsApiInboundIntegration`,
// `keynoteInboundIntegration`,
// `nagiosInboundIntegration`,
// `pingdomInboundIntegration`or `sqlMonitorInboundIntegration`.
//
// **Note:** This is meant for **generic** service integrations.
// To integrate with a **vendor** (e.g. Datadog or Amazon Cloudwatch) use the `vendor` field instead.
Type pulumi.StringOutput `pulumi:"type"`
// The ID of the vendor the integration should integrate with (e.g. Datadog or Amazon Cloudwatch).
Vendor pulumi.StringOutput `pulumi:"vendor"`
}
// NewServiceIntegration registers a new resource with the given unique name, arguments, and options.
func NewServiceIntegration(ctx *pulumi.Context,
name string, args *ServiceIntegrationArgs, opts ...pulumi.ResourceOption) (*ServiceIntegration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Service == nil {
return nil, errors.New("invalid value for required argument 'Service'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource ServiceIntegration
err := ctx.RegisterResource("pagerduty:index/serviceIntegration:ServiceIntegration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServiceIntegration gets an existing ServiceIntegration resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetServiceIntegration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceIntegrationState, opts ...pulumi.ResourceOption) (*ServiceIntegration, error) {
var resource ServiceIntegration
err := ctx.ReadResource("pagerduty:index/serviceIntegration:ServiceIntegration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServiceIntegration resources.
type serviceIntegrationState struct {
// Mode of Emails Filters feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#configure-a-regex-filter)). Can be `all-email`, `or-rules-email` or `and-rules-email`.
EmailFilterMode *string `pulumi:"emailFilterMode"`
EmailFilters []ServiceIntegrationEmailFilter `pulumi:"emailFilters"`
// Behaviour of Email Management feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#control-when-a-new-incident-or-alert-is-triggered)). Can be `onNewEmail`, `onNewEmailSubject`, `onlyIfNoOpenIncidents` or `useRules`.
EmailIncidentCreation *string `pulumi:"emailIncidentCreation"`
EmailParsers []ServiceIntegrationEmailParser `pulumi:"emailParsers"`
// Can be `openNewIncident` or `discard`.
EmailParsingFallback *string `pulumi:"emailParsingFallback"`
// URL at which the entity is uniquely displayed in the Web app.
HtmlUrl *string `pulumi:"htmlUrl"`
// This is the unique fully-qualified email address used for routing emails to this integration for processing.
IntegrationEmail *string `pulumi:"integrationEmail"`
// (Deprecated) This is the unique key used to route events to this integration when received via the PagerDuty Events API.
IntegrationKey *string `pulumi:"integrationKey"`
// The name of the service integration.
Name *string `pulumi:"name"`
// The ID of the service the integration should belong to.
Service *string `pulumi:"service"`
// The service type. Can be:
// `awsCloudwatchInboundIntegration`,
// `cloudkickInboundIntegration`,
// `eventTransformerApiInboundIntegration`,
// `eventsApiV2InboundIntegration` (requires service `alertCreation` to be `createAlertsAndIncidents`),
// `genericEmailInboundIntegration`,
// `genericEventsApiInboundIntegration`,
// `keynoteInboundIntegration`,
// `nagiosInboundIntegration`,
// `pingdomInboundIntegration`or `sqlMonitorInboundIntegration`.
//
// **Note:** This is meant for **generic** service integrations.
// To integrate with a **vendor** (e.g. Datadog or Amazon Cloudwatch) use the `vendor` field instead.
Type *string `pulumi:"type"`
// The ID of the vendor the integration should integrate with (e.g. Datadog or Amazon Cloudwatch).
Vendor *string `pulumi:"vendor"`
}
type ServiceIntegrationState struct {
// Mode of Emails Filters feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#configure-a-regex-filter)). Can be `all-email`, `or-rules-email` or `and-rules-email`.
EmailFilterMode pulumi.StringPtrInput
EmailFilters ServiceIntegrationEmailFilterArrayInput
// Behaviour of Email Management feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#control-when-a-new-incident-or-alert-is-triggered)). Can be `onNewEmail`, `onNewEmailSubject`, `onlyIfNoOpenIncidents` or `useRules`.
EmailIncidentCreation pulumi.StringPtrInput
EmailParsers ServiceIntegrationEmailParserArrayInput
// Can be `openNewIncident` or `discard`.
EmailParsingFallback pulumi.StringPtrInput
// URL at which the entity is uniquely displayed in the Web app.
HtmlUrl pulumi.StringPtrInput
// This is the unique fully-qualified email address used for routing emails to this integration for processing.
IntegrationEmail pulumi.StringPtrInput
// (Deprecated) This is the unique key used to route events to this integration when received via the PagerDuty Events API.
IntegrationKey pulumi.StringPtrInput
// The name of the service integration.
Name pulumi.StringPtrInput
// The ID of the service the integration should belong to.
Service pulumi.StringPtrInput
// The service type. Can be:
// `awsCloudwatchInboundIntegration`,
// `cloudkickInboundIntegration`,
// `eventTransformerApiInboundIntegration`,
// `eventsApiV2InboundIntegration` (requires service `alertCreation` to be `createAlertsAndIncidents`),
// `genericEmailInboundIntegration`,
// `genericEventsApiInboundIntegration`,
// `keynoteInboundIntegration`,
// `nagiosInboundIntegration`,
// `pingdomInboundIntegration`or `sqlMonitorInboundIntegration`.
//
// **Note:** This is meant for **generic** service integrations.
// To integrate with a **vendor** (e.g. Datadog or Amazon Cloudwatch) use the `vendor` field instead.
Type pulumi.StringPtrInput
// The ID of the vendor the integration should integrate with (e.g. Datadog or Amazon Cloudwatch).
Vendor pulumi.StringPtrInput
}
func (ServiceIntegrationState) ElementType() reflect.Type {
return reflect.TypeOf((*serviceIntegrationState)(nil)).Elem()
}
type serviceIntegrationArgs struct {
// Mode of Emails Filters feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#configure-a-regex-filter)). Can be `all-email`, `or-rules-email` or `and-rules-email`.
EmailFilterMode *string `pulumi:"emailFilterMode"`
EmailFilters []ServiceIntegrationEmailFilter `pulumi:"emailFilters"`
// Behaviour of Email Management feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#control-when-a-new-incident-or-alert-is-triggered)). Can be `onNewEmail`, `onNewEmailSubject`, `onlyIfNoOpenIncidents` or `useRules`.
EmailIncidentCreation *string `pulumi:"emailIncidentCreation"`
EmailParsers []ServiceIntegrationEmailParser `pulumi:"emailParsers"`
// Can be `openNewIncident` or `discard`.
EmailParsingFallback *string `pulumi:"emailParsingFallback"`
// This is the unique fully-qualified email address used for routing emails to this integration for processing.
IntegrationEmail *string `pulumi:"integrationEmail"`
// (Deprecated) This is the unique key used to route events to this integration when received via the PagerDuty Events API.
IntegrationKey *string `pulumi:"integrationKey"`
// The name of the service integration.
Name *string `pulumi:"name"`
// The ID of the service the integration should belong to.
Service string `pulumi:"service"`
// The service type. Can be:
// `awsCloudwatchInboundIntegration`,
// `cloudkickInboundIntegration`,
// `eventTransformerApiInboundIntegration`,
// `eventsApiV2InboundIntegration` (requires service `alertCreation` to be `createAlertsAndIncidents`),
// `genericEmailInboundIntegration`,
// `genericEventsApiInboundIntegration`,
// `keynoteInboundIntegration`,
// `nagiosInboundIntegration`,
// `pingdomInboundIntegration`or `sqlMonitorInboundIntegration`.
//
// **Note:** This is meant for **generic** service integrations.
// To integrate with a **vendor** (e.g. Datadog or Amazon Cloudwatch) use the `vendor` field instead.
Type *string `pulumi:"type"`
// The ID of the vendor the integration should integrate with (e.g. Datadog or Amazon Cloudwatch).
Vendor *string `pulumi:"vendor"`
}
// The set of arguments for constructing a ServiceIntegration resource.
type ServiceIntegrationArgs struct {
// Mode of Emails Filters feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#configure-a-regex-filter)). Can be `all-email`, `or-rules-email` or `and-rules-email`.
EmailFilterMode pulumi.StringPtrInput
EmailFilters ServiceIntegrationEmailFilterArrayInput
// Behaviour of Email Management feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#control-when-a-new-incident-or-alert-is-triggered)). Can be `onNewEmail`, `onNewEmailSubject`, `onlyIfNoOpenIncidents` or `useRules`.
EmailIncidentCreation pulumi.StringPtrInput
EmailParsers ServiceIntegrationEmailParserArrayInput
// Can be `openNewIncident` or `discard`.
EmailParsingFallback pulumi.StringPtrInput
// This is the unique fully-qualified email address used for routing emails to this integration for processing.
IntegrationEmail pulumi.StringPtrInput
// (Deprecated) This is the unique key used to route events to this integration when received via the PagerDuty Events API.
IntegrationKey pulumi.StringPtrInput
// The name of the service integration.
Name pulumi.StringPtrInput
// The ID of the service the integration should belong to.
Service pulumi.StringInput
// The service type. Can be:
// `awsCloudwatchInboundIntegration`,
// `cloudkickInboundIntegration`,
// `eventTransformerApiInboundIntegration`,
// `eventsApiV2InboundIntegration` (requires service `alertCreation` to be `createAlertsAndIncidents`),
// `genericEmailInboundIntegration`,
// `genericEventsApiInboundIntegration`,
// `keynoteInboundIntegration`,
// `nagiosInboundIntegration`,
// `pingdomInboundIntegration`or `sqlMonitorInboundIntegration`.
//
// **Note:** This is meant for **generic** service integrations.
// To integrate with a **vendor** (e.g. Datadog or Amazon Cloudwatch) use the `vendor` field instead.
Type pulumi.StringPtrInput
// The ID of the vendor the integration should integrate with (e.g. Datadog or Amazon Cloudwatch).
Vendor pulumi.StringPtrInput
}
func (ServiceIntegrationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*serviceIntegrationArgs)(nil)).Elem()
}
type ServiceIntegrationInput interface {
pulumi.Input
ToServiceIntegrationOutput() ServiceIntegrationOutput
ToServiceIntegrationOutputWithContext(ctx context.Context) ServiceIntegrationOutput
}
func (*ServiceIntegration) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceIntegration)(nil)).Elem()
}
func (i *ServiceIntegration) ToServiceIntegrationOutput() ServiceIntegrationOutput {
return i.ToServiceIntegrationOutputWithContext(context.Background())
}
func (i *ServiceIntegration) ToServiceIntegrationOutputWithContext(ctx context.Context) ServiceIntegrationOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceIntegrationOutput)
}
// ServiceIntegrationArrayInput is an input type that accepts ServiceIntegrationArray and ServiceIntegrationArrayOutput values.
// You can construct a concrete instance of `ServiceIntegrationArrayInput` via:
//
// ServiceIntegrationArray{ ServiceIntegrationArgs{...} }
type ServiceIntegrationArrayInput interface {
pulumi.Input
ToServiceIntegrationArrayOutput() ServiceIntegrationArrayOutput
ToServiceIntegrationArrayOutputWithContext(context.Context) ServiceIntegrationArrayOutput
}
type ServiceIntegrationArray []ServiceIntegrationInput
func (ServiceIntegrationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceIntegration)(nil)).Elem()
}
func (i ServiceIntegrationArray) ToServiceIntegrationArrayOutput() ServiceIntegrationArrayOutput {
return i.ToServiceIntegrationArrayOutputWithContext(context.Background())
}
func (i ServiceIntegrationArray) ToServiceIntegrationArrayOutputWithContext(ctx context.Context) ServiceIntegrationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceIntegrationArrayOutput)
}
// ServiceIntegrationMapInput is an input type that accepts ServiceIntegrationMap and ServiceIntegrationMapOutput values.
// You can construct a concrete instance of `ServiceIntegrationMapInput` via:
//
// ServiceIntegrationMap{ "key": ServiceIntegrationArgs{...} }
type ServiceIntegrationMapInput interface {
pulumi.Input
ToServiceIntegrationMapOutput() ServiceIntegrationMapOutput
ToServiceIntegrationMapOutputWithContext(context.Context) ServiceIntegrationMapOutput
}
type ServiceIntegrationMap map[string]ServiceIntegrationInput
func (ServiceIntegrationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceIntegration)(nil)).Elem()
}
func (i ServiceIntegrationMap) ToServiceIntegrationMapOutput() ServiceIntegrationMapOutput {
return i.ToServiceIntegrationMapOutputWithContext(context.Background())
}
func (i ServiceIntegrationMap) ToServiceIntegrationMapOutputWithContext(ctx context.Context) ServiceIntegrationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceIntegrationMapOutput)
}
type ServiceIntegrationOutput struct{ *pulumi.OutputState }
func (ServiceIntegrationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceIntegration)(nil)).Elem()
}
func (o ServiceIntegrationOutput) ToServiceIntegrationOutput() ServiceIntegrationOutput {
return o
}
func (o ServiceIntegrationOutput) ToServiceIntegrationOutputWithContext(ctx context.Context) ServiceIntegrationOutput {
return o
}
// Mode of Emails Filters feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#configure-a-regex-filter)). Can be `all-email`, `or-rules-email` or `and-rules-email`.
func (o ServiceIntegrationOutput) EmailFilterMode() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceIntegration) pulumi.StringOutput { return v.EmailFilterMode }).(pulumi.StringOutput)
}
func (o ServiceIntegrationOutput) EmailFilters() ServiceIntegrationEmailFilterArrayOutput {
return o.ApplyT(func(v *ServiceIntegration) ServiceIntegrationEmailFilterArrayOutput { return v.EmailFilters }).(ServiceIntegrationEmailFilterArrayOutput)
}
// Behaviour of Email Management feature ([explained in PD docs](https://support.pagerduty.com/docs/email-management-filters-and-rules#control-when-a-new-incident-or-alert-is-triggered)). Can be `onNewEmail`, `onNewEmailSubject`, `onlyIfNoOpenIncidents` or `useRules`.
func (o ServiceIntegrationOutput) EmailIncidentCreation() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceIntegration) pulumi.StringOutput { return v.EmailIncidentCreation }).(pulumi.StringOutput)
}
func (o ServiceIntegrationOutput) EmailParsers() ServiceIntegrationEmailParserArrayOutput {
return o.ApplyT(func(v *ServiceIntegration) ServiceIntegrationEmailParserArrayOutput { return v.EmailParsers }).(ServiceIntegrationEmailParserArrayOutput)
}
// Can be `openNewIncident` or `discard`.
func (o ServiceIntegrationOutput) EmailParsingFallback() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceIntegration) pulumi.StringOutput { return v.EmailParsingFallback }).(pulumi.StringOutput)
}
// URL at which the entity is uniquely displayed in the Web app.
func (o ServiceIntegrationOutput) HtmlUrl() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceIntegration) pulumi.StringOutput { return v.HtmlUrl }).(pulumi.StringOutput)
}
// This is the unique fully-qualified email address used for routing emails to this integration for processing.
func (o ServiceIntegrationOutput) IntegrationEmail() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceIntegration) pulumi.StringOutput { return v.IntegrationEmail }).(pulumi.StringOutput)
}
// (Deprecated) This is the unique key used to route events to this integration when received via the PagerDuty Events API.
func (o ServiceIntegrationOutput) IntegrationKey() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceIntegration) pulumi.StringOutput { return v.IntegrationKey }).(pulumi.StringOutput)
}
// The name of the service integration.
func (o ServiceIntegrationOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceIntegration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The ID of the service the integration should belong to.
func (o ServiceIntegrationOutput) Service() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceIntegration) pulumi.StringOutput { return v.Service }).(pulumi.StringOutput)
}
// The service type. Can be:
// `awsCloudwatchInboundIntegration`,
// `cloudkickInboundIntegration`,
// `eventTransformerApiInboundIntegration`,
// `eventsApiV2InboundIntegration` (requires service `alertCreation` to be `createAlertsAndIncidents`),
// `genericEmailInboundIntegration`,
// `genericEventsApiInboundIntegration`,
// `keynoteInboundIntegration`,
// `nagiosInboundIntegration`,
// `pingdomInboundIntegration`or `sqlMonitorInboundIntegration`.
//
// **Note:** This is meant for **generic** service integrations.
// To integrate with a **vendor** (e.g. Datadog or Amazon Cloudwatch) use the `vendor` field instead.
func (o ServiceIntegrationOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceIntegration) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
// The ID of the vendor the integration should integrate with (e.g. Datadog or Amazon Cloudwatch).
func (o ServiceIntegrationOutput) Vendor() pulumi.StringOutput {
return o.ApplyT(func(v *ServiceIntegration) pulumi.StringOutput { return v.Vendor }).(pulumi.StringOutput)
}
type ServiceIntegrationArrayOutput struct{ *pulumi.OutputState }
func (ServiceIntegrationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*ServiceIntegration)(nil)).Elem()
}
func (o ServiceIntegrationArrayOutput) ToServiceIntegrationArrayOutput() ServiceIntegrationArrayOutput {
return o
}
func (o ServiceIntegrationArrayOutput) ToServiceIntegrationArrayOutputWithContext(ctx context.Context) ServiceIntegrationArrayOutput {
return o
}
func (o ServiceIntegrationArrayOutput) Index(i pulumi.IntInput) ServiceIntegrationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ServiceIntegration {
return vs[0].([]*ServiceIntegration)[vs[1].(int)]
}).(ServiceIntegrationOutput)
}
type ServiceIntegrationMapOutput struct{ *pulumi.OutputState }
func (ServiceIntegrationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*ServiceIntegration)(nil)).Elem()
}
func (o ServiceIntegrationMapOutput) ToServiceIntegrationMapOutput() ServiceIntegrationMapOutput {
return o
}
func (o ServiceIntegrationMapOutput) ToServiceIntegrationMapOutputWithContext(ctx context.Context) ServiceIntegrationMapOutput {
return o
}
func (o ServiceIntegrationMapOutput) MapIndex(k pulumi.StringInput) ServiceIntegrationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ServiceIntegration {
return vs[0].(map[string]*ServiceIntegration)[vs[1].(string)]
}).(ServiceIntegrationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ServiceIntegrationInput)(nil)).Elem(), &ServiceIntegration{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceIntegrationArrayInput)(nil)).Elem(), ServiceIntegrationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ServiceIntegrationMapInput)(nil)).Elem(), ServiceIntegrationMap{})
pulumi.RegisterOutputType(ServiceIntegrationOutput{})
pulumi.RegisterOutputType(ServiceIntegrationArrayOutput{})
pulumi.RegisterOutputType(ServiceIntegrationMapOutput{})
}