aws-sdk-autoscaling 1.75.0 → 1.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +123 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-autoscaling/activity.rb +6 -2
- data/lib/aws-sdk-autoscaling/auto_scaling_group.rb +256 -130
- data/lib/aws-sdk-autoscaling/client.rb +1167 -433
- data/lib/aws-sdk-autoscaling/client_api.rb +201 -6
- data/lib/aws-sdk-autoscaling/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-autoscaling/endpoint_provider.rb +57 -0
- data/lib/aws-sdk-autoscaling/endpoints.rb +926 -0
- data/lib/aws-sdk-autoscaling/errors.rb +16 -0
- data/lib/aws-sdk-autoscaling/instance.rb +41 -17
- data/lib/aws-sdk-autoscaling/launch_configuration.rb +29 -35
- data/lib/aws-sdk-autoscaling/lifecycle_hook.rb +54 -46
- data/lib/aws-sdk-autoscaling/load_balancer.rb +15 -5
- data/lib/aws-sdk-autoscaling/notification_configuration.rb +12 -4
- data/lib/aws-sdk-autoscaling/plugins/endpoints.rb +198 -0
- data/lib/aws-sdk-autoscaling/resource.rb +223 -162
- data/lib/aws-sdk-autoscaling/scaling_policy.rb +12 -4
- data/lib/aws-sdk-autoscaling/scheduled_action.rb +10 -4
- data/lib/aws-sdk-autoscaling/tag.rb +18 -6
- data/lib/aws-sdk-autoscaling/types.rb +1479 -2513
- data/lib/aws-sdk-autoscaling.rb +5 -1
- metadata +8 -4
@@ -109,18 +109,13 @@ module Aws::AutoScaling
|
|
109
109
|
data[:target_group_arns]
|
110
110
|
end
|
111
111
|
|
112
|
-
#
|
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
|
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.
|
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 =
|
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
|
-
|
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
|
-
|
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
|
-
|
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::
|
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 =
|
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
|
464
|
-
#
|
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 =
|
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 =
|
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
|
-
#
|
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
|
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 =
|
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
|
-
#
|
565
|
-
#
|
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
|
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
|
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 =
|
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",
|
649
|
-
# namespace: "MetricNamespace",
|
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", #
|
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
|
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
|
-
#
|
819
|
-
# cooldown period is specified here, it overrides
|
820
|
-
#
|
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.
|
844
|
-
#
|
845
|
-
#
|
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`
|
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
|
-
|
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
|
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
|
-
# `"
|
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
|
-
|
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
|
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 =
|
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 =
|
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
|
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 =
|
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
|
-
#
|
1192
|
-
#
|
1193
|
-
#
|
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
|
-
#
|
1219
|
-
#
|
1220
|
-
#
|
1221
|
-
#
|
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
|
-
#
|
1232
|
-
#
|
1233
|
-
#
|
1234
|
-
#
|
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
|
-
#
|
1240
|
-
#
|
1241
|
-
#
|
1242
|
-
#
|
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/
|
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
|
1250
|
-
#
|
1251
|
-
#
|
1252
|
-
#
|
1253
|
-
#
|
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
|
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 [
|
1267
|
-
#
|
1268
|
-
#
|
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/
|
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
|
-
# [
|
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
|
-
|
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
|
-
#
|
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 =
|
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
|
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 =
|
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
|
-
#
|
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 =
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
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 =
|
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
|
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 =
|
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
|
-
#
|
1558
|
-
#
|
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
|
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
|
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 =
|
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|
|