/
instanceGroup.go
635 lines (578 loc) · 24 KB
/
instanceGroup.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
628
629
630
631
632
633
634
635
// 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 emr
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides an Elastic MapReduce Cluster Instance Group configuration.
// See [Amazon Elastic MapReduce Documentation](https://aws.amazon.com/documentation/emr/) for more information.
//
// > **NOTE:** At this time, Instance Groups cannot be destroyed through the API nor
// web interface. Instance Groups are destroyed when the EMR Cluster is destroyed.
// this provider will resize any Instance Group to zero when destroying the resource.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := emr.NewInstanceGroup(ctx, "task", &emr.InstanceGroupArgs{
// ClusterId: pulumi.Any(tf_test_cluster.Id),
// InstanceCount: pulumi.Int(1),
// InstanceType: pulumi.String("m5.xlarge"),
// Name: pulumi.String("my little instance group"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
//
// ## Import
//
// Using `pulumi import`, import EMR task instance group using their EMR Cluster id and Instance Group id separated by a forward-slash `/`. For example:
//
// ```sh
// $ pulumi import aws:emr/instanceGroup:InstanceGroup task_group j-123456ABCDEF/ig-15EK4O09RZLNR
// ```
type InstanceGroup struct {
pulumi.CustomResourceState
// The autoscaling policy document. This is a JSON formatted string. See [EMR Auto Scaling](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-automatic-scaling.html)
AutoscalingPolicy pulumi.StringPtrOutput `pulumi:"autoscalingPolicy"`
// If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
BidPrice pulumi.StringPtrOutput `pulumi:"bidPrice"`
// ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
ClusterId pulumi.StringOutput `pulumi:"clusterId"`
// A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := emr.NewInstanceGroup(ctx, "task", &emr.InstanceGroupArgs{
// ConfigurationsJson: pulumi.String(`[
// {
// "Classification": "hadoop-env",
// "Configurations": [
// {
// "Classification": "export",
// "Properties": {
// "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
// }
// }
// ],
// "Properties": {}
// }
// ]
// `),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// <!--End PulumiCodeChooser -->
ConfigurationsJson pulumi.StringPtrOutput `pulumi:"configurationsJson"`
// One or more `ebsConfig` blocks as defined below. Changing this forces a new resource to be created.
EbsConfigs InstanceGroupEbsConfigArrayOutput `pulumi:"ebsConfigs"`
// Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
EbsOptimized pulumi.BoolPtrOutput `pulumi:"ebsOptimized"`
// target number of instances for the instance group. defaults to 0.
InstanceCount pulumi.IntOutput `pulumi:"instanceCount"`
// The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
InstanceType pulumi.StringOutput `pulumi:"instanceType"`
// Human friendly name given to the instance group. Changing this forces a new resource to be created.
Name pulumi.StringOutput `pulumi:"name"`
// The number of instances currently running in this instance group.
RunningInstanceCount pulumi.IntOutput `pulumi:"runningInstanceCount"`
// The current status of the instance group.
Status pulumi.StringOutput `pulumi:"status"`
}
// NewInstanceGroup registers a new resource with the given unique name, arguments, and options.
func NewInstanceGroup(ctx *pulumi.Context,
name string, args *InstanceGroupArgs, opts ...pulumi.ResourceOption) (*InstanceGroup, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ClusterId == nil {
return nil, errors.New("invalid value for required argument 'ClusterId'")
}
if args.InstanceType == nil {
return nil, errors.New("invalid value for required argument 'InstanceType'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource InstanceGroup
err := ctx.RegisterResource("aws:emr/instanceGroup:InstanceGroup", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInstanceGroup gets an existing InstanceGroup 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 GetInstanceGroup(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InstanceGroupState, opts ...pulumi.ResourceOption) (*InstanceGroup, error) {
var resource InstanceGroup
err := ctx.ReadResource("aws:emr/instanceGroup:InstanceGroup", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering InstanceGroup resources.
type instanceGroupState struct {
// The autoscaling policy document. This is a JSON formatted string. See [EMR Auto Scaling](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-automatic-scaling.html)
AutoscalingPolicy *string `pulumi:"autoscalingPolicy"`
// If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
BidPrice *string `pulumi:"bidPrice"`
// ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
ClusterId *string `pulumi:"clusterId"`
// A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := emr.NewInstanceGroup(ctx, "task", &emr.InstanceGroupArgs{
// ConfigurationsJson: pulumi.String(`[
// {
// "Classification": "hadoop-env",
// "Configurations": [
// {
// "Classification": "export",
// "Properties": {
// "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
// }
// }
// ],
// "Properties": {}
// }
// ]
// `),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// <!--End PulumiCodeChooser -->
ConfigurationsJson *string `pulumi:"configurationsJson"`
// One or more `ebsConfig` blocks as defined below. Changing this forces a new resource to be created.
EbsConfigs []InstanceGroupEbsConfig `pulumi:"ebsConfigs"`
// Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
EbsOptimized *bool `pulumi:"ebsOptimized"`
// target number of instances for the instance group. defaults to 0.
InstanceCount *int `pulumi:"instanceCount"`
// The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
InstanceType *string `pulumi:"instanceType"`
// Human friendly name given to the instance group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
// The number of instances currently running in this instance group.
RunningInstanceCount *int `pulumi:"runningInstanceCount"`
// The current status of the instance group.
Status *string `pulumi:"status"`
}
type InstanceGroupState struct {
// The autoscaling policy document. This is a JSON formatted string. See [EMR Auto Scaling](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-automatic-scaling.html)
AutoscalingPolicy pulumi.StringPtrInput
// If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
BidPrice pulumi.StringPtrInput
// ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
ClusterId pulumi.StringPtrInput
// A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := emr.NewInstanceGroup(ctx, "task", &emr.InstanceGroupArgs{
// ConfigurationsJson: pulumi.String(`[
// {
// "Classification": "hadoop-env",
// "Configurations": [
// {
// "Classification": "export",
// "Properties": {
// "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
// }
// }
// ],
// "Properties": {}
// }
// ]
// `),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// <!--End PulumiCodeChooser -->
ConfigurationsJson pulumi.StringPtrInput
// One or more `ebsConfig` blocks as defined below. Changing this forces a new resource to be created.
EbsConfigs InstanceGroupEbsConfigArrayInput
// Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
EbsOptimized pulumi.BoolPtrInput
// target number of instances for the instance group. defaults to 0.
InstanceCount pulumi.IntPtrInput
// The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
InstanceType pulumi.StringPtrInput
// Human friendly name given to the instance group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
// The number of instances currently running in this instance group.
RunningInstanceCount pulumi.IntPtrInput
// The current status of the instance group.
Status pulumi.StringPtrInput
}
func (InstanceGroupState) ElementType() reflect.Type {
return reflect.TypeOf((*instanceGroupState)(nil)).Elem()
}
type instanceGroupArgs struct {
// The autoscaling policy document. This is a JSON formatted string. See [EMR Auto Scaling](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-automatic-scaling.html)
AutoscalingPolicy *string `pulumi:"autoscalingPolicy"`
// If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
BidPrice *string `pulumi:"bidPrice"`
// ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
ClusterId string `pulumi:"clusterId"`
// A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := emr.NewInstanceGroup(ctx, "task", &emr.InstanceGroupArgs{
// ConfigurationsJson: pulumi.String(`[
// {
// "Classification": "hadoop-env",
// "Configurations": [
// {
// "Classification": "export",
// "Properties": {
// "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
// }
// }
// ],
// "Properties": {}
// }
// ]
// `),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// <!--End PulumiCodeChooser -->
ConfigurationsJson *string `pulumi:"configurationsJson"`
// One or more `ebsConfig` blocks as defined below. Changing this forces a new resource to be created.
EbsConfigs []InstanceGroupEbsConfig `pulumi:"ebsConfigs"`
// Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
EbsOptimized *bool `pulumi:"ebsOptimized"`
// target number of instances for the instance group. defaults to 0.
InstanceCount *int `pulumi:"instanceCount"`
// The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
InstanceType string `pulumi:"instanceType"`
// Human friendly name given to the instance group. Changing this forces a new resource to be created.
Name *string `pulumi:"name"`
}
// The set of arguments for constructing a InstanceGroup resource.
type InstanceGroupArgs struct {
// The autoscaling policy document. This is a JSON formatted string. See [EMR Auto Scaling](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-automatic-scaling.html)
AutoscalingPolicy pulumi.StringPtrInput
// If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
BidPrice pulumi.StringPtrInput
// ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
ClusterId pulumi.StringInput
// A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := emr.NewInstanceGroup(ctx, "task", &emr.InstanceGroupArgs{
// ConfigurationsJson: pulumi.String(`[
// {
// "Classification": "hadoop-env",
// "Configurations": [
// {
// "Classification": "export",
// "Properties": {
// "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
// }
// }
// ],
// "Properties": {}
// }
// ]
// `),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
// <!--End PulumiCodeChooser -->
ConfigurationsJson pulumi.StringPtrInput
// One or more `ebsConfig` blocks as defined below. Changing this forces a new resource to be created.
EbsConfigs InstanceGroupEbsConfigArrayInput
// Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
EbsOptimized pulumi.BoolPtrInput
// target number of instances for the instance group. defaults to 0.
InstanceCount pulumi.IntPtrInput
// The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
InstanceType pulumi.StringInput
// Human friendly name given to the instance group. Changing this forces a new resource to be created.
Name pulumi.StringPtrInput
}
func (InstanceGroupArgs) ElementType() reflect.Type {
return reflect.TypeOf((*instanceGroupArgs)(nil)).Elem()
}
type InstanceGroupInput interface {
pulumi.Input
ToInstanceGroupOutput() InstanceGroupOutput
ToInstanceGroupOutputWithContext(ctx context.Context) InstanceGroupOutput
}
func (*InstanceGroup) ElementType() reflect.Type {
return reflect.TypeOf((**InstanceGroup)(nil)).Elem()
}
func (i *InstanceGroup) ToInstanceGroupOutput() InstanceGroupOutput {
return i.ToInstanceGroupOutputWithContext(context.Background())
}
func (i *InstanceGroup) ToInstanceGroupOutputWithContext(ctx context.Context) InstanceGroupOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceGroupOutput)
}
// InstanceGroupArrayInput is an input type that accepts InstanceGroupArray and InstanceGroupArrayOutput values.
// You can construct a concrete instance of `InstanceGroupArrayInput` via:
//
// InstanceGroupArray{ InstanceGroupArgs{...} }
type InstanceGroupArrayInput interface {
pulumi.Input
ToInstanceGroupArrayOutput() InstanceGroupArrayOutput
ToInstanceGroupArrayOutputWithContext(context.Context) InstanceGroupArrayOutput
}
type InstanceGroupArray []InstanceGroupInput
func (InstanceGroupArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InstanceGroup)(nil)).Elem()
}
func (i InstanceGroupArray) ToInstanceGroupArrayOutput() InstanceGroupArrayOutput {
return i.ToInstanceGroupArrayOutputWithContext(context.Background())
}
func (i InstanceGroupArray) ToInstanceGroupArrayOutputWithContext(ctx context.Context) InstanceGroupArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceGroupArrayOutput)
}
// InstanceGroupMapInput is an input type that accepts InstanceGroupMap and InstanceGroupMapOutput values.
// You can construct a concrete instance of `InstanceGroupMapInput` via:
//
// InstanceGroupMap{ "key": InstanceGroupArgs{...} }
type InstanceGroupMapInput interface {
pulumi.Input
ToInstanceGroupMapOutput() InstanceGroupMapOutput
ToInstanceGroupMapOutputWithContext(context.Context) InstanceGroupMapOutput
}
type InstanceGroupMap map[string]InstanceGroupInput
func (InstanceGroupMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InstanceGroup)(nil)).Elem()
}
func (i InstanceGroupMap) ToInstanceGroupMapOutput() InstanceGroupMapOutput {
return i.ToInstanceGroupMapOutputWithContext(context.Background())
}
func (i InstanceGroupMap) ToInstanceGroupMapOutputWithContext(ctx context.Context) InstanceGroupMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceGroupMapOutput)
}
type InstanceGroupOutput struct{ *pulumi.OutputState }
func (InstanceGroupOutput) ElementType() reflect.Type {
return reflect.TypeOf((**InstanceGroup)(nil)).Elem()
}
func (o InstanceGroupOutput) ToInstanceGroupOutput() InstanceGroupOutput {
return o
}
func (o InstanceGroupOutput) ToInstanceGroupOutputWithContext(ctx context.Context) InstanceGroupOutput {
return o
}
// The autoscaling policy document. This is a JSON formatted string. See [EMR Auto Scaling](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-automatic-scaling.html)
func (o InstanceGroupOutput) AutoscalingPolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InstanceGroup) pulumi.StringPtrOutput { return v.AutoscalingPolicy }).(pulumi.StringPtrOutput)
}
// If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
func (o InstanceGroupOutput) BidPrice() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InstanceGroup) pulumi.StringPtrOutput { return v.BidPrice }).(pulumi.StringPtrOutput)
}
// ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
func (o InstanceGroupOutput) ClusterId() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroup) pulumi.StringOutput { return v.ClusterId }).(pulumi.StringOutput)
}
// A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := emr.NewInstanceGroup(ctx, "task", &emr.InstanceGroupArgs{
// ConfigurationsJson: pulumi.String(`[
//
// {
// "Classification": "hadoop-env",
// "Configurations": [
// {
// "Classification": "export",
// "Properties": {
// "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
// }
// }
// ],
// "Properties": {}
// }
// ]
// `),
//
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
func (o InstanceGroupOutput) ConfigurationsJson() pulumi.StringPtrOutput {
return o.ApplyT(func(v *InstanceGroup) pulumi.StringPtrOutput { return v.ConfigurationsJson }).(pulumi.StringPtrOutput)
}
// One or more `ebsConfig` blocks as defined below. Changing this forces a new resource to be created.
func (o InstanceGroupOutput) EbsConfigs() InstanceGroupEbsConfigArrayOutput {
return o.ApplyT(func(v *InstanceGroup) InstanceGroupEbsConfigArrayOutput { return v.EbsConfigs }).(InstanceGroupEbsConfigArrayOutput)
}
// Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
func (o InstanceGroupOutput) EbsOptimized() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *InstanceGroup) pulumi.BoolPtrOutput { return v.EbsOptimized }).(pulumi.BoolPtrOutput)
}
// target number of instances for the instance group. defaults to 0.
func (o InstanceGroupOutput) InstanceCount() pulumi.IntOutput {
return o.ApplyT(func(v *InstanceGroup) pulumi.IntOutput { return v.InstanceCount }).(pulumi.IntOutput)
}
// The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
func (o InstanceGroupOutput) InstanceType() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroup) pulumi.StringOutput { return v.InstanceType }).(pulumi.StringOutput)
}
// Human friendly name given to the instance group. Changing this forces a new resource to be created.
func (o InstanceGroupOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The number of instances currently running in this instance group.
func (o InstanceGroupOutput) RunningInstanceCount() pulumi.IntOutput {
return o.ApplyT(func(v *InstanceGroup) pulumi.IntOutput { return v.RunningInstanceCount }).(pulumi.IntOutput)
}
// The current status of the instance group.
func (o InstanceGroupOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v *InstanceGroup) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput)
}
type InstanceGroupArrayOutput struct{ *pulumi.OutputState }
func (InstanceGroupArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InstanceGroup)(nil)).Elem()
}
func (o InstanceGroupArrayOutput) ToInstanceGroupArrayOutput() InstanceGroupArrayOutput {
return o
}
func (o InstanceGroupArrayOutput) ToInstanceGroupArrayOutputWithContext(ctx context.Context) InstanceGroupArrayOutput {
return o
}
func (o InstanceGroupArrayOutput) Index(i pulumi.IntInput) InstanceGroupOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *InstanceGroup {
return vs[0].([]*InstanceGroup)[vs[1].(int)]
}).(InstanceGroupOutput)
}
type InstanceGroupMapOutput struct{ *pulumi.OutputState }
func (InstanceGroupMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InstanceGroup)(nil)).Elem()
}
func (o InstanceGroupMapOutput) ToInstanceGroupMapOutput() InstanceGroupMapOutput {
return o
}
func (o InstanceGroupMapOutput) ToInstanceGroupMapOutputWithContext(ctx context.Context) InstanceGroupMapOutput {
return o
}
func (o InstanceGroupMapOutput) MapIndex(k pulumi.StringInput) InstanceGroupOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *InstanceGroup {
return vs[0].(map[string]*InstanceGroup)[vs[1].(string)]
}).(InstanceGroupOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InstanceGroupInput)(nil)).Elem(), &InstanceGroup{})
pulumi.RegisterInputType(reflect.TypeOf((*InstanceGroupArrayInput)(nil)).Elem(), InstanceGroupArray{})
pulumi.RegisterInputType(reflect.TypeOf((*InstanceGroupMapInput)(nil)).Elem(), InstanceGroupMap{})
pulumi.RegisterOutputType(InstanceGroupOutput{})
pulumi.RegisterOutputType(InstanceGroupArrayOutput{})
pulumi.RegisterOutputType(InstanceGroupMapOutput{})
}