/
launchTemplate.go
575 lines (507 loc) · 25.3 KB
/
launchTemplate.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
// 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 ecs
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/internal"
)
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := ecs.NewLaunchTemplate(ctx, "foo", &ecs.LaunchTemplateArgs{
// Description: pulumi.String("acc-test-desc"),
// EipBandwidth: pulumi.Int(1),
// EipBillingType: pulumi.String("PostPaidByBandwidth"),
// EipIsp: pulumi.String("ChinaMobile"),
// HostName: pulumi.String("tf-host-name"),
// HpcClusterId: pulumi.String("hpcCluster-l8u24ovdmoab6opf"),
// ImageId: pulumi.String("image-ycjwwciuzy5pkh54xx8f"),
// InstanceChargeType: pulumi.String("PostPaid"),
// InstanceName: pulumi.String("tf-acc-name"),
// InstanceTypeId: pulumi.String("ecs.g1.large"),
// KeyPairName: pulumi.String("tf-key-pair"),
// LaunchTemplateName: pulumi.String("tf-acc-template"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// LaunchTemplate can be imported using the LaunchTemplateId, e.g. When the instance launch template is modified, a new version will be created. When the number of versions reaches the upper limit (30), the oldest version that is not the default version will be deleted.
//
// ```sh
//
// $ pulumi import volcengine:ecs/launchTemplate:LaunchTemplate default lt-ysxc16auaugh9zfy****
//
// ```
type LaunchTemplate struct {
pulumi.CustomResourceState
// The description of the instance.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The EIP bandwidth which the scaling configuration set.
EipBandwidth pulumi.IntPtrOutput `pulumi:"eipBandwidth"`
// The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
EipBillingType pulumi.StringPtrOutput `pulumi:"eipBillingType"`
// The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
EipIsp pulumi.StringPtrOutput `pulumi:"eipIsp"`
// The host name of the instance.
HostName pulumi.StringPtrOutput `pulumi:"hostName"`
// The hpc cluster id.
HpcClusterId pulumi.StringPtrOutput `pulumi:"hpcClusterId"`
// The image ID.
ImageId pulumi.StringPtrOutput `pulumi:"imageId"`
// The charge type of the instance and volume.
InstanceChargeType pulumi.StringPtrOutput `pulumi:"instanceChargeType"`
// The name of the instance.
InstanceName pulumi.StringPtrOutput `pulumi:"instanceName"`
// The compute type of the instance.
InstanceTypeId pulumi.StringPtrOutput `pulumi:"instanceTypeId"`
// When you log in to the instance using the SSH key pair, enter the name of the key pair.
KeyPairName pulumi.StringPtrOutput `pulumi:"keyPairName"`
// The launch template id.
LaunchTemplateId pulumi.StringOutput `pulumi:"launchTemplateId"`
// The name of the launch template.
LaunchTemplateName pulumi.StringOutput `pulumi:"launchTemplateName"`
// The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
NetworkInterfaces LaunchTemplateNetworkInterfaceArrayOutput `pulumi:"networkInterfaces"`
// Whether to open the security reinforcement.
SecurityEnhancementStrategy pulumi.StringPtrOutput `pulumi:"securityEnhancementStrategy"`
// The index of the ordered suffix.
SuffixIndex pulumi.IntPtrOutput `pulumi:"suffixIndex"`
// Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
UniqueSuffix pulumi.BoolPtrOutput `pulumi:"uniqueSuffix"`
// Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
UserData pulumi.StringPtrOutput `pulumi:"userData"`
// The latest version description of the launch template.
VersionDescription pulumi.StringPtrOutput `pulumi:"versionDescription"`
// The list of volume of the scaling configuration.
Volumes LaunchTemplateVolumeArrayOutput `pulumi:"volumes"`
// The vpc id.
VpcId pulumi.StringPtrOutput `pulumi:"vpcId"`
// The zone id.
ZoneId pulumi.StringPtrOutput `pulumi:"zoneId"`
}
// NewLaunchTemplate registers a new resource with the given unique name, arguments, and options.
func NewLaunchTemplate(ctx *pulumi.Context,
name string, args *LaunchTemplateArgs, opts ...pulumi.ResourceOption) (*LaunchTemplate, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.LaunchTemplateName == nil {
return nil, errors.New("invalid value for required argument 'LaunchTemplateName'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource LaunchTemplate
err := ctx.RegisterResource("volcengine:ecs/launchTemplate:LaunchTemplate", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLaunchTemplate gets an existing LaunchTemplate 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 GetLaunchTemplate(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LaunchTemplateState, opts ...pulumi.ResourceOption) (*LaunchTemplate, error) {
var resource LaunchTemplate
err := ctx.ReadResource("volcengine:ecs/launchTemplate:LaunchTemplate", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LaunchTemplate resources.
type launchTemplateState struct {
// The description of the instance.
Description *string `pulumi:"description"`
// The EIP bandwidth which the scaling configuration set.
EipBandwidth *int `pulumi:"eipBandwidth"`
// The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
EipBillingType *string `pulumi:"eipBillingType"`
// The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
EipIsp *string `pulumi:"eipIsp"`
// The host name of the instance.
HostName *string `pulumi:"hostName"`
// The hpc cluster id.
HpcClusterId *string `pulumi:"hpcClusterId"`
// The image ID.
ImageId *string `pulumi:"imageId"`
// The charge type of the instance and volume.
InstanceChargeType *string `pulumi:"instanceChargeType"`
// The name of the instance.
InstanceName *string `pulumi:"instanceName"`
// The compute type of the instance.
InstanceTypeId *string `pulumi:"instanceTypeId"`
// When you log in to the instance using the SSH key pair, enter the name of the key pair.
KeyPairName *string `pulumi:"keyPairName"`
// The launch template id.
LaunchTemplateId *string `pulumi:"launchTemplateId"`
// The name of the launch template.
LaunchTemplateName *string `pulumi:"launchTemplateName"`
// The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
NetworkInterfaces []LaunchTemplateNetworkInterface `pulumi:"networkInterfaces"`
// Whether to open the security reinforcement.
SecurityEnhancementStrategy *string `pulumi:"securityEnhancementStrategy"`
// The index of the ordered suffix.
SuffixIndex *int `pulumi:"suffixIndex"`
// Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
UniqueSuffix *bool `pulumi:"uniqueSuffix"`
// Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
UserData *string `pulumi:"userData"`
// The latest version description of the launch template.
VersionDescription *string `pulumi:"versionDescription"`
// The list of volume of the scaling configuration.
Volumes []LaunchTemplateVolume `pulumi:"volumes"`
// The vpc id.
VpcId *string `pulumi:"vpcId"`
// The zone id.
ZoneId *string `pulumi:"zoneId"`
}
type LaunchTemplateState struct {
// The description of the instance.
Description pulumi.StringPtrInput
// The EIP bandwidth which the scaling configuration set.
EipBandwidth pulumi.IntPtrInput
// The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
EipBillingType pulumi.StringPtrInput
// The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
EipIsp pulumi.StringPtrInput
// The host name of the instance.
HostName pulumi.StringPtrInput
// The hpc cluster id.
HpcClusterId pulumi.StringPtrInput
// The image ID.
ImageId pulumi.StringPtrInput
// The charge type of the instance and volume.
InstanceChargeType pulumi.StringPtrInput
// The name of the instance.
InstanceName pulumi.StringPtrInput
// The compute type of the instance.
InstanceTypeId pulumi.StringPtrInput
// When you log in to the instance using the SSH key pair, enter the name of the key pair.
KeyPairName pulumi.StringPtrInput
// The launch template id.
LaunchTemplateId pulumi.StringPtrInput
// The name of the launch template.
LaunchTemplateName pulumi.StringPtrInput
// The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
NetworkInterfaces LaunchTemplateNetworkInterfaceArrayInput
// Whether to open the security reinforcement.
SecurityEnhancementStrategy pulumi.StringPtrInput
// The index of the ordered suffix.
SuffixIndex pulumi.IntPtrInput
// Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
UniqueSuffix pulumi.BoolPtrInput
// Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
UserData pulumi.StringPtrInput
// The latest version description of the launch template.
VersionDescription pulumi.StringPtrInput
// The list of volume of the scaling configuration.
Volumes LaunchTemplateVolumeArrayInput
// The vpc id.
VpcId pulumi.StringPtrInput
// The zone id.
ZoneId pulumi.StringPtrInput
}
func (LaunchTemplateState) ElementType() reflect.Type {
return reflect.TypeOf((*launchTemplateState)(nil)).Elem()
}
type launchTemplateArgs struct {
// The description of the instance.
Description *string `pulumi:"description"`
// The EIP bandwidth which the scaling configuration set.
EipBandwidth *int `pulumi:"eipBandwidth"`
// The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
EipBillingType *string `pulumi:"eipBillingType"`
// The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
EipIsp *string `pulumi:"eipIsp"`
// The host name of the instance.
HostName *string `pulumi:"hostName"`
// The hpc cluster id.
HpcClusterId *string `pulumi:"hpcClusterId"`
// The image ID.
ImageId *string `pulumi:"imageId"`
// The charge type of the instance and volume.
InstanceChargeType *string `pulumi:"instanceChargeType"`
// The name of the instance.
InstanceName *string `pulumi:"instanceName"`
// The compute type of the instance.
InstanceTypeId *string `pulumi:"instanceTypeId"`
// When you log in to the instance using the SSH key pair, enter the name of the key pair.
KeyPairName *string `pulumi:"keyPairName"`
// The name of the launch template.
LaunchTemplateName string `pulumi:"launchTemplateName"`
// The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
NetworkInterfaces []LaunchTemplateNetworkInterface `pulumi:"networkInterfaces"`
// Whether to open the security reinforcement.
SecurityEnhancementStrategy *string `pulumi:"securityEnhancementStrategy"`
// The index of the ordered suffix.
SuffixIndex *int `pulumi:"suffixIndex"`
// Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
UniqueSuffix *bool `pulumi:"uniqueSuffix"`
// Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
UserData *string `pulumi:"userData"`
// The latest version description of the launch template.
VersionDescription *string `pulumi:"versionDescription"`
// The list of volume of the scaling configuration.
Volumes []LaunchTemplateVolume `pulumi:"volumes"`
// The vpc id.
VpcId *string `pulumi:"vpcId"`
// The zone id.
ZoneId *string `pulumi:"zoneId"`
}
// The set of arguments for constructing a LaunchTemplate resource.
type LaunchTemplateArgs struct {
// The description of the instance.
Description pulumi.StringPtrInput
// The EIP bandwidth which the scaling configuration set.
EipBandwidth pulumi.IntPtrInput
// The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
EipBillingType pulumi.StringPtrInput
// The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
EipIsp pulumi.StringPtrInput
// The host name of the instance.
HostName pulumi.StringPtrInput
// The hpc cluster id.
HpcClusterId pulumi.StringPtrInput
// The image ID.
ImageId pulumi.StringPtrInput
// The charge type of the instance and volume.
InstanceChargeType pulumi.StringPtrInput
// The name of the instance.
InstanceName pulumi.StringPtrInput
// The compute type of the instance.
InstanceTypeId pulumi.StringPtrInput
// When you log in to the instance using the SSH key pair, enter the name of the key pair.
KeyPairName pulumi.StringPtrInput
// The name of the launch template.
LaunchTemplateName pulumi.StringInput
// The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
NetworkInterfaces LaunchTemplateNetworkInterfaceArrayInput
// Whether to open the security reinforcement.
SecurityEnhancementStrategy pulumi.StringPtrInput
// The index of the ordered suffix.
SuffixIndex pulumi.IntPtrInput
// Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
UniqueSuffix pulumi.BoolPtrInput
// Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
UserData pulumi.StringPtrInput
// The latest version description of the launch template.
VersionDescription pulumi.StringPtrInput
// The list of volume of the scaling configuration.
Volumes LaunchTemplateVolumeArrayInput
// The vpc id.
VpcId pulumi.StringPtrInput
// The zone id.
ZoneId pulumi.StringPtrInput
}
func (LaunchTemplateArgs) ElementType() reflect.Type {
return reflect.TypeOf((*launchTemplateArgs)(nil)).Elem()
}
type LaunchTemplateInput interface {
pulumi.Input
ToLaunchTemplateOutput() LaunchTemplateOutput
ToLaunchTemplateOutputWithContext(ctx context.Context) LaunchTemplateOutput
}
func (*LaunchTemplate) ElementType() reflect.Type {
return reflect.TypeOf((**LaunchTemplate)(nil)).Elem()
}
func (i *LaunchTemplate) ToLaunchTemplateOutput() LaunchTemplateOutput {
return i.ToLaunchTemplateOutputWithContext(context.Background())
}
func (i *LaunchTemplate) ToLaunchTemplateOutputWithContext(ctx context.Context) LaunchTemplateOutput {
return pulumi.ToOutputWithContext(ctx, i).(LaunchTemplateOutput)
}
// LaunchTemplateArrayInput is an input type that accepts LaunchTemplateArray and LaunchTemplateArrayOutput values.
// You can construct a concrete instance of `LaunchTemplateArrayInput` via:
//
// LaunchTemplateArray{ LaunchTemplateArgs{...} }
type LaunchTemplateArrayInput interface {
pulumi.Input
ToLaunchTemplateArrayOutput() LaunchTemplateArrayOutput
ToLaunchTemplateArrayOutputWithContext(context.Context) LaunchTemplateArrayOutput
}
type LaunchTemplateArray []LaunchTemplateInput
func (LaunchTemplateArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LaunchTemplate)(nil)).Elem()
}
func (i LaunchTemplateArray) ToLaunchTemplateArrayOutput() LaunchTemplateArrayOutput {
return i.ToLaunchTemplateArrayOutputWithContext(context.Background())
}
func (i LaunchTemplateArray) ToLaunchTemplateArrayOutputWithContext(ctx context.Context) LaunchTemplateArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(LaunchTemplateArrayOutput)
}
// LaunchTemplateMapInput is an input type that accepts LaunchTemplateMap and LaunchTemplateMapOutput values.
// You can construct a concrete instance of `LaunchTemplateMapInput` via:
//
// LaunchTemplateMap{ "key": LaunchTemplateArgs{...} }
type LaunchTemplateMapInput interface {
pulumi.Input
ToLaunchTemplateMapOutput() LaunchTemplateMapOutput
ToLaunchTemplateMapOutputWithContext(context.Context) LaunchTemplateMapOutput
}
type LaunchTemplateMap map[string]LaunchTemplateInput
func (LaunchTemplateMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LaunchTemplate)(nil)).Elem()
}
func (i LaunchTemplateMap) ToLaunchTemplateMapOutput() LaunchTemplateMapOutput {
return i.ToLaunchTemplateMapOutputWithContext(context.Background())
}
func (i LaunchTemplateMap) ToLaunchTemplateMapOutputWithContext(ctx context.Context) LaunchTemplateMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(LaunchTemplateMapOutput)
}
type LaunchTemplateOutput struct{ *pulumi.OutputState }
func (LaunchTemplateOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LaunchTemplate)(nil)).Elem()
}
func (o LaunchTemplateOutput) ToLaunchTemplateOutput() LaunchTemplateOutput {
return o
}
func (o LaunchTemplateOutput) ToLaunchTemplateOutputWithContext(ctx context.Context) LaunchTemplateOutput {
return o
}
// The description of the instance.
func (o LaunchTemplateOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// The EIP bandwidth which the scaling configuration set.
func (o LaunchTemplateOutput) EipBandwidth() pulumi.IntPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.IntPtrOutput { return v.EipBandwidth }).(pulumi.IntPtrOutput)
}
// The EIP billing type which the scaling configuration set. Valid values: PostPaidByBandwidth, PostPaidByTraffic.
func (o LaunchTemplateOutput) EipBillingType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.EipBillingType }).(pulumi.StringPtrOutput)
}
// The EIP ISP which the scaling configuration set. Valid values: BGP, ChinaMobile, ChinaUnicom, ChinaTelecom.
func (o LaunchTemplateOutput) EipIsp() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.EipIsp }).(pulumi.StringPtrOutput)
}
// The host name of the instance.
func (o LaunchTemplateOutput) HostName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.HostName }).(pulumi.StringPtrOutput)
}
// The hpc cluster id.
func (o LaunchTemplateOutput) HpcClusterId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.HpcClusterId }).(pulumi.StringPtrOutput)
}
// The image ID.
func (o LaunchTemplateOutput) ImageId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.ImageId }).(pulumi.StringPtrOutput)
}
// The charge type of the instance and volume.
func (o LaunchTemplateOutput) InstanceChargeType() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.InstanceChargeType }).(pulumi.StringPtrOutput)
}
// The name of the instance.
func (o LaunchTemplateOutput) InstanceName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.InstanceName }).(pulumi.StringPtrOutput)
}
// The compute type of the instance.
func (o LaunchTemplateOutput) InstanceTypeId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.InstanceTypeId }).(pulumi.StringPtrOutput)
}
// When you log in to the instance using the SSH key pair, enter the name of the key pair.
func (o LaunchTemplateOutput) KeyPairName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.KeyPairName }).(pulumi.StringPtrOutput)
}
// The launch template id.
func (o LaunchTemplateOutput) LaunchTemplateId() pulumi.StringOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringOutput { return v.LaunchTemplateId }).(pulumi.StringOutput)
}
// The name of the launch template.
func (o LaunchTemplateOutput) LaunchTemplateName() pulumi.StringOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringOutput { return v.LaunchTemplateName }).(pulumi.StringOutput)
}
// The list of network interfaces. When creating an instance, it is supported to bind auxiliary network cards at the same time. The first one is the primary network card, and the others are secondary network cards.
func (o LaunchTemplateOutput) NetworkInterfaces() LaunchTemplateNetworkInterfaceArrayOutput {
return o.ApplyT(func(v *LaunchTemplate) LaunchTemplateNetworkInterfaceArrayOutput { return v.NetworkInterfaces }).(LaunchTemplateNetworkInterfaceArrayOutput)
}
// Whether to open the security reinforcement.
func (o LaunchTemplateOutput) SecurityEnhancementStrategy() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.SecurityEnhancementStrategy }).(pulumi.StringPtrOutput)
}
// The index of the ordered suffix.
func (o LaunchTemplateOutput) SuffixIndex() pulumi.IntPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.IntPtrOutput { return v.SuffixIndex }).(pulumi.IntPtrOutput)
}
// Indicates whether the ordered suffix is automatically added to Hostname and InstanceName when multiple instances are created.
func (o LaunchTemplateOutput) UniqueSuffix() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.BoolPtrOutput { return v.UniqueSuffix }).(pulumi.BoolPtrOutput)
}
// Instance custom data. The set custom data must be Base64 encoded, and the size of the custom data before Base64 encoding cannot exceed 16KB.
func (o LaunchTemplateOutput) UserData() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.UserData }).(pulumi.StringPtrOutput)
}
// The latest version description of the launch template.
func (o LaunchTemplateOutput) VersionDescription() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.VersionDescription }).(pulumi.StringPtrOutput)
}
// The list of volume of the scaling configuration.
func (o LaunchTemplateOutput) Volumes() LaunchTemplateVolumeArrayOutput {
return o.ApplyT(func(v *LaunchTemplate) LaunchTemplateVolumeArrayOutput { return v.Volumes }).(LaunchTemplateVolumeArrayOutput)
}
// The vpc id.
func (o LaunchTemplateOutput) VpcId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.VpcId }).(pulumi.StringPtrOutput)
}
// The zone id.
func (o LaunchTemplateOutput) ZoneId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LaunchTemplate) pulumi.StringPtrOutput { return v.ZoneId }).(pulumi.StringPtrOutput)
}
type LaunchTemplateArrayOutput struct{ *pulumi.OutputState }
func (LaunchTemplateArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*LaunchTemplate)(nil)).Elem()
}
func (o LaunchTemplateArrayOutput) ToLaunchTemplateArrayOutput() LaunchTemplateArrayOutput {
return o
}
func (o LaunchTemplateArrayOutput) ToLaunchTemplateArrayOutputWithContext(ctx context.Context) LaunchTemplateArrayOutput {
return o
}
func (o LaunchTemplateArrayOutput) Index(i pulumi.IntInput) LaunchTemplateOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LaunchTemplate {
return vs[0].([]*LaunchTemplate)[vs[1].(int)]
}).(LaunchTemplateOutput)
}
type LaunchTemplateMapOutput struct{ *pulumi.OutputState }
func (LaunchTemplateMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*LaunchTemplate)(nil)).Elem()
}
func (o LaunchTemplateMapOutput) ToLaunchTemplateMapOutput() LaunchTemplateMapOutput {
return o
}
func (o LaunchTemplateMapOutput) ToLaunchTemplateMapOutputWithContext(ctx context.Context) LaunchTemplateMapOutput {
return o
}
func (o LaunchTemplateMapOutput) MapIndex(k pulumi.StringInput) LaunchTemplateOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LaunchTemplate {
return vs[0].(map[string]*LaunchTemplate)[vs[1].(string)]
}).(LaunchTemplateOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LaunchTemplateInput)(nil)).Elem(), &LaunchTemplate{})
pulumi.RegisterInputType(reflect.TypeOf((*LaunchTemplateArrayInput)(nil)).Elem(), LaunchTemplateArray{})
pulumi.RegisterInputType(reflect.TypeOf((*LaunchTemplateMapInput)(nil)).Elem(), LaunchTemplateMap{})
pulumi.RegisterOutputType(LaunchTemplateOutput{})
pulumi.RegisterOutputType(LaunchTemplateArrayOutput{})
pulumi.RegisterOutputType(LaunchTemplateMapOutput{})
}