aws-sdk-autoscaling 1.76.0 → 1.79.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-autoscaling/auto_scaling_group.rb +66 -35
- data/lib/aws-sdk-autoscaling/client.rb +205 -108
- data/lib/aws-sdk-autoscaling/client_api.rb +11 -0
- data/lib/aws-sdk-autoscaling/launch_configuration.rb +7 -17
- data/lib/aws-sdk-autoscaling/lifecycle_hook.rb +9 -9
- data/lib/aws-sdk-autoscaling/resource.rb +56 -23
- data/lib/aws-sdk-autoscaling/types.rb +254 -117
- data/lib/aws-sdk-autoscaling.rb +1 -1
- metadata +4 -4
@@ -27,7 +27,9 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
|
27
27
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
28
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
29
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
30
|
+
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
30
31
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
|
+
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
31
33
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
32
34
|
require 'aws-sdk-core/plugins/protocols/query.rb'
|
33
35
|
|
@@ -74,7 +76,9 @@ module Aws::AutoScaling
|
|
74
76
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
75
77
|
add_plugin(Aws::Plugins::TransferEncoding)
|
76
78
|
add_plugin(Aws::Plugins::HttpChecksum)
|
79
|
+
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
77
80
|
add_plugin(Aws::Plugins::DefaultsMode)
|
81
|
+
add_plugin(Aws::Plugins::RecursionDetection)
|
78
82
|
add_plugin(Aws::Plugins::SignatureV4)
|
79
83
|
add_plugin(Aws::Plugins::Protocols::Query)
|
80
84
|
|
@@ -676,22 +680,26 @@ module Aws::AutoScaling
|
|
676
680
|
# This step is a part of the procedure for adding a lifecycle hook to an
|
677
681
|
# Auto Scaling group:
|
678
682
|
#
|
679
|
-
# 1. (Optional) Create a
|
680
|
-
#
|
681
|
-
#
|
683
|
+
# 1. (Optional) Create a launch template or launch configuration with a
|
684
|
+
# user data script that runs while an instance is in a wait state
|
685
|
+
# due to a lifecycle hook.
|
682
686
|
#
|
683
|
-
# 2. (Optional) Create a
|
687
|
+
# 2. (Optional) Create a Lambda function and a rule that allows Amazon
|
688
|
+
# EventBridge to invoke your Lambda function when an instance is put
|
689
|
+
# into a wait state due to a lifecycle hook.
|
690
|
+
#
|
691
|
+
# 3. (Optional) Create a notification target and an IAM role. The
|
684
692
|
# target can be either an Amazon SQS queue or an Amazon SNS topic.
|
685
693
|
# The role allows Amazon EC2 Auto Scaling to publish lifecycle
|
686
694
|
# notifications to the target.
|
687
695
|
#
|
688
|
-
#
|
696
|
+
# 4. Create the lifecycle hook. Specify whether the hook is used when
|
689
697
|
# the instances launch or terminate.
|
690
698
|
#
|
691
|
-
#
|
692
|
-
# keep the instance in a
|
699
|
+
# 5. If you need more time, record the lifecycle action heartbeat to
|
700
|
+
# keep the instance in a wait state.
|
693
701
|
#
|
694
|
-
#
|
702
|
+
# 6. **If you finish before the timeout period ends, send a callback by
|
695
703
|
# using the CompleteLifecycleAction API call.**
|
696
704
|
#
|
697
705
|
# For more information, see [Amazon EC2 Auto Scaling lifecycle hooks][1]
|
@@ -864,13 +872,15 @@ module Aws::AutoScaling
|
|
864
872
|
# group.
|
865
873
|
#
|
866
874
|
# @option params [Integer] :default_cooldown
|
867
|
-
#
|
868
|
-
#
|
869
|
-
#
|
870
|
-
#
|
875
|
+
# *Only needed if you use simple scaling policies.*
|
876
|
+
#
|
877
|
+
# The amount of time, in seconds, between one scaling activity ending
|
878
|
+
# and another one starting due to simple scaling policies. For more
|
871
879
|
# information, see [Scaling cooldowns for Amazon EC2 Auto Scaling][1] in
|
872
880
|
# the *Amazon EC2 Auto Scaling User Guide*.
|
873
881
|
#
|
882
|
+
# Default: `300` seconds
|
883
|
+
#
|
874
884
|
#
|
875
885
|
#
|
876
886
|
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html
|
@@ -913,13 +923,17 @@ module Aws::AutoScaling
|
|
913
923
|
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/healthcheck.html
|
914
924
|
#
|
915
925
|
# @option params [Integer] :health_check_grace_period
|
926
|
+
# **
|
927
|
+
#
|
916
928
|
# The amount of time, in seconds, that Amazon EC2 Auto Scaling waits
|
917
929
|
# before checking the health status of an EC2 instance that has come
|
918
|
-
# into service and marking it unhealthy due to a failed
|
919
|
-
#
|
920
|
-
#
|
930
|
+
# into service and marking it unhealthy due to a failed Elastic Load
|
931
|
+
# Balancing or custom health check. This is useful if your instances do
|
932
|
+
# not immediately pass these health checks after they enter the
|
933
|
+
# `InService` state. For more information, see [Health check grace
|
934
|
+
# period][1] in the *Amazon EC2 Auto Scaling User Guide*.
|
921
935
|
#
|
922
|
-
#
|
936
|
+
# Default: `0` seconds
|
923
937
|
#
|
924
938
|
#
|
925
939
|
#
|
@@ -927,11 +941,14 @@ module Aws::AutoScaling
|
|
927
941
|
#
|
928
942
|
# @option params [String] :placement_group
|
929
943
|
# The name of an existing placement group into which to launch your
|
930
|
-
# instances
|
931
|
-
#
|
932
|
-
#
|
933
|
-
#
|
934
|
-
#
|
944
|
+
# instances. For more information, see [Placement groups][1] in the
|
945
|
+
# *Amazon EC2 User Guide for Linux Instances*.
|
946
|
+
#
|
947
|
+
# <note markdown="1"> A *cluster* placement group is a logical grouping of instances within
|
948
|
+
# a single Availability Zone. You cannot specify multiple Availability
|
949
|
+
# Zones and a cluster placement group.
|
950
|
+
#
|
951
|
+
# </note>
|
935
952
|
#
|
936
953
|
#
|
937
954
|
#
|
@@ -1043,6 +1060,32 @@ module Aws::AutoScaling
|
|
1043
1060
|
#
|
1044
1061
|
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-instance-type-requirements.html
|
1045
1062
|
#
|
1063
|
+
# @option params [Integer] :default_instance_warmup
|
1064
|
+
# The amount of time, in seconds, until a newly launched instance can
|
1065
|
+
# contribute to the Amazon CloudWatch metrics. This delay lets an
|
1066
|
+
# instance finish initializing before Amazon EC2 Auto Scaling aggregates
|
1067
|
+
# instance metrics, resulting in more reliable usage data. Set this
|
1068
|
+
# value equal to the amount of time that it takes for resource
|
1069
|
+
# consumption to become stable after an instance reaches the `InService`
|
1070
|
+
# state. For more information, see [Set the default instance warmup for
|
1071
|
+
# an Auto Scaling group][1] in the *Amazon EC2 Auto Scaling User Guide*.
|
1072
|
+
#
|
1073
|
+
# To manage your warm-up settings at the group level, we recommend that
|
1074
|
+
# you set the default instance warmup, *even if its value is set to 0
|
1075
|
+
# seconds*. This also optimizes the performance of scaling policies that
|
1076
|
+
# scale continuously, such as target tracking and step scaling policies.
|
1077
|
+
#
|
1078
|
+
# If you need to remove a value that you previously set, include the
|
1079
|
+
# property but specify `-1` for the value. However, we strongly
|
1080
|
+
# recommend keeping the default instance warmup enabled by specifying a
|
1081
|
+
# minimum value of `0`.
|
1082
|
+
#
|
1083
|
+
# Default: None
|
1084
|
+
#
|
1085
|
+
#
|
1086
|
+
#
|
1087
|
+
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html
|
1088
|
+
#
|
1046
1089
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1047
1090
|
#
|
1048
1091
|
#
|
@@ -1053,7 +1096,7 @@ module Aws::AutoScaling
|
|
1053
1096
|
# resp = client.create_auto_scaling_group({
|
1054
1097
|
# auto_scaling_group_name: "my-auto-scaling-group",
|
1055
1098
|
# launch_template: {
|
1056
|
-
#
|
1099
|
+
# launch_template_name: "my-template-for-auto-scaling",
|
1057
1100
|
# version: "$Latest",
|
1058
1101
|
# },
|
1059
1102
|
# max_instance_lifetime: 2592000,
|
@@ -1071,8 +1114,8 @@ module Aws::AutoScaling
|
|
1071
1114
|
# health_check_grace_period: 300,
|
1072
1115
|
# health_check_type: "ELB",
|
1073
1116
|
# launch_template: {
|
1074
|
-
#
|
1075
|
-
# version: "$
|
1117
|
+
# launch_template_name: "my-template-for-auto-scaling",
|
1118
|
+
# version: "$Latest",
|
1076
1119
|
# },
|
1077
1120
|
# max_size: 3,
|
1078
1121
|
# min_size: 1,
|
@@ -1247,6 +1290,7 @@ module Aws::AutoScaling
|
|
1247
1290
|
# max_instance_lifetime: 1,
|
1248
1291
|
# context: "Context",
|
1249
1292
|
# desired_capacity_type: "XmlStringMaxLen255",
|
1293
|
+
# default_instance_warmup: 1,
|
1250
1294
|
# })
|
1251
1295
|
#
|
1252
1296
|
# @see http://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/CreateAutoScalingGroup AWS API Documentation
|
@@ -1314,25 +1358,24 @@ module Aws::AutoScaling
|
|
1314
1358
|
# [2]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html
|
1315
1359
|
#
|
1316
1360
|
# @option params [String] :classic_link_vpc_id
|
1361
|
+
# *EC2-Classic retires on August 15, 2022. This parameter is not
|
1362
|
+
# supported after that date.*
|
1363
|
+
#
|
1317
1364
|
# The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances
|
1318
1365
|
# to. For more information, see [ClassicLink][1] in the *Amazon EC2 User
|
1319
|
-
# Guide for Linux Instances
|
1320
|
-
# VPC][2] in the *Amazon EC2 Auto Scaling User Guide*.
|
1321
|
-
#
|
1322
|
-
# This parameter can only be used if you are launching EC2-Classic
|
1323
|
-
# instances.
|
1366
|
+
# Guide for Linux Instances*.
|
1324
1367
|
#
|
1325
1368
|
#
|
1326
1369
|
#
|
1327
1370
|
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html
|
1328
|
-
# [2]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink
|
1329
1371
|
#
|
1330
1372
|
# @option params [Array<String>] :classic_link_vpc_security_groups
|
1373
|
+
# *EC2-Classic retires on August 15, 2022. This parameter is not
|
1374
|
+
# supported after that date.*
|
1375
|
+
#
|
1331
1376
|
# The IDs of one or more security groups for the specified
|
1332
1377
|
# ClassicLink-enabled VPC. For more information, see [ClassicLink][1] in
|
1333
|
-
# the *Amazon EC2 User Guide for Linux Instances
|
1334
|
-
# EC2-Classic instances to a VPC][2] in the *Amazon EC2 Auto Scaling
|
1335
|
-
# User Guide*.
|
1378
|
+
# the *Amazon EC2 User Guide for Linux Instances*.
|
1336
1379
|
#
|
1337
1380
|
# If you specify the `ClassicLinkVPCId` parameter, you must specify this
|
1338
1381
|
# parameter.
|
@@ -1340,7 +1383,6 @@ module Aws::AutoScaling
|
|
1340
1383
|
#
|
1341
1384
|
#
|
1342
1385
|
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html
|
1343
|
-
# [2]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink
|
1344
1386
|
#
|
1345
1387
|
# @option params [String] :user_data
|
1346
1388
|
# The user data to make available to the launched EC2 instances. For
|
@@ -2282,7 +2324,7 @@ module Aws::AutoScaling
|
|
2282
2324
|
# resp.auto_scaling_groups[0].instances[0].instance_id #=> String
|
2283
2325
|
# resp.auto_scaling_groups[0].instances[0].instance_type #=> String
|
2284
2326
|
# resp.auto_scaling_groups[0].instances[0].availability_zone #=> String
|
2285
|
-
# resp.auto_scaling_groups[0].instances[0].lifecycle_state #=> String, one of "Pending", "Pending:Wait", "Pending:Proceed", "Quarantined", "InService", "Terminating", "Terminating:Wait", "Terminating:Proceed", "Terminated", "Detaching", "Detached", "EnteringStandby", "Standby", "Warmed:Pending", "Warmed:Pending:Wait", "Warmed:Pending:Proceed", "Warmed:Terminating", "Warmed:Terminating:Wait", "Warmed:Terminating:Proceed", "Warmed:Terminated", "Warmed:Stopped", "Warmed:Running"
|
2327
|
+
# resp.auto_scaling_groups[0].instances[0].lifecycle_state #=> String, one of "Pending", "Pending:Wait", "Pending:Proceed", "Quarantined", "InService", "Terminating", "Terminating:Wait", "Terminating:Proceed", "Terminated", "Detaching", "Detached", "EnteringStandby", "Standby", "Warmed:Pending", "Warmed:Pending:Wait", "Warmed:Pending:Proceed", "Warmed:Terminating", "Warmed:Terminating:Wait", "Warmed:Terminating:Proceed", "Warmed:Terminated", "Warmed:Stopped", "Warmed:Running", "Warmed:Hibernated"
|
2286
2328
|
# resp.auto_scaling_groups[0].instances[0].health_status #=> String
|
2287
2329
|
# resp.auto_scaling_groups[0].instances[0].launch_configuration_name #=> String
|
2288
2330
|
# resp.auto_scaling_groups[0].instances[0].launch_template.launch_template_id #=> String
|
@@ -2314,11 +2356,13 @@ module Aws::AutoScaling
|
|
2314
2356
|
# resp.auto_scaling_groups[0].capacity_rebalance #=> Boolean
|
2315
2357
|
# resp.auto_scaling_groups[0].warm_pool_configuration.max_group_prepared_capacity #=> Integer
|
2316
2358
|
# resp.auto_scaling_groups[0].warm_pool_configuration.min_size #=> Integer
|
2317
|
-
# resp.auto_scaling_groups[0].warm_pool_configuration.pool_state #=> String, one of "Stopped", "Running"
|
2359
|
+
# resp.auto_scaling_groups[0].warm_pool_configuration.pool_state #=> String, one of "Stopped", "Running", "Hibernated"
|
2318
2360
|
# resp.auto_scaling_groups[0].warm_pool_configuration.status #=> String, one of "PendingDelete"
|
2361
|
+
# resp.auto_scaling_groups[0].warm_pool_configuration.instance_reuse_policy.reuse_on_scale_in #=> Boolean
|
2319
2362
|
# resp.auto_scaling_groups[0].warm_pool_size #=> Integer
|
2320
2363
|
# resp.auto_scaling_groups[0].context #=> String
|
2321
2364
|
# resp.auto_scaling_groups[0].desired_capacity_type #=> String
|
2365
|
+
# resp.auto_scaling_groups[0].default_instance_warmup #=> Integer
|
2322
2366
|
# resp.next_token #=> String
|
2323
2367
|
#
|
2324
2368
|
#
|
@@ -3829,13 +3873,14 @@ module Aws::AutoScaling
|
|
3829
3873
|
#
|
3830
3874
|
# resp.warm_pool_configuration.max_group_prepared_capacity #=> Integer
|
3831
3875
|
# resp.warm_pool_configuration.min_size #=> Integer
|
3832
|
-
# resp.warm_pool_configuration.pool_state #=> String, one of "Stopped", "Running"
|
3876
|
+
# resp.warm_pool_configuration.pool_state #=> String, one of "Stopped", "Running", "Hibernated"
|
3833
3877
|
# resp.warm_pool_configuration.status #=> String, one of "PendingDelete"
|
3878
|
+
# resp.warm_pool_configuration.instance_reuse_policy.reuse_on_scale_in #=> Boolean
|
3834
3879
|
# resp.instances #=> Array
|
3835
3880
|
# resp.instances[0].instance_id #=> String
|
3836
3881
|
# resp.instances[0].instance_type #=> String
|
3837
3882
|
# resp.instances[0].availability_zone #=> String
|
3838
|
-
# resp.instances[0].lifecycle_state #=> String, one of "Pending", "Pending:Wait", "Pending:Proceed", "Quarantined", "InService", "Terminating", "Terminating:Wait", "Terminating:Proceed", "Terminated", "Detaching", "Detached", "EnteringStandby", "Standby", "Warmed:Pending", "Warmed:Pending:Wait", "Warmed:Pending:Proceed", "Warmed:Terminating", "Warmed:Terminating:Wait", "Warmed:Terminating:Proceed", "Warmed:Terminated", "Warmed:Stopped", "Warmed:Running"
|
3883
|
+
# resp.instances[0].lifecycle_state #=> String, one of "Pending", "Pending:Wait", "Pending:Proceed", "Quarantined", "InService", "Terminating", "Terminating:Wait", "Terminating:Proceed", "Terminated", "Detaching", "Detached", "EnteringStandby", "Standby", "Warmed:Pending", "Warmed:Pending:Wait", "Warmed:Pending:Proceed", "Warmed:Terminating", "Warmed:Terminating:Wait", "Warmed:Terminating:Proceed", "Warmed:Terminated", "Warmed:Stopped", "Warmed:Running", "Warmed:Hibernated"
|
3839
3884
|
# resp.instances[0].health_status #=> String
|
3840
3885
|
# resp.instances[0].launch_configuration_name #=> String
|
3841
3886
|
# resp.instances[0].launch_template.launch_template_id #=> String
|
@@ -4586,30 +4631,34 @@ module Aws::AutoScaling
|
|
4586
4631
|
# Creates or updates a lifecycle hook for the specified Auto Scaling
|
4587
4632
|
# group.
|
4588
4633
|
#
|
4589
|
-
#
|
4590
|
-
#
|
4591
|
-
#
|
4634
|
+
# Lifecycle hooks let you create solutions that are aware of events in
|
4635
|
+
# the Auto Scaling instance lifecycle, and then perform a custom action
|
4636
|
+
# on instances when the corresponding lifecycle event occurs.
|
4592
4637
|
#
|
4593
4638
|
# This step is a part of the procedure for adding a lifecycle hook to an
|
4594
4639
|
# Auto Scaling group:
|
4595
4640
|
#
|
4596
|
-
# 1. (Optional) Create a
|
4597
|
-
#
|
4598
|
-
#
|
4641
|
+
# 1. (Optional) Create a launch template or launch configuration with a
|
4642
|
+
# user data script that runs while an instance is in a wait state
|
4643
|
+
# due to a lifecycle hook.
|
4599
4644
|
#
|
4600
|
-
# 2. (Optional) Create a
|
4645
|
+
# 2. (Optional) Create a Lambda function and a rule that allows Amazon
|
4646
|
+
# EventBridge to invoke your Lambda function when an instance is put
|
4647
|
+
# into a wait state due to a lifecycle hook.
|
4648
|
+
#
|
4649
|
+
# 3. (Optional) Create a notification target and an IAM role. The
|
4601
4650
|
# target can be either an Amazon SQS queue or an Amazon SNS topic.
|
4602
4651
|
# The role allows Amazon EC2 Auto Scaling to publish lifecycle
|
4603
4652
|
# notifications to the target.
|
4604
4653
|
#
|
4605
|
-
#
|
4654
|
+
# 4. **Create the lifecycle hook. Specify whether the hook is used when
|
4606
4655
|
# the instances launch or terminate.**
|
4607
4656
|
#
|
4608
|
-
#
|
4609
|
-
# keep the instance in a
|
4657
|
+
# 5. If you need more time, record the lifecycle action heartbeat to
|
4658
|
+
# keep the instance in a wait state using the
|
4610
4659
|
# RecordLifecycleActionHeartbeat API call.
|
4611
4660
|
#
|
4612
|
-
#
|
4661
|
+
# 6. If you finish before the timeout period ends, send a callback by
|
4613
4662
|
# using the CompleteLifecycleAction API call.
|
4614
4663
|
#
|
4615
4664
|
# For more information, see [Amazon EC2 Auto Scaling lifecycle hooks][1]
|
@@ -4646,11 +4695,11 @@ module Aws::AutoScaling
|
|
4646
4695
|
#
|
4647
4696
|
# @option params [String] :role_arn
|
4648
4697
|
# The ARN of the IAM role that allows the Auto Scaling group to publish
|
4649
|
-
# to the specified notification target
|
4650
|
-
# or an Amazon SQS queue.
|
4698
|
+
# to the specified notification target.
|
4651
4699
|
#
|
4652
|
-
#
|
4653
|
-
# hooks
|
4700
|
+
# Valid only if the notification target is an Amazon SNS topic or an
|
4701
|
+
# Amazon SQS queue. Required for new lifecycle hooks, but optional when
|
4702
|
+
# updating existing hooks.
|
4654
4703
|
#
|
4655
4704
|
# @option params [String] :notification_target_arn
|
4656
4705
|
# The ARN of the notification target that Amazon EC2 Auto Scaling uses
|
@@ -4691,16 +4740,16 @@ module Aws::AutoScaling
|
|
4691
4740
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
4692
4741
|
#
|
4693
4742
|
#
|
4694
|
-
# @example Example: To create a lifecycle hook
|
4743
|
+
# @example Example: To create a launch lifecycle hook
|
4695
4744
|
#
|
4696
|
-
# # This example creates a lifecycle hook.
|
4745
|
+
# # This example creates a lifecycle hook for instance launch.
|
4697
4746
|
#
|
4698
4747
|
# resp = client.put_lifecycle_hook({
|
4699
4748
|
# auto_scaling_group_name: "my-auto-scaling-group",
|
4700
|
-
#
|
4749
|
+
# default_result: "CONTINUE",
|
4750
|
+
# heartbeat_timeout: 300,
|
4751
|
+
# lifecycle_hook_name: "my-launch-lifecycle-hook",
|
4701
4752
|
# lifecycle_transition: "autoscaling:EC2_INSTANCE_LAUNCHING",
|
4702
|
-
# notification_target_arn: "arn:aws:sns:us-west-2:123456789012:my-sns-topic --role-arn",
|
4703
|
-
# role_arn: "arn:aws:iam::123456789012:role/my-auto-scaling-role",
|
4704
4753
|
# })
|
4705
4754
|
#
|
4706
4755
|
# @example Request syntax with placeholder values
|
@@ -4876,14 +4925,16 @@ module Aws::AutoScaling
|
|
4876
4925
|
# other policy type.)
|
4877
4926
|
#
|
4878
4927
|
# @option params [Integer] :cooldown
|
4879
|
-
#
|
4880
|
-
# cooldown period is specified here, it overrides
|
4881
|
-
#
|
4928
|
+
# A cooldown period, in seconds, that applies to a specific simple
|
4929
|
+
# scaling policy. When a cooldown period is specified here, it overrides
|
4930
|
+
# the default cooldown.
|
4882
4931
|
#
|
4883
4932
|
# Valid only if the policy type is `SimpleScaling`. For more
|
4884
4933
|
# information, see [Scaling cooldowns for Amazon EC2 Auto Scaling][1] in
|
4885
4934
|
# the *Amazon EC2 Auto Scaling User Guide*.
|
4886
4935
|
#
|
4936
|
+
# Default: None
|
4937
|
+
#
|
4887
4938
|
#
|
4888
4939
|
#
|
4889
4940
|
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html
|
@@ -4903,14 +4954,23 @@ module Aws::AutoScaling
|
|
4903
4954
|
# policy type.)
|
4904
4955
|
#
|
4905
4956
|
# @option params [Integer] :estimated_instance_warmup
|
4957
|
+
# *Not needed if the default instance warmup is defined for the group.*
|
4958
|
+
#
|
4906
4959
|
# The estimated time, in seconds, until a newly launched instance can
|
4907
|
-
# contribute to the CloudWatch metrics.
|
4908
|
-
#
|
4909
|
-
#
|
4960
|
+
# contribute to the CloudWatch metrics. This warm-up period applies to
|
4961
|
+
# instances launched due to a specific target tracking or step scaling
|
4962
|
+
# policy. When a warm-up period is specified here, it overrides the
|
4963
|
+
# default instance warmup.
|
4910
4964
|
#
|
4911
4965
|
# Valid only if the policy type is `TargetTrackingScaling` or
|
4912
4966
|
# `StepScaling`.
|
4913
4967
|
#
|
4968
|
+
# <note markdown="1"> The default is to use the value for the default instance warmup
|
4969
|
+
# defined for the group. If default instance warmup is null, then
|
4970
|
+
# `EstimatedInstanceWarmup` falls back to the value of default cooldown.
|
4971
|
+
#
|
4972
|
+
# </note>
|
4973
|
+
#
|
4914
4974
|
# @option params [Types::TargetTrackingConfiguration] :target_tracking_configuration
|
4915
4975
|
# A target tracking scaling policy. Provides support for predefined or
|
4916
4976
|
# custom metrics.
|
@@ -5334,17 +5394,25 @@ module Aws::AutoScaling
|
|
5334
5394
|
# Sets the instance state to transition to after the lifecycle actions
|
5335
5395
|
# are complete. Default is `Stopped`.
|
5336
5396
|
#
|
5397
|
+
# @option params [Types::InstanceReusePolicy] :instance_reuse_policy
|
5398
|
+
# Indicates whether instances in the Auto Scaling group can be returned
|
5399
|
+
# to the warm pool on scale in. The default is to terminate instances in
|
5400
|
+
# the Auto Scaling group when the group scales in.
|
5401
|
+
#
|
5337
5402
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
5338
5403
|
#
|
5339
5404
|
#
|
5340
|
-
# @example Example: To
|
5405
|
+
# @example Example: To create a warm pool for an Auto Scaling group
|
5341
5406
|
#
|
5342
|
-
# # This example
|
5407
|
+
# # This example creates a warm pool for the specified Auto Scaling group.
|
5343
5408
|
#
|
5344
5409
|
# resp = client.put_warm_pool({
|
5345
5410
|
# auto_scaling_group_name: "my-auto-scaling-group",
|
5411
|
+
# instance_reuse_policy: {
|
5412
|
+
# reuse_on_scale_in: true,
|
5413
|
+
# },
|
5346
5414
|
# min_size: 30,
|
5347
|
-
# pool_state: "
|
5415
|
+
# pool_state: "Hibernated",
|
5348
5416
|
# })
|
5349
5417
|
#
|
5350
5418
|
# @example Request syntax with placeholder values
|
@@ -5353,7 +5421,10 @@ module Aws::AutoScaling
|
|
5353
5421
|
# auto_scaling_group_name: "XmlStringMaxLen255", # required
|
5354
5422
|
# max_group_prepared_capacity: 1,
|
5355
5423
|
# min_size: 1,
|
5356
|
-
# pool_state: "Stopped", # accepts Stopped, Running
|
5424
|
+
# pool_state: "Stopped", # accepts Stopped, Running, Hibernated
|
5425
|
+
# instance_reuse_policy: {
|
5426
|
+
# reuse_on_scale_in: false,
|
5427
|
+
# },
|
5357
5428
|
# })
|
5358
5429
|
#
|
5359
5430
|
# @see http://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutWarmPool AWS API Documentation
|
@@ -5372,22 +5443,26 @@ module Aws::AutoScaling
|
|
5372
5443
|
# This step is a part of the procedure for adding a lifecycle hook to an
|
5373
5444
|
# Auto Scaling group:
|
5374
5445
|
#
|
5375
|
-
# 1. (Optional) Create a
|
5376
|
-
#
|
5377
|
-
#
|
5446
|
+
# 1. (Optional) Create a launch template or launch configuration with a
|
5447
|
+
# user data script that runs while an instance is in a wait state
|
5448
|
+
# due to a lifecycle hook.
|
5378
5449
|
#
|
5379
|
-
# 2. (Optional) Create a
|
5450
|
+
# 2. (Optional) Create a Lambda function and a rule that allows Amazon
|
5451
|
+
# EventBridge to invoke your Lambda function when an instance is put
|
5452
|
+
# into a wait state due to a lifecycle hook.
|
5453
|
+
#
|
5454
|
+
# 3. (Optional) Create a notification target and an IAM role. The
|
5380
5455
|
# target can be either an Amazon SQS queue or an Amazon SNS topic.
|
5381
5456
|
# The role allows Amazon EC2 Auto Scaling to publish lifecycle
|
5382
5457
|
# notifications to the target.
|
5383
5458
|
#
|
5384
|
-
#
|
5459
|
+
# 4. Create the lifecycle hook. Specify whether the hook is used when
|
5385
5460
|
# the instances launch or terminate.
|
5386
5461
|
#
|
5387
|
-
#
|
5388
|
-
# keep the instance in a
|
5462
|
+
# 5. **If you need more time, record the lifecycle action heartbeat to
|
5463
|
+
# keep the instance in a wait state.**
|
5389
5464
|
#
|
5390
|
-
#
|
5465
|
+
# 6. If you finish before the timeout period ends, send a callback by
|
5391
5466
|
# using the CompleteLifecycleAction API call.
|
5392
5467
|
#
|
5393
5468
|
# For more information, see [Amazon EC2 Auto Scaling lifecycle hooks][1]
|
@@ -5768,9 +5843,16 @@ module Aws::AutoScaling
|
|
5768
5843
|
#
|
5769
5844
|
# resp = client.start_instance_refresh({
|
5770
5845
|
# auto_scaling_group_name: "my-auto-scaling-group",
|
5846
|
+
# desired_configuration: {
|
5847
|
+
# launch_template: {
|
5848
|
+
# launch_template_name: "my-template-for-auto-scaling",
|
5849
|
+
# version: "$Latest",
|
5850
|
+
# },
|
5851
|
+
# },
|
5771
5852
|
# preferences: {
|
5772
5853
|
# instance_warmup: 400,
|
5773
|
-
# min_healthy_percentage:
|
5854
|
+
# min_healthy_percentage: 90,
|
5855
|
+
# skip_matching: true,
|
5774
5856
|
# },
|
5775
5857
|
# })
|
5776
5858
|
#
|
@@ -6131,10 +6213,10 @@ module Aws::AutoScaling
|
|
6131
6213
|
# group.
|
6132
6214
|
#
|
6133
6215
|
# @option params [Integer] :default_cooldown
|
6134
|
-
#
|
6135
|
-
#
|
6136
|
-
#
|
6137
|
-
#
|
6216
|
+
# *Only needed if you use simple scaling policies.*
|
6217
|
+
#
|
6218
|
+
# The amount of time, in seconds, between one scaling activity ending
|
6219
|
+
# and another one starting due to simple scaling policies. For more
|
6138
6220
|
# information, see [Scaling cooldowns for Amazon EC2 Auto Scaling][1] in
|
6139
6221
|
# the *Amazon EC2 Auto Scaling User Guide*.
|
6140
6222
|
#
|
@@ -6154,11 +6236,11 @@ module Aws::AutoScaling
|
|
6154
6236
|
# @option params [Integer] :health_check_grace_period
|
6155
6237
|
# The amount of time, in seconds, that Amazon EC2 Auto Scaling waits
|
6156
6238
|
# before checking the health status of an EC2 instance that has come
|
6157
|
-
# into service and marking it unhealthy due to a failed
|
6158
|
-
#
|
6159
|
-
#
|
6160
|
-
#
|
6161
|
-
#
|
6239
|
+
# into service and marking it unhealthy due to a failed Elastic Load
|
6240
|
+
# Balancing or custom health check. This is useful if your instances do
|
6241
|
+
# not immediately pass these health checks after they enter the
|
6242
|
+
# `InService` state. For more information, see [Health check grace
|
6243
|
+
# period][1] in the *Amazon EC2 Auto Scaling User Guide*.
|
6162
6244
|
#
|
6163
6245
|
#
|
6164
6246
|
#
|
@@ -6166,11 +6248,14 @@ module Aws::AutoScaling
|
|
6166
6248
|
#
|
6167
6249
|
# @option params [String] :placement_group
|
6168
6250
|
# The name of an existing placement group into which to launch your
|
6169
|
-
# instances
|
6170
|
-
#
|
6171
|
-
#
|
6172
|
-
#
|
6173
|
-
#
|
6251
|
+
# instances. For more information, see [Placement groups][1] in the
|
6252
|
+
# *Amazon EC2 User Guide for Linux Instances*.
|
6253
|
+
#
|
6254
|
+
# <note markdown="1"> A *cluster* placement group is a logical grouping of instances within
|
6255
|
+
# a single Availability Zone. You cannot specify multiple Availability
|
6256
|
+
# Zones and a cluster placement group.
|
6257
|
+
#
|
6258
|
+
# </note>
|
6174
6259
|
#
|
6175
6260
|
#
|
6176
6261
|
#
|
@@ -6254,34 +6339,45 @@ module Aws::AutoScaling
|
|
6254
6339
|
#
|
6255
6340
|
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-instance-type-requirements.html
|
6256
6341
|
#
|
6257
|
-
# @
|
6342
|
+
# @option params [Integer] :default_instance_warmup
|
6343
|
+
# The amount of time, in seconds, until a newly launched instance can
|
6344
|
+
# contribute to the Amazon CloudWatch metrics. This delay lets an
|
6345
|
+
# instance finish initializing before Amazon EC2 Auto Scaling aggregates
|
6346
|
+
# instance metrics, resulting in more reliable usage data. Set this
|
6347
|
+
# value equal to the amount of time that it takes for resource
|
6348
|
+
# consumption to become stable after an instance reaches the `InService`
|
6349
|
+
# state. For more information, see [Set the default instance warmup for
|
6350
|
+
# an Auto Scaling group][1] in the *Amazon EC2 Auto Scaling User Guide*.
|
6258
6351
|
#
|
6352
|
+
# To manage your warm-up settings at the group level, we recommend that
|
6353
|
+
# you set the default instance warmup, *even if its value is set to 0
|
6354
|
+
# seconds*. This also optimizes the performance of scaling policies that
|
6355
|
+
# scale continuously, such as target tracking and step scaling policies.
|
6259
6356
|
#
|
6260
|
-
#
|
6357
|
+
# If you need to remove a value that you previously set, include the
|
6358
|
+
# property but specify `-1` for the value. However, we strongly
|
6359
|
+
# recommend keeping the default instance warmup enabled by specifying a
|
6360
|
+
# minimum value of `0`.
|
6261
6361
|
#
|
6262
|
-
# # This example updates the launch configuration of the specified Auto Scaling group.
|
6263
6362
|
#
|
6264
|
-
# resp = client.update_auto_scaling_group({
|
6265
|
-
# auto_scaling_group_name: "my-auto-scaling-group",
|
6266
|
-
# launch_configuration_name: "new-launch-config",
|
6267
|
-
# })
|
6268
6363
|
#
|
6269
|
-
#
|
6364
|
+
# [1]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html
|
6270
6365
|
#
|
6271
|
-
#
|
6366
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
6272
6367
|
#
|
6273
|
-
# resp = client.update_auto_scaling_group({
|
6274
|
-
# auto_scaling_group_name: "my-auto-scaling-group",
|
6275
|
-
# max_size: 3,
|
6276
|
-
# min_size: 1,
|
6277
|
-
# })
|
6278
6368
|
#
|
6279
|
-
# @example Example: To
|
6369
|
+
# @example Example: To update an Auto Scaling group
|
6280
6370
|
#
|
6281
|
-
# # This example
|
6371
|
+
# # This example updates multiple properties at the same time.
|
6282
6372
|
#
|
6283
6373
|
# resp = client.update_auto_scaling_group({
|
6284
6374
|
# auto_scaling_group_name: "my-auto-scaling-group",
|
6375
|
+
# launch_template: {
|
6376
|
+
# launch_template_name: "my-template-for-auto-scaling",
|
6377
|
+
# version: "2",
|
6378
|
+
# },
|
6379
|
+
# max_size: 5,
|
6380
|
+
# min_size: 1,
|
6285
6381
|
# new_instances_protected_from_scale_in: true,
|
6286
6382
|
# })
|
6287
6383
|
#
|
@@ -6386,6 +6482,7 @@ module Aws::AutoScaling
|
|
6386
6482
|
# capacity_rebalance: false,
|
6387
6483
|
# context: "Context",
|
6388
6484
|
# desired_capacity_type: "XmlStringMaxLen255",
|
6485
|
+
# default_instance_warmup: 1,
|
6389
6486
|
# })
|
6390
6487
|
#
|
6391
6488
|
# @see http://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/UpdateAutoScalingGroup AWS API Documentation
|
@@ -6410,7 +6507,7 @@ module Aws::AutoScaling
|
|
6410
6507
|
params: params,
|
6411
6508
|
config: config)
|
6412
6509
|
context[:gem_name] = 'aws-sdk-autoscaling'
|
6413
|
-
context[:gem_version] = '1.
|
6510
|
+
context[:gem_version] = '1.79.0'
|
6414
6511
|
Seahorse::Client::Request.new(handlers, context)
|
6415
6512
|
end
|
6416
6513
|
|