aws-sdk-autoscaling 1.79.0 → 1.81.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 +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-autoscaling/auto_scaling_group.rb +58 -39
- data/lib/aws-sdk-autoscaling/client.rb +270 -221
- data/lib/aws-sdk-autoscaling/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-autoscaling/endpoint_provider.rb +117 -0
- data/lib/aws-sdk-autoscaling/endpoints.rb +869 -0
- data/lib/aws-sdk-autoscaling/instance.rb +1 -1
- data/lib/aws-sdk-autoscaling/launch_configuration.rb +20 -14
- data/lib/aws-sdk-autoscaling/lifecycle_hook.rb +26 -30
- data/lib/aws-sdk-autoscaling/plugins/endpoints.rb +190 -0
- data/lib/aws-sdk-autoscaling/resource.rb +119 -118
- data/lib/aws-sdk-autoscaling/scheduled_action.rb +1 -1
- data/lib/aws-sdk-autoscaling/types.rb +316 -265
- data/lib/aws-sdk-autoscaling.rb +5 -1
- metadata +8 -4
@@ -60,7 +60,7 @@ module Aws::AutoScaling
|
|
60
60
|
# used. For information about lifecycle states, see [Instance
|
61
61
|
# lifecycle][1] in the *Amazon EC2 Auto Scaling User Guide*.
|
62
62
|
#
|
63
|
-
# Valid
|
63
|
+
# Valid values: `Pending` \| `Pending:Wait` \| `Pending:Proceed` \|
|
64
64
|
# `Quarantined` \| `InService` \| `Terminating` \| `Terminating:Wait` \|
|
65
65
|
# `Terminating:Proceed` \| `Terminated` \| `Detaching` \| `Detached` \|
|
66
66
|
# `EnteringStandby` \| `Standby` \| `Warmed:Pending` \|
|
@@ -42,7 +42,7 @@ module Aws::AutoScaling
|
|
42
42
|
end
|
43
43
|
|
44
44
|
# The ID of the Amazon Machine Image (AMI) to use to launch your EC2
|
45
|
-
# instances. For more information, see [
|
45
|
+
# instances. For more information, see [Find a Linux AMI][1] in the
|
46
46
|
# *Amazon EC2 User Guide for Linux Instances*.
|
47
47
|
#
|
48
48
|
#
|
@@ -78,7 +78,7 @@ module Aws::AutoScaling
|
|
78
78
|
data[:security_groups]
|
79
79
|
end
|
80
80
|
|
81
|
-
# *EC2-Classic retires on August 15, 2022. This
|
81
|
+
# *EC2-Classic retires on August 15, 2022. This property is not
|
82
82
|
# supported after that date.*
|
83
83
|
#
|
84
84
|
# The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances
|
@@ -88,7 +88,7 @@ module Aws::AutoScaling
|
|
88
88
|
data[:classic_link_vpc_id]
|
89
89
|
end
|
90
90
|
|
91
|
-
# *EC2-Classic retires on August 15, 2022. This
|
91
|
+
# *EC2-Classic retires on August 15, 2022. This property is not
|
92
92
|
# supported after that date.*
|
93
93
|
#
|
94
94
|
# The IDs of one or more security groups for the VPC specified in
|
@@ -114,10 +114,9 @@ module Aws::AutoScaling
|
|
114
114
|
data[:user_data]
|
115
115
|
end
|
116
116
|
|
117
|
-
# The instance type for the instances.
|
118
|
-
#
|
119
|
-
#
|
120
|
-
# Instance Types][1] in the *Amazon EC2 User Guide for Linux Instances*.
|
117
|
+
# The instance type for the instances. For information about available
|
118
|
+
# instance types, see [Available instance types][1] in the *Amazon EC2
|
119
|
+
# User Guide for Linux Instances*.
|
121
120
|
#
|
122
121
|
#
|
123
122
|
#
|
@@ -139,9 +138,11 @@ module Aws::AutoScaling
|
|
139
138
|
data[:ramdisk_id]
|
140
139
|
end
|
141
140
|
|
142
|
-
#
|
143
|
-
#
|
144
|
-
#
|
141
|
+
# The block device mapping entries that define the block devices to
|
142
|
+
# attach to the instances at launch. By default, the block devices
|
143
|
+
# specified in the block device mapping for the AMI are used. For more
|
144
|
+
# information, see [Block Device Mapping][1] in the *Amazon EC2 User
|
145
|
+
# Guide for Linux Instances*.
|
145
146
|
#
|
146
147
|
#
|
147
148
|
#
|
@@ -212,10 +213,15 @@ module Aws::AutoScaling
|
|
212
213
|
data[:ebs_optimized]
|
213
214
|
end
|
214
215
|
|
215
|
-
#
|
216
|
-
#
|
217
|
-
#
|
218
|
-
#
|
216
|
+
# Specifies whether to assign a public IPv4 address to the group's
|
217
|
+
# instances. If the instance is launched into a default subnet, the
|
218
|
+
# default is to assign a public IPv4 address, unless you disabled the
|
219
|
+
# option to assign a public IPv4 address on the subnet. If the instance
|
220
|
+
# is launched into a nondefault subnet, the default is not to assign a
|
221
|
+
# public IPv4 address, unless you enabled the option to assign a public
|
222
|
+
# IPv4 address on the subnet. For more information, see [Launching Auto
|
223
|
+
# Scaling instances in a VPC][1] in the *Amazon EC2 Auto Scaling User
|
224
|
+
# Guide*.
|
219
225
|
#
|
220
226
|
#
|
221
227
|
#
|
@@ -44,20 +44,17 @@ module Aws::AutoScaling
|
|
44
44
|
end
|
45
45
|
alias :lifecycle_hook_name :name
|
46
46
|
|
47
|
-
# The
|
48
|
-
# The following are possible values:
|
47
|
+
# The lifecycle transition.
|
49
48
|
#
|
50
|
-
#
|
51
|
-
#
|
52
|
-
# * autoscaling:EC2\_INSTANCE\_TERMINATING
|
49
|
+
# Valid values: `autoscaling:EC2_INSTANCE_LAUNCHING` \|
|
50
|
+
# `autoscaling:EC2_INSTANCE_TERMINATING`
|
53
51
|
# @return [String]
|
54
52
|
def lifecycle_transition
|
55
53
|
data[:lifecycle_transition]
|
56
54
|
end
|
57
55
|
|
58
56
|
# The ARN of the target that Amazon EC2 Auto Scaling sends notifications
|
59
|
-
# to when an instance is in
|
60
|
-
# The notification target can be either an SQS queue or an SNS topic.
|
57
|
+
# to when an instance is in a wait state for the lifecycle hook.
|
61
58
|
# @return [String]
|
62
59
|
def notification_target_arn
|
63
60
|
data[:notification_target_arn]
|
@@ -81,7 +78,7 @@ module Aws::AutoScaling
|
|
81
78
|
# The maximum time, in seconds, that can elapse before the lifecycle
|
82
79
|
# hook times out. If the lifecycle hook times out, Amazon EC2 Auto
|
83
80
|
# Scaling performs the action that you specified in the `DefaultResult`
|
84
|
-
#
|
81
|
+
# property.
|
85
82
|
# @return [Integer]
|
86
83
|
def heartbeat_timeout
|
87
84
|
data[:heartbeat_timeout]
|
@@ -95,9 +92,10 @@ module Aws::AutoScaling
|
|
95
92
|
data[:global_timeout]
|
96
93
|
end
|
97
94
|
|
98
|
-
#
|
99
|
-
#
|
100
|
-
#
|
95
|
+
# The action the Auto Scaling group takes when the lifecycle hook
|
96
|
+
# timeout elapses or if an unexpected failure occurs.
|
97
|
+
#
|
98
|
+
# Valid values: `CONTINUE` \| `ABANDON`
|
101
99
|
# @return [String]
|
102
100
|
def default_result
|
103
101
|
data[:default_result]
|
@@ -254,8 +252,8 @@ module Aws::AutoScaling
|
|
254
252
|
# sends this token to the notification target you specified when you
|
255
253
|
# created the lifecycle hook.
|
256
254
|
# @option options [required, String] :lifecycle_action_result
|
257
|
-
# The action for the group to take.
|
258
|
-
# `
|
255
|
+
# The action for the group to take. You can specify either `CONTINUE` or
|
256
|
+
# `ABANDON`.
|
259
257
|
# @option options [String] :instance_id
|
260
258
|
# The ID of the instance.
|
261
259
|
# @return [Types::CompleteLifecycleActionAnswer]
|
@@ -294,12 +292,14 @@ module Aws::AutoScaling
|
|
294
292
|
# })
|
295
293
|
# @param [Hash] options ({})
|
296
294
|
# @option options [String] :lifecycle_transition
|
297
|
-
# The
|
298
|
-
#
|
295
|
+
# The lifecycle transition. For Auto Scaling groups, there are two major
|
296
|
+
# lifecycle transitions.
|
299
297
|
#
|
300
|
-
# *
|
298
|
+
# * To create a lifecycle hook for scale-out events, specify
|
299
|
+
# `autoscaling:EC2_INSTANCE_LAUNCHING`.
|
301
300
|
#
|
302
|
-
# *
|
301
|
+
# * To create a lifecycle hook for scale-in events, specify
|
302
|
+
# `autoscaling:EC2_INSTANCE_TERMINATING`.
|
303
303
|
#
|
304
304
|
# Required for new lifecycle hooks, but optional when updating existing
|
305
305
|
# hooks.
|
@@ -311,10 +311,10 @@ module Aws::AutoScaling
|
|
311
311
|
# Amazon SQS queue. Required for new lifecycle hooks, but optional when
|
312
312
|
# updating existing hooks.
|
313
313
|
# @option options [String] :notification_target_arn
|
314
|
-
# The ARN of the notification target that Amazon
|
315
|
-
# to notify you when an instance is in
|
316
|
-
# lifecycle hook.
|
317
|
-
# topic.
|
314
|
+
# The Amazon Resource Name (ARN) of the notification target that Amazon
|
315
|
+
# EC2 Auto Scaling uses to notify you when an instance is in a wait
|
316
|
+
# state for the lifecycle hook. You can specify either an Amazon SNS
|
317
|
+
# topic or an Amazon SQS queue.
|
318
318
|
#
|
319
319
|
# If you specify an empty string, this overrides the current ARN.
|
320
320
|
#
|
@@ -332,16 +332,12 @@ module Aws::AutoScaling
|
|
332
332
|
# The maximum time, in seconds, that can elapse before the lifecycle
|
333
333
|
# hook times out. The range is from `30` to `7200` seconds. The default
|
334
334
|
# value is `3600` seconds (1 hour).
|
335
|
-
#
|
336
|
-
# If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the
|
337
|
-
# action that you specified in the `DefaultResult` parameter. You can
|
338
|
-
# prevent the lifecycle hook from timing out by calling the
|
339
|
-
# RecordLifecycleActionHeartbeat API.
|
340
335
|
# @option options [String] :default_result
|
341
|
-
#
|
342
|
-
#
|
343
|
-
#
|
344
|
-
#
|
336
|
+
# The action the Auto Scaling group takes when the lifecycle hook
|
337
|
+
# timeout elapses or if an unexpected failure occurs. The default value
|
338
|
+
# is `ABANDON`.
|
339
|
+
#
|
340
|
+
# Valid values: `CONTINUE` \| `ABANDON`
|
345
341
|
# @return [Types::PutLifecycleHookAnswer]
|
346
342
|
def put(options = {})
|
347
343
|
options = options.merge(
|
@@ -0,0 +1,190 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::AutoScaling
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::AutoScaling::EndpointProvider',
|
17
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
|
+
'where `parameters` is a Struct similar to '\
|
20
|
+
'`Aws::AutoScaling::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::AutoScaling::EndpointProvider.new
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
class Handler < Seahorse::Client::Handler
|
27
|
+
def call(context)
|
28
|
+
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
|
+
unless context[:discovered_endpoint]
|
30
|
+
params = parameters_for_operation(context)
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
|
+
|
33
|
+
context.http_request.endpoint = endpoint.url
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
end
|
36
|
+
|
37
|
+
context[:endpoint_params] = params
|
38
|
+
context[:auth_scheme] =
|
39
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
|
+
|
41
|
+
@handler.call(context)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def apply_endpoint_headers(context, headers)
|
47
|
+
headers.each do |key, values|
|
48
|
+
value = values
|
49
|
+
.compact
|
50
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
51
|
+
.join(',')
|
52
|
+
|
53
|
+
context.http_request.headers[key] = value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def parameters_for_operation(context)
|
58
|
+
case context.operation_name
|
59
|
+
when :attach_instances
|
60
|
+
Aws::AutoScaling::Endpoints::AttachInstances.build(context)
|
61
|
+
when :attach_load_balancer_target_groups
|
62
|
+
Aws::AutoScaling::Endpoints::AttachLoadBalancerTargetGroups.build(context)
|
63
|
+
when :attach_load_balancers
|
64
|
+
Aws::AutoScaling::Endpoints::AttachLoadBalancers.build(context)
|
65
|
+
when :batch_delete_scheduled_action
|
66
|
+
Aws::AutoScaling::Endpoints::BatchDeleteScheduledAction.build(context)
|
67
|
+
when :batch_put_scheduled_update_group_action
|
68
|
+
Aws::AutoScaling::Endpoints::BatchPutScheduledUpdateGroupAction.build(context)
|
69
|
+
when :cancel_instance_refresh
|
70
|
+
Aws::AutoScaling::Endpoints::CancelInstanceRefresh.build(context)
|
71
|
+
when :complete_lifecycle_action
|
72
|
+
Aws::AutoScaling::Endpoints::CompleteLifecycleAction.build(context)
|
73
|
+
when :create_auto_scaling_group
|
74
|
+
Aws::AutoScaling::Endpoints::CreateAutoScalingGroup.build(context)
|
75
|
+
when :create_launch_configuration
|
76
|
+
Aws::AutoScaling::Endpoints::CreateLaunchConfiguration.build(context)
|
77
|
+
when :create_or_update_tags
|
78
|
+
Aws::AutoScaling::Endpoints::CreateOrUpdateTags.build(context)
|
79
|
+
when :delete_auto_scaling_group
|
80
|
+
Aws::AutoScaling::Endpoints::DeleteAutoScalingGroup.build(context)
|
81
|
+
when :delete_launch_configuration
|
82
|
+
Aws::AutoScaling::Endpoints::DeleteLaunchConfiguration.build(context)
|
83
|
+
when :delete_lifecycle_hook
|
84
|
+
Aws::AutoScaling::Endpoints::DeleteLifecycleHook.build(context)
|
85
|
+
when :delete_notification_configuration
|
86
|
+
Aws::AutoScaling::Endpoints::DeleteNotificationConfiguration.build(context)
|
87
|
+
when :delete_policy
|
88
|
+
Aws::AutoScaling::Endpoints::DeletePolicy.build(context)
|
89
|
+
when :delete_scheduled_action
|
90
|
+
Aws::AutoScaling::Endpoints::DeleteScheduledAction.build(context)
|
91
|
+
when :delete_tags
|
92
|
+
Aws::AutoScaling::Endpoints::DeleteTags.build(context)
|
93
|
+
when :delete_warm_pool
|
94
|
+
Aws::AutoScaling::Endpoints::DeleteWarmPool.build(context)
|
95
|
+
when :describe_account_limits
|
96
|
+
Aws::AutoScaling::Endpoints::DescribeAccountLimits.build(context)
|
97
|
+
when :describe_adjustment_types
|
98
|
+
Aws::AutoScaling::Endpoints::DescribeAdjustmentTypes.build(context)
|
99
|
+
when :describe_auto_scaling_groups
|
100
|
+
Aws::AutoScaling::Endpoints::DescribeAutoScalingGroups.build(context)
|
101
|
+
when :describe_auto_scaling_instances
|
102
|
+
Aws::AutoScaling::Endpoints::DescribeAutoScalingInstances.build(context)
|
103
|
+
when :describe_auto_scaling_notification_types
|
104
|
+
Aws::AutoScaling::Endpoints::DescribeAutoScalingNotificationTypes.build(context)
|
105
|
+
when :describe_instance_refreshes
|
106
|
+
Aws::AutoScaling::Endpoints::DescribeInstanceRefreshes.build(context)
|
107
|
+
when :describe_launch_configurations
|
108
|
+
Aws::AutoScaling::Endpoints::DescribeLaunchConfigurations.build(context)
|
109
|
+
when :describe_lifecycle_hook_types
|
110
|
+
Aws::AutoScaling::Endpoints::DescribeLifecycleHookTypes.build(context)
|
111
|
+
when :describe_lifecycle_hooks
|
112
|
+
Aws::AutoScaling::Endpoints::DescribeLifecycleHooks.build(context)
|
113
|
+
when :describe_load_balancer_target_groups
|
114
|
+
Aws::AutoScaling::Endpoints::DescribeLoadBalancerTargetGroups.build(context)
|
115
|
+
when :describe_load_balancers
|
116
|
+
Aws::AutoScaling::Endpoints::DescribeLoadBalancers.build(context)
|
117
|
+
when :describe_metric_collection_types
|
118
|
+
Aws::AutoScaling::Endpoints::DescribeMetricCollectionTypes.build(context)
|
119
|
+
when :describe_notification_configurations
|
120
|
+
Aws::AutoScaling::Endpoints::DescribeNotificationConfigurations.build(context)
|
121
|
+
when :describe_policies
|
122
|
+
Aws::AutoScaling::Endpoints::DescribePolicies.build(context)
|
123
|
+
when :describe_scaling_activities
|
124
|
+
Aws::AutoScaling::Endpoints::DescribeScalingActivities.build(context)
|
125
|
+
when :describe_scaling_process_types
|
126
|
+
Aws::AutoScaling::Endpoints::DescribeScalingProcessTypes.build(context)
|
127
|
+
when :describe_scheduled_actions
|
128
|
+
Aws::AutoScaling::Endpoints::DescribeScheduledActions.build(context)
|
129
|
+
when :describe_tags
|
130
|
+
Aws::AutoScaling::Endpoints::DescribeTags.build(context)
|
131
|
+
when :describe_termination_policy_types
|
132
|
+
Aws::AutoScaling::Endpoints::DescribeTerminationPolicyTypes.build(context)
|
133
|
+
when :describe_warm_pool
|
134
|
+
Aws::AutoScaling::Endpoints::DescribeWarmPool.build(context)
|
135
|
+
when :detach_instances
|
136
|
+
Aws::AutoScaling::Endpoints::DetachInstances.build(context)
|
137
|
+
when :detach_load_balancer_target_groups
|
138
|
+
Aws::AutoScaling::Endpoints::DetachLoadBalancerTargetGroups.build(context)
|
139
|
+
when :detach_load_balancers
|
140
|
+
Aws::AutoScaling::Endpoints::DetachLoadBalancers.build(context)
|
141
|
+
when :disable_metrics_collection
|
142
|
+
Aws::AutoScaling::Endpoints::DisableMetricsCollection.build(context)
|
143
|
+
when :enable_metrics_collection
|
144
|
+
Aws::AutoScaling::Endpoints::EnableMetricsCollection.build(context)
|
145
|
+
when :enter_standby
|
146
|
+
Aws::AutoScaling::Endpoints::EnterStandby.build(context)
|
147
|
+
when :execute_policy
|
148
|
+
Aws::AutoScaling::Endpoints::ExecutePolicy.build(context)
|
149
|
+
when :exit_standby
|
150
|
+
Aws::AutoScaling::Endpoints::ExitStandby.build(context)
|
151
|
+
when :get_predictive_scaling_forecast
|
152
|
+
Aws::AutoScaling::Endpoints::GetPredictiveScalingForecast.build(context)
|
153
|
+
when :put_lifecycle_hook
|
154
|
+
Aws::AutoScaling::Endpoints::PutLifecycleHook.build(context)
|
155
|
+
when :put_notification_configuration
|
156
|
+
Aws::AutoScaling::Endpoints::PutNotificationConfiguration.build(context)
|
157
|
+
when :put_scaling_policy
|
158
|
+
Aws::AutoScaling::Endpoints::PutScalingPolicy.build(context)
|
159
|
+
when :put_scheduled_update_group_action
|
160
|
+
Aws::AutoScaling::Endpoints::PutScheduledUpdateGroupAction.build(context)
|
161
|
+
when :put_warm_pool
|
162
|
+
Aws::AutoScaling::Endpoints::PutWarmPool.build(context)
|
163
|
+
when :record_lifecycle_action_heartbeat
|
164
|
+
Aws::AutoScaling::Endpoints::RecordLifecycleActionHeartbeat.build(context)
|
165
|
+
when :resume_processes
|
166
|
+
Aws::AutoScaling::Endpoints::ResumeProcesses.build(context)
|
167
|
+
when :set_desired_capacity
|
168
|
+
Aws::AutoScaling::Endpoints::SetDesiredCapacity.build(context)
|
169
|
+
when :set_instance_health
|
170
|
+
Aws::AutoScaling::Endpoints::SetInstanceHealth.build(context)
|
171
|
+
when :set_instance_protection
|
172
|
+
Aws::AutoScaling::Endpoints::SetInstanceProtection.build(context)
|
173
|
+
when :start_instance_refresh
|
174
|
+
Aws::AutoScaling::Endpoints::StartInstanceRefresh.build(context)
|
175
|
+
when :suspend_processes
|
176
|
+
Aws::AutoScaling::Endpoints::SuspendProcesses.build(context)
|
177
|
+
when :terminate_instance_in_auto_scaling_group
|
178
|
+
Aws::AutoScaling::Endpoints::TerminateInstanceInAutoScalingGroup.build(context)
|
179
|
+
when :update_auto_scaling_group
|
180
|
+
Aws::AutoScaling::Endpoints::UpdateAutoScalingGroup.build(context)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
def add_handlers(handlers, _config)
|
186
|
+
handlers.add(Handler, step: :build, priority: 75)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|