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.
@@ -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 Values: `Pending` \| `Pending:Wait` \| `Pending:Proceed` \|
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 [Finding an AMI][1] in the
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 parameter is not
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 parameter is not
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
- # For information about available instance types, see [Available
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
- # A block device mapping, which specifies the block devices for the
143
- # instance. For more information, see [Block Device Mapping][1] in the
144
- # *Amazon EC2 User Guide for Linux Instances*.
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
- # For Auto Scaling groups that are running in a VPC, specifies whether
216
- # to assign a public IP address to the group's instances. For more
217
- # information, see [Launching Auto Scaling instances in a VPC][1] in the
218
- # *Amazon EC2 Auto Scaling User Guide*.
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 state of the EC2 instance to which to attach the lifecycle hook.
48
- # The following are possible values:
47
+ # The lifecycle transition.
49
48
  #
50
- # * autoscaling:EC2\_INSTANCE\_LAUNCHING
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 the transition state for the lifecycle hook.
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
- # parameter.
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
- # Defines the action the Auto Scaling group should take when the
99
- # lifecycle hook timeout elapses or if an unexpected failure occurs. The
100
- # possible values are `CONTINUE` and `ABANDON`.
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. This parameter can be either
258
- # `CONTINUE` or `ABANDON`.
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 instance state to which you want to attach the lifecycle hook. The
298
- # valid values are:
295
+ # The lifecycle transition. For Auto Scaling groups, there are two major
296
+ # lifecycle transitions.
299
297
  #
300
- # * autoscaling:EC2\_INSTANCE\_LAUNCHING
298
+ # * To create a lifecycle hook for scale-out events, specify
299
+ # `autoscaling:EC2_INSTANCE_LAUNCHING`.
301
300
  #
302
- # * autoscaling:EC2\_INSTANCE\_TERMINATING
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 EC2 Auto Scaling uses
315
- # to notify you when an instance is in the transition state for the
316
- # lifecycle hook. This target can be either an SQS queue or an SNS
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
- # Defines the action the Auto Scaling group should take when the
342
- # lifecycle hook timeout elapses or if an unexpected failure occurs.
343
- # This parameter can be either `CONTINUE` or `ABANDON`. The default
344
- # value is `ABANDON`.
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