aws-sdk-autoscaling 1.75.0 → 1.99.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -109,18 +109,13 @@ module Aws::AutoScaling
109
109
  data[:target_group_arns]
110
110
  end
111
111
 
112
- # The service to use for the health checks. The valid values are `EC2`
113
- # and `ELB`. If you configure an Auto Scaling group to use `ELB` health
114
- # checks, it considers the instance unhealthy if it fails either the EC2
115
- # status checks or the load balancer health checks.
112
+ # A comma-separated value string of one or more health check types.
116
113
  # @return [String]
117
114
  def health_check_type
118
115
  data[:health_check_type]
119
116
  end
120
117
 
121
- # The amount of time, in seconds, that Amazon EC2 Auto Scaling waits
122
- # before checking the health status of an EC2 instance that has come
123
- # into service and marking it unhealthy due to a failed health check.
118
+ # The duration of the health check grace period, in seconds.
124
119
  # @return [Integer]
125
120
  def health_check_grace_period
126
121
  data[:health_check_grace_period]
@@ -220,23 +215,24 @@ module Aws::AutoScaling
220
215
 
221
216
  # The unit of measurement for the value specified for desired capacity.
222
217
  # Amazon EC2 Auto Scaling supports `DesiredCapacityType` for
223
- # attribute-based instance type selection only. For more information,
224
- # see [Creating an Auto Scaling group using attribute-based instance
225
- # type selection][1] in the *Amazon EC2 Auto Scaling User Guide*.
226
- #
227
- # By default, Amazon EC2 Auto Scaling specifies `units`, which
228
- # translates into number of instances.
229
- #
230
- # Valid values: `units` \| `vcpu` \| `memory-mib`
231
- #
232
- #
233
- #
234
- # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-instance-type-requirements.html
218
+ # attribute-based instance type selection only.
235
219
  # @return [String]
236
220
  def desired_capacity_type
237
221
  data[:desired_capacity_type]
238
222
  end
239
223
 
224
+ # The duration of the default instance warmup, in seconds.
225
+ # @return [Integer]
226
+ def default_instance_warmup
227
+ data[:default_instance_warmup]
228
+ end
229
+
230
+ # The traffic sources associated with this Auto Scaling group.
231
+ # @return [Array<Types::TrafficSourceIdentifier>]
232
+ def traffic_sources
233
+ data[:traffic_sources]
234
+ end
235
+
240
236
  # @!endgroup
241
237
 
242
238
  # @return [Client]
@@ -251,7 +247,9 @@ module Aws::AutoScaling
251
247
  #
252
248
  # @return [self]
253
249
  def load
254
- resp = @client.describe_auto_scaling_groups(auto_scaling_group_names: [@name])
250
+ resp = Aws::Plugins::UserAgent.feature('resource') do
251
+ @client.describe_auto_scaling_groups(auto_scaling_group_names: [@name])
252
+ end
255
253
  @data = resp.auto_scaling_groups[0]
256
254
  self
257
255
  end
@@ -296,7 +294,9 @@ module Aws::AutoScaling
296
294
  options, params = separate_params_and_options(options)
297
295
  waiter = Waiters::GroupExists.new(options)
298
296
  yield_waiter_and_warn(waiter, &block) if block_given?
299
- waiter.wait(params.merge(auto_scaling_group_names: [@name]))
297
+ Aws::Plugins::UserAgent.feature('resource') do
298
+ waiter.wait(params.merge(auto_scaling_group_names: [@name]))
299
+ end
300
300
  AutoScalingGroup.new({
301
301
  name: @name,
302
302
  client: @client
@@ -313,7 +313,9 @@ module Aws::AutoScaling
313
313
  options, params = separate_params_and_options(options)
314
314
  waiter = Waiters::GroupInService.new(options)
315
315
  yield_waiter_and_warn(waiter, &block) if block_given?
316
- waiter.wait(params.merge(auto_scaling_group_names: [@name]))
316
+ Aws::Plugins::UserAgent.feature('resource') do
317
+ waiter.wait(params.merge(auto_scaling_group_names: [@name]))
318
+ end
317
319
  AutoScalingGroup.new({
318
320
  name: @name,
319
321
  client: @client
@@ -330,7 +332,9 @@ module Aws::AutoScaling
330
332
  options, params = separate_params_and_options(options)
331
333
  waiter = Waiters::GroupNotExists.new(options)
332
334
  yield_waiter_and_warn(waiter, &block) if block_given?
333
- waiter.wait(params.merge(auto_scaling_group_names: [@name]))
335
+ Aws::Plugins::UserAgent.feature('resource') do
336
+ waiter.wait(params.merge(auto_scaling_group_names: [@name]))
337
+ end
334
338
  AutoScalingGroup.new({
335
339
  name: @name,
336
340
  client: @client
@@ -431,7 +435,9 @@ module Aws::AutoScaling
431
435
  :retry
432
436
  end
433
437
  end
434
- Aws::Waiters::Waiter.new(options).wait({})
438
+ Aws::Plugins::UserAgent.feature('resource') do
439
+ Aws::Waiters::Waiter.new(options).wait({})
440
+ end
435
441
  end
436
442
 
437
443
  # @!group Actions
@@ -447,7 +453,9 @@ module Aws::AutoScaling
447
453
  # @return [EmptyStructure]
448
454
  def attach_instances(options = {})
449
455
  options = options.merge(auto_scaling_group_name: @name)
450
- resp = @client.attach_instances(options)
456
+ resp = Aws::Plugins::UserAgent.feature('resource') do
457
+ @client.attach_instances(options)
458
+ end
451
459
  resp.data
452
460
  end
453
461
 
@@ -460,12 +468,14 @@ module Aws::AutoScaling
460
468
  # @option options [Boolean] :force_delete
461
469
  # Specifies that the group is to be deleted along with all instances
462
470
  # associated with the group, without waiting for all instances to be
463
- # terminated. This parameter also deletes any outstanding lifecycle
464
- # actions associated with the group.
471
+ # terminated. This action also deletes any outstanding lifecycle actions
472
+ # associated with the group.
465
473
  # @return [EmptyStructure]
466
474
  def delete(options = {})
467
475
  options = options.merge(auto_scaling_group_name: @name)
468
- resp = @client.delete_auto_scaling_group(options)
476
+ resp = Aws::Plugins::UserAgent.feature('resource') do
477
+ @client.delete_auto_scaling_group(options)
478
+ end
469
479
  resp.data
470
480
  end
471
481
 
@@ -485,7 +495,9 @@ module Aws::AutoScaling
485
495
  def detach_instances(options = {})
486
496
  batch = []
487
497
  options = options.merge(auto_scaling_group_name: @name)
488
- resp = @client.detach_instances(options)
498
+ resp = Aws::Plugins::UserAgent.feature('resource') do
499
+ @client.detach_instances(options)
500
+ end
489
501
  resp.data.activities.each do |a|
490
502
  batch << Activity.new(
491
503
  id: a.activity_id,
@@ -503,7 +515,9 @@ module Aws::AutoScaling
503
515
  # })
504
516
  # @param [Hash] options ({})
505
517
  # @option options [Array<String>] :metrics
506
- # Specifies one or more of the following metrics:
518
+ # Identifies the metrics to disable.
519
+ #
520
+ # You can specify one or more of the following metrics:
507
521
  #
508
522
  # * `GroupMinSize`
509
523
  #
@@ -545,11 +559,20 @@ module Aws::AutoScaling
545
559
  #
546
560
  # * `GroupAndWarmPoolTotalCapacity`
547
561
  #
548
- # If you omit this parameter, all metrics are disabled.
562
+ # If you omit this property, all metrics are disabled.
563
+ #
564
+ # For more information, see [Auto Scaling group metrics][1] in the
565
+ # *Amazon EC2 Auto Scaling User Guide*.
566
+ #
567
+ #
568
+ #
569
+ # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-cloudwatch-monitoring.html#as-group-metrics
549
570
  # @return [EmptyStructure]
550
571
  def disable_metrics_collection(options = {})
551
572
  options = options.merge(auto_scaling_group_name: @name)
552
- resp = @client.disable_metrics_collection(options)
573
+ resp = Aws::Plugins::UserAgent.feature('resource') do
574
+ @client.disable_metrics_collection(options)
575
+ end
553
576
  resp.data
554
577
  end
555
578
 
@@ -561,8 +584,9 @@ module Aws::AutoScaling
561
584
  # })
562
585
  # @param [Hash] options ({})
563
586
  # @option options [Array<String>] :metrics
564
- # Specifies which group-level metrics to start collecting. You can
565
- # specify one or more of the following metrics:
587
+ # Identifies the metrics to enable.
588
+ #
589
+ # You can specify one or more of the following metrics:
566
590
  #
567
591
  # * `GroupMinSize`
568
592
  #
@@ -580,9 +604,6 @@ module Aws::AutoScaling
580
604
  #
581
605
  # * `GroupTotalInstances`
582
606
  #
583
- # The instance weighting feature supports the following additional
584
- # metrics:
585
- #
586
607
  # * `GroupInServiceCapacity`
587
608
  #
588
609
  # * `GroupPendingCapacity`
@@ -593,8 +614,6 @@ module Aws::AutoScaling
593
614
  #
594
615
  # * `GroupTotalCapacity`
595
616
  #
596
- # The warm pools feature supports the following additional metrics:
597
- #
598
617
  # * `WarmPoolDesiredCapacity`
599
618
  #
600
619
  # * `WarmPoolWarmedCapacity`
@@ -609,14 +628,24 @@ module Aws::AutoScaling
609
628
  #
610
629
  # * `GroupAndWarmPoolTotalCapacity`
611
630
  #
612
- # If you omit this parameter, all metrics are enabled.
631
+ # If you specify `Granularity` and don't specify any metrics, all
632
+ # metrics are enabled.
633
+ #
634
+ # For more information, see [Auto Scaling group metrics][1] in the
635
+ # *Amazon EC2 Auto Scaling User Guide*.
636
+ #
637
+ #
638
+ #
639
+ # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-cloudwatch-monitoring.html#as-group-metrics
613
640
  # @option options [required, String] :granularity
614
- # The granularity to associate with the metrics to collect. The only
615
- # valid value is `1Minute`.
641
+ # The frequency at which Amazon EC2 Auto Scaling sends aggregated data
642
+ # to CloudWatch. The only valid value is `1Minute`.
616
643
  # @return [EmptyStructure]
617
644
  def enable_metrics_collection(options = {})
618
645
  options = options.merge(auto_scaling_group_name: @name)
619
- resp = @client.enable_metrics_collection(options)
646
+ resp = Aws::Plugins::UserAgent.feature('resource') do
647
+ @client.enable_metrics_collection(options)
648
+ end
620
649
  resp.data
621
650
  end
622
651
 
@@ -645,16 +674,38 @@ module Aws::AutoScaling
645
674
  # resource_label: "XmlStringMaxLen1023",
646
675
  # },
647
676
  # customized_metric_specification: {
648
- # metric_name: "MetricName", # required
649
- # namespace: "MetricNamespace", # required
677
+ # metric_name: "MetricName",
678
+ # namespace: "MetricNamespace",
650
679
  # dimensions: [
651
680
  # {
652
681
  # name: "MetricDimensionName", # required
653
682
  # value: "MetricDimensionValue", # required
654
683
  # },
655
684
  # ],
656
- # statistic: "Average", # required, accepts Average, Minimum, Maximum, SampleCount, Sum
685
+ # statistic: "Average", # accepts Average, Minimum, Maximum, SampleCount, Sum
657
686
  # unit: "MetricUnit",
687
+ # metrics: [
688
+ # {
689
+ # id: "XmlStringMaxLen255", # required
690
+ # expression: "XmlStringMaxLen2047",
691
+ # metric_stat: {
692
+ # metric: { # required
693
+ # namespace: "MetricNamespace", # required
694
+ # metric_name: "MetricName", # required
695
+ # dimensions: [
696
+ # {
697
+ # name: "MetricDimensionName", # required
698
+ # value: "MetricDimensionValue", # required
699
+ # },
700
+ # ],
701
+ # },
702
+ # stat: "XmlStringMetricStat", # required
703
+ # unit: "MetricUnit",
704
+ # },
705
+ # label: "XmlStringMetricLabel",
706
+ # return_data: false,
707
+ # },
708
+ # ],
658
709
  # },
659
710
  # target_value: 1.0, # required
660
711
  # disable_scale_in: false,
@@ -810,19 +861,21 @@ module Aws::AutoScaling
810
861
  # The amount by which to scale, based on the specified adjustment type.
811
862
  # A positive value adds to the current capacity while a negative number
812
863
  # removes from the current capacity. For exact capacity, you must
813
- # specify a positive value.
864
+ # specify a non-negative value.
814
865
  #
815
866
  # Required if the policy type is `SimpleScaling`. (Not used with any
816
867
  # other policy type.)
817
868
  # @option options [Integer] :cooldown
818
- # The duration of the policy's cooldown period, in seconds. When a
819
- # cooldown period is specified here, it overrides the default cooldown
820
- # period defined for the Auto Scaling group.
869
+ # A cooldown period, in seconds, that applies to a specific simple
870
+ # scaling policy. When a cooldown period is specified here, it overrides
871
+ # the default cooldown.
821
872
  #
822
873
  # Valid only if the policy type is `SimpleScaling`. For more
823
874
  # information, see [Scaling cooldowns for Amazon EC2 Auto Scaling][1] in
824
875
  # the *Amazon EC2 Auto Scaling User Guide*.
825
876
  #
877
+ # Default: None
878
+ #
826
879
  #
827
880
  #
828
881
  # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html
@@ -839,13 +892,22 @@ module Aws::AutoScaling
839
892
  # Required if the policy type is `StepScaling`. (Not used with any other
840
893
  # policy type.)
841
894
  # @option options [Integer] :estimated_instance_warmup
895
+ # *Not needed if the default instance warmup is defined for the group.*
896
+ #
842
897
  # The estimated time, in seconds, until a newly launched instance can
843
- # contribute to the CloudWatch metrics. If not provided, the default is
844
- # to use the value from the default cooldown period for the Auto Scaling
845
- # group.
898
+ # contribute to the CloudWatch metrics. This warm-up period applies to
899
+ # instances launched due to a specific target tracking or step scaling
900
+ # policy. When a warm-up period is specified here, it overrides the
901
+ # default instance warmup.
846
902
  #
847
903
  # Valid only if the policy type is `TargetTrackingScaling` or
848
904
  # `StepScaling`.
905
+ #
906
+ # <note markdown="1"> The default is to use the value for the default instance warmup
907
+ # defined for the group. If default instance warmup is null, then
908
+ # `EstimatedInstanceWarmup` falls back to the value of default cooldown.
909
+ #
910
+ # </note>
849
911
  # @option options [Types::TargetTrackingConfiguration] :target_tracking_configuration
850
912
  # A target tracking scaling policy. Provides support for predefined or
851
913
  # custom metrics.
@@ -861,7 +923,7 @@ module Aws::AutoScaling
861
923
  # * `ALBRequestCountPerTarget`
862
924
  #
863
925
  # If you specify `ALBRequestCountPerTarget` for the metric, you must
864
- # specify the `ResourceLabel` parameter with the
926
+ # specify the `ResourceLabel` property with the
865
927
  # `PredefinedMetricSpecification`.
866
928
  #
867
929
  # For more information, see [TargetTrackingConfiguration][1] in the
@@ -899,7 +961,9 @@ module Aws::AutoScaling
899
961
  # @return [ScalingPolicy]
900
962
  def put_scaling_policy(options = {})
901
963
  options = options.merge(auto_scaling_group_name: @name)
902
- @client.put_scaling_policy(options)
964
+ Aws::Plugins::UserAgent.feature('resource') do
965
+ @client.put_scaling_policy(options)
966
+ end
903
967
  ScalingPolicy.new(
904
968
  name: options[:policy_name],
905
969
  client: @client
@@ -923,20 +987,18 @@ module Aws::AutoScaling
923
987
  # @option options [required, String] :scheduled_action_name
924
988
  # The name of this scaling action.
925
989
  # @option options [Time,DateTime,Date,Integer,String] :time
926
- # This parameter is no longer used.
990
+ # This property is no longer used.
927
991
  # @option options [Time,DateTime,Date,Integer,String] :start_time
928
992
  # The date and time for this action to start, in YYYY-MM-DDThh:mm:ssZ
929
993
  # format in UTC/GMT only and in quotes (for example,
930
- # `"2019-06-01T00:00:00Z"`).
994
+ # `"2021-06-01T00:00:00Z"`).
931
995
  #
932
996
  # If you specify `Recurrence` and `StartTime`, Amazon EC2 Auto Scaling
933
997
  # performs the action at this time, and then performs the action based
934
998
  # on the specified recurrence.
935
- #
936
- # If you try to schedule your action in the past, Amazon EC2 Auto
937
- # Scaling returns an error message.
938
999
  # @option options [Time,DateTime,Date,Integer,String] :end_time
939
- # The date and time for the recurring schedule to end, in UTC.
1000
+ # The date and time for the recurring schedule to end, in UTC. For
1001
+ # example, `"2021-06-01T00:00:00Z"`.
940
1002
  # @option options [String] :recurrence
941
1003
  # The recurring schedule for this action. This format consists of five
942
1004
  # fields separated by white spaces: \[Minute\] \[Hour\]
@@ -961,6 +1023,11 @@ module Aws::AutoScaling
961
1023
  # after the scheduled action runs and the capacity it attempts to
962
1024
  # maintain. It can scale beyond this capacity if you add more scaling
963
1025
  # conditions.
1026
+ #
1027
+ # <note markdown="1"> You must specify at least one of the following properties: `MaxSize`,
1028
+ # `MinSize`, or `DesiredCapacity`.
1029
+ #
1030
+ # </note>
964
1031
  # @option options [String] :time_zone
965
1032
  # Specifies the time zone for a cron expression. If a time zone is not
966
1033
  # provided, UTC is used by default.
@@ -976,7 +1043,9 @@ module Aws::AutoScaling
976
1043
  # @return [ScheduledAction]
977
1044
  def put_scheduled_update_group_action(options = {})
978
1045
  options = options.merge(auto_scaling_group_name: @name)
979
- @client.put_scheduled_update_group_action(options)
1046
+ Aws::Plugins::UserAgent.feature('resource') do
1047
+ @client.put_scheduled_update_group_action(options)
1048
+ end
980
1049
  ScheduledAction.new(
981
1050
  name: options[:scheduled_action_name],
982
1051
  client: @client
@@ -1010,11 +1079,13 @@ module Aws::AutoScaling
1010
1079
  #
1011
1080
  # * `ScheduledActions`
1012
1081
  #
1013
- # If you omit this parameter, all processes are specified.
1082
+ # If you omit this property, all processes are specified.
1014
1083
  # @return [EmptyStructure]
1015
1084
  def resume_processes(options = {})
1016
1085
  options = options.merge(auto_scaling_group_name: @name)
1017
- resp = @client.resume_processes(options)
1086
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1087
+ @client.resume_processes(options)
1088
+ end
1018
1089
  resp.data
1019
1090
  end
1020
1091
 
@@ -1038,7 +1109,9 @@ module Aws::AutoScaling
1038
1109
  # @return [EmptyStructure]
1039
1110
  def set_desired_capacity(options = {})
1040
1111
  options = options.merge(auto_scaling_group_name: @name)
1041
- resp = @client.set_desired_capacity(options)
1112
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1113
+ @client.set_desired_capacity(options)
1114
+ end
1042
1115
  resp.data
1043
1116
  end
1044
1117
 
@@ -1069,11 +1142,13 @@ module Aws::AutoScaling
1069
1142
  #
1070
1143
  # * `ScheduledActions`
1071
1144
  #
1072
- # If you omit this parameter, all processes are specified.
1145
+ # If you omit this property, all processes are specified.
1073
1146
  # @return [EmptyStructure]
1074
1147
  def suspend_processes(options = {})
1075
1148
  options = options.merge(auto_scaling_group_name: @name)
1076
- resp = @client.suspend_processes(options)
1149
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1150
+ @client.suspend_processes(options)
1151
+ end
1077
1152
  resp.data
1078
1153
  end
1079
1154
 
@@ -1148,6 +1223,11 @@ module Aws::AutoScaling
1148
1223
  # min: 1,
1149
1224
  # max: 1,
1150
1225
  # },
1226
+ # network_bandwidth_gbps: {
1227
+ # min: 1.0,
1228
+ # max: 1.0,
1229
+ # },
1230
+ # allowed_instance_types: ["AllowedInstanceType"],
1151
1231
  # },
1152
1232
  # },
1153
1233
  # ],
@@ -1177,6 +1257,7 @@ module Aws::AutoScaling
1177
1257
  # capacity_rebalance: false,
1178
1258
  # context: "Context",
1179
1259
  # desired_capacity_type: "XmlStringMaxLen255",
1260
+ # default_instance_warmup: 1,
1180
1261
  # })
1181
1262
  # @param [Hash] options ({})
1182
1263
  # @option options [String] :launch_configuration_name
@@ -1188,9 +1269,9 @@ module Aws::AutoScaling
1188
1269
  # specify `LaunchTemplate` in your update request, you can't specify
1189
1270
  # `LaunchConfigurationName` or `MixedInstancesPolicy`.
1190
1271
  # @option options [Types::MixedInstancesPolicy] :mixed_instances_policy
1191
- # An embedded object that specifies a mixed instances policy. For more
1192
- # information, see [Auto Scaling groups with multiple instance types and
1193
- # purchase options][1] in the *Amazon EC2 Auto Scaling User Guide*.
1272
+ # The mixed instances policy. For more information, see [Auto Scaling
1273
+ # groups with multiple instance types and purchase options][1] in the
1274
+ # *Amazon EC2 Auto Scaling User Guide*.
1194
1275
  #
1195
1276
  #
1196
1277
  #
@@ -1215,10 +1296,10 @@ module Aws::AutoScaling
1215
1296
  # size of the group and less than or equal to the maximum size of the
1216
1297
  # group.
1217
1298
  # @option options [Integer] :default_cooldown
1218
- # The amount of time, in seconds, after a scaling activity completes
1219
- # before another scaling activity can start. The default value is `300`.
1220
- # This setting applies when using simple scaling policies, but not when
1221
- # using other scaling policies or scheduled scaling. For more
1299
+ # *Only needed if you use simple scaling policies.*
1300
+ #
1301
+ # The amount of time, in seconds, between one scaling activity ending
1302
+ # and another one starting due to simple scaling policies. For more
1222
1303
  # information, see [Scaling cooldowns for Amazon EC2 Auto Scaling][1] in
1223
1304
  # the *Amazon EC2 Auto Scaling User Guide*.
1224
1305
  #
@@ -1228,29 +1309,40 @@ module Aws::AutoScaling
1228
1309
  # @option options [Array<String>] :availability_zones
1229
1310
  # One or more Availability Zones for the group.
1230
1311
  # @option options [String] :health_check_type
1231
- # The service to use for the health checks. The valid values are `EC2`
1232
- # and `ELB`. If you configure an Auto Scaling group to use `ELB` health
1233
- # checks, it considers the instance unhealthy if it fails either the EC2
1234
- # status checks or the load balancer health checks.
1312
+ # A comma-separated value string of one or more health check types.
1313
+ #
1314
+ # The valid values are `EC2`, `ELB`, and `VPC_LATTICE`. `EC2` is the
1315
+ # default health check and cannot be disabled. For more information, see
1316
+ # [Health checks for Auto Scaling instances][1] in the *Amazon EC2 Auto
1317
+ # Scaling User Guide*.
1318
+ #
1319
+ # Only specify `EC2` if you must clear a value that was previously set.
1320
+ #
1321
+ #
1322
+ #
1323
+ # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html
1235
1324
  # @option options [Integer] :health_check_grace_period
1236
1325
  # The amount of time, in seconds, that Amazon EC2 Auto Scaling waits
1237
1326
  # before checking the health status of an EC2 instance that has come
1238
1327
  # into service and marking it unhealthy due to a failed health check.
1239
- # The default value is `0`. For more information, see [Health check
1240
- # grace period][1] in the *Amazon EC2 Auto Scaling User Guide*.
1241
- #
1242
- # Conditional: Required if you are adding an `ELB` health check.
1328
+ # This is useful if your instances do not immediately pass their health
1329
+ # checks after they enter the `InService` state. For more information,
1330
+ # see [Set the health check grace period for an Auto Scaling group][1]
1331
+ # in the *Amazon EC2 Auto Scaling User Guide*.
1243
1332
  #
1244
1333
  #
1245
1334
  #
1246
- # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html#health-check-grace-period
1335
+ # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/health-check-grace-period.html
1247
1336
  # @option options [String] :placement_group
1248
1337
  # The name of an existing placement group into which to launch your
1249
- # instances, if any. A placement group is a logical grouping of
1250
- # instances within a single Availability Zone. You cannot specify
1251
- # multiple Availability Zones and a placement group. For more
1252
- # information, see [Placement Groups][1] in the *Amazon EC2 User Guide
1253
- # for Linux Instances*.
1338
+ # instances. For more information, see [Placement groups][1] in the
1339
+ # *Amazon EC2 User Guide for Linux Instances*.
1340
+ #
1341
+ # <note markdown="1"> A *cluster* placement group is a logical grouping of instances within
1342
+ # a single Availability Zone. You cannot specify multiple Availability
1343
+ # Zones and a cluster placement group.
1344
+ #
1345
+ # </note>
1254
1346
  #
1255
1347
  #
1256
1348
  #
@@ -1258,18 +1350,21 @@ module Aws::AutoScaling
1258
1350
  # @option options [String] :vpc_zone_identifier
1259
1351
  # A comma-separated list of subnet IDs for a virtual private cloud
1260
1352
  # (VPC). If you specify `VPCZoneIdentifier` with `AvailabilityZones`,
1261
- # the subnets that you specify for this parameter must reside in those
1262
- # Availability Zones.
1353
+ # the subnets that you specify must reside in those Availability Zones.
1263
1354
  # @option options [Array<String>] :termination_policies
1264
1355
  # A policy or a list of policies that are used to select the instances
1265
1356
  # to terminate. The policies are executed in the order that you list
1266
- # them. For more information, see [Controlling which Auto Scaling
1267
- # instances terminate during scale in][1] in the *Amazon EC2 Auto
1268
- # Scaling User Guide*.
1357
+ # them. For more information, see [Work with Amazon EC2 Auto Scaling
1358
+ # termination policies][1] in the *Amazon EC2 Auto Scaling User Guide*.
1359
+ #
1360
+ # Valid values: `Default` \| `AllocationStrategy` \|
1361
+ # `ClosestToNextInstanceHour` \| `NewestInstance` \| `OldestInstance` \|
1362
+ # `OldestLaunchConfiguration` \| `OldestLaunchTemplate` \|
1363
+ # `arn:aws:lambda:region:account-id:function:my-function:my-alias`
1269
1364
  #
1270
1365
  #
1271
1366
  #
1272
- # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html
1367
+ # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-termination-policies.html
1273
1368
  # @option options [Boolean] :new_instances_protected_from_scale_in
1274
1369
  # Indicates whether newly launched instances are protected from
1275
1370
  # termination by Amazon EC2 Auto Scaling when scaling in. For more
@@ -1302,8 +1397,8 @@ module Aws::AutoScaling
1302
1397
  # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-max-instance-lifetime.html
1303
1398
  # @option options [Boolean] :capacity_rebalance
1304
1399
  # Enables or disables Capacity Rebalancing. For more information, see
1305
- # [Amazon EC2 Auto Scaling Capacity Rebalancing][1] in the *Amazon EC2
1306
- # Auto Scaling User Guide*.
1400
+ # [Use Capacity Rebalancing to handle Amazon EC2 Spot Interruptions][1]
1401
+ # in the *Amazon EC2 Auto Scaling User Guide*.
1307
1402
  #
1308
1403
  #
1309
1404
  #
@@ -1325,10 +1420,36 @@ module Aws::AutoScaling
1325
1420
  #
1326
1421
  #
1327
1422
  # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-instance-type-requirements.html
1423
+ # @option options [Integer] :default_instance_warmup
1424
+ # The amount of time, in seconds, until a new instance is considered to
1425
+ # have finished initializing and resource consumption to become stable
1426
+ # after it enters the `InService` state.
1427
+ #
1428
+ # During an instance refresh, Amazon EC2 Auto Scaling waits for the
1429
+ # warm-up period after it replaces an instance before it moves on to
1430
+ # replacing the next instance. Amazon EC2 Auto Scaling also waits for
1431
+ # the warm-up period before aggregating the metrics for new instances
1432
+ # with existing instances in the Amazon CloudWatch metrics that are used
1433
+ # for scaling, resulting in more reliable usage data. For more
1434
+ # information, see [Set the default instance warmup for an Auto Scaling
1435
+ # group][1] in the *Amazon EC2 Auto Scaling User Guide*.
1436
+ #
1437
+ # To manage various warm-up settings at the group level, we recommend
1438
+ # that you set the default instance warmup, *even if it is set to 0
1439
+ # seconds*. To remove a value that you previously set, include the
1440
+ # property but specify `-1` for the value. However, we strongly
1441
+ # recommend keeping the default instance warmup enabled by specifying a
1442
+ # value of `0` or other nominal value.
1443
+ #
1444
+ #
1445
+ #
1446
+ # [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html
1328
1447
  # @return [AutoScalingGroup]
1329
1448
  def update(options = {})
1330
1449
  options = options.merge(auto_scaling_group_name: @name)
1331
- @client.update_auto_scaling_group(options)
1450
+ Aws::Plugins::UserAgent.feature('resource') do
1451
+ @client.update_auto_scaling_group(options)
1452
+ end
1332
1453
  AutoScalingGroup.new(
1333
1454
  name: options[:auto_scaling_group_name],
1334
1455
  client: @client
@@ -1346,7 +1467,7 @@ module Aws::AutoScaling
1346
1467
  # @param [Hash] options ({})
1347
1468
  # @option options [Array<String>] :activity_ids
1348
1469
  # The activity IDs of the desired scaling activities. If you omit this
1349
- # parameter, all activities for the past six weeks are described. If
1470
+ # property, all activities for the past six weeks are described. If
1350
1471
  # unknown activities are requested, they are ignored with no error. If
1351
1472
  # you specify an Auto Scaling group, the results are limited to that
1352
1473
  # group.
@@ -1359,7 +1480,9 @@ module Aws::AutoScaling
1359
1480
  def activities(options = {})
1360
1481
  batches = Enumerator.new do |y|
1361
1482
  options = options.merge(auto_scaling_group_name: @name)
1362
- resp = @client.describe_scaling_activities(options)
1483
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1484
+ @client.describe_scaling_activities(options)
1485
+ end
1363
1486
  resp.each_page do |page|
1364
1487
  batch = []
1365
1488
  page.data.activities.each do |a|
@@ -1418,14 +1541,16 @@ module Aws::AutoScaling
1418
1541
  # })
1419
1542
  # @param [Hash] options ({})
1420
1543
  # @option options [Array<String>] :lifecycle_hook_names
1421
- # The names of one or more lifecycle hooks. If you omit this parameter,
1544
+ # The names of one or more lifecycle hooks. If you omit this property,
1422
1545
  # all lifecycle hooks are described.
1423
1546
  # @return [LifecycleHook::Collection]
1424
1547
  def lifecycle_hooks(options = {})
1425
1548
  batches = Enumerator.new do |y|
1426
1549
  batch = []
1427
1550
  options = options.merge(auto_scaling_group_name: @name)
1428
- resp = @client.describe_lifecycle_hooks(options)
1551
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1552
+ @client.describe_lifecycle_hooks(options)
1553
+ end
1429
1554
  resp.data.lifecycle_hooks.each do |l|
1430
1555
  batch << LifecycleHook.new(
1431
1556
  group_name: l.auto_scaling_group_name,
@@ -1451,32 +1576,27 @@ module Aws::AutoScaling
1451
1576
 
1452
1577
  # @example Request syntax with placeholder values
1453
1578
  #
1454
- # load_balancers = auto_scaling_group.load_balancers({
1455
- # next_token: "XmlString",
1456
- # max_records: 1,
1457
- # })
1579
+ # auto_scaling_group.load_balancers()
1458
1580
  # @param [Hash] options ({})
1459
- # @option options [String] :next_token
1460
- # The token for the next set of items to return. (You received this
1461
- # token from a previous call.)
1462
- # @option options [Integer] :max_records
1463
- # The maximum number of items to return with this call. The default
1464
- # value is `100` and the maximum value is `100`.
1465
1581
  # @return [LoadBalancer::Collection]
1466
1582
  def load_balancers(options = {})
1467
1583
  batches = Enumerator.new do |y|
1468
- batch = []
1469
1584
  options = options.merge(auto_scaling_group_name: @name)
1470
- resp = @client.describe_load_balancers(options)
1471
- resp.data.load_balancers.each do |l|
1472
- batch << LoadBalancer.new(
1473
- group_name: @name,
1474
- name: l.load_balancer_name,
1475
- data: l,
1476
- client: @client
1477
- )
1585
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1586
+ @client.describe_load_balancers(options)
1587
+ end
1588
+ resp.each_page do |page|
1589
+ batch = []
1590
+ page.data.load_balancers.each do |l|
1591
+ batch << LoadBalancer.new(
1592
+ group_name: @name,
1593
+ name: l.load_balancer_name,
1594
+ data: l,
1595
+ client: @client
1596
+ )
1597
+ end
1598
+ y.yield(batch)
1478
1599
  end
1479
- y.yield(batch)
1480
1600
  end
1481
1601
  LoadBalancer::Collection.new(batches)
1482
1602
  end
@@ -1489,7 +1609,9 @@ module Aws::AutoScaling
1489
1609
  def notification_configurations(options = {})
1490
1610
  batches = Enumerator.new do |y|
1491
1611
  options = Aws::Util.deep_merge(options, auto_scaling_group_names: [@name])
1492
- resp = @client.describe_notification_configurations(options)
1612
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1613
+ @client.describe_notification_configurations(options)
1614
+ end
1493
1615
  resp.each_page do |page|
1494
1616
  batch = []
1495
1617
  page.data.notification_configurations.each do |n|
@@ -1515,7 +1637,7 @@ module Aws::AutoScaling
1515
1637
  # })
1516
1638
  # @param [Hash] options ({})
1517
1639
  # @option options [Array<String>] :policy_names
1518
- # The names of one or more policies. If you omit this parameter, all
1640
+ # The names of one or more policies. If you omit this property, all
1519
1641
  # policies are described. If a group name is provided, the results are
1520
1642
  # limited to that group. If you specify an unknown policy name, it is
1521
1643
  # ignored with no error.
@@ -1528,7 +1650,9 @@ module Aws::AutoScaling
1528
1650
  def policies(options = {})
1529
1651
  batches = Enumerator.new do |y|
1530
1652
  options = options.merge(auto_scaling_group_name: @name)
1531
- resp = @client.describe_policies(options)
1653
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1654
+ @client.describe_policies(options)
1655
+ end
1532
1656
  resp.each_page do |page|
1533
1657
  batch = []
1534
1658
  page.data.scaling_policies.each do |s|
@@ -1553,22 +1677,24 @@ module Aws::AutoScaling
1553
1677
  # })
1554
1678
  # @param [Hash] options ({})
1555
1679
  # @option options [Array<String>] :scheduled_action_names
1556
- # The names of one or more scheduled actions. If you omit this
1557
- # parameter, all scheduled actions are described. If you specify an
1558
- # unknown scheduled action, it is ignored with no error.
1680
+ # The names of one or more scheduled actions. If you omit this property,
1681
+ # all scheduled actions are described. If you specify an unknown
1682
+ # scheduled action, it is ignored with no error.
1559
1683
  #
1560
1684
  # Array Members: Maximum number of 50 actions.
1561
1685
  # @option options [Time,DateTime,Date,Integer,String] :start_time
1562
1686
  # The earliest scheduled start time to return. If scheduled action names
1563
- # are provided, this parameter is ignored.
1687
+ # are provided, this property is ignored.
1564
1688
  # @option options [Time,DateTime,Date,Integer,String] :end_time
1565
1689
  # The latest scheduled start time to return. If scheduled action names
1566
- # are provided, this parameter is ignored.
1690
+ # are provided, this property is ignored.
1567
1691
  # @return [ScheduledAction::Collection]
1568
1692
  def scheduled_actions(options = {})
1569
1693
  batches = Enumerator.new do |y|
1570
1694
  options = options.merge(auto_scaling_group_name: @name)
1571
- resp = @client.describe_scheduled_actions(options)
1695
+ resp = Aws::Plugins::UserAgent.feature('resource') do
1696
+ @client.describe_scheduled_actions(options)
1697
+ end
1572
1698
  resp.each_page do |page|
1573
1699
  batch = []
1574
1700
  page.data.scheduled_update_group_actions.each do |s|