generated from pulumi/pulumi-tf-provider-boilerplate
/
alertTarget.go
518 lines (460 loc) · 20.8 KB
/
alertTarget.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
// 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 wavefront
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-wavefront/sdk/v2/go/wavefront/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a wavefront Alert Target resource. This allows alert targets to created, updated, and deleted.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-wavefront/sdk/v2/go/wavefront"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := wavefront.NewAlertTarget(ctx, "testTarget", &wavefront.AlertTargetArgs{
// ContentType: pulumi.String("application/json"),
// CustomHeaders: pulumi.StringMap{
// "Testing": pulumi.String("true"),
// },
// Description: pulumi.String("Test target"),
// Method: pulumi.String("WEBHOOK"),
// Recipient: pulumi.String("https://hooks.slack.com/services/test/me"),
// Template: pulumi.String("{}"),
// Triggers: pulumi.StringArray{
// pulumi.String("ALERT_OPENED"),
// pulumi.String("ALERT_RESOLVED"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// ## Attributes Reference
//
// * `targetId` - The target ID prefixed with `target:` for interpolating into a Wavefront Alert.
//
// ### Route
//
// The `route` mapping supports the following:
//
// - `method` - (Required) The notification method used for notification target. One of `WEBHOOK`, `EMAIL`, `PAGERDUTY`.
// - `target` - (Required) The endpoint for the alert route. `EMAIL`: email address. `PAGERDUTY`: PagerDuty routing
// key. `WEBHOOK`: URL endpoint.
// - `filter` - (Required) String that filters the route. Space delimited. Currently only allows a single key value pair.
// (e.g. `env prod`)
//
// ### Example
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-wavefront/sdk/v2/go/wavefront"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := wavefront.NewAlertTarget(ctx, "testTarget", &wavefront.AlertTargetArgs{
// ContentType: pulumi.String("application/json"),
// CustomHeaders: pulumi.StringMap{
// "Testing": pulumi.String("true"),
// },
// Description: pulumi.String("Test target"),
// Method: pulumi.String("WEBHOOK"),
// Recipient: pulumi.String("https://hooks.slack.com/services/test/me"),
// Routes: wavefront.AlertTargetRouteArray{
// &wavefront.AlertTargetRouteArgs{
// Filter: pulumi.StringMap{
// "key": pulumi.String("env"),
// "value": pulumi.String("prod"),
// },
// Method: pulumi.String("WEBHOOK"),
// Target: pulumi.String("https://hooks.slack.com/services/test/me/prod"),
// },
// &wavefront.AlertTargetRouteArgs{
// Filter: pulumi.StringMap{
// "key": pulumi.String("env"),
// "value": pulumi.String("dev"),
// },
// Method: pulumi.String("WEBHOOK"),
// Target: pulumi.String("https://hooks.slack.com/services/test/me/dev"),
// },
// },
// Template: pulumi.String("{}"),
// Triggers: pulumi.StringArray{
// pulumi.String("ALERT_OPENED"),
// pulumi.String("ALERT_RESOLVED"),
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// Alert Targets can be imported using the `id`, e.g.
//
// ```sh
//
// $ pulumi import wavefront:index/alertTarget:AlertTarget alert_target abcdEFGhijKLMNO
//
// ```
type AlertTarget struct {
pulumi.CustomResourceState
// The value of the `Content-Type` header of the webhook.
ContentType pulumi.StringPtrOutput `pulumi:"contentType"`
// A `string->string` map specifying the custom HTTP header key/value pairs that will be
// sent in the requests with a method of `WEBHOOK`.
CustomHeaders pulumi.StringMapOutput `pulumi:"customHeaders"`
// Description describing this alert target.
Description pulumi.StringOutput `pulumi:"description"`
// The subject title of an email notification target.
EmailSubject pulumi.StringPtrOutput `pulumi:"emailSubject"`
// Determine whether the email alert content is sent as HTML or text.
IsHtmlContent pulumi.BoolPtrOutput `pulumi:"isHtmlContent"`
// The notification method used for notification target. One of `WEBHOOK`, `EMAIL`, `PAGERDUTY`.
Method pulumi.StringPtrOutput `pulumi:"method"`
// The name of the alert target as it is displayed in Wavefront.
Name pulumi.StringOutput `pulumi:"name"`
// The end point for the notification Target. `EMAIL`: email address. `PAGERDUTY`: PagerDuty
// routing key. `WEBHOOK`: URL endpoint.
Recipient pulumi.StringOutput `pulumi:"recipient"`
// List of routing targets that this alert target will notify. See Route
Routes AlertTargetRouteArrayOutput `pulumi:"routes"`
TargetId pulumi.StringOutput `pulumi:"targetId"`
// A mustache template that will form the body of the POST request, email, and summary of the PagerDuty.
Template pulumi.StringOutput `pulumi:"template"`
// A list of occurrences on which this webhook will be fired. Valid values are `ALERT_OPENED`,
// `ALERT_UPDATED`, `ALERT_RESOLVED`, `ALERT_MAINTENANCE`, `ALERT_SNOOZED`, `ALERT_NO_DATA`, `ALERT_NO_DATA_RESOLVED`, `ALERT_NO_DATA_MAINTENANCE`.
Triggers pulumi.StringArrayOutput `pulumi:"triggers"`
}
// NewAlertTarget registers a new resource with the given unique name, arguments, and options.
func NewAlertTarget(ctx *pulumi.Context,
name string, args *AlertTargetArgs, opts ...pulumi.ResourceOption) (*AlertTarget, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Description == nil {
return nil, errors.New("invalid value for required argument 'Description'")
}
if args.Recipient == nil {
return nil, errors.New("invalid value for required argument 'Recipient'")
}
if args.Template == nil {
return nil, errors.New("invalid value for required argument 'Template'")
}
if args.Triggers == nil {
return nil, errors.New("invalid value for required argument 'Triggers'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AlertTarget
err := ctx.RegisterResource("wavefront:index/alertTarget:AlertTarget", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAlertTarget gets an existing AlertTarget 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 GetAlertTarget(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AlertTargetState, opts ...pulumi.ResourceOption) (*AlertTarget, error) {
var resource AlertTarget
err := ctx.ReadResource("wavefront:index/alertTarget:AlertTarget", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AlertTarget resources.
type alertTargetState struct {
// The value of the `Content-Type` header of the webhook.
ContentType *string `pulumi:"contentType"`
// A `string->string` map specifying the custom HTTP header key/value pairs that will be
// sent in the requests with a method of `WEBHOOK`.
CustomHeaders map[string]string `pulumi:"customHeaders"`
// Description describing this alert target.
Description *string `pulumi:"description"`
// The subject title of an email notification target.
EmailSubject *string `pulumi:"emailSubject"`
// Determine whether the email alert content is sent as HTML or text.
IsHtmlContent *bool `pulumi:"isHtmlContent"`
// The notification method used for notification target. One of `WEBHOOK`, `EMAIL`, `PAGERDUTY`.
Method *string `pulumi:"method"`
// The name of the alert target as it is displayed in Wavefront.
Name *string `pulumi:"name"`
// The end point for the notification Target. `EMAIL`: email address. `PAGERDUTY`: PagerDuty
// routing key. `WEBHOOK`: URL endpoint.
Recipient *string `pulumi:"recipient"`
// List of routing targets that this alert target will notify. See Route
Routes []AlertTargetRoute `pulumi:"routes"`
TargetId *string `pulumi:"targetId"`
// A mustache template that will form the body of the POST request, email, and summary of the PagerDuty.
Template *string `pulumi:"template"`
// A list of occurrences on which this webhook will be fired. Valid values are `ALERT_OPENED`,
// `ALERT_UPDATED`, `ALERT_RESOLVED`, `ALERT_MAINTENANCE`, `ALERT_SNOOZED`, `ALERT_NO_DATA`, `ALERT_NO_DATA_RESOLVED`, `ALERT_NO_DATA_MAINTENANCE`.
Triggers []string `pulumi:"triggers"`
}
type AlertTargetState struct {
// The value of the `Content-Type` header of the webhook.
ContentType pulumi.StringPtrInput
// A `string->string` map specifying the custom HTTP header key/value pairs that will be
// sent in the requests with a method of `WEBHOOK`.
CustomHeaders pulumi.StringMapInput
// Description describing this alert target.
Description pulumi.StringPtrInput
// The subject title of an email notification target.
EmailSubject pulumi.StringPtrInput
// Determine whether the email alert content is sent as HTML or text.
IsHtmlContent pulumi.BoolPtrInput
// The notification method used for notification target. One of `WEBHOOK`, `EMAIL`, `PAGERDUTY`.
Method pulumi.StringPtrInput
// The name of the alert target as it is displayed in Wavefront.
Name pulumi.StringPtrInput
// The end point for the notification Target. `EMAIL`: email address. `PAGERDUTY`: PagerDuty
// routing key. `WEBHOOK`: URL endpoint.
Recipient pulumi.StringPtrInput
// List of routing targets that this alert target will notify. See Route
Routes AlertTargetRouteArrayInput
TargetId pulumi.StringPtrInput
// A mustache template that will form the body of the POST request, email, and summary of the PagerDuty.
Template pulumi.StringPtrInput
// A list of occurrences on which this webhook will be fired. Valid values are `ALERT_OPENED`,
// `ALERT_UPDATED`, `ALERT_RESOLVED`, `ALERT_MAINTENANCE`, `ALERT_SNOOZED`, `ALERT_NO_DATA`, `ALERT_NO_DATA_RESOLVED`, `ALERT_NO_DATA_MAINTENANCE`.
Triggers pulumi.StringArrayInput
}
func (AlertTargetState) ElementType() reflect.Type {
return reflect.TypeOf((*alertTargetState)(nil)).Elem()
}
type alertTargetArgs struct {
// The value of the `Content-Type` header of the webhook.
ContentType *string `pulumi:"contentType"`
// A `string->string` map specifying the custom HTTP header key/value pairs that will be
// sent in the requests with a method of `WEBHOOK`.
CustomHeaders map[string]string `pulumi:"customHeaders"`
// Description describing this alert target.
Description string `pulumi:"description"`
// The subject title of an email notification target.
EmailSubject *string `pulumi:"emailSubject"`
// Determine whether the email alert content is sent as HTML or text.
IsHtmlContent *bool `pulumi:"isHtmlContent"`
// The notification method used for notification target. One of `WEBHOOK`, `EMAIL`, `PAGERDUTY`.
Method *string `pulumi:"method"`
// The name of the alert target as it is displayed in Wavefront.
Name *string `pulumi:"name"`
// The end point for the notification Target. `EMAIL`: email address. `PAGERDUTY`: PagerDuty
// routing key. `WEBHOOK`: URL endpoint.
Recipient string `pulumi:"recipient"`
// List of routing targets that this alert target will notify. See Route
Routes []AlertTargetRoute `pulumi:"routes"`
// A mustache template that will form the body of the POST request, email, and summary of the PagerDuty.
Template string `pulumi:"template"`
// A list of occurrences on which this webhook will be fired. Valid values are `ALERT_OPENED`,
// `ALERT_UPDATED`, `ALERT_RESOLVED`, `ALERT_MAINTENANCE`, `ALERT_SNOOZED`, `ALERT_NO_DATA`, `ALERT_NO_DATA_RESOLVED`, `ALERT_NO_DATA_MAINTENANCE`.
Triggers []string `pulumi:"triggers"`
}
// The set of arguments for constructing a AlertTarget resource.
type AlertTargetArgs struct {
// The value of the `Content-Type` header of the webhook.
ContentType pulumi.StringPtrInput
// A `string->string` map specifying the custom HTTP header key/value pairs that will be
// sent in the requests with a method of `WEBHOOK`.
CustomHeaders pulumi.StringMapInput
// Description describing this alert target.
Description pulumi.StringInput
// The subject title of an email notification target.
EmailSubject pulumi.StringPtrInput
// Determine whether the email alert content is sent as HTML or text.
IsHtmlContent pulumi.BoolPtrInput
// The notification method used for notification target. One of `WEBHOOK`, `EMAIL`, `PAGERDUTY`.
Method pulumi.StringPtrInput
// The name of the alert target as it is displayed in Wavefront.
Name pulumi.StringPtrInput
// The end point for the notification Target. `EMAIL`: email address. `PAGERDUTY`: PagerDuty
// routing key. `WEBHOOK`: URL endpoint.
Recipient pulumi.StringInput
// List of routing targets that this alert target will notify. See Route
Routes AlertTargetRouteArrayInput
// A mustache template that will form the body of the POST request, email, and summary of the PagerDuty.
Template pulumi.StringInput
// A list of occurrences on which this webhook will be fired. Valid values are `ALERT_OPENED`,
// `ALERT_UPDATED`, `ALERT_RESOLVED`, `ALERT_MAINTENANCE`, `ALERT_SNOOZED`, `ALERT_NO_DATA`, `ALERT_NO_DATA_RESOLVED`, `ALERT_NO_DATA_MAINTENANCE`.
Triggers pulumi.StringArrayInput
}
func (AlertTargetArgs) ElementType() reflect.Type {
return reflect.TypeOf((*alertTargetArgs)(nil)).Elem()
}
type AlertTargetInput interface {
pulumi.Input
ToAlertTargetOutput() AlertTargetOutput
ToAlertTargetOutputWithContext(ctx context.Context) AlertTargetOutput
}
func (*AlertTarget) ElementType() reflect.Type {
return reflect.TypeOf((**AlertTarget)(nil)).Elem()
}
func (i *AlertTarget) ToAlertTargetOutput() AlertTargetOutput {
return i.ToAlertTargetOutputWithContext(context.Background())
}
func (i *AlertTarget) ToAlertTargetOutputWithContext(ctx context.Context) AlertTargetOutput {
return pulumi.ToOutputWithContext(ctx, i).(AlertTargetOutput)
}
// AlertTargetArrayInput is an input type that accepts AlertTargetArray and AlertTargetArrayOutput values.
// You can construct a concrete instance of `AlertTargetArrayInput` via:
//
// AlertTargetArray{ AlertTargetArgs{...} }
type AlertTargetArrayInput interface {
pulumi.Input
ToAlertTargetArrayOutput() AlertTargetArrayOutput
ToAlertTargetArrayOutputWithContext(context.Context) AlertTargetArrayOutput
}
type AlertTargetArray []AlertTargetInput
func (AlertTargetArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AlertTarget)(nil)).Elem()
}
func (i AlertTargetArray) ToAlertTargetArrayOutput() AlertTargetArrayOutput {
return i.ToAlertTargetArrayOutputWithContext(context.Background())
}
func (i AlertTargetArray) ToAlertTargetArrayOutputWithContext(ctx context.Context) AlertTargetArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(AlertTargetArrayOutput)
}
// AlertTargetMapInput is an input type that accepts AlertTargetMap and AlertTargetMapOutput values.
// You can construct a concrete instance of `AlertTargetMapInput` via:
//
// AlertTargetMap{ "key": AlertTargetArgs{...} }
type AlertTargetMapInput interface {
pulumi.Input
ToAlertTargetMapOutput() AlertTargetMapOutput
ToAlertTargetMapOutputWithContext(context.Context) AlertTargetMapOutput
}
type AlertTargetMap map[string]AlertTargetInput
func (AlertTargetMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AlertTarget)(nil)).Elem()
}
func (i AlertTargetMap) ToAlertTargetMapOutput() AlertTargetMapOutput {
return i.ToAlertTargetMapOutputWithContext(context.Background())
}
func (i AlertTargetMap) ToAlertTargetMapOutputWithContext(ctx context.Context) AlertTargetMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(AlertTargetMapOutput)
}
type AlertTargetOutput struct{ *pulumi.OutputState }
func (AlertTargetOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AlertTarget)(nil)).Elem()
}
func (o AlertTargetOutput) ToAlertTargetOutput() AlertTargetOutput {
return o
}
func (o AlertTargetOutput) ToAlertTargetOutputWithContext(ctx context.Context) AlertTargetOutput {
return o
}
// The value of the `Content-Type` header of the webhook.
func (o AlertTargetOutput) ContentType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AlertTarget) pulumi.StringPtrOutput { return v.ContentType }).(pulumi.StringPtrOutput)
}
// A `string->string` map specifying the custom HTTP header key/value pairs that will be
// sent in the requests with a method of `WEBHOOK`.
func (o AlertTargetOutput) CustomHeaders() pulumi.StringMapOutput {
return o.ApplyT(func(v *AlertTarget) pulumi.StringMapOutput { return v.CustomHeaders }).(pulumi.StringMapOutput)
}
// Description describing this alert target.
func (o AlertTargetOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v *AlertTarget) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput)
}
// The subject title of an email notification target.
func (o AlertTargetOutput) EmailSubject() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AlertTarget) pulumi.StringPtrOutput { return v.EmailSubject }).(pulumi.StringPtrOutput)
}
// Determine whether the email alert content is sent as HTML or text.
func (o AlertTargetOutput) IsHtmlContent() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *AlertTarget) pulumi.BoolPtrOutput { return v.IsHtmlContent }).(pulumi.BoolPtrOutput)
}
// The notification method used for notification target. One of `WEBHOOK`, `EMAIL`, `PAGERDUTY`.
func (o AlertTargetOutput) Method() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AlertTarget) pulumi.StringPtrOutput { return v.Method }).(pulumi.StringPtrOutput)
}
// The name of the alert target as it is displayed in Wavefront.
func (o AlertTargetOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *AlertTarget) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The end point for the notification Target. `EMAIL`: email address. `PAGERDUTY`: PagerDuty
// routing key. `WEBHOOK`: URL endpoint.
func (o AlertTargetOutput) Recipient() pulumi.StringOutput {
return o.ApplyT(func(v *AlertTarget) pulumi.StringOutput { return v.Recipient }).(pulumi.StringOutput)
}
// List of routing targets that this alert target will notify. See Route
func (o AlertTargetOutput) Routes() AlertTargetRouteArrayOutput {
return o.ApplyT(func(v *AlertTarget) AlertTargetRouteArrayOutput { return v.Routes }).(AlertTargetRouteArrayOutput)
}
func (o AlertTargetOutput) TargetId() pulumi.StringOutput {
return o.ApplyT(func(v *AlertTarget) pulumi.StringOutput { return v.TargetId }).(pulumi.StringOutput)
}
// A mustache template that will form the body of the POST request, email, and summary of the PagerDuty.
func (o AlertTargetOutput) Template() pulumi.StringOutput {
return o.ApplyT(func(v *AlertTarget) pulumi.StringOutput { return v.Template }).(pulumi.StringOutput)
}
// A list of occurrences on which this webhook will be fired. Valid values are `ALERT_OPENED`,
// `ALERT_UPDATED`, `ALERT_RESOLVED`, `ALERT_MAINTENANCE`, `ALERT_SNOOZED`, `ALERT_NO_DATA`, `ALERT_NO_DATA_RESOLVED`, `ALERT_NO_DATA_MAINTENANCE`.
func (o AlertTargetOutput) Triggers() pulumi.StringArrayOutput {
return o.ApplyT(func(v *AlertTarget) pulumi.StringArrayOutput { return v.Triggers }).(pulumi.StringArrayOutput)
}
type AlertTargetArrayOutput struct{ *pulumi.OutputState }
func (AlertTargetArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*AlertTarget)(nil)).Elem()
}
func (o AlertTargetArrayOutput) ToAlertTargetArrayOutput() AlertTargetArrayOutput {
return o
}
func (o AlertTargetArrayOutput) ToAlertTargetArrayOutputWithContext(ctx context.Context) AlertTargetArrayOutput {
return o
}
func (o AlertTargetArrayOutput) Index(i pulumi.IntInput) AlertTargetOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AlertTarget {
return vs[0].([]*AlertTarget)[vs[1].(int)]
}).(AlertTargetOutput)
}
type AlertTargetMapOutput struct{ *pulumi.OutputState }
func (AlertTargetMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*AlertTarget)(nil)).Elem()
}
func (o AlertTargetMapOutput) ToAlertTargetMapOutput() AlertTargetMapOutput {
return o
}
func (o AlertTargetMapOutput) ToAlertTargetMapOutputWithContext(ctx context.Context) AlertTargetMapOutput {
return o
}
func (o AlertTargetMapOutput) MapIndex(k pulumi.StringInput) AlertTargetOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AlertTarget {
return vs[0].(map[string]*AlertTarget)[vs[1].(string)]
}).(AlertTargetOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AlertTargetInput)(nil)).Elem(), &AlertTarget{})
pulumi.RegisterInputType(reflect.TypeOf((*AlertTargetArrayInput)(nil)).Elem(), AlertTargetArray{})
pulumi.RegisterInputType(reflect.TypeOf((*AlertTargetMapInput)(nil)).Elem(), AlertTargetMap{})
pulumi.RegisterOutputType(AlertTargetOutput{})
pulumi.RegisterOutputType(AlertTargetArrayOutput{})
pulumi.RegisterOutputType(AlertTargetMapOutput{})
}