-
Notifications
You must be signed in to change notification settings - Fork 623
/
api_types.go
2041 lines (1714 loc) · 73.2 KB
/
api_types.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
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package autoscaling
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
var _ aws.Config
var _ = awsutil.Prettify
// Describes scaling activity, which is a long-running process that represents
// a change to your Auto Scaling group, such as changing its size or replacing
// an instance.
type Activity struct {
_ struct{} `type:"structure"`
// The ID of the activity.
//
// ActivityId is a required field
ActivityId *string `type:"string" required:"true"`
// The name of the Auto Scaling group.
//
// AutoScalingGroupName is a required field
AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
// The reason the activity began.
//
// Cause is a required field
Cause *string `min:"1" type:"string" required:"true"`
// A friendly, more verbose description of the activity.
Description *string `type:"string"`
// The details about the activity.
Details *string `type:"string"`
// The end time of the activity.
EndTime *time.Time `type:"timestamp"`
// A value between 0 and 100 that indicates the progress of the activity.
Progress *int64 `type:"integer"`
// The start time of the activity.
//
// StartTime is a required field
StartTime *time.Time `type:"timestamp" required:"true"`
// The current status of the activity.
//
// StatusCode is a required field
StatusCode ScalingActivityStatusCode `type:"string" required:"true" enum:"true"`
// A friendly, more verbose description of the activity status.
StatusMessage *string `min:"1" type:"string"`
}
// String returns the string representation
func (s Activity) String() string {
return awsutil.Prettify(s)
}
// Describes a policy adjustment type.
type AdjustmentType struct {
_ struct{} `type:"structure"`
// The policy adjustment type. The valid values are ChangeInCapacity, ExactCapacity,
// and PercentChangeInCapacity.
AdjustmentType *string `min:"1" type:"string"`
}
// String returns the string representation
func (s AdjustmentType) String() string {
return awsutil.Prettify(s)
}
// Describes an alarm.
type Alarm struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the alarm.
AlarmARN *string `min:"1" type:"string"`
// The name of the alarm.
AlarmName *string `min:"1" type:"string"`
}
// String returns the string representation
func (s Alarm) String() string {
return awsutil.Prettify(s)
}
// Describes an Auto Scaling group.
type AutoScalingGroup struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the Auto Scaling group.
AutoScalingGroupARN *string `min:"1" type:"string"`
// The name of the Auto Scaling group.
//
// AutoScalingGroupName is a required field
AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
// One or more Availability Zones for the group.
//
// AvailabilityZones is a required field
AvailabilityZones []string `min:"1" type:"list" required:"true"`
// The date and time the group was created.
//
// CreatedTime is a required field
CreatedTime *time.Time `type:"timestamp" required:"true"`
// The duration of the default cooldown period, in seconds.
//
// DefaultCooldown is a required field
DefaultCooldown *int64 `type:"integer" required:"true"`
// The desired size of the group.
//
// DesiredCapacity is a required field
DesiredCapacity *int64 `type:"integer" required:"true"`
// The metrics enabled for the group.
EnabledMetrics []EnabledMetric `type:"list"`
// The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before
// checking the health status of an EC2 instance that has come into service.
HealthCheckGracePeriod *int64 `type:"integer"`
// The service to use for the health checks. The valid values are EC2 and ELB.
// If you configure an Auto Scaling group to use ELB health checks, it considers
// the instance unhealthy if it fails either the EC2 status checks or the load
// balancer health checks.
//
// HealthCheckType is a required field
HealthCheckType *string `min:"1" type:"string" required:"true"`
// The EC2 instances associated with the group.
Instances []Instance `type:"list"`
// The name of the associated launch configuration.
LaunchConfigurationName *string `min:"1" type:"string"`
// The launch template for the group.
LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
// One or more load balancers associated with the group.
LoadBalancerNames []string `type:"list"`
// The maximum amount of time, in seconds, that an instance can be in service.
//
// Valid Range: Minimum value of 0.
MaxInstanceLifetime *int64 `type:"integer"`
// The maximum size of the group.
//
// MaxSize is a required field
MaxSize *int64 `type:"integer" required:"true"`
// The minimum size of the group.
//
// MinSize is a required field
MinSize *int64 `type:"integer" required:"true"`
// The mixed instances policy for the group.
MixedInstancesPolicy *MixedInstancesPolicy `type:"structure"`
// Indicates whether newly launched instances are protected from termination
// by Amazon EC2 Auto Scaling when scaling in.
NewInstancesProtectedFromScaleIn *bool `type:"boolean"`
// The name of the placement group into which to launch your instances, if any.
PlacementGroup *string `min:"1" type:"string"`
// The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling
// group uses to call other AWS services on your behalf.
ServiceLinkedRoleARN *string `min:"1" type:"string"`
// The current state of the group when the DeleteAutoScalingGroup operation
// is in progress.
Status *string `min:"1" type:"string"`
// The suspended processes associated with the group.
SuspendedProcesses []SuspendedProcess `type:"list"`
// The tags for the group.
Tags []TagDescription `type:"list"`
// The Amazon Resource Names (ARN) of the target groups for your load balancer.
TargetGroupARNs []string `type:"list"`
// The termination policies for the group.
TerminationPolicies []string `type:"list"`
// One or more subnet IDs, if applicable, separated by commas.
VPCZoneIdentifier *string `min:"1" type:"string"`
}
// String returns the string representation
func (s AutoScalingGroup) String() string {
return awsutil.Prettify(s)
}
// Describes an EC2 instance associated with an Auto Scaling group.
type AutoScalingInstanceDetails struct {
_ struct{} `type:"structure"`
// The name of the Auto Scaling group for the instance.
//
// AutoScalingGroupName is a required field
AutoScalingGroupName *string `min:"1" type:"string" required:"true"`
// The Availability Zone for the instance.
//
// AvailabilityZone is a required field
AvailabilityZone *string `min:"1" type:"string" required:"true"`
// The last reported health status of this instance. "Healthy" means that the
// instance is healthy and should remain in service. "Unhealthy" means that
// the instance is unhealthy and Amazon EC2 Auto Scaling should terminate and
// replace it.
//
// HealthStatus is a required field
HealthStatus *string `min:"1" type:"string" required:"true"`
// The ID of the instance.
//
// InstanceId is a required field
InstanceId *string `min:"1" type:"string" required:"true"`
// The instance type of the EC2 instance.
InstanceType *string `min:"1" type:"string"`
// The launch configuration used to launch the instance. This value is not available
// if you attached the instance to the Auto Scaling group.
LaunchConfigurationName *string `min:"1" type:"string"`
// The launch template for the instance.
LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
// The lifecycle state for the instance.
//
// LifecycleState is a required field
LifecycleState *string `min:"1" type:"string" required:"true"`
// Indicates whether the instance is protected from termination by Amazon EC2
// Auto Scaling when scaling in.
//
// ProtectedFromScaleIn is a required field
ProtectedFromScaleIn *bool `type:"boolean" required:"true"`
// The number of capacity units contributed by the instance based on its instance
// type.
//
// Valid Range: Minimum value of 1. Maximum value of 999.
WeightedCapacity *string `min:"1" type:"string"`
}
// String returns the string representation
func (s AutoScalingInstanceDetails) String() string {
return awsutil.Prettify(s)
}
// Describes a block device mapping.
type BlockDeviceMapping struct {
_ struct{} `type:"structure"`
// The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh).
// For more information, see Device Naming on Linux Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html)
// in the Amazon EC2 User Guide for Linux Instances.
//
// DeviceName is a required field
DeviceName *string `min:"1" type:"string" required:"true"`
// Parameters used to automatically set up EBS volumes when an instance is launched.
//
// You can specify either VirtualName or Ebs, but not both.
Ebs *Ebs `type:"structure"`
// Setting this value to true suppresses the specified device included in the
// block device mapping of the AMI.
//
// If NoDevice is true for the root device, instances might fail the EC2 health
// check. In that case, Amazon EC2 Auto Scaling launches replacement instances.
//
// If you specify NoDevice, you cannot specify Ebs.
NoDevice *bool `type:"boolean"`
// The name of the virtual device (for example, ephemeral0).
//
// You can specify either VirtualName or Ebs, but not both.
VirtualName *string `min:"1" type:"string"`
}
// String returns the string representation
func (s BlockDeviceMapping) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *BlockDeviceMapping) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "BlockDeviceMapping"}
if s.DeviceName == nil {
invalidParams.Add(aws.NewErrParamRequired("DeviceName"))
}
if s.DeviceName != nil && len(*s.DeviceName) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("DeviceName", 1))
}
if s.VirtualName != nil && len(*s.VirtualName) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("VirtualName", 1))
}
if s.Ebs != nil {
if err := s.Ebs.Validate(); err != nil {
invalidParams.AddNested("Ebs", err.(aws.ErrInvalidParams))
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Represents a CloudWatch metric of your choosing for a target tracking scaling
// policy to use with Amazon EC2 Auto Scaling.
//
// To create your customized metric specification:
//
// * Add values for each required parameter from CloudWatch. You can use
// an existing metric, or a new metric that you create. To use your own metric,
// you must first publish the metric to CloudWatch. For more information,
// see Publish Custom Metrics (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html)
// in the Amazon CloudWatch User Guide.
//
// * Choose a metric that changes proportionally with capacity. The value
// of the metric should increase or decrease in inverse proportion to the
// number of capacity units. That is, the value of the metric should decrease
// when capacity increases.
//
// For more information about CloudWatch, see Amazon CloudWatch Concepts (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html).
type CustomizedMetricSpecification struct {
_ struct{} `type:"structure"`
// The dimensions of the metric.
//
// Conditional: If you published your metric with dimensions, you must specify
// the same dimensions in your scaling policy.
Dimensions []MetricDimension `type:"list"`
// The name of the metric.
//
// MetricName is a required field
MetricName *string `type:"string" required:"true"`
// The namespace of the metric.
//
// Namespace is a required field
Namespace *string `type:"string" required:"true"`
// The statistic of the metric.
//
// Statistic is a required field
Statistic MetricStatistic `type:"string" required:"true" enum:"true"`
// The unit of the metric.
Unit *string `type:"string"`
}
// String returns the string representation
func (s CustomizedMetricSpecification) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CustomizedMetricSpecification) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "CustomizedMetricSpecification"}
if s.MetricName == nil {
invalidParams.Add(aws.NewErrParamRequired("MetricName"))
}
if s.Namespace == nil {
invalidParams.Add(aws.NewErrParamRequired("Namespace"))
}
if len(s.Statistic) == 0 {
invalidParams.Add(aws.NewErrParamRequired("Statistic"))
}
if s.Dimensions != nil {
for i, v := range s.Dimensions {
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Dimensions", i), err.(aws.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Describes information used to set up an Amazon EBS volume specified in a
// block device mapping.
type Ebs struct {
_ struct{} `type:"structure"`
// Indicates whether the volume is deleted on instance termination. For Amazon
// EC2 Auto Scaling, the default value is true.
DeleteOnTermination *bool `type:"boolean"`
// Specifies whether the volume should be encrypted. Encrypted EBS volumes can
// only be attached to instances that support Amazon EBS encryption. For more
// information, see Supported Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances).
// If your AMI uses encrypted volumes, you can also only launch it on supported
// instance types.
//
// If you are creating a volume from a snapshot, you cannot specify an encryption
// value. Volumes that are created from encrypted snapshots are automatically
// encrypted, and volumes that are created from unencrypted snapshots are automatically
// unencrypted. By default, encrypted snapshots use the AWS managed CMK that
// is used for EBS encryption, but you can specify a custom CMK when you create
// the snapshot. The ability to encrypt a snapshot during copying also allows
// you to apply a new CMK to an already-encrypted snapshot. Volumes restored
// from the resulting copy are only accessible using the new CMK.
//
// Enabling encryption by default (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default)
// results in all EBS volumes being encrypted with the AWS managed CMK or a
// customer managed CMK, whether or not the snapshot was encrypted.
//
// For more information, see Using Encryption with EBS-Backed AMIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html)
// in the Amazon EC2 User Guide for Linux Instances and Required CMK Key Policy
// for Use with Encrypted Volumes (https://docs.aws.amazon.com/autoscaling/ec2/userguide/key-policy-requirements-EBS-encryption.html)
// in the Amazon EC2 Auto Scaling User Guide.
Encrypted *bool `type:"boolean"`
// The number of I/O operations per second (IOPS) to provision for the volume.
// The maximum ratio of IOPS to volume size (in GiB) is 50:1. For more information,
// see Amazon EBS Volume Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)
// in the Amazon EC2 User Guide for Linux Instances.
//
// Required when the volume type is io1. (Not used with standard, gp2, st1,
// or sc1 volumes.)
Iops *int64 `min:"100" type:"integer"`
// The snapshot ID of the volume to use.
//
// You must specify either a VolumeSize or a SnapshotId.
SnapshotId *string `min:"1" type:"string"`
// The volume size, in Gibibytes (GiB).
//
// This can be a number from 1-1,024 for standard, 4-16,384 for io1, 1-16,384
// for gp2, and 500-16,384 for st1 and sc1. If you specify a snapshot, the volume
// size must be equal to or larger than the snapshot size.
//
// Default: If you create a volume from a snapshot and you don't specify a volume
// size, the default is the snapshot size.
//
// You must specify either a VolumeSize or a SnapshotId. If you specify both
// SnapshotId and VolumeSize, the volume size must be equal or greater than
// the size of the snapshot.
VolumeSize *int64 `min:"1" type:"integer"`
// The volume type, which can be standard for Magnetic, io1 for Provisioned
// IOPS SSD, gp2 for General Purpose SSD, st1 for Throughput Optimized HDD,
// or sc1 for Cold HDD. For more information, see Amazon EBS Volume Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html)
// in the Amazon EC2 User Guide for Linux Instances.
//
// Valid Values: standard | io1 | gp2 | st1 | sc1
VolumeType *string `min:"1" type:"string"`
}
// String returns the string representation
func (s Ebs) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Ebs) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "Ebs"}
if s.Iops != nil && *s.Iops < 100 {
invalidParams.Add(aws.NewErrParamMinValue("Iops", 100))
}
if s.SnapshotId != nil && len(*s.SnapshotId) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("SnapshotId", 1))
}
if s.VolumeSize != nil && *s.VolumeSize < 1 {
invalidParams.Add(aws.NewErrParamMinValue("VolumeSize", 1))
}
if s.VolumeType != nil && len(*s.VolumeType) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("VolumeType", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Describes an enabled metric.
type EnabledMetric struct {
_ struct{} `type:"structure"`
// The granularity of the metric. The only valid value is 1Minute.
Granularity *string `min:"1" type:"string"`
// One of the following metrics:
//
// * GroupMinSize
//
// * GroupMaxSize
//
// * GroupDesiredCapacity
//
// * GroupInServiceInstances
//
// * GroupPendingInstances
//
// * GroupStandbyInstances
//
// * GroupTerminatingInstances
//
// * GroupTotalInstances
//
// * GroupInServiceCapacity
//
// * GroupPendingCapacity
//
// * GroupStandbyCapacity
//
// * GroupTerminatingCapacity
//
// * GroupTotalCapacity
Metric *string `min:"1" type:"string"`
}
// String returns the string representation
func (s EnabledMetric) String() string {
return awsutil.Prettify(s)
}
// Describes a scheduled action that could not be created, updated, or deleted.
type FailedScheduledUpdateGroupActionRequest struct {
_ struct{} `type:"structure"`
// The error code.
ErrorCode *string `min:"1" type:"string"`
// The error message accompanying the error code.
ErrorMessage *string `type:"string"`
// The name of the scheduled action.
//
// ScheduledActionName is a required field
ScheduledActionName *string `min:"1" type:"string" required:"true"`
}
// String returns the string representation
func (s FailedScheduledUpdateGroupActionRequest) String() string {
return awsutil.Prettify(s)
}
// Describes a filter that is used to return a more specific list of results
// when describing tags.
//
// For more information, see Tagging Auto Scaling Groups and Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-tagging.html)
// in the Amazon EC2 Auto Scaling User Guide.
type Filter struct {
_ struct{} `type:"structure"`
// The name of the filter. The valid values are: auto-scaling-group, key, value,
// and propagate-at-launch.
Name *string `type:"string"`
// One or more filter values. Filter values are case-sensitive.
Values []string `type:"list"`
}
// String returns the string representation
func (s Filter) String() string {
return awsutil.Prettify(s)
}
// Describes an EC2 instance.
type Instance struct {
_ struct{} `type:"structure"`
// The Availability Zone in which the instance is running.
//
// AvailabilityZone is a required field
AvailabilityZone *string `min:"1" type:"string" required:"true"`
// The last reported health status of the instance. "Healthy" means that the
// instance is healthy and should remain in service. "Unhealthy" means that
// the instance is unhealthy and that Amazon EC2 Auto Scaling should terminate
// and replace it.
//
// HealthStatus is a required field
HealthStatus *string `min:"1" type:"string" required:"true"`
// The ID of the instance.
//
// InstanceId is a required field
InstanceId *string `min:"1" type:"string" required:"true"`
// The instance type of the EC2 instance.
InstanceType *string `min:"1" type:"string"`
// The launch configuration associated with the instance.
LaunchConfigurationName *string `min:"1" type:"string"`
// The launch template for the instance.
LaunchTemplate *LaunchTemplateSpecification `type:"structure"`
// A description of the current lifecycle state. The Quarantined state is not
// used.
//
// LifecycleState is a required field
LifecycleState LifecycleState `type:"string" required:"true" enum:"true"`
// Indicates whether the instance is protected from termination by Amazon EC2
// Auto Scaling when scaling in.
//
// ProtectedFromScaleIn is a required field
ProtectedFromScaleIn *bool `type:"boolean" required:"true"`
// The number of capacity units contributed by the instance based on its instance
// type.
//
// Valid Range: Minimum value of 1. Maximum value of 999.
WeightedCapacity *string `min:"1" type:"string"`
}
// String returns the string representation
func (s Instance) String() string {
return awsutil.Prettify(s)
}
// Describes whether detailed monitoring is enabled for the Auto Scaling instances.
type InstanceMonitoring struct {
_ struct{} `type:"structure"`
// If true, detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
Enabled *bool `type:"boolean"`
}
// String returns the string representation
func (s InstanceMonitoring) String() string {
return awsutil.Prettify(s)
}
// Describes an instance refresh for an Auto Scaling group.
type InstanceRefresh struct {
_ struct{} `type:"structure"`
// The name of the Auto Scaling group.
AutoScalingGroupName *string `min:"1" type:"string"`
// The date and time at which the instance refresh ended.
EndTime *time.Time `type:"timestamp"`
// The instance refresh ID.
InstanceRefreshId *string `min:"1" type:"string"`
// The number of instances remaining to update before the instance refresh is
// complete.
InstancesToUpdate *int64 `type:"integer"`
// The percentage of the instance refresh that is complete. For each instance
// replacement, Amazon EC2 Auto Scaling tracks the instance's health status
// and warm-up time. When the instance's health status changes to healthy and
// the specified warm-up time passes, the instance is considered updated and
// added to the percentage complete.
PercentageComplete *int64 `type:"integer"`
// The date and time at which the instance refresh began.
StartTime *time.Time `type:"timestamp"`
// The current status for the instance refresh operation:
//
// * Pending - The request was created, but the operation has not started.
//
// * InProgress - The operation is in progress.
//
// * Successful - The operation completed successfully.
//
// * Failed - The operation failed to complete. You can troubleshoot using
// the status reason and the scaling activities.
//
// * Cancelling - An ongoing operation is being cancelled. Cancellation does
// not roll back any replacements that have already been completed, but it
// prevents new replacements from being started.
//
// * Cancelled - The operation is cancelled.
Status InstanceRefreshStatus `type:"string" enum:"true"`
// Provides more details about the current status of the instance refresh.
StatusReason *string `min:"1" type:"string"`
}
// String returns the string representation
func (s InstanceRefresh) String() string {
return awsutil.Prettify(s)
}
// Describes an instances distribution for an Auto Scaling group with a MixedInstancesPolicy.
//
// The instances distribution specifies the distribution of On-Demand Instances
// and Spot Instances, the maximum price to pay for Spot Instances, and how
// the Auto Scaling group allocates instance types to fulfill On-Demand and
// Spot capacity.
//
// When you update SpotAllocationStrategy, SpotInstancePools, or SpotMaxPrice,
// this update action does not deploy any changes across the running Amazon
// EC2 instances in the group. Your existing Spot Instances continue to run
// as long as the maximum price for those instances is higher than the current
// Spot price. When scale out occurs, Amazon EC2 Auto Scaling launches instances
// based on the new settings. When scale in occurs, Amazon EC2 Auto Scaling
// terminates instances according to the group's termination policies.
type InstancesDistribution struct {
_ struct{} `type:"structure"`
// Indicates how to allocate instance types to fulfill On-Demand capacity.
//
// The only valid value is prioritized, which is also the default value. This
// strategy uses the order of instance type overrides for the LaunchTemplate
// to define the launch priority of each instance type. The first instance type
// in the array is prioritized higher than the last. If all your On-Demand capacity
// cannot be fulfilled using your highest priority instance, then the Auto Scaling
// groups launches the remaining capacity using the second priority instance
// type, and so on.
OnDemandAllocationStrategy *string `type:"string"`
// The minimum amount of the Auto Scaling group's capacity that must be fulfilled
// by On-Demand Instances. This base portion is provisioned first as your group
// scales.
//
// Default if not set is 0. If you leave it set to 0, On-Demand Instances are
// launched as a percentage of the Auto Scaling group's desired capacity, per
// the OnDemandPercentageAboveBaseCapacity setting.
//
// An update to this setting means a gradual replacement of instances to maintain
// the specified number of On-Demand Instances for your base capacity. When
// replacing instances, Amazon EC2 Auto Scaling launches new instances before
// terminating the old ones.
OnDemandBaseCapacity *int64 `type:"integer"`
// Controls the percentages of On-Demand Instances and Spot Instances for your
// additional capacity beyond OnDemandBaseCapacity.
//
// Default if not set is 100. If you leave it set to 100, the percentages are
// 100% for On-Demand Instances and 0% for Spot Instances.
//
// An update to this setting means a gradual replacement of instances to maintain
// the percentage of On-Demand Instances for your additional capacity above
// the base capacity. When replacing instances, Amazon EC2 Auto Scaling launches
// new instances before terminating the old ones.
//
// Valid Range: Minimum value of 0. Maximum value of 100.
OnDemandPercentageAboveBaseCapacity *int64 `type:"integer"`
// Indicates how to allocate instances across Spot Instance pools.
//
// If the allocation strategy is lowest-price, the Auto Scaling group launches
// instances using the Spot pools with the lowest price, and evenly allocates
// your instances across the number of Spot pools that you specify. If the allocation
// strategy is capacity-optimized, the Auto Scaling group launches instances
// using Spot pools that are optimally chosen based on the available Spot capacity.
//
// The default Spot allocation strategy for calls that you make through the
// API, the AWS CLI, or the AWS SDKs is lowest-price. The default Spot allocation
// strategy for the AWS Management Console is capacity-optimized.
//
// Valid values: lowest-price | capacity-optimized
SpotAllocationStrategy *string `type:"string"`
// The number of Spot Instance pools across which to allocate your Spot Instances.
// The Spot pools are determined from the different instance types in the Overrides
// array of LaunchTemplate. Default if not set is 2.
//
// Used only when the Spot allocation strategy is lowest-price.
//
// Valid Range: Minimum value of 1. Maximum value of 20.
SpotInstancePools *int64 `type:"integer"`
// The maximum price per unit hour that you are willing to pay for a Spot Instance.
// If you leave the value of this parameter blank (which is the default), the
// maximum Spot price is set at the On-Demand price.
//
// To remove a value that you previously set, include the parameter but leave
// the value blank.
SpotMaxPrice *string `type:"string"`
}
// String returns the string representation
func (s InstancesDistribution) String() string {
return awsutil.Prettify(s)
}
// Describes a launch configuration.
type LaunchConfiguration struct {
_ struct{} `type:"structure"`
// For Auto Scaling groups that are running in a VPC, specifies whether to assign
// a public IP address to the group's instances.
//
// For more information, see Launching Auto Scaling Instances in a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html)
// in the Amazon EC2 Auto Scaling User Guide.
AssociatePublicIpAddress *bool `type:"boolean"`
// A block device mapping, which specifies the block devices for the instance.
//
// For more information, see Block Device Mapping (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html)
// in the Amazon EC2 User Guide for Linux Instances.
BlockDeviceMappings []BlockDeviceMapping `type:"list"`
// The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
//
// For more information, see ClassicLink (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
// in the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic
// Instances to a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink)
// in the Amazon EC2 Auto Scaling User Guide.
ClassicLinkVPCId *string `min:"1" type:"string"`
// The IDs of one or more security groups for the VPC specified in ClassicLinkVPCId.
//
// For more information, see ClassicLink (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html)
// in the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic
// Instances to a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink)
// in the Amazon EC2 Auto Scaling User Guide.
ClassicLinkVPCSecurityGroups []string `type:"list"`
// The creation date and time for the launch configuration.
//
// CreatedTime is a required field
CreatedTime *time.Time `type:"timestamp" required:"true"`
// Specifies whether the launch configuration is optimized for EBS I/O (true)
// or not (false).
//
// For more information, see Amazon EBS-Optimized Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html)
// in the Amazon EC2 User Guide for Linux Instances.
EbsOptimized *bool `type:"boolean"`
// The name or the Amazon Resource Name (ARN) of the instance profile associated
// with the IAM role for the instance. The instance profile contains the IAM
// role.
//
// For more information, see IAM Role for Applications That Run on Amazon EC2
// Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html)
// in the Amazon EC2 Auto Scaling User Guide.
IamInstanceProfile *string `min:"1" type:"string"`
// The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances.
//
// For more information, see Finding an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html)
// in the Amazon EC2 User Guide for Linux Instances.
//
// ImageId is a required field
ImageId *string `min:"1" type:"string" required:"true"`
// Controls whether instances in this group are launched with detailed (true)
// or basic (false) monitoring.
//
// For more information, see Configure Monitoring for Auto Scaling Instances
// (https://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-monitoring.html#enable-as-instance-metrics)
// in the Amazon EC2 Auto Scaling User Guide.
InstanceMonitoring *InstanceMonitoring `type:"structure"`
// The instance type for the instances.
//
// For information about available instance types, see Available Instance Types
// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes)
// in the Amazon EC2 User Guide for Linux Instances.
//
// InstanceType is a required field
InstanceType *string `min:"1" type:"string" required:"true"`
// The ID of the kernel associated with the AMI.
KernelId *string `min:"1" type:"string"`
// The name of the key pair.
//
// For more information, see Amazon EC2 Key Pairs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html)
// in the Amazon EC2 User Guide for Linux Instances.
KeyName *string `min:"1" type:"string"`
// The Amazon Resource Name (ARN) of the launch configuration.
LaunchConfigurationARN *string `min:"1" type:"string"`
// The name of the launch configuration.
//
// LaunchConfigurationName is a required field
LaunchConfigurationName *string `min:"1" type:"string" required:"true"`
// The tenancy of the instance, either default or dedicated. An instance with
// dedicated tenancy runs on isolated, single-tenant hardware and can only be
// launched into a VPC.
//
// For more information, see Instance Placement Tenancy (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-vpc-tenancy)
// in the Amazon EC2 Auto Scaling User Guide.
PlacementTenancy *string `min:"1" type:"string"`
// The ID of the RAM disk associated with the AMI.
RamdiskId *string `min:"1" type:"string"`
// A list that contains the security groups to assign to the instances in the
// Auto Scaling group.
//
// For more information, see Security Groups for Your VPC (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html)
// in the Amazon Virtual Private Cloud User Guide.
SecurityGroups []string `type:"list"`
// The maximum hourly price to be paid for any Spot Instance launched to fulfill
// the request. Spot Instances are launched when the price you specify exceeds
// the current Spot price.
//
// For more information, see Launching Spot Instances in Your Auto Scaling Group
// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html)
// in the Amazon EC2 Auto Scaling User Guide.
SpotPrice *string `min:"1" type:"string"`
// The Base64-encoded user data to make available to the launched EC2 instances.
//
// For more information, see Instance Metadata and User Data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html)
// in the Amazon EC2 User Guide for Linux Instances.
UserData *string `type:"string"`
}
// String returns the string representation
func (s LaunchConfiguration) String() string {
return awsutil.Prettify(s)
}
// Describes a launch template and overrides.
//
// The overrides are used to override the instance type specified by the launch
// template with multiple instance types that can be used to launch On-Demand
// Instances and Spot Instances.
//
// When you update the launch template or overrides, existing Amazon EC2 instances
// continue to run. When scale out occurs, Amazon EC2 Auto Scaling launches
// instances to match the new settings. When scale in occurs, Amazon EC2 Auto
// Scaling terminates instances according to the group's termination policies.
type LaunchTemplate struct {
_ struct{} `type:"structure"`
// The launch template to use. You must specify either the launch template ID
// or launch template name in the request.
LaunchTemplateSpecification *LaunchTemplateSpecification `type:"structure"`
// Any parameters that you specify override the same parameters in the launch
// template. Currently, the only supported override is instance type. You can
// specify between 1 and 20 instance types.
//
// If not provided, Amazon EC2 Auto Scaling will use the instance type specified
// in the launch template to launch instances.
Overrides []LaunchTemplateOverrides `type:"list"`
}
// String returns the string representation
func (s LaunchTemplate) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *LaunchTemplate) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "LaunchTemplate"}
if s.LaunchTemplateSpecification != nil {
if err := s.LaunchTemplateSpecification.Validate(); err != nil {
invalidParams.AddNested("LaunchTemplateSpecification", err.(aws.ErrInvalidParams))
}
}
if s.Overrides != nil {
for i, v := range s.Overrides {
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Overrides", i), err.(aws.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Describes an override for a launch template. Currently, the only supported
// override is instance type.
//
// The maximum number of instance type overrides that can be associated with
// an Auto Scaling group is 20.