generated from pulumi/pulumi-tf-provider-boilerplate
/
cluster.go
731 lines (667 loc) · 30.5 KB
/
cluster.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
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
// 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"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provide a resource to create a emr cluster.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "fmt"
//
// "github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/Emr"
// "github.com/pulumi/pulumi-tencentcloud/sdk/go/tencentcloud/Instance"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Emr"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Instance"
// "github.com/tencentcloudstack/pulumi-tencentcloud/sdk/go/tencentcloud/Security"
// "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 {
// cfg := config.New(ctx, "")
// availabilityZone := "ap-guangzhou-3"
// if param := cfg.Get("availabilityZone"); param != "" {
// availabilityZone = param
// }
// cvm4c8m, err := Instance.GetTypes(ctx, &instance.GetTypesArgs{
// ExcludeSoldOut: pulumi.BoolRef(true),
// CpuCoreCount: pulumi.IntRef(4),
// MemorySize: pulumi.IntRef(8),
// Filters: []instance.GetTypesFilter{
// instance.GetTypesFilter{
// Name: "instance-charge-type",
// Values: []string{
// "POSTPAID_BY_HOUR",
// },
// },
// instance.GetTypesFilter{
// Name: "zone",
// Values: []string{
// availabilityZone,
// },
// },
// },
// }, nil)
// if err != nil {
// return err
// }
// emrVpc, err := Vpc.NewInstance(ctx, "emrVpc", &Vpc.InstanceArgs{
// CidrBlock: pulumi.String("10.0.0.0/16"),
// })
// if err != nil {
// return err
// }
// emrSubnet, err := Subnet.NewInstance(ctx, "emrSubnet", &Subnet.InstanceArgs{
// AvailabilityZone: pulumi.String(availabilityZone),
// VpcId: emrVpc.ID(),
// CidrBlock: pulumi.String("10.0.20.0/28"),
// IsMulticast: pulumi.Bool(false),
// })
// if err != nil {
// return err
// }
// emrSg, err := Security.NewGroup(ctx, "emrSg", &Security.GroupArgs{
// Description: pulumi.String("emr sg"),
// ProjectId: pulumi.Int(0),
// })
// if err != nil {
// return err
// }
// _, err = Emr.NewCluster(ctx, "emrCluster", &Emr.ClusterArgs{
// ProductId: pulumi.Int(38),
// VpcSettings: pulumi.AnyMap{
// "vpc_id": emrVpc.ID(),
// "subnet_id": emrSubnet.ID(),
// },
// Softwares: pulumi.StringArray{
// pulumi.String("hdfs-2.8.5"),
// pulumi.String("knox-1.6.1"),
// pulumi.String("openldap-2.4.44"),
// pulumi.String("yarn-2.8.5"),
// pulumi.String("zookeeper-3.6.3"),
// },
// SupportHa: pulumi.Int(0),
// InstanceName: pulumi.String("emr-cluster-test"),
// ResourceSpec: &emr.ClusterResourceSpecArgs{
// MasterResourceSpec: &emr.ClusterResourceSpecMasterResourceSpecArgs{
// MemSize: pulumi.Int(8192),
// Cpu: pulumi.Int(4),
// DiskSize: pulumi.Int(100),
// DiskType: pulumi.String("CLOUD_PREMIUM"),
// Spec: pulumi.String(fmt.Sprintf("%v%v", "CVM.", cvm4c8m.InstanceTypes[0].Family)),
// StorageType: pulumi.Int(5),
// RootSize: pulumi.Int(50),
// },
// CoreResourceSpec: &emr.ClusterResourceSpecCoreResourceSpecArgs{
// MemSize: pulumi.Int(8192),
// Cpu: pulumi.Int(4),
// DiskSize: pulumi.Int(100),
// DiskType: pulumi.String("CLOUD_PREMIUM"),
// Spec: pulumi.String(fmt.Sprintf("%v%v", "CVM.", cvm4c8m.InstanceTypes[0].Family)),
// StorageType: pulumi.Int(5),
// RootSize: pulumi.Int(50),
// },
// MasterCount: pulumi.Int(1),
// CoreCount: pulumi.Int(2),
// },
// LoginSettings: pulumi.AnyMap{
// "password": pulumi.Any("Tencent@cloud123"),
// },
// TimeSpan: pulumi.Int(3600),
// TimeUnit: pulumi.String("s"),
// PayMode: pulumi.Int(0),
// PlacementInfo: &emr.ClusterPlacementInfoArgs{
// Zone: pulumi.String(availabilityZone),
// ProjectId: pulumi.Int(0),
// },
// SgId: emrSg.ID(),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
type Cluster struct {
pulumi.CustomResourceState
// It will be deprecated in later versions. Display strategy of EMR instance.
//
// Deprecated: It will be deprecated in later versions.
DisplayStrategy pulumi.StringPtrOutput `pulumi:"displayStrategy"`
// Access the external file system.
ExtendFsField pulumi.StringPtrOutput `pulumi:"extendFsField"`
// Created EMR instance id.
InstanceId pulumi.StringOutput `pulumi:"instanceId"`
// Name of the instance, which can contain 6 to 36 English letters, Chinese characters, digits, dashes(-), or underscores(_).
InstanceName pulumi.StringOutput `pulumi:"instanceName"`
// Instance login settings.
LoginSettings pulumi.MapOutput `pulumi:"loginSettings"`
// Whether to enable the cluster Master node public network. Value range:
// - NEED_MASTER_WAN: Indicates that the cluster Master node public network is enabled.
// - NOT_NEED_MASTER_WAN: Indicates that it is not turned on.
// By default, the cluster Master node internet is enabled.
NeedMasterWan pulumi.StringPtrOutput `pulumi:"needMasterWan"`
// The pay mode of instance. 0 represent POSTPAID_BY_HOUR, 1 represent PREPAID.
PayMode pulumi.IntOutput `pulumi:"payMode"`
// It will be deprecated in later versions. Use `placementInfo` instead. The location of the instance.
//
// Deprecated: It will be deprecated in later versions. Use `placement_info` instead.
Placement pulumi.MapOutput `pulumi:"placement"`
// The location of the instance.
PlacementInfo ClusterPlacementInfoOutput `pulumi:"placementInfo"`
// Product ID. Different products ID represents different EMR product versions. Value range:
// - 16: represents EMR-V2.3.0
// - 20: indicates EMR-V2.5.0
// - 25: represents EMR-V3.1.0
// - 27: represents KAFKA-V1.0.0
// - 30: indicates EMR-V2.6.0
// - 33: represents EMR-V3.2.1
// - 34: stands for EMR-V3.3.0
// - 36: represents STARROCKS-V1.0.0
// - 37: indicates EMR-V3.4.0
// - 38: represents EMR-V2.7.0
// - 39: stands for STARROCKS-V1.1.0
// - 41: represents DRUID-V1.1.0.
ProductId pulumi.IntOutput `pulumi:"productId"`
// Resource specification of EMR instance.
ResourceSpec ClusterResourceSpecPtrOutput `pulumi:"resourceSpec"`
// The ID of the security group to which the instance belongs, in the form of sg-xxxxxxxx.
SgId pulumi.StringPtrOutput `pulumi:"sgId"`
// The softwares of a EMR instance.
Softwares pulumi.StringArrayOutput `pulumi:"softwares"`
// The flag whether the instance support high availability.(0=>not support, 1=>support).
SupportHa pulumi.IntOutput `pulumi:"supportHa"`
// Tag description list.
Tags pulumi.MapOutput `pulumi:"tags"`
// The length of time the instance was purchased. Use with TimeUnit.When TimeUnit is s, the parameter can only be filled in at 3600, representing a metered instance.
// When TimeUnit is m, the number filled in by this parameter indicates the length of purchase of the monthly instance of the package year, such as 1 for one month of purchase.
TimeSpan pulumi.IntPtrOutput `pulumi:"timeSpan"`
// The unit of time in which the instance was purchased. When PayMode is 0, TimeUnit can only take values of s(second). When PayMode is 1, TimeUnit can only take the value m(month).
TimeUnit pulumi.StringPtrOutput `pulumi:"timeUnit"`
// The private net config of EMR instance.
VpcSettings pulumi.MapOutput `pulumi:"vpcSettings"`
}
// NewCluster registers a new resource with the given unique name, arguments, and options.
func NewCluster(ctx *pulumi.Context,
name string, args *ClusterArgs, opts ...pulumi.ResourceOption) (*Cluster, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.InstanceName == nil {
return nil, errors.New("invalid value for required argument 'InstanceName'")
}
if args.PayMode == nil {
return nil, errors.New("invalid value for required argument 'PayMode'")
}
if args.ProductId == nil {
return nil, errors.New("invalid value for required argument 'ProductId'")
}
if args.Softwares == nil {
return nil, errors.New("invalid value for required argument 'Softwares'")
}
if args.SupportHa == nil {
return nil, errors.New("invalid value for required argument 'SupportHa'")
}
if args.VpcSettings == nil {
return nil, errors.New("invalid value for required argument 'VpcSettings'")
}
opts = pkgResourceDefaultOpts(opts)
var resource Cluster
err := ctx.RegisterResource("tencentcloud:Emr/cluster:Cluster", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetCluster gets an existing Cluster 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 GetCluster(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ClusterState, opts ...pulumi.ResourceOption) (*Cluster, error) {
var resource Cluster
err := ctx.ReadResource("tencentcloud:Emr/cluster:Cluster", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering Cluster resources.
type clusterState struct {
// It will be deprecated in later versions. Display strategy of EMR instance.
//
// Deprecated: It will be deprecated in later versions.
DisplayStrategy *string `pulumi:"displayStrategy"`
// Access the external file system.
ExtendFsField *string `pulumi:"extendFsField"`
// Created EMR instance id.
InstanceId *string `pulumi:"instanceId"`
// Name of the instance, which can contain 6 to 36 English letters, Chinese characters, digits, dashes(-), or underscores(_).
InstanceName *string `pulumi:"instanceName"`
// Instance login settings.
LoginSettings map[string]interface{} `pulumi:"loginSettings"`
// Whether to enable the cluster Master node public network. Value range:
// - NEED_MASTER_WAN: Indicates that the cluster Master node public network is enabled.
// - NOT_NEED_MASTER_WAN: Indicates that it is not turned on.
// By default, the cluster Master node internet is enabled.
NeedMasterWan *string `pulumi:"needMasterWan"`
// The pay mode of instance. 0 represent POSTPAID_BY_HOUR, 1 represent PREPAID.
PayMode *int `pulumi:"payMode"`
// It will be deprecated in later versions. Use `placementInfo` instead. The location of the instance.
//
// Deprecated: It will be deprecated in later versions. Use `placement_info` instead.
Placement map[string]interface{} `pulumi:"placement"`
// The location of the instance.
PlacementInfo *ClusterPlacementInfo `pulumi:"placementInfo"`
// Product ID. Different products ID represents different EMR product versions. Value range:
// - 16: represents EMR-V2.3.0
// - 20: indicates EMR-V2.5.0
// - 25: represents EMR-V3.1.0
// - 27: represents KAFKA-V1.0.0
// - 30: indicates EMR-V2.6.0
// - 33: represents EMR-V3.2.1
// - 34: stands for EMR-V3.3.0
// - 36: represents STARROCKS-V1.0.0
// - 37: indicates EMR-V3.4.0
// - 38: represents EMR-V2.7.0
// - 39: stands for STARROCKS-V1.1.0
// - 41: represents DRUID-V1.1.0.
ProductId *int `pulumi:"productId"`
// Resource specification of EMR instance.
ResourceSpec *ClusterResourceSpec `pulumi:"resourceSpec"`
// The ID of the security group to which the instance belongs, in the form of sg-xxxxxxxx.
SgId *string `pulumi:"sgId"`
// The softwares of a EMR instance.
Softwares []string `pulumi:"softwares"`
// The flag whether the instance support high availability.(0=>not support, 1=>support).
SupportHa *int `pulumi:"supportHa"`
// Tag description list.
Tags map[string]interface{} `pulumi:"tags"`
// The length of time the instance was purchased. Use with TimeUnit.When TimeUnit is s, the parameter can only be filled in at 3600, representing a metered instance.
// When TimeUnit is m, the number filled in by this parameter indicates the length of purchase of the monthly instance of the package year, such as 1 for one month of purchase.
TimeSpan *int `pulumi:"timeSpan"`
// The unit of time in which the instance was purchased. When PayMode is 0, TimeUnit can only take values of s(second). When PayMode is 1, TimeUnit can only take the value m(month).
TimeUnit *string `pulumi:"timeUnit"`
// The private net config of EMR instance.
VpcSettings map[string]interface{} `pulumi:"vpcSettings"`
}
type ClusterState struct {
// It will be deprecated in later versions. Display strategy of EMR instance.
//
// Deprecated: It will be deprecated in later versions.
DisplayStrategy pulumi.StringPtrInput
// Access the external file system.
ExtendFsField pulumi.StringPtrInput
// Created EMR instance id.
InstanceId pulumi.StringPtrInput
// Name of the instance, which can contain 6 to 36 English letters, Chinese characters, digits, dashes(-), or underscores(_).
InstanceName pulumi.StringPtrInput
// Instance login settings.
LoginSettings pulumi.MapInput
// Whether to enable the cluster Master node public network. Value range:
// - NEED_MASTER_WAN: Indicates that the cluster Master node public network is enabled.
// - NOT_NEED_MASTER_WAN: Indicates that it is not turned on.
// By default, the cluster Master node internet is enabled.
NeedMasterWan pulumi.StringPtrInput
// The pay mode of instance. 0 represent POSTPAID_BY_HOUR, 1 represent PREPAID.
PayMode pulumi.IntPtrInput
// It will be deprecated in later versions. Use `placementInfo` instead. The location of the instance.
//
// Deprecated: It will be deprecated in later versions. Use `placement_info` instead.
Placement pulumi.MapInput
// The location of the instance.
PlacementInfo ClusterPlacementInfoPtrInput
// Product ID. Different products ID represents different EMR product versions. Value range:
// - 16: represents EMR-V2.3.0
// - 20: indicates EMR-V2.5.0
// - 25: represents EMR-V3.1.0
// - 27: represents KAFKA-V1.0.0
// - 30: indicates EMR-V2.6.0
// - 33: represents EMR-V3.2.1
// - 34: stands for EMR-V3.3.0
// - 36: represents STARROCKS-V1.0.0
// - 37: indicates EMR-V3.4.0
// - 38: represents EMR-V2.7.0
// - 39: stands for STARROCKS-V1.1.0
// - 41: represents DRUID-V1.1.0.
ProductId pulumi.IntPtrInput
// Resource specification of EMR instance.
ResourceSpec ClusterResourceSpecPtrInput
// The ID of the security group to which the instance belongs, in the form of sg-xxxxxxxx.
SgId pulumi.StringPtrInput
// The softwares of a EMR instance.
Softwares pulumi.StringArrayInput
// The flag whether the instance support high availability.(0=>not support, 1=>support).
SupportHa pulumi.IntPtrInput
// Tag description list.
Tags pulumi.MapInput
// The length of time the instance was purchased. Use with TimeUnit.When TimeUnit is s, the parameter can only be filled in at 3600, representing a metered instance.
// When TimeUnit is m, the number filled in by this parameter indicates the length of purchase of the monthly instance of the package year, such as 1 for one month of purchase.
TimeSpan pulumi.IntPtrInput
// The unit of time in which the instance was purchased. When PayMode is 0, TimeUnit can only take values of s(second). When PayMode is 1, TimeUnit can only take the value m(month).
TimeUnit pulumi.StringPtrInput
// The private net config of EMR instance.
VpcSettings pulumi.MapInput
}
func (ClusterState) ElementType() reflect.Type {
return reflect.TypeOf((*clusterState)(nil)).Elem()
}
type clusterArgs struct {
// It will be deprecated in later versions. Display strategy of EMR instance.
//
// Deprecated: It will be deprecated in later versions.
DisplayStrategy *string `pulumi:"displayStrategy"`
// Access the external file system.
ExtendFsField *string `pulumi:"extendFsField"`
// Name of the instance, which can contain 6 to 36 English letters, Chinese characters, digits, dashes(-), or underscores(_).
InstanceName string `pulumi:"instanceName"`
// Instance login settings.
LoginSettings map[string]interface{} `pulumi:"loginSettings"`
// Whether to enable the cluster Master node public network. Value range:
// - NEED_MASTER_WAN: Indicates that the cluster Master node public network is enabled.
// - NOT_NEED_MASTER_WAN: Indicates that it is not turned on.
// By default, the cluster Master node internet is enabled.
NeedMasterWan *string `pulumi:"needMasterWan"`
// The pay mode of instance. 0 represent POSTPAID_BY_HOUR, 1 represent PREPAID.
PayMode int `pulumi:"payMode"`
// It will be deprecated in later versions. Use `placementInfo` instead. The location of the instance.
//
// Deprecated: It will be deprecated in later versions. Use `placement_info` instead.
Placement map[string]interface{} `pulumi:"placement"`
// The location of the instance.
PlacementInfo *ClusterPlacementInfo `pulumi:"placementInfo"`
// Product ID. Different products ID represents different EMR product versions. Value range:
// - 16: represents EMR-V2.3.0
// - 20: indicates EMR-V2.5.0
// - 25: represents EMR-V3.1.0
// - 27: represents KAFKA-V1.0.0
// - 30: indicates EMR-V2.6.0
// - 33: represents EMR-V3.2.1
// - 34: stands for EMR-V3.3.0
// - 36: represents STARROCKS-V1.0.0
// - 37: indicates EMR-V3.4.0
// - 38: represents EMR-V2.7.0
// - 39: stands for STARROCKS-V1.1.0
// - 41: represents DRUID-V1.1.0.
ProductId int `pulumi:"productId"`
// Resource specification of EMR instance.
ResourceSpec *ClusterResourceSpec `pulumi:"resourceSpec"`
// The ID of the security group to which the instance belongs, in the form of sg-xxxxxxxx.
SgId *string `pulumi:"sgId"`
// The softwares of a EMR instance.
Softwares []string `pulumi:"softwares"`
// The flag whether the instance support high availability.(0=>not support, 1=>support).
SupportHa int `pulumi:"supportHa"`
// Tag description list.
Tags map[string]interface{} `pulumi:"tags"`
// The length of time the instance was purchased. Use with TimeUnit.When TimeUnit is s, the parameter can only be filled in at 3600, representing a metered instance.
// When TimeUnit is m, the number filled in by this parameter indicates the length of purchase of the monthly instance of the package year, such as 1 for one month of purchase.
TimeSpan *int `pulumi:"timeSpan"`
// The unit of time in which the instance was purchased. When PayMode is 0, TimeUnit can only take values of s(second). When PayMode is 1, TimeUnit can only take the value m(month).
TimeUnit *string `pulumi:"timeUnit"`
// The private net config of EMR instance.
VpcSettings map[string]interface{} `pulumi:"vpcSettings"`
}
// The set of arguments for constructing a Cluster resource.
type ClusterArgs struct {
// It will be deprecated in later versions. Display strategy of EMR instance.
//
// Deprecated: It will be deprecated in later versions.
DisplayStrategy pulumi.StringPtrInput
// Access the external file system.
ExtendFsField pulumi.StringPtrInput
// Name of the instance, which can contain 6 to 36 English letters, Chinese characters, digits, dashes(-), or underscores(_).
InstanceName pulumi.StringInput
// Instance login settings.
LoginSettings pulumi.MapInput
// Whether to enable the cluster Master node public network. Value range:
// - NEED_MASTER_WAN: Indicates that the cluster Master node public network is enabled.
// - NOT_NEED_MASTER_WAN: Indicates that it is not turned on.
// By default, the cluster Master node internet is enabled.
NeedMasterWan pulumi.StringPtrInput
// The pay mode of instance. 0 represent POSTPAID_BY_HOUR, 1 represent PREPAID.
PayMode pulumi.IntInput
// It will be deprecated in later versions. Use `placementInfo` instead. The location of the instance.
//
// Deprecated: It will be deprecated in later versions. Use `placement_info` instead.
Placement pulumi.MapInput
// The location of the instance.
PlacementInfo ClusterPlacementInfoPtrInput
// Product ID. Different products ID represents different EMR product versions. Value range:
// - 16: represents EMR-V2.3.0
// - 20: indicates EMR-V2.5.0
// - 25: represents EMR-V3.1.0
// - 27: represents KAFKA-V1.0.0
// - 30: indicates EMR-V2.6.0
// - 33: represents EMR-V3.2.1
// - 34: stands for EMR-V3.3.0
// - 36: represents STARROCKS-V1.0.0
// - 37: indicates EMR-V3.4.0
// - 38: represents EMR-V2.7.0
// - 39: stands for STARROCKS-V1.1.0
// - 41: represents DRUID-V1.1.0.
ProductId pulumi.IntInput
// Resource specification of EMR instance.
ResourceSpec ClusterResourceSpecPtrInput
// The ID of the security group to which the instance belongs, in the form of sg-xxxxxxxx.
SgId pulumi.StringPtrInput
// The softwares of a EMR instance.
Softwares pulumi.StringArrayInput
// The flag whether the instance support high availability.(0=>not support, 1=>support).
SupportHa pulumi.IntInput
// Tag description list.
Tags pulumi.MapInput
// The length of time the instance was purchased. Use with TimeUnit.When TimeUnit is s, the parameter can only be filled in at 3600, representing a metered instance.
// When TimeUnit is m, the number filled in by this parameter indicates the length of purchase of the monthly instance of the package year, such as 1 for one month of purchase.
TimeSpan pulumi.IntPtrInput
// The unit of time in which the instance was purchased. When PayMode is 0, TimeUnit can only take values of s(second). When PayMode is 1, TimeUnit can only take the value m(month).
TimeUnit pulumi.StringPtrInput
// The private net config of EMR instance.
VpcSettings pulumi.MapInput
}
func (ClusterArgs) ElementType() reflect.Type {
return reflect.TypeOf((*clusterArgs)(nil)).Elem()
}
type ClusterInput interface {
pulumi.Input
ToClusterOutput() ClusterOutput
ToClusterOutputWithContext(ctx context.Context) ClusterOutput
}
func (*Cluster) ElementType() reflect.Type {
return reflect.TypeOf((**Cluster)(nil)).Elem()
}
func (i *Cluster) ToClusterOutput() ClusterOutput {
return i.ToClusterOutputWithContext(context.Background())
}
func (i *Cluster) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterOutput)
}
// ClusterArrayInput is an input type that accepts ClusterArray and ClusterArrayOutput values.
// You can construct a concrete instance of `ClusterArrayInput` via:
//
// ClusterArray{ ClusterArgs{...} }
type ClusterArrayInput interface {
pulumi.Input
ToClusterArrayOutput() ClusterArrayOutput
ToClusterArrayOutputWithContext(context.Context) ClusterArrayOutput
}
type ClusterArray []ClusterInput
func (ClusterArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
}
func (i ClusterArray) ToClusterArrayOutput() ClusterArrayOutput {
return i.ToClusterArrayOutputWithContext(context.Background())
}
func (i ClusterArray) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterArrayOutput)
}
// ClusterMapInput is an input type that accepts ClusterMap and ClusterMapOutput values.
// You can construct a concrete instance of `ClusterMapInput` via:
//
// ClusterMap{ "key": ClusterArgs{...} }
type ClusterMapInput interface {
pulumi.Input
ToClusterMapOutput() ClusterMapOutput
ToClusterMapOutputWithContext(context.Context) ClusterMapOutput
}
type ClusterMap map[string]ClusterInput
func (ClusterMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
}
func (i ClusterMap) ToClusterMapOutput() ClusterMapOutput {
return i.ToClusterMapOutputWithContext(context.Background())
}
func (i ClusterMap) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ClusterMapOutput)
}
type ClusterOutput struct{ *pulumi.OutputState }
func (ClusterOutput) ElementType() reflect.Type {
return reflect.TypeOf((**Cluster)(nil)).Elem()
}
func (o ClusterOutput) ToClusterOutput() ClusterOutput {
return o
}
func (o ClusterOutput) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
return o
}
// It will be deprecated in later versions. Display strategy of EMR instance.
//
// Deprecated: It will be deprecated in later versions.
func (o ClusterOutput) DisplayStrategy() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.DisplayStrategy }).(pulumi.StringPtrOutput)
}
// Access the external file system.
func (o ClusterOutput) ExtendFsField() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.ExtendFsField }).(pulumi.StringPtrOutput)
}
// Created EMR instance id.
func (o ClusterOutput) InstanceId() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.InstanceId }).(pulumi.StringOutput)
}
// Name of the instance, which can contain 6 to 36 English letters, Chinese characters, digits, dashes(-), or underscores(_).
func (o ClusterOutput) InstanceName() pulumi.StringOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.InstanceName }).(pulumi.StringOutput)
}
// Instance login settings.
func (o ClusterOutput) LoginSettings() pulumi.MapOutput {
return o.ApplyT(func(v *Cluster) pulumi.MapOutput { return v.LoginSettings }).(pulumi.MapOutput)
}
// Whether to enable the cluster Master node public network. Value range:
// - NEED_MASTER_WAN: Indicates that the cluster Master node public network is enabled.
// - NOT_NEED_MASTER_WAN: Indicates that it is not turned on.
// By default, the cluster Master node internet is enabled.
func (o ClusterOutput) NeedMasterWan() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.NeedMasterWan }).(pulumi.StringPtrOutput)
}
// The pay mode of instance. 0 represent POSTPAID_BY_HOUR, 1 represent PREPAID.
func (o ClusterOutput) PayMode() pulumi.IntOutput {
return o.ApplyT(func(v *Cluster) pulumi.IntOutput { return v.PayMode }).(pulumi.IntOutput)
}
// It will be deprecated in later versions. Use `placementInfo` instead. The location of the instance.
//
// Deprecated: It will be deprecated in later versions. Use `placement_info` instead.
func (o ClusterOutput) Placement() pulumi.MapOutput {
return o.ApplyT(func(v *Cluster) pulumi.MapOutput { return v.Placement }).(pulumi.MapOutput)
}
// The location of the instance.
func (o ClusterOutput) PlacementInfo() ClusterPlacementInfoOutput {
return o.ApplyT(func(v *Cluster) ClusterPlacementInfoOutput { return v.PlacementInfo }).(ClusterPlacementInfoOutput)
}
// Product ID. Different products ID represents different EMR product versions. Value range:
// - 16: represents EMR-V2.3.0
// - 20: indicates EMR-V2.5.0
// - 25: represents EMR-V3.1.0
// - 27: represents KAFKA-V1.0.0
// - 30: indicates EMR-V2.6.0
// - 33: represents EMR-V3.2.1
// - 34: stands for EMR-V3.3.0
// - 36: represents STARROCKS-V1.0.0
// - 37: indicates EMR-V3.4.0
// - 38: represents EMR-V2.7.0
// - 39: stands for STARROCKS-V1.1.0
// - 41: represents DRUID-V1.1.0.
func (o ClusterOutput) ProductId() pulumi.IntOutput {
return o.ApplyT(func(v *Cluster) pulumi.IntOutput { return v.ProductId }).(pulumi.IntOutput)
}
// Resource specification of EMR instance.
func (o ClusterOutput) ResourceSpec() ClusterResourceSpecPtrOutput {
return o.ApplyT(func(v *Cluster) ClusterResourceSpecPtrOutput { return v.ResourceSpec }).(ClusterResourceSpecPtrOutput)
}
// The ID of the security group to which the instance belongs, in the form of sg-xxxxxxxx.
func (o ClusterOutput) SgId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.SgId }).(pulumi.StringPtrOutput)
}
// The softwares of a EMR instance.
func (o ClusterOutput) Softwares() pulumi.StringArrayOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringArrayOutput { return v.Softwares }).(pulumi.StringArrayOutput)
}
// The flag whether the instance support high availability.(0=>not support, 1=>support).
func (o ClusterOutput) SupportHa() pulumi.IntOutput {
return o.ApplyT(func(v *Cluster) pulumi.IntOutput { return v.SupportHa }).(pulumi.IntOutput)
}
// Tag description list.
func (o ClusterOutput) Tags() pulumi.MapOutput {
return o.ApplyT(func(v *Cluster) pulumi.MapOutput { return v.Tags }).(pulumi.MapOutput)
}
// The length of time the instance was purchased. Use with TimeUnit.When TimeUnit is s, the parameter can only be filled in at 3600, representing a metered instance.
// When TimeUnit is m, the number filled in by this parameter indicates the length of purchase of the monthly instance of the package year, such as 1 for one month of purchase.
func (o ClusterOutput) TimeSpan() pulumi.IntPtrOutput {
return o.ApplyT(func(v *Cluster) pulumi.IntPtrOutput { return v.TimeSpan }).(pulumi.IntPtrOutput)
}
// The unit of time in which the instance was purchased. When PayMode is 0, TimeUnit can only take values of s(second). When PayMode is 1, TimeUnit can only take the value m(month).
func (o ClusterOutput) TimeUnit() pulumi.StringPtrOutput {
return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.TimeUnit }).(pulumi.StringPtrOutput)
}
// The private net config of EMR instance.
func (o ClusterOutput) VpcSettings() pulumi.MapOutput {
return o.ApplyT(func(v *Cluster) pulumi.MapOutput { return v.VpcSettings }).(pulumi.MapOutput)
}
type ClusterArrayOutput struct{ *pulumi.OutputState }
func (ClusterArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
}
func (o ClusterArrayOutput) ToClusterArrayOutput() ClusterArrayOutput {
return o
}
func (o ClusterArrayOutput) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
return o
}
func (o ClusterArrayOutput) Index(i pulumi.IntInput) ClusterOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Cluster {
return vs[0].([]*Cluster)[vs[1].(int)]
}).(ClusterOutput)
}
type ClusterMapOutput struct{ *pulumi.OutputState }
func (ClusterMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
}
func (o ClusterMapOutput) ToClusterMapOutput() ClusterMapOutput {
return o
}
func (o ClusterMapOutput) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
return o
}
func (o ClusterMapOutput) MapIndex(k pulumi.StringInput) ClusterOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Cluster {
return vs[0].(map[string]*Cluster)[vs[1].(string)]
}).(ClusterOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*ClusterInput)(nil)).Elem(), &Cluster{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterArrayInput)(nil)).Elem(), ClusterArray{})
pulumi.RegisterInputType(reflect.TypeOf((*ClusterMapInput)(nil)).Elem(), ClusterMap{})
pulumi.RegisterOutputType(ClusterOutput{})
pulumi.RegisterOutputType(ClusterArrayOutput{})
pulumi.RegisterOutputType(ClusterMapOutput{})
}