generated from pulumi/pulumi-tf-provider-boilerplate
/
lifecycleHook.go
494 lines (439 loc) · 20.8 KB
/
lifecycleHook.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
// 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 as
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a resource for an AS (Auto scaling) lifecycle hook.
//
// ## Example Usage
// ### Create a basic LifecycleHook
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/As"
// "github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/Availability"
// "github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/Images"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/As"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Availability"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Images"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Subnet"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Vpc"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// zones, err := Availability.GetZonesByProduct(ctx, &availability.GetZonesByProductArgs{
// Product: "as",
// }, nil)
// if err != nil {
// return err
// }
// image, err := Images.GetInstance(ctx, &images.GetInstanceArgs{
// ImageTypes: []string{
// "PUBLIC_IMAGE",
// },
// OsName: pulumi.StringRef("TencentOS Server 3.2 (Final)"),
// }, nil)
// if err != nil {
// return err
// }
// vpc, err := Vpc.NewInstance(ctx, "vpc", &Vpc.InstanceArgs{
// CidrBlock: pulumi.String("10.0.0.0/16"),
// })
// if err != nil {
// return err
// }
// subnet, err := Subnet.NewInstance(ctx, "subnet", &Subnet.InstanceArgs{
// VpcId: vpc.ID(),
// CidrBlock: pulumi.String("10.0.0.0/16"),
// AvailabilityZone: pulumi.String(zones.Zones[0].Name),
// })
// if err != nil {
// return err
// }
// exampleScalingConfig, err := As.NewScalingConfig(ctx, "exampleScalingConfig", &As.ScalingConfigArgs{
// ConfigurationName: pulumi.String("tf-example"),
// ImageId: pulumi.String(image.Images[0].ImageId),
// InstanceTypes: pulumi.StringArray{
// pulumi.String("SA1.SMALL1"),
// pulumi.String("SA2.SMALL1"),
// pulumi.String("SA2.SMALL2"),
// pulumi.String("SA2.SMALL4"),
// },
// InstanceNameSettings: &as.ScalingConfigInstanceNameSettingsArgs{
// InstanceName: pulumi.String("test-ins-name"),
// },
// })
// if err != nil {
// return err
// }
// exampleScalingGroup, err := As.NewScalingGroup(ctx, "exampleScalingGroup", &As.ScalingGroupArgs{
// ScalingGroupName: pulumi.String("tf-example"),
// ConfigurationId: exampleScalingConfig.ID(),
// MaxSize: pulumi.Int(1),
// MinSize: pulumi.Int(0),
// VpcId: vpc.ID(),
// SubnetIds: pulumi.StringArray{
// subnet.ID(),
// },
// })
// if err != nil {
// return err
// }
// _, err = As.NewLifecycleHook(ctx, "exampleLifecycleHook", &As.LifecycleHookArgs{
// ScalingGroupId: exampleScalingGroup.ID(),
// LifecycleHookName: pulumi.String("tf-as-lifecycle-hook"),
// LifecycleTransition: pulumi.String("INSTANCE_LAUNCHING"),
// DefaultResult: pulumi.String("CONTINUE"),
// HeartbeatTimeout: pulumi.Int(500),
// NotificationMetadata: pulumi.String("tf test"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/As"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := As.NewLifecycleHook(ctx, "example", &As.LifecycleHookArgs{
// ScalingGroupId: pulumi.Any(tencentcloud_as_scaling_group.Example.Id),
// LifecycleHookName: pulumi.String("tf-as-lifecycle-hook"),
// LifecycleTransition: pulumi.String("INSTANCE_LAUNCHING"),
// DefaultResult: pulumi.String("CONTINUE"),
// HeartbeatTimeout: pulumi.Int(500),
// NotificationMetadata: pulumi.String("tf test"),
// NotificationTargetType: pulumi.String("CMQ_QUEUE"),
// NotificationQueueName: pulumi.String("lifcyclehook"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/As"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := As.NewLifecycleHook(ctx, "example", &As.LifecycleHookArgs{
// ScalingGroupId: pulumi.Any(tencentcloud_as_scaling_group.Example.Id),
// LifecycleHookName: pulumi.String("tf-as-lifecycle-hook"),
// LifecycleTransition: pulumi.String("INSTANCE_LAUNCHING"),
// DefaultResult: pulumi.String("CONTINUE"),
// HeartbeatTimeout: pulumi.Int(500),
// NotificationMetadata: pulumi.String("tf test"),
// NotificationTargetType: pulumi.String("CMQ_TOPIC"),
// NotificationTopicName: pulumi.String("lifcyclehook"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
type LifecycleHook struct {
pulumi.CustomResourceState
// Defines the action the AS group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. Valid values: `CONTINUE` and `ABANDON`. The default value is `CONTINUE`.
DefaultResult pulumi.StringPtrOutput `pulumi:"defaultResult"`
// Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. Valid value ranges: (30~7200). and default value is `300`.
HeartbeatTimeout pulumi.IntPtrOutput `pulumi:"heartbeatTimeout"`
// The name of the lifecycle hook.
LifecycleHookName pulumi.StringOutput `pulumi:"lifecycleHookName"`
// The instance state to which you want to attach the lifecycle hook. Valid values: `INSTANCE_LAUNCHING` and `INSTANCE_TERMINATING`.
LifecycleTransition pulumi.StringOutput `pulumi:"lifecycleTransition"`
// Contains additional information that you want to include any time AS sends a message to the notification target.
NotificationMetadata pulumi.StringPtrOutput `pulumi:"notificationMetadata"`
// For CMQ_QUEUE type, a name of queue must be set.
NotificationQueueName pulumi.StringPtrOutput `pulumi:"notificationQueueName"`
// Target type. Valid values: `CMQ_QUEUE`, `CMQ_TOPIC`.
NotificationTargetType pulumi.StringPtrOutput `pulumi:"notificationTargetType"`
// For CMQ_TOPIC type, a name of topic must be set.
NotificationTopicName pulumi.StringPtrOutput `pulumi:"notificationTopicName"`
// ID of a scaling group.
ScalingGroupId pulumi.StringOutput `pulumi:"scalingGroupId"`
}
// NewLifecycleHook registers a new resource with the given unique name, arguments, and options.
func NewLifecycleHook(ctx *pulumi.Context,
name string, args *LifecycleHookArgs, opts ...pulumi.ResourceOption) (*LifecycleHook, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LifecycleHookName == nil {
return nil, errors.New("invalid value for required argument 'LifecycleHookName'")
}
if args.LifecycleTransition == nil {
return nil, errors.New("invalid value for required argument 'LifecycleTransition'")
}
if args.ScalingGroupId == nil {
return nil, errors.New("invalid value for required argument 'ScalingGroupId'")
}
opts = pkgResourceDefaultOpts(opts)
var resource LifecycleHook
err := ctx.RegisterResource("tencentcloud:As/lifecycleHook:LifecycleHook", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLifecycleHook gets an existing LifecycleHook 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 GetLifecycleHook(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LifecycleHookState, opts ...pulumi.ResourceOption) (*LifecycleHook, error) {
var resource LifecycleHook
err := ctx.ReadResource("tencentcloud:As/lifecycleHook:LifecycleHook", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LifecycleHook resources.
type lifecycleHookState struct {
// Defines the action the AS group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. Valid values: `CONTINUE` and `ABANDON`. The default value is `CONTINUE`.
DefaultResult *string `pulumi:"defaultResult"`
// Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. Valid value ranges: (30~7200). and default value is `300`.
HeartbeatTimeout *int `pulumi:"heartbeatTimeout"`
// The name of the lifecycle hook.
LifecycleHookName *string `pulumi:"lifecycleHookName"`
// The instance state to which you want to attach the lifecycle hook. Valid values: `INSTANCE_LAUNCHING` and `INSTANCE_TERMINATING`.
LifecycleTransition *string `pulumi:"lifecycleTransition"`
// Contains additional information that you want to include any time AS sends a message to the notification target.
NotificationMetadata *string `pulumi:"notificationMetadata"`
// For CMQ_QUEUE type, a name of queue must be set.
NotificationQueueName *string `pulumi:"notificationQueueName"`
// Target type. Valid values: `CMQ_QUEUE`, `CMQ_TOPIC`.
NotificationTargetType *string `pulumi:"notificationTargetType"`
// For CMQ_TOPIC type, a name of topic must be set.
NotificationTopicName *string `pulumi:"notificationTopicName"`
// ID of a scaling group.
ScalingGroupId *string `pulumi:"scalingGroupId"`
}
type LifecycleHookState struct {
// Defines the action the AS group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. Valid values: `CONTINUE` and `ABANDON`. The default value is `CONTINUE`.
DefaultResult pulumi.StringPtrInput
// Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. Valid value ranges: (30~7200). and default value is `300`.
HeartbeatTimeout pulumi.IntPtrInput
// The name of the lifecycle hook.
LifecycleHookName pulumi.StringPtrInput
// The instance state to which you want to attach the lifecycle hook. Valid values: `INSTANCE_LAUNCHING` and `INSTANCE_TERMINATING`.
LifecycleTransition pulumi.StringPtrInput
// Contains additional information that you want to include any time AS sends a message to the notification target.
NotificationMetadata pulumi.StringPtrInput
// For CMQ_QUEUE type, a name of queue must be set.
NotificationQueueName pulumi.StringPtrInput
// Target type. Valid values: `CMQ_QUEUE`, `CMQ_TOPIC`.
NotificationTargetType pulumi.StringPtrInput
// For CMQ_TOPIC type, a name of topic must be set.
NotificationTopicName pulumi.StringPtrInput
// ID of a scaling group.
ScalingGroupId pulumi.StringPtrInput
}
func (LifecycleHookState) ElementType() reflect.Type {
return reflect.TypeOf((*lifecycleHookState)(nil)).Elem()
}
type lifecycleHookArgs struct {
// Defines the action the AS group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. Valid values: `CONTINUE` and `ABANDON`. The default value is `CONTINUE`.
DefaultResult *string `pulumi:"defaultResult"`
// Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. Valid value ranges: (30~7200). and default value is `300`.
HeartbeatTimeout *int `pulumi:"heartbeatTimeout"`
// The name of the lifecycle hook.
LifecycleHookName string `pulumi:"lifecycleHookName"`
// The instance state to which you want to attach the lifecycle hook. Valid values: `INSTANCE_LAUNCHING` and `INSTANCE_TERMINATING`.
LifecycleTransition string `pulumi:"lifecycleTransition"`
// Contains additional information that you want to include any time AS sends a message to the notification target.
NotificationMetadata *string `pulumi:"notificationMetadata"`
// For CMQ_QUEUE type, a name of queue must be set.
NotificationQueueName *string `pulumi:"notificationQueueName"`
// Target type. Valid values: `CMQ_QUEUE`, `CMQ_TOPIC`.
NotificationTargetType *string `pulumi:"notificationTargetType"`
// For CMQ_TOPIC type, a name of topic must be set.
NotificationTopicName *string `pulumi:"notificationTopicName"`
// ID of a scaling group.
ScalingGroupId string `pulumi:"scalingGroupId"`
}
// The set of arguments for constructing a LifecycleHook resource.
type LifecycleHookArgs struct {
// Defines the action the AS group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. Valid values: `CONTINUE` and `ABANDON`. The default value is `CONTINUE`.
DefaultResult pulumi.StringPtrInput
// Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. Valid value ranges: (30~7200). and default value is `300`.
HeartbeatTimeout pulumi.IntPtrInput
// The name of the lifecycle hook.
LifecycleHookName pulumi.StringInput
// The instance state to which you want to attach the lifecycle hook. Valid values: `INSTANCE_LAUNCHING` and `INSTANCE_TERMINATING`.
LifecycleTransition pulumi.StringInput
// Contains additional information that you want to include any time AS sends a message to the notification target.
NotificationMetadata pulumi.StringPtrInput
// For CMQ_QUEUE type, a name of queue must be set.
NotificationQueueName pulumi.StringPtrInput
// Target type. Valid values: `CMQ_QUEUE`, `CMQ_TOPIC`.
NotificationTargetType pulumi.StringPtrInput
// For CMQ_TOPIC type, a name of topic must be set.
NotificationTopicName pulumi.StringPtrInput
// ID of a scaling group.
ScalingGroupId pulumi.StringInput
}
func (LifecycleHookArgs) ElementType() reflect.Type {
return reflect.TypeOf((*lifecycleHookArgs)(nil)).Elem()
}
type LifecycleHookInput interface {
pulumi.Input
ToLifecycleHookOutput() LifecycleHookOutput
ToLifecycleHookOutputWithContext(ctx context.Context) LifecycleHookOutput
}
func (*LifecycleHook) ElementType() reflect.Type {
return reflect.TypeOf((**LifecycleHook)(nil)).Elem()
}
func (i *LifecycleHook) ToLifecycleHookOutput() LifecycleHookOutput {
return i.ToLifecycleHookOutputWithContext(context.Background())
}
func (i *LifecycleHook) ToLifecycleHookOutputWithContext(ctx context.Context) LifecycleHookOutput {
return pulumi.ToOutputWithContext(ctx, i).(LifecycleHookOutput)
}
// LifecycleHookArrayInput is an input type that accepts LifecycleHookArray and LifecycleHookArrayOutput values.
// You can construct a concrete instance of `LifecycleHookArrayInput` via:
//
// LifecycleHookArray{ LifecycleHookArgs{...} }
type LifecycleHookArrayInput interface {
pulumi.Input
ToLifecycleHookArrayOutput() LifecycleHookArrayOutput
ToLifecycleHookArrayOutputWithContext(context.Context) LifecycleHookArrayOutput
}
type LifecycleHookArray []LifecycleHookInput
func (LifecycleHookArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LifecycleHook)(nil)).Elem()
}
func (i LifecycleHookArray) ToLifecycleHookArrayOutput() LifecycleHookArrayOutput {
return i.ToLifecycleHookArrayOutputWithContext(context.Background())
}
func (i LifecycleHookArray) ToLifecycleHookArrayOutputWithContext(ctx context.Context) LifecycleHookArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LifecycleHookArrayOutput)
}
// LifecycleHookMapInput is an input type that accepts LifecycleHookMap and LifecycleHookMapOutput values.
// You can construct a concrete instance of `LifecycleHookMapInput` via:
//
// LifecycleHookMap{ "key": LifecycleHookArgs{...} }
type LifecycleHookMapInput interface {
pulumi.Input
ToLifecycleHookMapOutput() LifecycleHookMapOutput
ToLifecycleHookMapOutputWithContext(context.Context) LifecycleHookMapOutput
}
type LifecycleHookMap map[string]LifecycleHookInput
func (LifecycleHookMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LifecycleHook)(nil)).Elem()
}
func (i LifecycleHookMap) ToLifecycleHookMapOutput() LifecycleHookMapOutput {
return i.ToLifecycleHookMapOutputWithContext(context.Background())
}
func (i LifecycleHookMap) ToLifecycleHookMapOutputWithContext(ctx context.Context) LifecycleHookMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LifecycleHookMapOutput)
}
type LifecycleHookOutput struct{ *pulumi.OutputState }
func (LifecycleHookOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LifecycleHook)(nil)).Elem()
}
func (o LifecycleHookOutput) ToLifecycleHookOutput() LifecycleHookOutput {
return o
}
func (o LifecycleHookOutput) ToLifecycleHookOutputWithContext(ctx context.Context) LifecycleHookOutput {
return o
}
// Defines the action the AS group should take when the lifecycle hook timeout elapses or if an unexpected failure occurs. Valid values: `CONTINUE` and `ABANDON`. The default value is `CONTINUE`.
func (o LifecycleHookOutput) DefaultResult() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LifecycleHook) pulumi.StringPtrOutput { return v.DefaultResult }).(pulumi.StringPtrOutput)
}
// Defines the amount of time, in seconds, that can elapse before the lifecycle hook times out. Valid value ranges: (30~7200). and default value is `300`.
func (o LifecycleHookOutput) HeartbeatTimeout() pulumi.IntPtrOutput {
return o.ApplyT(func(v *LifecycleHook) pulumi.IntPtrOutput { return v.HeartbeatTimeout }).(pulumi.IntPtrOutput)
}
// The name of the lifecycle hook.
func (o LifecycleHookOutput) LifecycleHookName() pulumi.StringOutput {
return o.ApplyT(func(v *LifecycleHook) pulumi.StringOutput { return v.LifecycleHookName }).(pulumi.StringOutput)
}
// The instance state to which you want to attach the lifecycle hook. Valid values: `INSTANCE_LAUNCHING` and `INSTANCE_TERMINATING`.
func (o LifecycleHookOutput) LifecycleTransition() pulumi.StringOutput {
return o.ApplyT(func(v *LifecycleHook) pulumi.StringOutput { return v.LifecycleTransition }).(pulumi.StringOutput)
}
// Contains additional information that you want to include any time AS sends a message to the notification target.
func (o LifecycleHookOutput) NotificationMetadata() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LifecycleHook) pulumi.StringPtrOutput { return v.NotificationMetadata }).(pulumi.StringPtrOutput)
}
// For CMQ_QUEUE type, a name of queue must be set.
func (o LifecycleHookOutput) NotificationQueueName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LifecycleHook) pulumi.StringPtrOutput { return v.NotificationQueueName }).(pulumi.StringPtrOutput)
}
// Target type. Valid values: `CMQ_QUEUE`, `CMQ_TOPIC`.
func (o LifecycleHookOutput) NotificationTargetType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LifecycleHook) pulumi.StringPtrOutput { return v.NotificationTargetType }).(pulumi.StringPtrOutput)
}
// For CMQ_TOPIC type, a name of topic must be set.
func (o LifecycleHookOutput) NotificationTopicName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LifecycleHook) pulumi.StringPtrOutput { return v.NotificationTopicName }).(pulumi.StringPtrOutput)
}
// ID of a scaling group.
func (o LifecycleHookOutput) ScalingGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *LifecycleHook) pulumi.StringOutput { return v.ScalingGroupId }).(pulumi.StringOutput)
}
type LifecycleHookArrayOutput struct{ *pulumi.OutputState }
func (LifecycleHookArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LifecycleHook)(nil)).Elem()
}
func (o LifecycleHookArrayOutput) ToLifecycleHookArrayOutput() LifecycleHookArrayOutput {
return o
}
func (o LifecycleHookArrayOutput) ToLifecycleHookArrayOutputWithContext(ctx context.Context) LifecycleHookArrayOutput {
return o
}
func (o LifecycleHookArrayOutput) Index(i pulumi.IntInput) LifecycleHookOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LifecycleHook {
return vs[0].([]*LifecycleHook)[vs[1].(int)]
}).(LifecycleHookOutput)
}
type LifecycleHookMapOutput struct{ *pulumi.OutputState }
func (LifecycleHookMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LifecycleHook)(nil)).Elem()
}
func (o LifecycleHookMapOutput) ToLifecycleHookMapOutput() LifecycleHookMapOutput {
return o
}
func (o LifecycleHookMapOutput) ToLifecycleHookMapOutputWithContext(ctx context.Context) LifecycleHookMapOutput {
return o
}
func (o LifecycleHookMapOutput) MapIndex(k pulumi.StringInput) LifecycleHookOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LifecycleHook {
return vs[0].(map[string]*LifecycleHook)[vs[1].(string)]
}).(LifecycleHookOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LifecycleHookInput)(nil)).Elem(), &LifecycleHook{})
pulumi.RegisterInputType(reflect.TypeOf((*LifecycleHookArrayInput)(nil)).Elem(), LifecycleHookArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LifecycleHookMapInput)(nil)).Elem(), LifecycleHookMap{})
pulumi.RegisterOutputType(LifecycleHookOutput{})
pulumi.RegisterOutputType(LifecycleHookArrayOutput{})
pulumi.RegisterOutputType(LifecycleHookMapOutput{})
}