-
Notifications
You must be signed in to change notification settings - Fork 5
/
eciScalingConfiguration.go
952 lines (870 loc) · 46.3 KB
/
eciScalingConfiguration.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
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
// 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 ess
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a ESS eci scaling configuration resource.
//
// For information about ess eci scaling configuration, see [CreateEciScalingConfiguration](https://www.alibabacloud.com/help/en/auto-scaling/latest/create-eci-scaling-configuration).
//
// > **NOTE:** Available since v1.164.0.
//
// ## Example Usage
//
// # Basic Usage
//
// ```go
// package main
//
// import (
//
// "fmt"
//
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ess"
// "github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
// "github.com/pulumi/pulumi-random/sdk/v4/go/random"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// cfg := config.New(ctx, "")
// name := "terraform-example"
// if param := cfg.Get("name"); param != "" {
// name = param
// }
// defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
// Min: 10000,
// Max: 99999,
// })
// if err != nil {
// return err
// }
// myName := fmt.Sprintf("%v-%v", name, defaultInteger.Result)
// _default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
// AvailableDiskCategory: pulumi.StringRef("cloud_efficiency"),
// AvailableResourceCreation: pulumi.StringRef("VSwitch"),
// }, nil)
// if err != nil {
// return err
// }
// defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
// VpcName: pulumi.String(myName),
// CidrBlock: pulumi.String("172.16.0.0/16"),
// })
// if err != nil {
// return err
// }
// defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
// VpcId: defaultNetwork.ID(),
// CidrBlock: pulumi.String("172.16.0.0/24"),
// ZoneId: pulumi.String(_default.Zones[0].Id),
// VswitchName: pulumi.String(myName),
// })
// if err != nil {
// return err
// }
// defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
// Name: pulumi.String(myName),
// VpcId: defaultNetwork.ID(),
// })
// if err != nil {
// return err
// }
// defaultScalingGroup, err := ess.NewScalingGroup(ctx, "default", &ess.ScalingGroupArgs{
// MinSize: pulumi.Int(0),
// MaxSize: pulumi.Int(1),
// ScalingGroupName: pulumi.String(myName),
// RemovalPolicies: pulumi.StringArray{
// pulumi.String("OldestInstance"),
// pulumi.String("NewestInstance"),
// },
// VswitchIds: pulumi.StringArray{
// defaultSwitch.ID(),
// },
// GroupType: pulumi.String("ECI"),
// })
// if err != nil {
// return err
// }
// _, err = ess.NewEciScalingConfiguration(ctx, "default", &ess.EciScalingConfigurationArgs{
// ScalingGroupId: defaultScalingGroup.ID(),
// Cpu: pulumi.Float64(2),
// Memory: pulumi.Float64(4),
// SecurityGroupId: defaultSecurityGroup.ID(),
// ForceDelete: pulumi.Bool(true),
// Active: pulumi.Bool(true),
// ContainerGroupName: pulumi.String("container-group-1649839595174"),
// Containers: ess.EciScalingConfigurationContainerArray{
// &ess.EciScalingConfigurationContainerArgs{
// Name: pulumi.String("container-1"),
// Image: pulumi.String("registry-vpc.cn-hangzhou.aliyuncs.com/eci_open/alpine:3.5"),
// },
// },
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
//
// ## Import
//
// ESS eci scaling configuration can be imported using the id, e.g.
//
// ```sh
// $ pulumi import alicloud:ess/eciScalingConfiguration:EciScalingConfiguration example asc-abc123456
// ```
type EciScalingConfiguration struct {
pulumi.CustomResourceState
// Information about the Container Registry Enterprise Edition instance. See `acrRegistryInfos` below for details.
AcrRegistryInfos EciScalingConfigurationAcrRegistryInfoArrayOutput `pulumi:"acrRegistryInfos"`
// Whether active current eci scaling configuration in the specified scaling group. Note that only
// one configuration can be active. Default to `false`.
Active pulumi.BoolPtrOutput `pulumi:"active"`
// The duration in seconds relative to the startTime that the job may be active before the system tries to terminate it.
ActiveDeadlineSeconds pulumi.IntPtrOutput `pulumi:"activeDeadlineSeconds"`
// Whether create eip automatically.
AutoCreateEip pulumi.BoolPtrOutput `pulumi:"autoCreateEip"`
// Whether to automatically match the image cache.
AutoMatchImageCache pulumi.BoolPtrOutput `pulumi:"autoMatchImageCache"`
// The name of the container group. which must contain 2-128 characters (
// English), starting with numbers, English lowercase letters , and can contain number, and hypens `-`.
ContainerGroupName pulumi.StringPtrOutput `pulumi:"containerGroupName"`
// The list of containers. See `containers` below for details.
Containers EciScalingConfigurationContainerArrayOutput `pulumi:"containers"`
// The amount of CPU resources allocated to the container group.
Cpu pulumi.Float64PtrOutput `pulumi:"cpu"`
// The description of data disk N. Valid values of N: 1 to 16. The description must be 2 to
// 256 characters in length and cannot start with http:// or https://.
Description pulumi.StringPtrOutput `pulumi:"description"`
// dns policy of contain group.
DnsPolicy pulumi.StringPtrOutput `pulumi:"dnsPolicy"`
// egress bandwidth.
EgressBandwidth pulumi.IntPtrOutput `pulumi:"egressBandwidth"`
// Eip bandwidth.
EipBandwidth pulumi.IntPtrOutput `pulumi:"eipBandwidth"`
// Enable sls log service.
EnableSls pulumi.BoolPtrOutput `pulumi:"enableSls"`
// The size of ephemeral storage.
EphemeralStorage pulumi.IntPtrOutput `pulumi:"ephemeralStorage"`
// The eci scaling configuration will be deleted forcibly with deleting its scaling group.
// Default to false.
ForceDelete pulumi.BoolPtrOutput `pulumi:"forceDelete"`
// HostAliases. See `hostAliases` below.
HostAliases EciScalingConfigurationHostAliasArrayOutput `pulumi:"hostAliases"`
// Hostname of an ECI instance.
HostName pulumi.StringPtrOutput `pulumi:"hostName"`
// The image registry credential. See `imageRegistryCredentials` below for
// details.
ImageRegistryCredentials EciScalingConfigurationImageRegistryCredentialArrayOutput `pulumi:"imageRegistryCredentials"`
// The ID of image cache.
ImageSnapshotId pulumi.StringPtrOutput `pulumi:"imageSnapshotId"`
// Ingress bandwidth.
IngressBandwidth pulumi.IntPtrOutput `pulumi:"ingressBandwidth"`
// The list of initContainers. See `initContainers` below for details.
InitContainers EciScalingConfigurationInitContainerArrayOutput `pulumi:"initContainers"`
// The specified ECS instance types. You can specify up to five ECS instance types.
InstanceTypes pulumi.StringArrayOutput `pulumi:"instanceTypes"`
// Number of IPv6 addresses.
Ipv6AddressCount pulumi.IntPtrOutput `pulumi:"ipv6AddressCount"`
// The weight of an ECI instance attached to the Server Group.
LoadBalancerWeight pulumi.IntPtrOutput `pulumi:"loadBalancerWeight"`
// The amount of memory resources allocated to the container group.
Memory pulumi.Float64PtrOutput `pulumi:"memory"`
// The RAM role that the container group assumes. ECI and ECS share the same RAM role.
RamRoleName pulumi.StringPtrOutput `pulumi:"ramRoleName"`
// ID of resource group.
ResourceGroupId pulumi.StringPtrOutput `pulumi:"resourceGroupId"`
// The restart policy of the container group. Default to `Always`.
RestartPolicy pulumi.StringPtrOutput `pulumi:"restartPolicy"`
// Name shown for the scheduled task. which must contain 2-64 characters (
// English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number,
// underscores `_`, hypens `-`, and decimal point `.`. If this parameter value is not specified, the default value is
// EciScalingConfigurationId.
ScalingConfigurationName pulumi.StringOutput `pulumi:"scalingConfigurationName"`
// ID of the scaling group of a eci scaling configuration.
ScalingGroupId pulumi.StringOutput `pulumi:"scalingGroupId"`
// ID of the security group used to create new instance. It is conflict
// with `securityGroupIds`.
SecurityGroupId pulumi.StringPtrOutput `pulumi:"securityGroupId"`
// The maximum price hourly for spot instance.
SpotPriceLimit pulumi.Float64PtrOutput `pulumi:"spotPriceLimit"`
// The spot strategy for a Pay-As-You-Go instance. Valid values: `NoSpot`, `SpotAsPriceGo`
// , `SpotWithPriceLimit`.
SpotStrategy pulumi.StringPtrOutput `pulumi:"spotStrategy"`
// A mapping of tags to assign to the resource. It will be applied for ECI instances finally.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "http://", or "https://". It cannot
// be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "http://", or "https://" It can be
// a null string.
Tags pulumi.MapOutput `pulumi:"tags"`
// The program's buffering time before closing.
TerminationGracePeriodSeconds pulumi.IntPtrOutput `pulumi:"terminationGracePeriodSeconds"`
// The list of volumes. See `volumes` below for details.
Volumes EciScalingConfigurationVolumeArrayOutput `pulumi:"volumes"`
}
// NewEciScalingConfiguration registers a new resource with the given unique name, arguments, and options.
func NewEciScalingConfiguration(ctx *pulumi.Context,
name string, args *EciScalingConfigurationArgs, opts ...pulumi.ResourceOption) (*EciScalingConfiguration, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.ScalingGroupId == nil {
return nil, errors.New("invalid value for required argument 'ScalingGroupId'")
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource EciScalingConfiguration
err := ctx.RegisterResource("alicloud:ess/eciScalingConfiguration:EciScalingConfiguration", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetEciScalingConfiguration gets an existing EciScalingConfiguration 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 GetEciScalingConfiguration(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *EciScalingConfigurationState, opts ...pulumi.ResourceOption) (*EciScalingConfiguration, error) {
var resource EciScalingConfiguration
err := ctx.ReadResource("alicloud:ess/eciScalingConfiguration:EciScalingConfiguration", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering EciScalingConfiguration resources.
type eciScalingConfigurationState struct {
// Information about the Container Registry Enterprise Edition instance. See `acrRegistryInfos` below for details.
AcrRegistryInfos []EciScalingConfigurationAcrRegistryInfo `pulumi:"acrRegistryInfos"`
// Whether active current eci scaling configuration in the specified scaling group. Note that only
// one configuration can be active. Default to `false`.
Active *bool `pulumi:"active"`
// The duration in seconds relative to the startTime that the job may be active before the system tries to terminate it.
ActiveDeadlineSeconds *int `pulumi:"activeDeadlineSeconds"`
// Whether create eip automatically.
AutoCreateEip *bool `pulumi:"autoCreateEip"`
// Whether to automatically match the image cache.
AutoMatchImageCache *bool `pulumi:"autoMatchImageCache"`
// The name of the container group. which must contain 2-128 characters (
// English), starting with numbers, English lowercase letters , and can contain number, and hypens `-`.
ContainerGroupName *string `pulumi:"containerGroupName"`
// The list of containers. See `containers` below for details.
Containers []EciScalingConfigurationContainer `pulumi:"containers"`
// The amount of CPU resources allocated to the container group.
Cpu *float64 `pulumi:"cpu"`
// The description of data disk N. Valid values of N: 1 to 16. The description must be 2 to
// 256 characters in length and cannot start with http:// or https://.
Description *string `pulumi:"description"`
// dns policy of contain group.
DnsPolicy *string `pulumi:"dnsPolicy"`
// egress bandwidth.
EgressBandwidth *int `pulumi:"egressBandwidth"`
// Eip bandwidth.
EipBandwidth *int `pulumi:"eipBandwidth"`
// Enable sls log service.
EnableSls *bool `pulumi:"enableSls"`
// The size of ephemeral storage.
EphemeralStorage *int `pulumi:"ephemeralStorage"`
// The eci scaling configuration will be deleted forcibly with deleting its scaling group.
// Default to false.
ForceDelete *bool `pulumi:"forceDelete"`
// HostAliases. See `hostAliases` below.
HostAliases []EciScalingConfigurationHostAlias `pulumi:"hostAliases"`
// Hostname of an ECI instance.
HostName *string `pulumi:"hostName"`
// The image registry credential. See `imageRegistryCredentials` below for
// details.
ImageRegistryCredentials []EciScalingConfigurationImageRegistryCredential `pulumi:"imageRegistryCredentials"`
// The ID of image cache.
ImageSnapshotId *string `pulumi:"imageSnapshotId"`
// Ingress bandwidth.
IngressBandwidth *int `pulumi:"ingressBandwidth"`
// The list of initContainers. See `initContainers` below for details.
InitContainers []EciScalingConfigurationInitContainer `pulumi:"initContainers"`
// The specified ECS instance types. You can specify up to five ECS instance types.
InstanceTypes []string `pulumi:"instanceTypes"`
// Number of IPv6 addresses.
Ipv6AddressCount *int `pulumi:"ipv6AddressCount"`
// The weight of an ECI instance attached to the Server Group.
LoadBalancerWeight *int `pulumi:"loadBalancerWeight"`
// The amount of memory resources allocated to the container group.
Memory *float64 `pulumi:"memory"`
// The RAM role that the container group assumes. ECI and ECS share the same RAM role.
RamRoleName *string `pulumi:"ramRoleName"`
// ID of resource group.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// The restart policy of the container group. Default to `Always`.
RestartPolicy *string `pulumi:"restartPolicy"`
// Name shown for the scheduled task. which must contain 2-64 characters (
// English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number,
// underscores `_`, hypens `-`, and decimal point `.`. If this parameter value is not specified, the default value is
// EciScalingConfigurationId.
ScalingConfigurationName *string `pulumi:"scalingConfigurationName"`
// ID of the scaling group of a eci scaling configuration.
ScalingGroupId *string `pulumi:"scalingGroupId"`
// ID of the security group used to create new instance. It is conflict
// with `securityGroupIds`.
SecurityGroupId *string `pulumi:"securityGroupId"`
// The maximum price hourly for spot instance.
SpotPriceLimit *float64 `pulumi:"spotPriceLimit"`
// The spot strategy for a Pay-As-You-Go instance. Valid values: `NoSpot`, `SpotAsPriceGo`
// , `SpotWithPriceLimit`.
SpotStrategy *string `pulumi:"spotStrategy"`
// A mapping of tags to assign to the resource. It will be applied for ECI instances finally.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "http://", or "https://". It cannot
// be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "http://", or "https://" It can be
// a null string.
Tags map[string]interface{} `pulumi:"tags"`
// The program's buffering time before closing.
TerminationGracePeriodSeconds *int `pulumi:"terminationGracePeriodSeconds"`
// The list of volumes. See `volumes` below for details.
Volumes []EciScalingConfigurationVolume `pulumi:"volumes"`
}
type EciScalingConfigurationState struct {
// Information about the Container Registry Enterprise Edition instance. See `acrRegistryInfos` below for details.
AcrRegistryInfos EciScalingConfigurationAcrRegistryInfoArrayInput
// Whether active current eci scaling configuration in the specified scaling group. Note that only
// one configuration can be active. Default to `false`.
Active pulumi.BoolPtrInput
// The duration in seconds relative to the startTime that the job may be active before the system tries to terminate it.
ActiveDeadlineSeconds pulumi.IntPtrInput
// Whether create eip automatically.
AutoCreateEip pulumi.BoolPtrInput
// Whether to automatically match the image cache.
AutoMatchImageCache pulumi.BoolPtrInput
// The name of the container group. which must contain 2-128 characters (
// English), starting with numbers, English lowercase letters , and can contain number, and hypens `-`.
ContainerGroupName pulumi.StringPtrInput
// The list of containers. See `containers` below for details.
Containers EciScalingConfigurationContainerArrayInput
// The amount of CPU resources allocated to the container group.
Cpu pulumi.Float64PtrInput
// The description of data disk N. Valid values of N: 1 to 16. The description must be 2 to
// 256 characters in length and cannot start with http:// or https://.
Description pulumi.StringPtrInput
// dns policy of contain group.
DnsPolicy pulumi.StringPtrInput
// egress bandwidth.
EgressBandwidth pulumi.IntPtrInput
// Eip bandwidth.
EipBandwidth pulumi.IntPtrInput
// Enable sls log service.
EnableSls pulumi.BoolPtrInput
// The size of ephemeral storage.
EphemeralStorage pulumi.IntPtrInput
// The eci scaling configuration will be deleted forcibly with deleting its scaling group.
// Default to false.
ForceDelete pulumi.BoolPtrInput
// HostAliases. See `hostAliases` below.
HostAliases EciScalingConfigurationHostAliasArrayInput
// Hostname of an ECI instance.
HostName pulumi.StringPtrInput
// The image registry credential. See `imageRegistryCredentials` below for
// details.
ImageRegistryCredentials EciScalingConfigurationImageRegistryCredentialArrayInput
// The ID of image cache.
ImageSnapshotId pulumi.StringPtrInput
// Ingress bandwidth.
IngressBandwidth pulumi.IntPtrInput
// The list of initContainers. See `initContainers` below for details.
InitContainers EciScalingConfigurationInitContainerArrayInput
// The specified ECS instance types. You can specify up to five ECS instance types.
InstanceTypes pulumi.StringArrayInput
// Number of IPv6 addresses.
Ipv6AddressCount pulumi.IntPtrInput
// The weight of an ECI instance attached to the Server Group.
LoadBalancerWeight pulumi.IntPtrInput
// The amount of memory resources allocated to the container group.
Memory pulumi.Float64PtrInput
// The RAM role that the container group assumes. ECI and ECS share the same RAM role.
RamRoleName pulumi.StringPtrInput
// ID of resource group.
ResourceGroupId pulumi.StringPtrInput
// The restart policy of the container group. Default to `Always`.
RestartPolicy pulumi.StringPtrInput
// Name shown for the scheduled task. which must contain 2-64 characters (
// English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number,
// underscores `_`, hypens `-`, and decimal point `.`. If this parameter value is not specified, the default value is
// EciScalingConfigurationId.
ScalingConfigurationName pulumi.StringPtrInput
// ID of the scaling group of a eci scaling configuration.
ScalingGroupId pulumi.StringPtrInput
// ID of the security group used to create new instance. It is conflict
// with `securityGroupIds`.
SecurityGroupId pulumi.StringPtrInput
// The maximum price hourly for spot instance.
SpotPriceLimit pulumi.Float64PtrInput
// The spot strategy for a Pay-As-You-Go instance. Valid values: `NoSpot`, `SpotAsPriceGo`
// , `SpotWithPriceLimit`.
SpotStrategy pulumi.StringPtrInput
// A mapping of tags to assign to the resource. It will be applied for ECI instances finally.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "http://", or "https://". It cannot
// be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "http://", or "https://" It can be
// a null string.
Tags pulumi.MapInput
// The program's buffering time before closing.
TerminationGracePeriodSeconds pulumi.IntPtrInput
// The list of volumes. See `volumes` below for details.
Volumes EciScalingConfigurationVolumeArrayInput
}
func (EciScalingConfigurationState) ElementType() reflect.Type {
return reflect.TypeOf((*eciScalingConfigurationState)(nil)).Elem()
}
type eciScalingConfigurationArgs struct {
// Information about the Container Registry Enterprise Edition instance. See `acrRegistryInfos` below for details.
AcrRegistryInfos []EciScalingConfigurationAcrRegistryInfo `pulumi:"acrRegistryInfos"`
// Whether active current eci scaling configuration in the specified scaling group. Note that only
// one configuration can be active. Default to `false`.
Active *bool `pulumi:"active"`
// The duration in seconds relative to the startTime that the job may be active before the system tries to terminate it.
ActiveDeadlineSeconds *int `pulumi:"activeDeadlineSeconds"`
// Whether create eip automatically.
AutoCreateEip *bool `pulumi:"autoCreateEip"`
// Whether to automatically match the image cache.
AutoMatchImageCache *bool `pulumi:"autoMatchImageCache"`
// The name of the container group. which must contain 2-128 characters (
// English), starting with numbers, English lowercase letters , and can contain number, and hypens `-`.
ContainerGroupName *string `pulumi:"containerGroupName"`
// The list of containers. See `containers` below for details.
Containers []EciScalingConfigurationContainer `pulumi:"containers"`
// The amount of CPU resources allocated to the container group.
Cpu *float64 `pulumi:"cpu"`
// The description of data disk N. Valid values of N: 1 to 16. The description must be 2 to
// 256 characters in length and cannot start with http:// or https://.
Description *string `pulumi:"description"`
// dns policy of contain group.
DnsPolicy *string `pulumi:"dnsPolicy"`
// egress bandwidth.
EgressBandwidth *int `pulumi:"egressBandwidth"`
// Eip bandwidth.
EipBandwidth *int `pulumi:"eipBandwidth"`
// Enable sls log service.
EnableSls *bool `pulumi:"enableSls"`
// The size of ephemeral storage.
EphemeralStorage *int `pulumi:"ephemeralStorage"`
// The eci scaling configuration will be deleted forcibly with deleting its scaling group.
// Default to false.
ForceDelete *bool `pulumi:"forceDelete"`
// HostAliases. See `hostAliases` below.
HostAliases []EciScalingConfigurationHostAlias `pulumi:"hostAliases"`
// Hostname of an ECI instance.
HostName *string `pulumi:"hostName"`
// The image registry credential. See `imageRegistryCredentials` below for
// details.
ImageRegistryCredentials []EciScalingConfigurationImageRegistryCredential `pulumi:"imageRegistryCredentials"`
// The ID of image cache.
ImageSnapshotId *string `pulumi:"imageSnapshotId"`
// Ingress bandwidth.
IngressBandwidth *int `pulumi:"ingressBandwidth"`
// The list of initContainers. See `initContainers` below for details.
InitContainers []EciScalingConfigurationInitContainer `pulumi:"initContainers"`
// The specified ECS instance types. You can specify up to five ECS instance types.
InstanceTypes []string `pulumi:"instanceTypes"`
// Number of IPv6 addresses.
Ipv6AddressCount *int `pulumi:"ipv6AddressCount"`
// The weight of an ECI instance attached to the Server Group.
LoadBalancerWeight *int `pulumi:"loadBalancerWeight"`
// The amount of memory resources allocated to the container group.
Memory *float64 `pulumi:"memory"`
// The RAM role that the container group assumes. ECI and ECS share the same RAM role.
RamRoleName *string `pulumi:"ramRoleName"`
// ID of resource group.
ResourceGroupId *string `pulumi:"resourceGroupId"`
// The restart policy of the container group. Default to `Always`.
RestartPolicy *string `pulumi:"restartPolicy"`
// Name shown for the scheduled task. which must contain 2-64 characters (
// English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number,
// underscores `_`, hypens `-`, and decimal point `.`. If this parameter value is not specified, the default value is
// EciScalingConfigurationId.
ScalingConfigurationName *string `pulumi:"scalingConfigurationName"`
// ID of the scaling group of a eci scaling configuration.
ScalingGroupId string `pulumi:"scalingGroupId"`
// ID of the security group used to create new instance. It is conflict
// with `securityGroupIds`.
SecurityGroupId *string `pulumi:"securityGroupId"`
// The maximum price hourly for spot instance.
SpotPriceLimit *float64 `pulumi:"spotPriceLimit"`
// The spot strategy for a Pay-As-You-Go instance. Valid values: `NoSpot`, `SpotAsPriceGo`
// , `SpotWithPriceLimit`.
SpotStrategy *string `pulumi:"spotStrategy"`
// A mapping of tags to assign to the resource. It will be applied for ECI instances finally.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "http://", or "https://". It cannot
// be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "http://", or "https://" It can be
// a null string.
Tags map[string]interface{} `pulumi:"tags"`
// The program's buffering time before closing.
TerminationGracePeriodSeconds *int `pulumi:"terminationGracePeriodSeconds"`
// The list of volumes. See `volumes` below for details.
Volumes []EciScalingConfigurationVolume `pulumi:"volumes"`
}
// The set of arguments for constructing a EciScalingConfiguration resource.
type EciScalingConfigurationArgs struct {
// Information about the Container Registry Enterprise Edition instance. See `acrRegistryInfos` below for details.
AcrRegistryInfos EciScalingConfigurationAcrRegistryInfoArrayInput
// Whether active current eci scaling configuration in the specified scaling group. Note that only
// one configuration can be active. Default to `false`.
Active pulumi.BoolPtrInput
// The duration in seconds relative to the startTime that the job may be active before the system tries to terminate it.
ActiveDeadlineSeconds pulumi.IntPtrInput
// Whether create eip automatically.
AutoCreateEip pulumi.BoolPtrInput
// Whether to automatically match the image cache.
AutoMatchImageCache pulumi.BoolPtrInput
// The name of the container group. which must contain 2-128 characters (
// English), starting with numbers, English lowercase letters , and can contain number, and hypens `-`.
ContainerGroupName pulumi.StringPtrInput
// The list of containers. See `containers` below for details.
Containers EciScalingConfigurationContainerArrayInput
// The amount of CPU resources allocated to the container group.
Cpu pulumi.Float64PtrInput
// The description of data disk N. Valid values of N: 1 to 16. The description must be 2 to
// 256 characters in length and cannot start with http:// or https://.
Description pulumi.StringPtrInput
// dns policy of contain group.
DnsPolicy pulumi.StringPtrInput
// egress bandwidth.
EgressBandwidth pulumi.IntPtrInput
// Eip bandwidth.
EipBandwidth pulumi.IntPtrInput
// Enable sls log service.
EnableSls pulumi.BoolPtrInput
// The size of ephemeral storage.
EphemeralStorage pulumi.IntPtrInput
// The eci scaling configuration will be deleted forcibly with deleting its scaling group.
// Default to false.
ForceDelete pulumi.BoolPtrInput
// HostAliases. See `hostAliases` below.
HostAliases EciScalingConfigurationHostAliasArrayInput
// Hostname of an ECI instance.
HostName pulumi.StringPtrInput
// The image registry credential. See `imageRegistryCredentials` below for
// details.
ImageRegistryCredentials EciScalingConfigurationImageRegistryCredentialArrayInput
// The ID of image cache.
ImageSnapshotId pulumi.StringPtrInput
// Ingress bandwidth.
IngressBandwidth pulumi.IntPtrInput
// The list of initContainers. See `initContainers` below for details.
InitContainers EciScalingConfigurationInitContainerArrayInput
// The specified ECS instance types. You can specify up to five ECS instance types.
InstanceTypes pulumi.StringArrayInput
// Number of IPv6 addresses.
Ipv6AddressCount pulumi.IntPtrInput
// The weight of an ECI instance attached to the Server Group.
LoadBalancerWeight pulumi.IntPtrInput
// The amount of memory resources allocated to the container group.
Memory pulumi.Float64PtrInput
// The RAM role that the container group assumes. ECI and ECS share the same RAM role.
RamRoleName pulumi.StringPtrInput
// ID of resource group.
ResourceGroupId pulumi.StringPtrInput
// The restart policy of the container group. Default to `Always`.
RestartPolicy pulumi.StringPtrInput
// Name shown for the scheduled task. which must contain 2-64 characters (
// English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number,
// underscores `_`, hypens `-`, and decimal point `.`. If this parameter value is not specified, the default value is
// EciScalingConfigurationId.
ScalingConfigurationName pulumi.StringPtrInput
// ID of the scaling group of a eci scaling configuration.
ScalingGroupId pulumi.StringInput
// ID of the security group used to create new instance. It is conflict
// with `securityGroupIds`.
SecurityGroupId pulumi.StringPtrInput
// The maximum price hourly for spot instance.
SpotPriceLimit pulumi.Float64PtrInput
// The spot strategy for a Pay-As-You-Go instance. Valid values: `NoSpot`, `SpotAsPriceGo`
// , `SpotWithPriceLimit`.
SpotStrategy pulumi.StringPtrInput
// A mapping of tags to assign to the resource. It will be applied for ECI instances finally.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "http://", or "https://". It cannot
// be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "http://", or "https://" It can be
// a null string.
Tags pulumi.MapInput
// The program's buffering time before closing.
TerminationGracePeriodSeconds pulumi.IntPtrInput
// The list of volumes. See `volumes` below for details.
Volumes EciScalingConfigurationVolumeArrayInput
}
func (EciScalingConfigurationArgs) ElementType() reflect.Type {
return reflect.TypeOf((*eciScalingConfigurationArgs)(nil)).Elem()
}
type EciScalingConfigurationInput interface {
pulumi.Input
ToEciScalingConfigurationOutput() EciScalingConfigurationOutput
ToEciScalingConfigurationOutputWithContext(ctx context.Context) EciScalingConfigurationOutput
}
func (*EciScalingConfiguration) ElementType() reflect.Type {
return reflect.TypeOf((**EciScalingConfiguration)(nil)).Elem()
}
func (i *EciScalingConfiguration) ToEciScalingConfigurationOutput() EciScalingConfigurationOutput {
return i.ToEciScalingConfigurationOutputWithContext(context.Background())
}
func (i *EciScalingConfiguration) ToEciScalingConfigurationOutputWithContext(ctx context.Context) EciScalingConfigurationOutput {
return pulumi.ToOutputWithContext(ctx, i).(EciScalingConfigurationOutput)
}
// EciScalingConfigurationArrayInput is an input type that accepts EciScalingConfigurationArray and EciScalingConfigurationArrayOutput values.
// You can construct a concrete instance of `EciScalingConfigurationArrayInput` via:
//
// EciScalingConfigurationArray{ EciScalingConfigurationArgs{...} }
type EciScalingConfigurationArrayInput interface {
pulumi.Input
ToEciScalingConfigurationArrayOutput() EciScalingConfigurationArrayOutput
ToEciScalingConfigurationArrayOutputWithContext(context.Context) EciScalingConfigurationArrayOutput
}
type EciScalingConfigurationArray []EciScalingConfigurationInput
func (EciScalingConfigurationArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EciScalingConfiguration)(nil)).Elem()
}
func (i EciScalingConfigurationArray) ToEciScalingConfigurationArrayOutput() EciScalingConfigurationArrayOutput {
return i.ToEciScalingConfigurationArrayOutputWithContext(context.Background())
}
func (i EciScalingConfigurationArray) ToEciScalingConfigurationArrayOutputWithContext(ctx context.Context) EciScalingConfigurationArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(EciScalingConfigurationArrayOutput)
}
// EciScalingConfigurationMapInput is an input type that accepts EciScalingConfigurationMap and EciScalingConfigurationMapOutput values.
// You can construct a concrete instance of `EciScalingConfigurationMapInput` via:
//
// EciScalingConfigurationMap{ "key": EciScalingConfigurationArgs{...} }
type EciScalingConfigurationMapInput interface {
pulumi.Input
ToEciScalingConfigurationMapOutput() EciScalingConfigurationMapOutput
ToEciScalingConfigurationMapOutputWithContext(context.Context) EciScalingConfigurationMapOutput
}
type EciScalingConfigurationMap map[string]EciScalingConfigurationInput
func (EciScalingConfigurationMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EciScalingConfiguration)(nil)).Elem()
}
func (i EciScalingConfigurationMap) ToEciScalingConfigurationMapOutput() EciScalingConfigurationMapOutput {
return i.ToEciScalingConfigurationMapOutputWithContext(context.Background())
}
func (i EciScalingConfigurationMap) ToEciScalingConfigurationMapOutputWithContext(ctx context.Context) EciScalingConfigurationMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(EciScalingConfigurationMapOutput)
}
type EciScalingConfigurationOutput struct{ *pulumi.OutputState }
func (EciScalingConfigurationOutput) ElementType() reflect.Type {
return reflect.TypeOf((**EciScalingConfiguration)(nil)).Elem()
}
func (o EciScalingConfigurationOutput) ToEciScalingConfigurationOutput() EciScalingConfigurationOutput {
return o
}
func (o EciScalingConfigurationOutput) ToEciScalingConfigurationOutputWithContext(ctx context.Context) EciScalingConfigurationOutput {
return o
}
// Information about the Container Registry Enterprise Edition instance. See `acrRegistryInfos` below for details.
func (o EciScalingConfigurationOutput) AcrRegistryInfos() EciScalingConfigurationAcrRegistryInfoArrayOutput {
return o.ApplyT(func(v *EciScalingConfiguration) EciScalingConfigurationAcrRegistryInfoArrayOutput {
return v.AcrRegistryInfos
}).(EciScalingConfigurationAcrRegistryInfoArrayOutput)
}
// Whether active current eci scaling configuration in the specified scaling group. Note that only
// one configuration can be active. Default to `false`.
func (o EciScalingConfigurationOutput) Active() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.BoolPtrOutput { return v.Active }).(pulumi.BoolPtrOutput)
}
// The duration in seconds relative to the startTime that the job may be active before the system tries to terminate it.
func (o EciScalingConfigurationOutput) ActiveDeadlineSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.IntPtrOutput { return v.ActiveDeadlineSeconds }).(pulumi.IntPtrOutput)
}
// Whether create eip automatically.
func (o EciScalingConfigurationOutput) AutoCreateEip() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.BoolPtrOutput { return v.AutoCreateEip }).(pulumi.BoolPtrOutput)
}
// Whether to automatically match the image cache.
func (o EciScalingConfigurationOutput) AutoMatchImageCache() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.BoolPtrOutput { return v.AutoMatchImageCache }).(pulumi.BoolPtrOutput)
}
// The name of the container group. which must contain 2-128 characters (
// English), starting with numbers, English lowercase letters , and can contain number, and hypens `-`.
func (o EciScalingConfigurationOutput) ContainerGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringPtrOutput { return v.ContainerGroupName }).(pulumi.StringPtrOutput)
}
// The list of containers. See `containers` below for details.
func (o EciScalingConfigurationOutput) Containers() EciScalingConfigurationContainerArrayOutput {
return o.ApplyT(func(v *EciScalingConfiguration) EciScalingConfigurationContainerArrayOutput { return v.Containers }).(EciScalingConfigurationContainerArrayOutput)
}
// The amount of CPU resources allocated to the container group.
func (o EciScalingConfigurationOutput) Cpu() pulumi.Float64PtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.Float64PtrOutput { return v.Cpu }).(pulumi.Float64PtrOutput)
}
// The description of data disk N. Valid values of N: 1 to 16. The description must be 2 to
// 256 characters in length and cannot start with http:// or https://.
func (o EciScalingConfigurationOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
}
// dns policy of contain group.
func (o EciScalingConfigurationOutput) DnsPolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringPtrOutput { return v.DnsPolicy }).(pulumi.StringPtrOutput)
}
// egress bandwidth.
func (o EciScalingConfigurationOutput) EgressBandwidth() pulumi.IntPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.IntPtrOutput { return v.EgressBandwidth }).(pulumi.IntPtrOutput)
}
// Eip bandwidth.
func (o EciScalingConfigurationOutput) EipBandwidth() pulumi.IntPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.IntPtrOutput { return v.EipBandwidth }).(pulumi.IntPtrOutput)
}
// Enable sls log service.
func (o EciScalingConfigurationOutput) EnableSls() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.BoolPtrOutput { return v.EnableSls }).(pulumi.BoolPtrOutput)
}
// The size of ephemeral storage.
func (o EciScalingConfigurationOutput) EphemeralStorage() pulumi.IntPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.IntPtrOutput { return v.EphemeralStorage }).(pulumi.IntPtrOutput)
}
// The eci scaling configuration will be deleted forcibly with deleting its scaling group.
// Default to false.
func (o EciScalingConfigurationOutput) ForceDelete() pulumi.BoolPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.BoolPtrOutput { return v.ForceDelete }).(pulumi.BoolPtrOutput)
}
// HostAliases. See `hostAliases` below.
func (o EciScalingConfigurationOutput) HostAliases() EciScalingConfigurationHostAliasArrayOutput {
return o.ApplyT(func(v *EciScalingConfiguration) EciScalingConfigurationHostAliasArrayOutput { return v.HostAliases }).(EciScalingConfigurationHostAliasArrayOutput)
}
// Hostname of an ECI instance.
func (o EciScalingConfigurationOutput) HostName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringPtrOutput { return v.HostName }).(pulumi.StringPtrOutput)
}
// The image registry credential. See `imageRegistryCredentials` below for
// details.
func (o EciScalingConfigurationOutput) ImageRegistryCredentials() EciScalingConfigurationImageRegistryCredentialArrayOutput {
return o.ApplyT(func(v *EciScalingConfiguration) EciScalingConfigurationImageRegistryCredentialArrayOutput {
return v.ImageRegistryCredentials
}).(EciScalingConfigurationImageRegistryCredentialArrayOutput)
}
// The ID of image cache.
func (o EciScalingConfigurationOutput) ImageSnapshotId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringPtrOutput { return v.ImageSnapshotId }).(pulumi.StringPtrOutput)
}
// Ingress bandwidth.
func (o EciScalingConfigurationOutput) IngressBandwidth() pulumi.IntPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.IntPtrOutput { return v.IngressBandwidth }).(pulumi.IntPtrOutput)
}
// The list of initContainers. See `initContainers` below for details.
func (o EciScalingConfigurationOutput) InitContainers() EciScalingConfigurationInitContainerArrayOutput {
return o.ApplyT(func(v *EciScalingConfiguration) EciScalingConfigurationInitContainerArrayOutput {
return v.InitContainers
}).(EciScalingConfigurationInitContainerArrayOutput)
}
// The specified ECS instance types. You can specify up to five ECS instance types.
func (o EciScalingConfigurationOutput) InstanceTypes() pulumi.StringArrayOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringArrayOutput { return v.InstanceTypes }).(pulumi.StringArrayOutput)
}
// Number of IPv6 addresses.
func (o EciScalingConfigurationOutput) Ipv6AddressCount() pulumi.IntPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.IntPtrOutput { return v.Ipv6AddressCount }).(pulumi.IntPtrOutput)
}
// The weight of an ECI instance attached to the Server Group.
func (o EciScalingConfigurationOutput) LoadBalancerWeight() pulumi.IntPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.IntPtrOutput { return v.LoadBalancerWeight }).(pulumi.IntPtrOutput)
}
// The amount of memory resources allocated to the container group.
func (o EciScalingConfigurationOutput) Memory() pulumi.Float64PtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.Float64PtrOutput { return v.Memory }).(pulumi.Float64PtrOutput)
}
// The RAM role that the container group assumes. ECI and ECS share the same RAM role.
func (o EciScalingConfigurationOutput) RamRoleName() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringPtrOutput { return v.RamRoleName }).(pulumi.StringPtrOutput)
}
// ID of resource group.
func (o EciScalingConfigurationOutput) ResourceGroupId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringPtrOutput { return v.ResourceGroupId }).(pulumi.StringPtrOutput)
}
// The restart policy of the container group. Default to `Always`.
func (o EciScalingConfigurationOutput) RestartPolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringPtrOutput { return v.RestartPolicy }).(pulumi.StringPtrOutput)
}
// Name shown for the scheduled task. which must contain 2-64 characters (
// English or Chinese), starting with numbers, English letters or Chinese characters, and can contain number,
// underscores `_`, hypens `-`, and decimal point `.`. If this parameter value is not specified, the default value is
// EciScalingConfigurationId.
func (o EciScalingConfigurationOutput) ScalingConfigurationName() pulumi.StringOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringOutput { return v.ScalingConfigurationName }).(pulumi.StringOutput)
}
// ID of the scaling group of a eci scaling configuration.
func (o EciScalingConfigurationOutput) ScalingGroupId() pulumi.StringOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringOutput { return v.ScalingGroupId }).(pulumi.StringOutput)
}
// ID of the security group used to create new instance. It is conflict
// with `securityGroupIds`.
func (o EciScalingConfigurationOutput) SecurityGroupId() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringPtrOutput { return v.SecurityGroupId }).(pulumi.StringPtrOutput)
}
// The maximum price hourly for spot instance.
func (o EciScalingConfigurationOutput) SpotPriceLimit() pulumi.Float64PtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.Float64PtrOutput { return v.SpotPriceLimit }).(pulumi.Float64PtrOutput)
}
// The spot strategy for a Pay-As-You-Go instance. Valid values: `NoSpot`, `SpotAsPriceGo`
// , `SpotWithPriceLimit`.
func (o EciScalingConfigurationOutput) SpotStrategy() pulumi.StringPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.StringPtrOutput { return v.SpotStrategy }).(pulumi.StringPtrOutput)
}
// A mapping of tags to assign to the resource. It will be applied for ECI instances finally.
// - Key: It can be up to 64 characters in length. It cannot begin with "aliyun", "http://", or "https://". It cannot
// be a null string.
// - Value: It can be up to 128 characters in length. It cannot begin with "aliyun", "http://", or "https://" It can be
// a null string.
func (o EciScalingConfigurationOutput) Tags() pulumi.MapOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.MapOutput { return v.Tags }).(pulumi.MapOutput)
}
// The program's buffering time before closing.
func (o EciScalingConfigurationOutput) TerminationGracePeriodSeconds() pulumi.IntPtrOutput {
return o.ApplyT(func(v *EciScalingConfiguration) pulumi.IntPtrOutput { return v.TerminationGracePeriodSeconds }).(pulumi.IntPtrOutput)
}
// The list of volumes. See `volumes` below for details.
func (o EciScalingConfigurationOutput) Volumes() EciScalingConfigurationVolumeArrayOutput {
return o.ApplyT(func(v *EciScalingConfiguration) EciScalingConfigurationVolumeArrayOutput { return v.Volumes }).(EciScalingConfigurationVolumeArrayOutput)
}
type EciScalingConfigurationArrayOutput struct{ *pulumi.OutputState }
func (EciScalingConfigurationArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*EciScalingConfiguration)(nil)).Elem()
}
func (o EciScalingConfigurationArrayOutput) ToEciScalingConfigurationArrayOutput() EciScalingConfigurationArrayOutput {
return o
}
func (o EciScalingConfigurationArrayOutput) ToEciScalingConfigurationArrayOutputWithContext(ctx context.Context) EciScalingConfigurationArrayOutput {
return o
}
func (o EciScalingConfigurationArrayOutput) Index(i pulumi.IntInput) EciScalingConfigurationOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EciScalingConfiguration {
return vs[0].([]*EciScalingConfiguration)[vs[1].(int)]
}).(EciScalingConfigurationOutput)
}
type EciScalingConfigurationMapOutput struct{ *pulumi.OutputState }
func (EciScalingConfigurationMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*EciScalingConfiguration)(nil)).Elem()
}
func (o EciScalingConfigurationMapOutput) ToEciScalingConfigurationMapOutput() EciScalingConfigurationMapOutput {
return o
}
func (o EciScalingConfigurationMapOutput) ToEciScalingConfigurationMapOutputWithContext(ctx context.Context) EciScalingConfigurationMapOutput {
return o
}
func (o EciScalingConfigurationMapOutput) MapIndex(k pulumi.StringInput) EciScalingConfigurationOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EciScalingConfiguration {
return vs[0].(map[string]*EciScalingConfiguration)[vs[1].(string)]
}).(EciScalingConfigurationOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*EciScalingConfigurationInput)(nil)).Elem(), &EciScalingConfiguration{})
pulumi.RegisterInputType(reflect.TypeOf((*EciScalingConfigurationArrayInput)(nil)).Elem(), EciScalingConfigurationArray{})
pulumi.RegisterInputType(reflect.TypeOf((*EciScalingConfigurationMapInput)(nil)).Elem(), EciScalingConfigurationMap{})
pulumi.RegisterOutputType(EciScalingConfigurationOutput{})
pulumi.RegisterOutputType(EciScalingConfigurationArrayOutput{})
pulumi.RegisterOutputType(EciScalingConfigurationMapOutput{})
}