/
notificationChannel.go
523 lines (462 loc) · 31.2 KB
/
notificationChannel.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
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package monitoring
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// A NotificationChannel is a medium through which an alert is delivered
// when a policy violation is detected. Examples of channels include email, SMS,
// and third-party messaging applications. Fields containing sensitive information
// like authentication tokens or contact info are only partially populated on retrieval.
//
// Notification Channels are designed to be flexible and are made up of a supported `type`
// and labels to configure that channel. Each `type` has specific labels that need to be
// present for that channel to be correctly configured. The labels that are required to be
// present for one channel `type` are often different than those required for another.
// Due to these loose constraints it's often best to set up a channel through the UI
// and import it to the provider when setting up a brand new channel type to determine which
// labels are required.
//
// A list of supported channels per project the `list` endpoint can be
// accessed programmatically or through the api explorer at https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannelDescriptors/list .
// This provides the channel type and all of the required labels that must be passed.
//
// To get more information about NotificationChannel, see:
//
// * [API documentation](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannels)
// * How-to Guides
// * [Notification Options](https://cloud.google.com/monitoring/support/notification-options)
// * [Monitoring API Documentation](https://cloud.google.com/monitoring/api/v3/)
//
// ## Example Usage
// ### Notification Channel Basic
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/monitoring"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := monitoring.NewNotificationChannel(ctx, "basic", &monitoring.NotificationChannelArgs{
// DisplayName: pulumi.String("Test Notification Channel"),
// Labels: pulumi.StringMap{
// "email_address": pulumi.String("fake_email@blahblah.com"),
// },
// Type: pulumi.String("email"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// ### Notification Channel Sensitive
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/monitoring"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := monitoring.NewNotificationChannel(ctx, "_default", &monitoring.NotificationChannelArgs{
// DisplayName: pulumi.String("Test Slack Channel"),
// Labels: pulumi.StringMap{
// "channel_name": pulumi.String("#foobar"),
// },
// SensitiveLabels: &monitoring.NotificationChannelSensitiveLabelsArgs{
// AuthToken: pulumi.String("one"),
// },
// Type: pulumi.String("slack"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// NotificationChannel can be imported using any of these accepted formats
//
// ```sh
// $ pulumi import gcp:monitoring/notificationChannel:NotificationChannel default {{name}}
// ```
type NotificationChannel struct {
pulumi.CustomResourceState
// An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.
Description pulumi.StringPtrOutput `pulumi:"description"`
// An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.
DisplayName pulumi.StringPtrOutput `pulumi:"displayName"`
// Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.
Enabled pulumi.BoolPtrOutput `pulumi:"enabled"`
// Configuration fields that define the channel and its behavior. The
// permissible and required labels are specified in the
// NotificationChannelDescriptor corresponding to the type field.
// Labels with sensitive data are obfuscated by the API and therefore the provider cannot
// determine if there are upstream changes to these fields. They can also be configured via
// the sensitiveLabels block, but cannot be configured in both places.
Labels pulumi.StringMapOutput `pulumi:"labels"`
// The full REST resource name for this channel. The syntax is: projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] The
// [CHANNEL_ID] is automatically assigned by the server on creation.
Name pulumi.StringOutput `pulumi:"name"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringOutput `pulumi:"project"`
// Different notification type behaviors are configured primarily using the the `labels` field on this
// resource. This block contains the labels which contain secrets or passwords so that they can be marked
// sensitive and hidden from plan output. The name of the field, eg: password, will be the key
// in the `labels` map in the api request.
// Credentials may not be specified in both locations and will cause an error. Changing from one location
// to a different credential configuration in the config will require an apply to update state.
// Structure is documented below.
SensitiveLabels NotificationChannelSensitiveLabelsPtrOutput `pulumi:"sensitiveLabels"`
// The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. See https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannelDescriptors/list to get the list of valid values such as "email", "slack", etc...
Type pulumi.StringOutput `pulumi:"type"`
// User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.
UserLabels pulumi.StringMapOutput `pulumi:"userLabels"`
// Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel
// operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is
// non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel
// works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require
// verification or that this specific channel has been exempted from verification because it was created prior to
// verification being required for channels of this type.This field cannot be modified using a standard
// UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.
VerificationStatus pulumi.StringOutput `pulumi:"verificationStatus"`
}
// NewNotificationChannel registers a new resource with the given unique name, arguments, and options.
func NewNotificationChannel(ctx *pulumi.Context,
name string, args *NotificationChannelArgs, opts ...pulumi.ResourceOption) (*NotificationChannel, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.Type == nil {
return nil, errors.New("invalid value for required argument 'Type'")
}
var resource NotificationChannel
err := ctx.RegisterResource("gcp:monitoring/notificationChannel:NotificationChannel", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetNotificationChannel gets an existing NotificationChannel 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 GetNotificationChannel(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *NotificationChannelState, opts ...pulumi.ResourceOption) (*NotificationChannel, error) {
var resource NotificationChannel
err := ctx.ReadResource("gcp:monitoring/notificationChannel:NotificationChannel", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering NotificationChannel resources.
type notificationChannelState struct {
// An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.
Description *string `pulumi:"description"`
// An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.
DisplayName *string `pulumi:"displayName"`
// Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.
Enabled *bool `pulumi:"enabled"`
// Configuration fields that define the channel and its behavior. The
// permissible and required labels are specified in the
// NotificationChannelDescriptor corresponding to the type field.
// Labels with sensitive data are obfuscated by the API and therefore the provider cannot
// determine if there are upstream changes to these fields. They can also be configured via
// the sensitiveLabels block, but cannot be configured in both places.
Labels map[string]string `pulumi:"labels"`
// The full REST resource name for this channel. The syntax is: projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] The
// [CHANNEL_ID] is automatically assigned by the server on creation.
Name *string `pulumi:"name"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// Different notification type behaviors are configured primarily using the the `labels` field on this
// resource. This block contains the labels which contain secrets or passwords so that they can be marked
// sensitive and hidden from plan output. The name of the field, eg: password, will be the key
// in the `labels` map in the api request.
// Credentials may not be specified in both locations and will cause an error. Changing from one location
// to a different credential configuration in the config will require an apply to update state.
// Structure is documented below.
SensitiveLabels *NotificationChannelSensitiveLabels `pulumi:"sensitiveLabels"`
// The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. See https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannelDescriptors/list to get the list of valid values such as "email", "slack", etc...
Type *string `pulumi:"type"`
// User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.
UserLabels map[string]string `pulumi:"userLabels"`
// Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel
// operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is
// non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel
// works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require
// verification or that this specific channel has been exempted from verification because it was created prior to
// verification being required for channels of this type.This field cannot be modified using a standard
// UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.
VerificationStatus *string `pulumi:"verificationStatus"`
}
type NotificationChannelState struct {
// An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.
Description pulumi.StringPtrInput
// An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.
DisplayName pulumi.StringPtrInput
// Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.
Enabled pulumi.BoolPtrInput
// Configuration fields that define the channel and its behavior. The
// permissible and required labels are specified in the
// NotificationChannelDescriptor corresponding to the type field.
// Labels with sensitive data are obfuscated by the API and therefore the provider cannot
// determine if there are upstream changes to these fields. They can also be configured via
// the sensitiveLabels block, but cannot be configured in both places.
Labels pulumi.StringMapInput
// The full REST resource name for this channel. The syntax is: projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID] The
// [CHANNEL_ID] is automatically assigned by the server on creation.
Name pulumi.StringPtrInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// Different notification type behaviors are configured primarily using the the `labels` field on this
// resource. This block contains the labels which contain secrets or passwords so that they can be marked
// sensitive and hidden from plan output. The name of the field, eg: password, will be the key
// in the `labels` map in the api request.
// Credentials may not be specified in both locations and will cause an error. Changing from one location
// to a different credential configuration in the config will require an apply to update state.
// Structure is documented below.
SensitiveLabels NotificationChannelSensitiveLabelsPtrInput
// The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. See https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannelDescriptors/list to get the list of valid values such as "email", "slack", etc...
Type pulumi.StringPtrInput
// User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.
UserLabels pulumi.StringMapInput
// Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel
// operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is
// non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel
// works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require
// verification or that this specific channel has been exempted from verification because it was created prior to
// verification being required for channels of this type.This field cannot be modified using a standard
// UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.
VerificationStatus pulumi.StringPtrInput
}
func (NotificationChannelState) ElementType() reflect.Type {
return reflect.TypeOf((*notificationChannelState)(nil)).Elem()
}
type notificationChannelArgs struct {
// An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.
Description *string `pulumi:"description"`
// An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.
DisplayName *string `pulumi:"displayName"`
// Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.
Enabled *bool `pulumi:"enabled"`
// Configuration fields that define the channel and its behavior. The
// permissible and required labels are specified in the
// NotificationChannelDescriptor corresponding to the type field.
// Labels with sensitive data are obfuscated by the API and therefore the provider cannot
// determine if there are upstream changes to these fields. They can also be configured via
// the sensitiveLabels block, but cannot be configured in both places.
Labels map[string]string `pulumi:"labels"`
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project *string `pulumi:"project"`
// Different notification type behaviors are configured primarily using the the `labels` field on this
// resource. This block contains the labels which contain secrets or passwords so that they can be marked
// sensitive and hidden from plan output. The name of the field, eg: password, will be the key
// in the `labels` map in the api request.
// Credentials may not be specified in both locations and will cause an error. Changing from one location
// to a different credential configuration in the config will require an apply to update state.
// Structure is documented below.
SensitiveLabels *NotificationChannelSensitiveLabels `pulumi:"sensitiveLabels"`
// The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. See https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannelDescriptors/list to get the list of valid values such as "email", "slack", etc...
Type string `pulumi:"type"`
// User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.
UserLabels map[string]string `pulumi:"userLabels"`
}
// The set of arguments for constructing a NotificationChannel resource.
type NotificationChannelArgs struct {
// An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.
Description pulumi.StringPtrInput
// An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.
DisplayName pulumi.StringPtrInput
// Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.
Enabled pulumi.BoolPtrInput
// Configuration fields that define the channel and its behavior. The
// permissible and required labels are specified in the
// NotificationChannelDescriptor corresponding to the type field.
// Labels with sensitive data are obfuscated by the API and therefore the provider cannot
// determine if there are upstream changes to these fields. They can also be configured via
// the sensitiveLabels block, but cannot be configured in both places.
Labels pulumi.StringMapInput
// The ID of the project in which the resource belongs.
// If it is not provided, the provider project is used.
Project pulumi.StringPtrInput
// Different notification type behaviors are configured primarily using the the `labels` field on this
// resource. This block contains the labels which contain secrets or passwords so that they can be marked
// sensitive and hidden from plan output. The name of the field, eg: password, will be the key
// in the `labels` map in the api request.
// Credentials may not be specified in both locations and will cause an error. Changing from one location
// to a different credential configuration in the config will require an apply to update state.
// Structure is documented below.
SensitiveLabels NotificationChannelSensitiveLabelsPtrInput
// The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field. See https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannelDescriptors/list to get the list of valid values such as "email", "slack", etc...
Type pulumi.StringInput
// User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.
UserLabels pulumi.StringMapInput
}
func (NotificationChannelArgs) ElementType() reflect.Type {
return reflect.TypeOf((*notificationChannelArgs)(nil)).Elem()
}
type NotificationChannelInput interface {
pulumi.Input
ToNotificationChannelOutput() NotificationChannelOutput
ToNotificationChannelOutputWithContext(ctx context.Context) NotificationChannelOutput
}
func (*NotificationChannel) ElementType() reflect.Type {
return reflect.TypeOf((*NotificationChannel)(nil))
}
func (i *NotificationChannel) ToNotificationChannelOutput() NotificationChannelOutput {
return i.ToNotificationChannelOutputWithContext(context.Background())
}
func (i *NotificationChannel) ToNotificationChannelOutputWithContext(ctx context.Context) NotificationChannelOutput {
return pulumi.ToOutputWithContext(ctx, i).(NotificationChannelOutput)
}
func (i *NotificationChannel) ToNotificationChannelPtrOutput() NotificationChannelPtrOutput {
return i.ToNotificationChannelPtrOutputWithContext(context.Background())
}
func (i *NotificationChannel) ToNotificationChannelPtrOutputWithContext(ctx context.Context) NotificationChannelPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(NotificationChannelPtrOutput)
}
type NotificationChannelPtrInput interface {
pulumi.Input
ToNotificationChannelPtrOutput() NotificationChannelPtrOutput
ToNotificationChannelPtrOutputWithContext(ctx context.Context) NotificationChannelPtrOutput
}
type notificationChannelPtrType NotificationChannelArgs
func (*notificationChannelPtrType) ElementType() reflect.Type {
return reflect.TypeOf((**NotificationChannel)(nil))
}
func (i *notificationChannelPtrType) ToNotificationChannelPtrOutput() NotificationChannelPtrOutput {
return i.ToNotificationChannelPtrOutputWithContext(context.Background())
}
func (i *notificationChannelPtrType) ToNotificationChannelPtrOutputWithContext(ctx context.Context) NotificationChannelPtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(NotificationChannelPtrOutput)
}
// NotificationChannelArrayInput is an input type that accepts NotificationChannelArray and NotificationChannelArrayOutput values.
// You can construct a concrete instance of `NotificationChannelArrayInput` via:
//
// NotificationChannelArray{ NotificationChannelArgs{...} }
type NotificationChannelArrayInput interface {
pulumi.Input
ToNotificationChannelArrayOutput() NotificationChannelArrayOutput
ToNotificationChannelArrayOutputWithContext(context.Context) NotificationChannelArrayOutput
}
type NotificationChannelArray []NotificationChannelInput
func (NotificationChannelArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*NotificationChannel)(nil)).Elem()
}
func (i NotificationChannelArray) ToNotificationChannelArrayOutput() NotificationChannelArrayOutput {
return i.ToNotificationChannelArrayOutputWithContext(context.Background())
}
func (i NotificationChannelArray) ToNotificationChannelArrayOutputWithContext(ctx context.Context) NotificationChannelArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(NotificationChannelArrayOutput)
}
// NotificationChannelMapInput is an input type that accepts NotificationChannelMap and NotificationChannelMapOutput values.
// You can construct a concrete instance of `NotificationChannelMapInput` via:
//
// NotificationChannelMap{ "key": NotificationChannelArgs{...} }
type NotificationChannelMapInput interface {
pulumi.Input
ToNotificationChannelMapOutput() NotificationChannelMapOutput
ToNotificationChannelMapOutputWithContext(context.Context) NotificationChannelMapOutput
}
type NotificationChannelMap map[string]NotificationChannelInput
func (NotificationChannelMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*NotificationChannel)(nil)).Elem()
}
func (i NotificationChannelMap) ToNotificationChannelMapOutput() NotificationChannelMapOutput {
return i.ToNotificationChannelMapOutputWithContext(context.Background())
}
func (i NotificationChannelMap) ToNotificationChannelMapOutputWithContext(ctx context.Context) NotificationChannelMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(NotificationChannelMapOutput)
}
type NotificationChannelOutput struct{ *pulumi.OutputState }
func (NotificationChannelOutput) ElementType() reflect.Type {
return reflect.TypeOf((*NotificationChannel)(nil))
}
func (o NotificationChannelOutput) ToNotificationChannelOutput() NotificationChannelOutput {
return o
}
func (o NotificationChannelOutput) ToNotificationChannelOutputWithContext(ctx context.Context) NotificationChannelOutput {
return o
}
func (o NotificationChannelOutput) ToNotificationChannelPtrOutput() NotificationChannelPtrOutput {
return o.ToNotificationChannelPtrOutputWithContext(context.Background())
}
func (o NotificationChannelOutput) ToNotificationChannelPtrOutputWithContext(ctx context.Context) NotificationChannelPtrOutput {
return o.ApplyTWithContext(ctx, func(_ context.Context, v NotificationChannel) *NotificationChannel {
return &v
}).(NotificationChannelPtrOutput)
}
type NotificationChannelPtrOutput struct{ *pulumi.OutputState }
func (NotificationChannelPtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**NotificationChannel)(nil))
}
func (o NotificationChannelPtrOutput) ToNotificationChannelPtrOutput() NotificationChannelPtrOutput {
return o
}
func (o NotificationChannelPtrOutput) ToNotificationChannelPtrOutputWithContext(ctx context.Context) NotificationChannelPtrOutput {
return o
}
func (o NotificationChannelPtrOutput) Elem() NotificationChannelOutput {
return o.ApplyT(func(v *NotificationChannel) NotificationChannel {
if v != nil {
return *v
}
var ret NotificationChannel
return ret
}).(NotificationChannelOutput)
}
type NotificationChannelArrayOutput struct{ *pulumi.OutputState }
func (NotificationChannelArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]NotificationChannel)(nil))
}
func (o NotificationChannelArrayOutput) ToNotificationChannelArrayOutput() NotificationChannelArrayOutput {
return o
}
func (o NotificationChannelArrayOutput) ToNotificationChannelArrayOutputWithContext(ctx context.Context) NotificationChannelArrayOutput {
return o
}
func (o NotificationChannelArrayOutput) Index(i pulumi.IntInput) NotificationChannelOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) NotificationChannel {
return vs[0].([]NotificationChannel)[vs[1].(int)]
}).(NotificationChannelOutput)
}
type NotificationChannelMapOutput struct{ *pulumi.OutputState }
func (NotificationChannelMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]NotificationChannel)(nil))
}
func (o NotificationChannelMapOutput) ToNotificationChannelMapOutput() NotificationChannelMapOutput {
return o
}
func (o NotificationChannelMapOutput) ToNotificationChannelMapOutputWithContext(ctx context.Context) NotificationChannelMapOutput {
return o
}
func (o NotificationChannelMapOutput) MapIndex(k pulumi.StringInput) NotificationChannelOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) NotificationChannel {
return vs[0].(map[string]NotificationChannel)[vs[1].(string)]
}).(NotificationChannelOutput)
}
func init() {
pulumi.RegisterOutputType(NotificationChannelOutput{})
pulumi.RegisterOutputType(NotificationChannelPtrOutput{})
pulumi.RegisterOutputType(NotificationChannelArrayOutput{})
pulumi.RegisterOutputType(NotificationChannelMapOutput{})
}