aws-sdk-autoscaling 1.38.1 → 1.43.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-autoscaling.rb +3 -1
- data/lib/aws-sdk-autoscaling/activity.rb +2 -0
- data/lib/aws-sdk-autoscaling/auto_scaling_group.rb +87 -64
- data/lib/aws-sdk-autoscaling/client.rb +406 -107
- data/lib/aws-sdk-autoscaling/client_api.rb +99 -0
- data/lib/aws-sdk-autoscaling/customizations.rb +1 -0
- data/lib/aws-sdk-autoscaling/errors.rb +34 -0
- data/lib/aws-sdk-autoscaling/instance.rb +2 -0
- data/lib/aws-sdk-autoscaling/launch_configuration.rb +2 -0
- data/lib/aws-sdk-autoscaling/lifecycle_hook.rb +6 -4
- data/lib/aws-sdk-autoscaling/load_balancer.rb +2 -0
- data/lib/aws-sdk-autoscaling/notification_configuration.rb +2 -0
- data/lib/aws-sdk-autoscaling/resource.rb +7 -4
- data/lib/aws-sdk-autoscaling/scaling_policy.rb +31 -20
- data/lib/aws-sdk-autoscaling/scheduled_action.rb +2 -0
- data/lib/aws-sdk-autoscaling/tag.rb +2 -0
- data/lib/aws-sdk-autoscaling/types.rb +548 -101
- data/lib/aws-sdk-autoscaling/waiters.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afecae18046996033a2ef55bfc84f74433ff7ca9495fdd25d0f3e12cacbf94ff
|
4
|
+
data.tar.gz: d52641542a1f514bd4b026b8133450c0102505fd1f969888fe20f472a4b7f91b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ba73d0b1da470a5ebe7c7f208e16b13816cb3bfeab19567f7f74120ea8b8a99b8f0e2f5a6549b194ea0c797711eb1399e79b186cea84a7ad9373adb922cb4fc
|
7
|
+
data.tar.gz: bf045f371fb7e6061144f3c8844c4e673e0ad9692fe759eacb8009e51866bcd31f3e74727139c00e254996fbe064737de4a8c105e128601b2bca8d0247b120c9
|
data/lib/aws-sdk-autoscaling.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -56,6 +58,6 @@ require_relative 'aws-sdk-autoscaling/customizations'
|
|
56
58
|
# @service
|
57
59
|
module Aws::AutoScaling
|
58
60
|
|
59
|
-
GEM_VERSION = '1.
|
61
|
+
GEM_VERSION = '1.43.0'
|
60
62
|
|
61
63
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -75,8 +77,7 @@ module Aws::AutoScaling
|
|
75
77
|
data[:desired_capacity]
|
76
78
|
end
|
77
79
|
|
78
|
-
# The
|
79
|
-
# before another scaling activity can start.
|
80
|
+
# The duration of the default cooldown period, in seconds.
|
80
81
|
# @return [Integer]
|
81
82
|
def default_cooldown
|
82
83
|
data[:default_cooldown]
|
@@ -583,15 +584,19 @@ module Aws::AutoScaling
|
|
583
584
|
# @option options [required, String] :policy_name
|
584
585
|
# The name of the policy.
|
585
586
|
# @option options [String] :policy_type
|
586
|
-
#
|
587
|
-
#
|
588
|
-
#
|
587
|
+
# One of the following policy types:
|
588
|
+
#
|
589
|
+
# * `TargetTrackingScaling`
|
590
|
+
#
|
591
|
+
# * `StepScaling`
|
592
|
+
#
|
593
|
+
# * `SimpleScaling` (default)
|
589
594
|
# @option options [String] :adjustment_type
|
590
|
-
# Specifies
|
591
|
-
# number or a percentage
|
595
|
+
# Specifies how the scaling adjustment is interpreted (either an
|
596
|
+
# absolute number or a percentage). The valid values are
|
592
597
|
# `ChangeInCapacity`, `ExactCapacity`, and `PercentChangeInCapacity`.
|
593
598
|
#
|
594
|
-
#
|
599
|
+
# Required if the policy type is `StepScaling` or `SimpleScaling`. For
|
595
600
|
# more information, see [Scaling Adjustment Types][1] in the *Amazon EC2
|
596
601
|
# Auto Scaling User Guide*.
|
597
602
|
#
|
@@ -602,41 +607,43 @@ module Aws::AutoScaling
|
|
602
607
|
# Available for backward compatibility. Use `MinAdjustmentMagnitude`
|
603
608
|
# instead.
|
604
609
|
# @option options [Integer] :min_adjustment_magnitude
|
605
|
-
# The minimum value to scale by when
|
606
|
-
# example, suppose that you create a step
|
607
|
-
# Auto Scaling group by 25 percent and
|
608
|
-
# `MinAdjustmentMagnitude` of 2. If the group has 4
|
609
|
-
# scaling policy is performed, 25 percent of 4 is 1.
|
610
|
-
# you specified a `MinAdjustmentMagnitude` of 2, Amazon
|
611
|
-
# scales out the group by 2 instances.
|
612
|
-
#
|
613
|
-
# Valid only if the policy type is `StepScaling` or `SimpleScaling
|
614
|
-
#
|
615
|
-
#
|
616
|
-
#
|
610
|
+
# The minimum value to scale by when the adjustment type is
|
611
|
+
# `PercentChangeInCapacity`. For example, suppose that you create a step
|
612
|
+
# scaling policy to scale out an Auto Scaling group by 25 percent and
|
613
|
+
# you specify a `MinAdjustmentMagnitude` of 2. If the group has 4
|
614
|
+
# instances and the scaling policy is performed, 25 percent of 4 is 1.
|
615
|
+
# However, because you specified a `MinAdjustmentMagnitude` of 2, Amazon
|
616
|
+
# EC2 Auto Scaling scales out the group by 2 instances.
|
617
|
+
#
|
618
|
+
# Valid only if the policy type is `StepScaling` or `SimpleScaling`. For
|
619
|
+
# more information, see [Scaling Adjustment Types][1] in the *Amazon EC2
|
620
|
+
# Auto Scaling User Guide*.
|
621
|
+
#
|
622
|
+
# <note markdown="1"> Some Auto Scaling groups use instance weights. In this case, set the
|
623
|
+
# `MinAdjustmentMagnitude` to a value that is at least as large as your
|
624
|
+
# largest instance weight.
|
625
|
+
#
|
626
|
+
# </note>
|
617
627
|
#
|
618
628
|
#
|
619
629
|
#
|
620
630
|
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment
|
621
631
|
# @option options [Integer] :scaling_adjustment
|
622
|
-
# The amount by which
|
623
|
-
#
|
624
|
-
#
|
625
|
-
#
|
626
|
-
#
|
627
|
-
#
|
628
|
-
#
|
629
|
-
# Conditional: If you specify `SimpleScaling` for the policy type, you
|
630
|
-
# must specify this parameter. (Not used with any other policy type.)
|
632
|
+
# The amount by which to scale, based on the specified adjustment type.
|
633
|
+
# A positive value adds to the current capacity while a negative number
|
634
|
+
# removes from the current capacity. For exact capacity, you must
|
635
|
+
# specify a positive value.
|
636
|
+
#
|
637
|
+
# Required if the policy type is `SimpleScaling`. (Not used with any
|
638
|
+
# other policy type.)
|
631
639
|
# @option options [Integer] :cooldown
|
632
|
-
# The
|
633
|
-
#
|
634
|
-
#
|
635
|
-
# applies.
|
640
|
+
# The duration of the policy's cooldown period, in seconds. When a
|
641
|
+
# cooldown period is specified here, it overrides the default cooldown
|
642
|
+
# period defined for the Auto Scaling group.
|
636
643
|
#
|
637
644
|
# Valid only if the policy type is `SimpleScaling`. For more
|
638
|
-
# information, see [Scaling Cooldowns
|
639
|
-
# Scaling User Guide*.
|
645
|
+
# information, see [Scaling Cooldowns for Amazon EC2 Auto Scaling][1] in
|
646
|
+
# the *Amazon EC2 Auto Scaling User Guide*.
|
640
647
|
#
|
641
648
|
#
|
642
649
|
#
|
@@ -651,25 +658,38 @@ module Aws::AutoScaling
|
|
651
658
|
# A set of adjustments that enable you to scale based on the size of the
|
652
659
|
# alarm breach.
|
653
660
|
#
|
654
|
-
#
|
655
|
-
#
|
661
|
+
# Required if the policy type is `StepScaling`. (Not used with any other
|
662
|
+
# policy type.)
|
656
663
|
# @option options [Integer] :estimated_instance_warmup
|
657
664
|
# The estimated time, in seconds, until a newly launched instance can
|
658
|
-
# contribute to the CloudWatch metrics.
|
659
|
-
#
|
665
|
+
# contribute to the CloudWatch metrics. If not provided, the default is
|
666
|
+
# to use the value from the default cooldown period for the Auto Scaling
|
667
|
+
# group.
|
660
668
|
#
|
661
|
-
# Valid only if the policy type is `
|
662
|
-
# `
|
669
|
+
# Valid only if the policy type is `TargetTrackingScaling` or
|
670
|
+
# `StepScaling`.
|
663
671
|
# @option options [Types::TargetTrackingConfiguration] :target_tracking_configuration
|
664
672
|
# A target tracking scaling policy. Includes support for predefined or
|
665
673
|
# customized metrics.
|
666
674
|
#
|
675
|
+
# The following predefined metrics are available:
|
676
|
+
#
|
677
|
+
# * `ASGAverageCPUUtilization`
|
678
|
+
#
|
679
|
+
# * `ASGAverageNetworkIn`
|
680
|
+
#
|
681
|
+
# * `ASGAverageNetworkOut`
|
682
|
+
#
|
683
|
+
# * `ALBRequestCountPerTarget`
|
684
|
+
#
|
685
|
+
# If you specify `ALBRequestCountPerTarget` for the metric, you must
|
686
|
+
# specify the `ResourceLabel` parameter with the
|
687
|
+
# `PredefinedMetricSpecification`.
|
688
|
+
#
|
667
689
|
# For more information, see [TargetTrackingConfiguration][1] in the
|
668
690
|
# *Amazon EC2 Auto Scaling API Reference*.
|
669
691
|
#
|
670
|
-
#
|
671
|
-
# type, you must specify this parameter. (Not used with any other policy
|
672
|
-
# type.)
|
692
|
+
# Required if the policy type is `TargetTrackingScaling`.
|
673
693
|
#
|
674
694
|
#
|
675
695
|
#
|
@@ -763,24 +783,27 @@ module Aws::AutoScaling
|
|
763
783
|
# })
|
764
784
|
# @param [Hash] options ({})
|
765
785
|
# @option options [Array<String>] :scaling_processes
|
766
|
-
# One or more of the following processes
|
767
|
-
# all processes are specified.
|
786
|
+
# One or more of the following processes:
|
768
787
|
#
|
769
788
|
# * `Launch`
|
770
789
|
#
|
771
790
|
# * `Terminate`
|
772
791
|
#
|
773
|
-
# * `
|
792
|
+
# * `AddToLoadBalancer`
|
774
793
|
#
|
775
|
-
# * `
|
794
|
+
# * `AlarmNotification`
|
776
795
|
#
|
777
796
|
# * `AZRebalance`
|
778
797
|
#
|
779
|
-
# * `
|
798
|
+
# * `HealthCheck`
|
799
|
+
#
|
800
|
+
# * `InstanceRefresh`
|
801
|
+
#
|
802
|
+
# * `ReplaceUnhealthy`
|
780
803
|
#
|
781
804
|
# * `ScheduledActions`
|
782
805
|
#
|
783
|
-
#
|
806
|
+
# If you omit this parameter, all processes are specified.
|
784
807
|
# @return [EmptyStructure]
|
785
808
|
def resume_processes(options = {})
|
786
809
|
options = options.merge(auto_scaling_group_name: @name)
|
@@ -819,24 +842,27 @@ module Aws::AutoScaling
|
|
819
842
|
# })
|
820
843
|
# @param [Hash] options ({})
|
821
844
|
# @option options [Array<String>] :scaling_processes
|
822
|
-
# One or more of the following processes
|
823
|
-
# all processes are specified.
|
845
|
+
# One or more of the following processes:
|
824
846
|
#
|
825
847
|
# * `Launch`
|
826
848
|
#
|
827
849
|
# * `Terminate`
|
828
850
|
#
|
829
|
-
# * `
|
851
|
+
# * `AddToLoadBalancer`
|
830
852
|
#
|
831
|
-
# * `
|
853
|
+
# * `AlarmNotification`
|
832
854
|
#
|
833
855
|
# * `AZRebalance`
|
834
856
|
#
|
835
|
-
# * `
|
857
|
+
# * `HealthCheck`
|
858
|
+
#
|
859
|
+
# * `InstanceRefresh`
|
860
|
+
#
|
861
|
+
# * `ReplaceUnhealthy`
|
836
862
|
#
|
837
863
|
# * `ScheduledActions`
|
838
864
|
#
|
839
|
-
#
|
865
|
+
# If you omit this parameter, all processes are specified.
|
840
866
|
# @return [EmptyStructure]
|
841
867
|
def suspend_processes(options = {})
|
842
868
|
options = options.merge(auto_scaling_group_name: @name)
|
@@ -945,13 +971,11 @@ module Aws::AutoScaling
|
|
945
971
|
# @option options [Integer] :default_cooldown
|
946
972
|
# The amount of time, in seconds, after a scaling activity completes
|
947
973
|
# before another scaling activity can start. The default value is `300`.
|
948
|
-
# This cooldown period is not used when a scaling-specific cooldown is
|
949
|
-
# specified.
|
950
974
|
#
|
951
|
-
#
|
952
|
-
#
|
953
|
-
# information, see [Scaling Cooldowns
|
954
|
-
# Scaling User Guide*.
|
975
|
+
# This setting applies when using simple scaling policies, but not when
|
976
|
+
# using other scaling policies or scheduled scaling. For more
|
977
|
+
# information, see [Scaling Cooldowns for Amazon EC2 Auto Scaling][1] in
|
978
|
+
# the *Amazon EC2 Auto Scaling User Guide*.
|
955
979
|
#
|
956
980
|
#
|
957
981
|
#
|
@@ -971,8 +995,7 @@ module Aws::AutoScaling
|
|
971
995
|
# For more information, see [Health Check Grace Period][1] in the
|
972
996
|
# *Amazon EC2 Auto Scaling User Guide*.
|
973
997
|
#
|
974
|
-
#
|
975
|
-
# health check.
|
998
|
+
# Required if you are adding an `ELB` health check.
|
976
999
|
#
|
977
1000
|
#
|
978
1001
|
#
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# WARNING ABOUT GENERATED CODE
|
2
4
|
#
|
3
5
|
# This file is generated. See the contributing guide for more information:
|
@@ -562,6 +564,57 @@ module Aws::AutoScaling
|
|
562
564
|
req.send_request(options)
|
563
565
|
end
|
564
566
|
|
567
|
+
# Cancels an instance refresh operation in progress. Cancellation does
|
568
|
+
# not roll back any replacements that have already been completed, but
|
569
|
+
# it prevents new replacements from being started.
|
570
|
+
#
|
571
|
+
# For more information, see [Replacing Auto Scaling Instances Based on
|
572
|
+
# an Instance Refresh][1].
|
573
|
+
#
|
574
|
+
#
|
575
|
+
#
|
576
|
+
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html
|
577
|
+
#
|
578
|
+
# @option params [required, String] :auto_scaling_group_name
|
579
|
+
# The name of the Auto Scaling group.
|
580
|
+
#
|
581
|
+
# @return [Types::CancelInstanceRefreshAnswer] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
582
|
+
#
|
583
|
+
# * {Types::CancelInstanceRefreshAnswer#instance_refresh_id #instance_refresh_id} => String
|
584
|
+
#
|
585
|
+
#
|
586
|
+
# @example Example: To cancel an instance refresh
|
587
|
+
#
|
588
|
+
# # This example cancels an instance refresh operation in progress.
|
589
|
+
#
|
590
|
+
# resp = client.cancel_instance_refresh({
|
591
|
+
# auto_scaling_group_name: "my-auto-scaling-group",
|
592
|
+
# })
|
593
|
+
#
|
594
|
+
# resp.to_h outputs the following:
|
595
|
+
# {
|
596
|
+
# instance_refresh_id: "08b91cf7-8fa6-48af-b6a6-d227f40f1b9b",
|
597
|
+
# }
|
598
|
+
#
|
599
|
+
# @example Request syntax with placeholder values
|
600
|
+
#
|
601
|
+
# resp = client.cancel_instance_refresh({
|
602
|
+
# auto_scaling_group_name: "XmlStringMaxLen255", # required
|
603
|
+
# })
|
604
|
+
#
|
605
|
+
# @example Response structure
|
606
|
+
#
|
607
|
+
# resp.instance_refresh_id #=> String
|
608
|
+
#
|
609
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CancelInstanceRefresh AWS API Documentation
|
610
|
+
#
|
611
|
+
# @overload cancel_instance_refresh(params = {})
|
612
|
+
# @param [Hash] params ({})
|
613
|
+
def cancel_instance_refresh(params = {}, options = {})
|
614
|
+
req = build_request(:cancel_instance_refresh, params)
|
615
|
+
req.send_request(options)
|
616
|
+
end
|
617
|
+
|
565
618
|
# Completes the lifecycle action for the specified token or instance
|
566
619
|
# with the specified result.
|
567
620
|
#
|
@@ -771,8 +824,10 @@ module Aws::AutoScaling
|
|
771
824
|
# The amount of time, in seconds, after a scaling activity completes
|
772
825
|
# before another scaling activity can start. The default value is `300`.
|
773
826
|
#
|
774
|
-
#
|
775
|
-
#
|
827
|
+
# This setting applies when using simple scaling policies, but not when
|
828
|
+
# using other scaling policies or scheduled scaling. For more
|
829
|
+
# information, see [Scaling Cooldowns for Amazon EC2 Auto Scaling][1] in
|
830
|
+
# the *Amazon EC2 Auto Scaling User Guide*.
|
776
831
|
#
|
777
832
|
#
|
778
833
|
#
|
@@ -833,8 +888,7 @@ module Aws::AutoScaling
|
|
833
888
|
# For more information, see [Health Check Grace Period][1] in the
|
834
889
|
# *Amazon EC2 Auto Scaling User Guide*.
|
835
890
|
#
|
836
|
-
#
|
837
|
-
# health check.
|
891
|
+
# Required if you are adding an `ELB` health check.
|
838
892
|
#
|
839
893
|
#
|
840
894
|
#
|
@@ -947,46 +1001,50 @@ module Aws::AutoScaling
|
|
947
1001
|
#
|
948
1002
|
# resp = client.create_auto_scaling_group({
|
949
1003
|
# auto_scaling_group_name: "my-auto-scaling-group",
|
950
|
-
#
|
1004
|
+
# launch_template: {
|
1005
|
+
# launch_template_id: "lt-0a20c965061f64abc",
|
1006
|
+
# version: "$Latest",
|
1007
|
+
# },
|
1008
|
+
# max_instance_lifetime: 2592000,
|
951
1009
|
# max_size: 3,
|
952
1010
|
# min_size: 1,
|
953
|
-
# vpc_zone_identifier: "subnet-
|
1011
|
+
# vpc_zone_identifier: "subnet-057fa0918fEXAMPLE",
|
954
1012
|
# })
|
955
1013
|
#
|
956
|
-
# @example Example: To create an Auto Scaling group with an attached
|
1014
|
+
# @example Example: To create an Auto Scaling group with an attached target group
|
957
1015
|
#
|
958
|
-
# # This example creates an Auto Scaling group and attaches the specified
|
1016
|
+
# # This example creates an Auto Scaling group and attaches the specified target group.
|
959
1017
|
#
|
960
1018
|
# resp = client.create_auto_scaling_group({
|
961
1019
|
# auto_scaling_group_name: "my-auto-scaling-group",
|
962
|
-
# availability_zones: [
|
963
|
-
# "us-west-2c",
|
964
|
-
# ],
|
965
1020
|
# health_check_grace_period: 120,
|
966
1021
|
# health_check_type: "ELB",
|
967
1022
|
# launch_configuration_name: "my-launch-config",
|
968
|
-
# load_balancer_names: [
|
969
|
-
# "my-load-balancer",
|
970
|
-
# ],
|
971
1023
|
# max_size: 3,
|
972
1024
|
# min_size: 1,
|
1025
|
+
# target_group_arns: [
|
1026
|
+
# "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067",
|
1027
|
+
# ],
|
1028
|
+
# vpc_zone_identifier: "subnet-057fa0918fEXAMPLE, subnet-610acd08EXAMPLE",
|
973
1029
|
# })
|
974
1030
|
#
|
975
|
-
# @example Example: To create an Auto Scaling group with an attached
|
1031
|
+
# @example Example: To create an Auto Scaling group with an attached load balancer
|
976
1032
|
#
|
977
|
-
# # This example creates an Auto Scaling group and attaches the specified
|
1033
|
+
# # This example creates an Auto Scaling group and attaches the specified Classic Load Balancer.
|
978
1034
|
#
|
979
1035
|
# resp = client.create_auto_scaling_group({
|
980
1036
|
# auto_scaling_group_name: "my-auto-scaling-group",
|
1037
|
+
# availability_zones: [
|
1038
|
+
# "us-west-2c",
|
1039
|
+
# ],
|
981
1040
|
# health_check_grace_period: 120,
|
982
1041
|
# health_check_type: "ELB",
|
983
1042
|
# launch_configuration_name: "my-launch-config",
|
1043
|
+
# load_balancer_names: [
|
1044
|
+
# "my-load-balancer",
|
1045
|
+
# ],
|
984
1046
|
# max_size: 3,
|
985
1047
|
# min_size: 1,
|
986
|
-
# target_group_arns: [
|
987
|
-
# "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067",
|
988
|
-
# ],
|
989
|
-
# vpc_zone_identifier: "subnet-4176792c, subnet-65ea5f08",
|
990
1048
|
# })
|
991
1049
|
#
|
992
1050
|
# @example Request syntax with placeholder values
|
@@ -1649,7 +1707,7 @@ module Aws::AutoScaling
|
|
1649
1707
|
#
|
1650
1708
|
# resp = client.delete_policy({
|
1651
1709
|
# auto_scaling_group_name: "my-auto-scaling-group",
|
1652
|
-
# policy_name: "
|
1710
|
+
# policy_name: "my-step-scale-out-policy",
|
1653
1711
|
# })
|
1654
1712
|
#
|
1655
1713
|
# @example Request syntax with placeholder values
|
@@ -1818,7 +1876,7 @@ module Aws::AutoScaling
|
|
1818
1876
|
# * {Types::DescribeAdjustmentTypesAnswer#adjustment_types #adjustment_types} => Array<Types::AdjustmentType>
|
1819
1877
|
#
|
1820
1878
|
#
|
1821
|
-
# @example Example: To describe the Auto Scaling adjustment types
|
1879
|
+
# @example Example: To describe the Amazon EC2 Auto Scaling adjustment types
|
1822
1880
|
#
|
1823
1881
|
# # This example describes the available adjustment types.
|
1824
1882
|
#
|
@@ -2147,6 +2205,116 @@ module Aws::AutoScaling
|
|
2147
2205
|
req.send_request(options)
|
2148
2206
|
end
|
2149
2207
|
|
2208
|
+
# Describes one or more instance refreshes.
|
2209
|
+
#
|
2210
|
+
# You can determine the status of a request by looking at the `Status`
|
2211
|
+
# parameter. The following are the possible statuses:
|
2212
|
+
#
|
2213
|
+
# * `Pending` - The request was created, but the operation has not
|
2214
|
+
# started.
|
2215
|
+
#
|
2216
|
+
# * `InProgress` - The operation is in progress.
|
2217
|
+
#
|
2218
|
+
# * `Successful` - The operation completed successfully.
|
2219
|
+
#
|
2220
|
+
# * `Failed` - The operation failed to complete. You can troubleshoot
|
2221
|
+
# using the status reason and the scaling activities.
|
2222
|
+
#
|
2223
|
+
# * `Cancelling` - An ongoing operation is being cancelled. Cancellation
|
2224
|
+
# does not roll back any replacements that have already been
|
2225
|
+
# completed, but it prevents new replacements from being started.
|
2226
|
+
#
|
2227
|
+
# * `Cancelled` - The operation is cancelled.
|
2228
|
+
#
|
2229
|
+
# For more information, see [Replacing Auto Scaling Instances Based on
|
2230
|
+
# an Instance Refresh][1].
|
2231
|
+
#
|
2232
|
+
#
|
2233
|
+
#
|
2234
|
+
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html
|
2235
|
+
#
|
2236
|
+
# @option params [required, String] :auto_scaling_group_name
|
2237
|
+
# The name of the Auto Scaling group.
|
2238
|
+
#
|
2239
|
+
# @option params [Array<String>] :instance_refresh_ids
|
2240
|
+
# One or more instance refresh IDs.
|
2241
|
+
#
|
2242
|
+
# @option params [String] :next_token
|
2243
|
+
# The token for the next set of items to return. (You received this
|
2244
|
+
# token from a previous call.)
|
2245
|
+
#
|
2246
|
+
# @option params [Integer] :max_records
|
2247
|
+
# The maximum number of items to return with this call. The default
|
2248
|
+
# value is `50` and the maximum value is `100`.
|
2249
|
+
#
|
2250
|
+
# @return [Types::DescribeInstanceRefreshesAnswer] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
2251
|
+
#
|
2252
|
+
# * {Types::DescribeInstanceRefreshesAnswer#instance_refreshes #instance_refreshes} => Array<Types::InstanceRefresh>
|
2253
|
+
# * {Types::DescribeInstanceRefreshesAnswer#next_token #next_token} => String
|
2254
|
+
#
|
2255
|
+
#
|
2256
|
+
# @example Example: To list instance refreshes
|
2257
|
+
#
|
2258
|
+
# # This example describes the instance refreshes for the specified Auto Scaling group.
|
2259
|
+
#
|
2260
|
+
# resp = client.describe_instance_refreshes({
|
2261
|
+
# auto_scaling_group_name: "my-auto-scaling-group",
|
2262
|
+
# })
|
2263
|
+
#
|
2264
|
+
# resp.to_h outputs the following:
|
2265
|
+
# {
|
2266
|
+
# instance_refreshes: [
|
2267
|
+
# {
|
2268
|
+
# auto_scaling_group_name: "my-auto-scaling-group",
|
2269
|
+
# instance_refresh_id: "08b91cf7-8fa6-48af-b6a6-d227f40f1b9b",
|
2270
|
+
# instances_to_update: 5,
|
2271
|
+
# percentage_complete: 0,
|
2272
|
+
# start_time: Time.parse("2020-06-02T18:11:27Z"),
|
2273
|
+
# status: "InProgress",
|
2274
|
+
# },
|
2275
|
+
# {
|
2276
|
+
# auto_scaling_group_name: "my-auto-scaling-group",
|
2277
|
+
# end_time: Time.parse("2020-06-02T16:53:37Z"),
|
2278
|
+
# instance_refresh_id: "dd7728d0-5bc4-4575-96a3-1b2c52bf8bb1",
|
2279
|
+
# instances_to_update: 0,
|
2280
|
+
# percentage_complete: 100,
|
2281
|
+
# start_time: Time.parse("2020-06-02T16:43:19Z"),
|
2282
|
+
# status: "Successful",
|
2283
|
+
# },
|
2284
|
+
# ],
|
2285
|
+
# }
|
2286
|
+
#
|
2287
|
+
# @example Request syntax with placeholder values
|
2288
|
+
#
|
2289
|
+
# resp = client.describe_instance_refreshes({
|
2290
|
+
# auto_scaling_group_name: "XmlStringMaxLen255", # required
|
2291
|
+
# instance_refresh_ids: ["XmlStringMaxLen255"],
|
2292
|
+
# next_token: "XmlString",
|
2293
|
+
# max_records: 1,
|
2294
|
+
# })
|
2295
|
+
#
|
2296
|
+
# @example Response structure
|
2297
|
+
#
|
2298
|
+
# resp.instance_refreshes #=> Array
|
2299
|
+
# resp.instance_refreshes[0].instance_refresh_id #=> String
|
2300
|
+
# resp.instance_refreshes[0].auto_scaling_group_name #=> String
|
2301
|
+
# resp.instance_refreshes[0].status #=> String, one of "Pending", "InProgress", "Successful", "Failed", "Cancelling", "Cancelled"
|
2302
|
+
# resp.instance_refreshes[0].status_reason #=> String
|
2303
|
+
# resp.instance_refreshes[0].start_time #=> Time
|
2304
|
+
# resp.instance_refreshes[0].end_time #=> Time
|
2305
|
+
# resp.instance_refreshes[0].percentage_complete #=> Integer
|
2306
|
+
# resp.instance_refreshes[0].instances_to_update #=> Integer
|
2307
|
+
# resp.next_token #=> String
|
2308
|
+
#
|
2309
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeInstanceRefreshes AWS API Documentation
|
2310
|
+
#
|
2311
|
+
# @overload describe_instance_refreshes(params = {})
|
2312
|
+
# @param [Hash] params ({})
|
2313
|
+
def describe_instance_refreshes(params = {}, options = {})
|
2314
|
+
req = build_request(:describe_instance_refreshes, params)
|
2315
|
+
req.send_request(options)
|
2316
|
+
end
|
2317
|
+
|
2150
2318
|
# Describes one or more launch configurations.
|
2151
2319
|
#
|
2152
2320
|
# @option params [Array<String>] :launch_configuration_names
|
@@ -2664,7 +2832,7 @@ module Aws::AutoScaling
|
|
2664
2832
|
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
2665
2833
|
#
|
2666
2834
|
#
|
2667
|
-
# @example Example: To describe
|
2835
|
+
# @example Example: To describe scaling policies
|
2668
2836
|
#
|
2669
2837
|
# # This example describes the policies for the specified Auto Scaling group.
|
2670
2838
|
#
|
@@ -3569,7 +3737,8 @@ module Aws::AutoScaling
|
|
3569
3737
|
req.send_request(options)
|
3570
3738
|
end
|
3571
3739
|
|
3572
|
-
# Executes the specified policy.
|
3740
|
+
# Executes the specified policy. This can be useful for testing the
|
3741
|
+
# design of your scaling policy.
|
3573
3742
|
#
|
3574
3743
|
# @option params [String] :auto_scaling_group_name
|
3575
3744
|
# The name of the Auto Scaling group.
|
@@ -3581,11 +3750,9 @@ module Aws::AutoScaling
|
|
3581
3750
|
# Indicates whether Amazon EC2 Auto Scaling waits for the cooldown
|
3582
3751
|
# period to complete before executing the policy.
|
3583
3752
|
#
|
3584
|
-
#
|
3585
|
-
#
|
3586
|
-
#
|
3587
|
-
# For more information, see [Scaling Cooldowns][1] in the *Amazon EC2
|
3588
|
-
# Auto Scaling User Guide*.
|
3753
|
+
# Valid only if the policy type is `SimpleScaling`. For more
|
3754
|
+
# information, see [Scaling Cooldowns for Amazon EC2 Auto Scaling][1] in
|
3755
|
+
# the *Amazon EC2 Auto Scaling User Guide*.
|
3589
3756
|
#
|
3590
3757
|
#
|
3591
3758
|
#
|
@@ -3601,26 +3768,27 @@ module Aws::AutoScaling
|
|
3601
3768
|
# If you specify a metric value that doesn't correspond to a step
|
3602
3769
|
# adjustment for the policy, the call returns an error.
|
3603
3770
|
#
|
3604
|
-
#
|
3605
|
-
#
|
3771
|
+
# Required if the policy type is `StepScaling` and not supported
|
3772
|
+
# otherwise.
|
3606
3773
|
#
|
3607
3774
|
# @option params [Float] :breach_threshold
|
3608
3775
|
# The breach threshold for the alarm.
|
3609
3776
|
#
|
3610
|
-
#
|
3611
|
-
#
|
3777
|
+
# Required if the policy type is `StepScaling` and not supported
|
3778
|
+
# otherwise.
|
3612
3779
|
#
|
3613
3780
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
3614
3781
|
#
|
3615
3782
|
#
|
3616
|
-
# @example Example: To execute
|
3783
|
+
# @example Example: To execute a scaling policy
|
3617
3784
|
#
|
3618
|
-
# # This example executes the specified
|
3785
|
+
# # This example executes the specified policy.
|
3619
3786
|
#
|
3620
3787
|
# resp = client.execute_policy({
|
3621
3788
|
# auto_scaling_group_name: "my-auto-scaling-group",
|
3622
|
-
#
|
3623
|
-
#
|
3789
|
+
# breach_threshold: 50.0,
|
3790
|
+
# metric_value: 59.0,
|
3791
|
+
# policy_name: "my-step-scale-out-policy",
|
3624
3792
|
# })
|
3625
3793
|
#
|
3626
3794
|
# @example Request syntax with placeholder values
|
@@ -3780,16 +3948,16 @@ module Aws::AutoScaling
|
|
3780
3948
|
#
|
3781
3949
|
# * autoscaling:EC2\_INSTANCE\_TERMINATING
|
3782
3950
|
#
|
3783
|
-
#
|
3784
|
-
#
|
3951
|
+
# Required for new lifecycle hooks, but optional when updating existing
|
3952
|
+
# hooks.
|
3785
3953
|
#
|
3786
3954
|
# @option params [String] :role_arn
|
3787
3955
|
# The ARN of the IAM role that allows the Auto Scaling group to publish
|
3788
3956
|
# to the specified notification target, for example, an Amazon SNS topic
|
3789
3957
|
# or an Amazon SQS queue.
|
3790
3958
|
#
|
3791
|
-
#
|
3792
|
-
#
|
3959
|
+
# Required for new lifecycle hooks, but optional when updating existing
|
3960
|
+
# hooks.
|
3793
3961
|
#
|
3794
3962
|
# @option params [String] :notification_target_arn
|
3795
3963
|
# The ARN of the notification target that Amazon EC2 Auto Scaling uses
|
@@ -3942,16 +4110,20 @@ module Aws::AutoScaling
|
|
3942
4110
|
# The name of the policy.
|
3943
4111
|
#
|
3944
4112
|
# @option params [String] :policy_type
|
3945
|
-
#
|
3946
|
-
#
|
3947
|
-
#
|
4113
|
+
# One of the following policy types:
|
4114
|
+
#
|
4115
|
+
# * `TargetTrackingScaling`
|
4116
|
+
#
|
4117
|
+
# * `StepScaling`
|
4118
|
+
#
|
4119
|
+
# * `SimpleScaling` (default)
|
3948
4120
|
#
|
3949
4121
|
# @option params [String] :adjustment_type
|
3950
|
-
# Specifies
|
3951
|
-
# number or a percentage
|
4122
|
+
# Specifies how the scaling adjustment is interpreted (either an
|
4123
|
+
# absolute number or a percentage). The valid values are
|
3952
4124
|
# `ChangeInCapacity`, `ExactCapacity`, and `PercentChangeInCapacity`.
|
3953
4125
|
#
|
3954
|
-
#
|
4126
|
+
# Required if the policy type is `StepScaling` or `SimpleScaling`. For
|
3955
4127
|
# more information, see [Scaling Adjustment Types][1] in the *Amazon EC2
|
3956
4128
|
# Auto Scaling User Guide*.
|
3957
4129
|
#
|
@@ -3964,43 +4136,45 @@ module Aws::AutoScaling
|
|
3964
4136
|
# instead.
|
3965
4137
|
#
|
3966
4138
|
# @option params [Integer] :min_adjustment_magnitude
|
3967
|
-
# The minimum value to scale by when
|
3968
|
-
# example, suppose that you create a step
|
3969
|
-
# Auto Scaling group by 25 percent and
|
3970
|
-
# `MinAdjustmentMagnitude` of 2. If the group has 4
|
3971
|
-
# scaling policy is performed, 25 percent of 4 is 1.
|
3972
|
-
# you specified a `MinAdjustmentMagnitude` of 2, Amazon
|
3973
|
-
# scales out the group by 2 instances.
|
3974
|
-
#
|
3975
|
-
# Valid only if the policy type is `StepScaling` or `SimpleScaling
|
3976
|
-
#
|
3977
|
-
#
|
3978
|
-
#
|
4139
|
+
# The minimum value to scale by when the adjustment type is
|
4140
|
+
# `PercentChangeInCapacity`. For example, suppose that you create a step
|
4141
|
+
# scaling policy to scale out an Auto Scaling group by 25 percent and
|
4142
|
+
# you specify a `MinAdjustmentMagnitude` of 2. If the group has 4
|
4143
|
+
# instances and the scaling policy is performed, 25 percent of 4 is 1.
|
4144
|
+
# However, because you specified a `MinAdjustmentMagnitude` of 2, Amazon
|
4145
|
+
# EC2 Auto Scaling scales out the group by 2 instances.
|
4146
|
+
#
|
4147
|
+
# Valid only if the policy type is `StepScaling` or `SimpleScaling`. For
|
4148
|
+
# more information, see [Scaling Adjustment Types][1] in the *Amazon EC2
|
4149
|
+
# Auto Scaling User Guide*.
|
4150
|
+
#
|
4151
|
+
# <note markdown="1"> Some Auto Scaling groups use instance weights. In this case, set the
|
4152
|
+
# `MinAdjustmentMagnitude` to a value that is at least as large as your
|
4153
|
+
# largest instance weight.
|
4154
|
+
#
|
4155
|
+
# </note>
|
3979
4156
|
#
|
3980
4157
|
#
|
3981
4158
|
#
|
3982
4159
|
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment
|
3983
4160
|
#
|
3984
4161
|
# @option params [Integer] :scaling_adjustment
|
3985
|
-
# The amount by which
|
3986
|
-
#
|
3987
|
-
#
|
3988
|
-
#
|
3989
|
-
# capacity and a negative value subtracts from the current capacity. For
|
3990
|
-
# exact capacity, you must specify a positive value.
|
4162
|
+
# The amount by which to scale, based on the specified adjustment type.
|
4163
|
+
# A positive value adds to the current capacity while a negative number
|
4164
|
+
# removes from the current capacity. For exact capacity, you must
|
4165
|
+
# specify a positive value.
|
3991
4166
|
#
|
3992
|
-
#
|
3993
|
-
#
|
4167
|
+
# Required if the policy type is `SimpleScaling`. (Not used with any
|
4168
|
+
# other policy type.)
|
3994
4169
|
#
|
3995
4170
|
# @option params [Integer] :cooldown
|
3996
|
-
# The
|
3997
|
-
#
|
3998
|
-
#
|
3999
|
-
# applies.
|
4171
|
+
# The duration of the policy's cooldown period, in seconds. When a
|
4172
|
+
# cooldown period is specified here, it overrides the default cooldown
|
4173
|
+
# period defined for the Auto Scaling group.
|
4000
4174
|
#
|
4001
4175
|
# Valid only if the policy type is `SimpleScaling`. For more
|
4002
|
-
# information, see [Scaling Cooldowns
|
4003
|
-
# Scaling User Guide*.
|
4176
|
+
# information, see [Scaling Cooldowns for Amazon EC2 Auto Scaling][1] in
|
4177
|
+
# the *Amazon EC2 Auto Scaling User Guide*.
|
4004
4178
|
#
|
4005
4179
|
#
|
4006
4180
|
#
|
@@ -4017,27 +4191,40 @@ module Aws::AutoScaling
|
|
4017
4191
|
# A set of adjustments that enable you to scale based on the size of the
|
4018
4192
|
# alarm breach.
|
4019
4193
|
#
|
4020
|
-
#
|
4021
|
-
#
|
4194
|
+
# Required if the policy type is `StepScaling`. (Not used with any other
|
4195
|
+
# policy type.)
|
4022
4196
|
#
|
4023
4197
|
# @option params [Integer] :estimated_instance_warmup
|
4024
4198
|
# The estimated time, in seconds, until a newly launched instance can
|
4025
|
-
# contribute to the CloudWatch metrics.
|
4026
|
-
#
|
4199
|
+
# contribute to the CloudWatch metrics. If not provided, the default is
|
4200
|
+
# to use the value from the default cooldown period for the Auto Scaling
|
4201
|
+
# group.
|
4027
4202
|
#
|
4028
|
-
# Valid only if the policy type is `
|
4029
|
-
# `
|
4203
|
+
# Valid only if the policy type is `TargetTrackingScaling` or
|
4204
|
+
# `StepScaling`.
|
4030
4205
|
#
|
4031
4206
|
# @option params [Types::TargetTrackingConfiguration] :target_tracking_configuration
|
4032
4207
|
# A target tracking scaling policy. Includes support for predefined or
|
4033
4208
|
# customized metrics.
|
4034
4209
|
#
|
4210
|
+
# The following predefined metrics are available:
|
4211
|
+
#
|
4212
|
+
# * `ASGAverageCPUUtilization`
|
4213
|
+
#
|
4214
|
+
# * `ASGAverageNetworkIn`
|
4215
|
+
#
|
4216
|
+
# * `ASGAverageNetworkOut`
|
4217
|
+
#
|
4218
|
+
# * `ALBRequestCountPerTarget`
|
4219
|
+
#
|
4220
|
+
# If you specify `ALBRequestCountPerTarget` for the metric, you must
|
4221
|
+
# specify the `ResourceLabel` parameter with the
|
4222
|
+
# `PredefinedMetricSpecification`.
|
4223
|
+
#
|
4035
4224
|
# For more information, see [TargetTrackingConfiguration][1] in the
|
4036
4225
|
# *Amazon EC2 Auto Scaling API Reference*.
|
4037
4226
|
#
|
4038
|
-
#
|
4039
|
-
# type, you must specify this parameter. (Not used with any other policy
|
4040
|
-
# type.)
|
4227
|
+
# Required if the policy type is `TargetTrackingScaling`.
|
4041
4228
|
#
|
4042
4229
|
#
|
4043
4230
|
#
|
@@ -4064,15 +4251,31 @@ module Aws::AutoScaling
|
|
4064
4251
|
# # This example adds the specified policy to the specified Auto Scaling group.
|
4065
4252
|
#
|
4066
4253
|
# resp = client.put_scaling_policy({
|
4067
|
-
# adjustment_type: "ChangeInCapacity",
|
4068
4254
|
# auto_scaling_group_name: "my-auto-scaling-group",
|
4069
|
-
# policy_name: "
|
4070
|
-
#
|
4255
|
+
# policy_name: "alb1000-target-tracking-scaling-policy",
|
4256
|
+
# policy_type: "TargetTrackingScaling",
|
4257
|
+
# target_tracking_configuration: {
|
4258
|
+
# predefined_metric_specification: {
|
4259
|
+
# predefined_metric_type: "ALBRequestCountPerTarget",
|
4260
|
+
# resource_label: "app/EC2Co-EcsEl-1TKLTMITMM0EO/f37c06a68c1748aa/targetgroup/EC2Co-Defau-LDNM7Q3ZH1ZN/6d4ea56ca2d6a18d",
|
4261
|
+
# },
|
4262
|
+
# target_value: 1000.0,
|
4263
|
+
# },
|
4071
4264
|
# })
|
4072
4265
|
#
|
4073
4266
|
# resp.to_h outputs the following:
|
4074
4267
|
# {
|
4075
|
-
#
|
4268
|
+
# alarms: [
|
4269
|
+
# {
|
4270
|
+
# alarm_arn: "arn:aws:cloudwatch:us-west-2:123456789012:alarm:TargetTracking-my-asg-AlarmHigh-fc0e4183-23ac-497e-9992-691c9980c38e",
|
4271
|
+
# alarm_name: "TargetTracking-my-asg-AlarmHigh-fc0e4183-23ac-497e-9992-691c9980c38e",
|
4272
|
+
# },
|
4273
|
+
# {
|
4274
|
+
# alarm_arn: "arn:aws:cloudwatch:us-west-2:123456789012:alarm:TargetTracking-my-asg-AlarmLow-61a39305-ed0c-47af-bd9e-471a352ee1a2",
|
4275
|
+
# alarm_name: "TargetTracking-my-asg-AlarmLow-61a39305-ed0c-47af-bd9e-471a352ee1a2",
|
4276
|
+
# },
|
4277
|
+
# ],
|
4278
|
+
# policy_arn: "arn:aws:autoscaling:us-west-2:123456789012:scalingPolicy:228f02c2-c665-4bfd-aaac-8b04080bea3c:autoScalingGroupName/my-auto-scaling-group:policyName/alb1000-target-tracking-scaling-policy",
|
4076
4279
|
# }
|
4077
4280
|
#
|
4078
4281
|
# @example Request syntax with placeholder values
|
@@ -4328,24 +4531,27 @@ module Aws::AutoScaling
|
|
4328
4531
|
# The name of the Auto Scaling group.
|
4329
4532
|
#
|
4330
4533
|
# @option params [Array<String>] :scaling_processes
|
4331
|
-
# One or more of the following processes
|
4332
|
-
# all processes are specified.
|
4534
|
+
# One or more of the following processes:
|
4333
4535
|
#
|
4334
4536
|
# * `Launch`
|
4335
4537
|
#
|
4336
4538
|
# * `Terminate`
|
4337
4539
|
#
|
4338
|
-
# * `
|
4540
|
+
# * `AddToLoadBalancer`
|
4339
4541
|
#
|
4340
|
-
# * `
|
4542
|
+
# * `AlarmNotification`
|
4341
4543
|
#
|
4342
4544
|
# * `AZRebalance`
|
4343
4545
|
#
|
4344
|
-
# * `
|
4546
|
+
# * `HealthCheck`
|
4547
|
+
#
|
4548
|
+
# * `InstanceRefresh`
|
4549
|
+
#
|
4550
|
+
# * `ReplaceUnhealthy`
|
4345
4551
|
#
|
4346
4552
|
# * `ScheduledActions`
|
4347
4553
|
#
|
4348
|
-
#
|
4554
|
+
# If you omit this parameter, all processes are specified.
|
4349
4555
|
#
|
4350
4556
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
4351
4557
|
#
|
@@ -4561,6 +4767,99 @@ module Aws::AutoScaling
|
|
4561
4767
|
req.send_request(options)
|
4562
4768
|
end
|
4563
4769
|
|
4770
|
+
# Starts a new instance refresh operation, which triggers a rolling
|
4771
|
+
# replacement of all previously launched instances in the Auto Scaling
|
4772
|
+
# group with a new group of instances.
|
4773
|
+
#
|
4774
|
+
# If successful, this call creates a new instance refresh request with a
|
4775
|
+
# unique ID that you can use to track its progress. To query its status,
|
4776
|
+
# call the DescribeInstanceRefreshes API. To describe the instance
|
4777
|
+
# refreshes that have already run, call the DescribeInstanceRefreshes
|
4778
|
+
# API. To cancel an instance refresh operation in progress, use the
|
4779
|
+
# CancelInstanceRefresh API.
|
4780
|
+
#
|
4781
|
+
# For more information, see [Replacing Auto Scaling Instances Based on
|
4782
|
+
# an Instance Refresh][1].
|
4783
|
+
#
|
4784
|
+
#
|
4785
|
+
#
|
4786
|
+
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html
|
4787
|
+
#
|
4788
|
+
# @option params [required, String] :auto_scaling_group_name
|
4789
|
+
# The name of the Auto Scaling group.
|
4790
|
+
#
|
4791
|
+
# @option params [String] :strategy
|
4792
|
+
# The strategy to use for the instance refresh. The only valid value is
|
4793
|
+
# `Rolling`.
|
4794
|
+
#
|
4795
|
+
# A rolling update is an update that is applied to all instances in an
|
4796
|
+
# Auto Scaling group until all instances have been updated. A rolling
|
4797
|
+
# update can fail due to failed health checks or if instances are on
|
4798
|
+
# standby or are protected from scale in. If the rolling update process
|
4799
|
+
# fails, any instances that were already replaced are not rolled back to
|
4800
|
+
# their previous configuration.
|
4801
|
+
#
|
4802
|
+
# @option params [Types::RefreshPreferences] :preferences
|
4803
|
+
# Set of preferences associated with the instance refresh request.
|
4804
|
+
#
|
4805
|
+
# If not provided, the default values are used. For
|
4806
|
+
# `MinHealthyPercentage`, the default value is `90`. For
|
4807
|
+
# `InstanceWarmup`, the default is to use the value specified for the
|
4808
|
+
# health check grace period for the Auto Scaling group.
|
4809
|
+
#
|
4810
|
+
# For more information, see [RefreshPreferences][1] in the *Amazon EC2
|
4811
|
+
# Auto Scaling API Reference*.
|
4812
|
+
#
|
4813
|
+
#
|
4814
|
+
#
|
4815
|
+
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_RefreshPreferences.html
|
4816
|
+
#
|
4817
|
+
# @return [Types::StartInstanceRefreshAnswer] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
4818
|
+
#
|
4819
|
+
# * {Types::StartInstanceRefreshAnswer#instance_refresh_id #instance_refresh_id} => String
|
4820
|
+
#
|
4821
|
+
#
|
4822
|
+
# @example Example: To start an instance refresh
|
4823
|
+
#
|
4824
|
+
# # This example starts an instance refresh for the specified Auto Scaling group.
|
4825
|
+
#
|
4826
|
+
# resp = client.start_instance_refresh({
|
4827
|
+
# auto_scaling_group_name: "my-auto-scaling-group",
|
4828
|
+
# preferences: {
|
4829
|
+
# instance_warmup: 400,
|
4830
|
+
# min_healthy_percentage: 50,
|
4831
|
+
# },
|
4832
|
+
# })
|
4833
|
+
#
|
4834
|
+
# resp.to_h outputs the following:
|
4835
|
+
# {
|
4836
|
+
# instance_refresh_id: "08b91cf7-8fa6-48af-b6a6-d227f40f1b9b",
|
4837
|
+
# }
|
4838
|
+
#
|
4839
|
+
# @example Request syntax with placeholder values
|
4840
|
+
#
|
4841
|
+
# resp = client.start_instance_refresh({
|
4842
|
+
# auto_scaling_group_name: "XmlStringMaxLen255", # required
|
4843
|
+
# strategy: "Rolling", # accepts Rolling
|
4844
|
+
# preferences: {
|
4845
|
+
# min_healthy_percentage: 1,
|
4846
|
+
# instance_warmup: 1,
|
4847
|
+
# },
|
4848
|
+
# })
|
4849
|
+
#
|
4850
|
+
# @example Response structure
|
4851
|
+
#
|
4852
|
+
# resp.instance_refresh_id #=> String
|
4853
|
+
#
|
4854
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/StartInstanceRefresh AWS API Documentation
|
4855
|
+
#
|
4856
|
+
# @overload start_instance_refresh(params = {})
|
4857
|
+
# @param [Hash] params ({})
|
4858
|
+
def start_instance_refresh(params = {}, options = {})
|
4859
|
+
req = build_request(:start_instance_refresh, params)
|
4860
|
+
req.send_request(options)
|
4861
|
+
end
|
4862
|
+
|
4564
4863
|
# Suspends the specified automatic scaling processes, or all processes,
|
4565
4864
|
# for the specified Auto Scaling group.
|
4566
4865
|
#
|
@@ -4580,24 +4879,27 @@ module Aws::AutoScaling
|
|
4580
4879
|
# The name of the Auto Scaling group.
|
4581
4880
|
#
|
4582
4881
|
# @option params [Array<String>] :scaling_processes
|
4583
|
-
# One or more of the following processes
|
4584
|
-
# all processes are specified.
|
4882
|
+
# One or more of the following processes:
|
4585
4883
|
#
|
4586
4884
|
# * `Launch`
|
4587
4885
|
#
|
4588
4886
|
# * `Terminate`
|
4589
4887
|
#
|
4590
|
-
# * `
|
4888
|
+
# * `AddToLoadBalancer`
|
4591
4889
|
#
|
4592
|
-
# * `
|
4890
|
+
# * `AlarmNotification`
|
4593
4891
|
#
|
4594
4892
|
# * `AZRebalance`
|
4595
4893
|
#
|
4596
|
-
# * `
|
4894
|
+
# * `HealthCheck`
|
4895
|
+
#
|
4896
|
+
# * `InstanceRefresh`
|
4897
|
+
#
|
4898
|
+
# * `ReplaceUnhealthy`
|
4597
4899
|
#
|
4598
4900
|
# * `ScheduledActions`
|
4599
4901
|
#
|
4600
|
-
#
|
4902
|
+
# If you omit this parameter, all processes are specified.
|
4601
4903
|
#
|
4602
4904
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
4603
4905
|
#
|
@@ -4812,13 +5114,11 @@ module Aws::AutoScaling
|
|
4812
5114
|
# @option params [Integer] :default_cooldown
|
4813
5115
|
# The amount of time, in seconds, after a scaling activity completes
|
4814
5116
|
# before another scaling activity can start. The default value is `300`.
|
4815
|
-
# This cooldown period is not used when a scaling-specific cooldown is
|
4816
|
-
# specified.
|
4817
5117
|
#
|
4818
|
-
#
|
4819
|
-
#
|
4820
|
-
# information, see [Scaling Cooldowns
|
4821
|
-
# Scaling User Guide*.
|
5118
|
+
# This setting applies when using simple scaling policies, but not when
|
5119
|
+
# using other scaling policies or scheduled scaling. For more
|
5120
|
+
# information, see [Scaling Cooldowns for Amazon EC2 Auto Scaling][1] in
|
5121
|
+
# the *Amazon EC2 Auto Scaling User Guide*.
|
4822
5122
|
#
|
4823
5123
|
#
|
4824
5124
|
#
|
@@ -4841,8 +5141,7 @@ module Aws::AutoScaling
|
|
4841
5141
|
# For more information, see [Health Check Grace Period][1] in the
|
4842
5142
|
# *Amazon EC2 Auto Scaling User Guide*.
|
4843
5143
|
#
|
4844
|
-
#
|
4845
|
-
# health check.
|
5144
|
+
# Required if you are adding an `ELB` health check.
|
4846
5145
|
#
|
4847
5146
|
#
|
4848
5147
|
#
|
@@ -5020,7 +5319,7 @@ module Aws::AutoScaling
|
|
5020
5319
|
params: params,
|
5021
5320
|
config: config)
|
5022
5321
|
context[:gem_name] = 'aws-sdk-autoscaling'
|
5023
|
-
context[:gem_version] = '1.
|
5322
|
+
context[:gem_version] = '1.43.0'
|
5024
5323
|
Seahorse::Client::Request.new(handlers, context)
|
5025
5324
|
end
|
5026
5325
|
|