aws-sdk-autoscaling 1.75.0 → 1.99.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +123 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-autoscaling/activity.rb +6 -2
- data/lib/aws-sdk-autoscaling/auto_scaling_group.rb +256 -130
- data/lib/aws-sdk-autoscaling/client.rb +1167 -433
- data/lib/aws-sdk-autoscaling/client_api.rb +201 -6
- data/lib/aws-sdk-autoscaling/endpoint_parameters.rb +66 -0
- data/lib/aws-sdk-autoscaling/endpoint_provider.rb +57 -0
- data/lib/aws-sdk-autoscaling/endpoints.rb +926 -0
- data/lib/aws-sdk-autoscaling/errors.rb +16 -0
- data/lib/aws-sdk-autoscaling/instance.rb +41 -17
- data/lib/aws-sdk-autoscaling/launch_configuration.rb +29 -35
- data/lib/aws-sdk-autoscaling/lifecycle_hook.rb +54 -46
- data/lib/aws-sdk-autoscaling/load_balancer.rb +15 -5
- data/lib/aws-sdk-autoscaling/notification_configuration.rb +12 -4
- data/lib/aws-sdk-autoscaling/plugins/endpoints.rb +198 -0
- data/lib/aws-sdk-autoscaling/resource.rb +223 -162
- data/lib/aws-sdk-autoscaling/scaling_policy.rb +12 -4
- data/lib/aws-sdk-autoscaling/scheduled_action.rb +10 -4
- data/lib/aws-sdk-autoscaling/tag.rb +18 -6
- data/lib/aws-sdk-autoscaling/types.rb +1479 -2513
- data/lib/aws-sdk-autoscaling.rb +5 -1
- metadata +8 -4
@@ -31,6 +31,7 @@ module Aws::AutoScaling
|
|
31
31
|
# * {AlreadyExistsFault}
|
32
32
|
# * {InstanceRefreshInProgressFault}
|
33
33
|
# * {InvalidNextToken}
|
34
|
+
# * {IrreversibleInstanceRefreshFault}
|
34
35
|
# * {LimitExceededFault}
|
35
36
|
# * {ResourceContentionFault}
|
36
37
|
# * {ResourceInUseFault}
|
@@ -103,6 +104,21 @@ module Aws::AutoScaling
|
|
103
104
|
end
|
104
105
|
end
|
105
106
|
|
107
|
+
class IrreversibleInstanceRefreshFault < ServiceError
|
108
|
+
|
109
|
+
# @param [Seahorse::Client::RequestContext] context
|
110
|
+
# @param [String] message
|
111
|
+
# @param [Aws::AutoScaling::Types::IrreversibleInstanceRefreshFault] data
|
112
|
+
def initialize(context, message, data = Aws::EmptyStructure.new)
|
113
|
+
super(context, message, data)
|
114
|
+
end
|
115
|
+
|
116
|
+
# @return [String]
|
117
|
+
def message
|
118
|
+
@message || @data[:message]
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
106
122
|
class LimitExceededFault < ServiceError
|
107
123
|
|
108
124
|
# @param [Seahorse::Client::RequestContext] context
|
@@ -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` \|
|
@@ -77,10 +77,10 @@ module Aws::AutoScaling
|
|
77
77
|
data[:lifecycle_state]
|
78
78
|
end
|
79
79
|
|
80
|
-
# The last reported health status of this instance.
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
80
|
+
# The last reported health status of this instance. `Healthy` means that
|
81
|
+
# the instance is healthy and should remain in service. `Unhealthy`
|
82
|
+
# means that the instance is unhealthy and Amazon EC2 Auto Scaling
|
83
|
+
# should terminate and replace it.
|
84
84
|
# @return [String]
|
85
85
|
def health_status
|
86
86
|
data[:health_status]
|
@@ -129,7 +129,9 @@ module Aws::AutoScaling
|
|
129
129
|
#
|
130
130
|
# @return [self]
|
131
131
|
def load
|
132
|
-
resp =
|
132
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
133
|
+
@client.describe_auto_scaling_instances(instance_ids: [@id])
|
134
|
+
end
|
133
135
|
@data = resp.auto_scaling_instances[0]
|
134
136
|
self
|
135
137
|
end
|
@@ -244,7 +246,9 @@ module Aws::AutoScaling
|
|
244
246
|
:retry
|
245
247
|
end
|
246
248
|
end
|
247
|
-
Aws::
|
249
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
250
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
251
|
+
end
|
248
252
|
end
|
249
253
|
|
250
254
|
# @!group Actions
|
@@ -259,7 +263,9 @@ module Aws::AutoScaling
|
|
259
263
|
auto_scaling_group_name: @group_name,
|
260
264
|
instance_ids: [@id]
|
261
265
|
)
|
262
|
-
resp =
|
266
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
267
|
+
@client.attach_instances(options)
|
268
|
+
end
|
263
269
|
resp.data
|
264
270
|
end
|
265
271
|
|
@@ -279,7 +285,9 @@ module Aws::AutoScaling
|
|
279
285
|
auto_scaling_group_name: @group_name,
|
280
286
|
instance_ids: [@id]
|
281
287
|
)
|
282
|
-
resp =
|
288
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
289
|
+
@client.detach_instances(options)
|
290
|
+
end
|
283
291
|
resp.data.activities.each do |a|
|
284
292
|
batch << Activity.new(
|
285
293
|
id: a.activity_id,
|
@@ -306,7 +314,9 @@ module Aws::AutoScaling
|
|
306
314
|
auto_scaling_group_name: @group_name,
|
307
315
|
instance_ids: [@id]
|
308
316
|
)
|
309
|
-
resp =
|
317
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
318
|
+
@client.enter_standby(options)
|
319
|
+
end
|
310
320
|
resp.data.activities.each do |a|
|
311
321
|
batch << Activity.new(
|
312
322
|
id: a.activity_id,
|
@@ -328,7 +338,9 @@ module Aws::AutoScaling
|
|
328
338
|
auto_scaling_group_name: @group_name,
|
329
339
|
instance_ids: [@id]
|
330
340
|
)
|
331
|
-
resp =
|
341
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
342
|
+
@client.exit_standby(options)
|
343
|
+
end
|
332
344
|
resp.data.activities.each do |a|
|
333
345
|
batch << Activity.new(
|
334
346
|
id: a.activity_id,
|
@@ -367,7 +379,9 @@ module Aws::AutoScaling
|
|
367
379
|
# @return [EmptyStructure]
|
368
380
|
def set_health(options = {})
|
369
381
|
options = options.merge(instance_id: @id)
|
370
|
-
resp =
|
382
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
383
|
+
@client.set_instance_health(options)
|
384
|
+
end
|
371
385
|
resp.data
|
372
386
|
end
|
373
387
|
|
@@ -383,7 +397,9 @@ module Aws::AutoScaling
|
|
383
397
|
# @return [Activity]
|
384
398
|
def terminate(options = {})
|
385
399
|
options = options.merge(instance_id: @id)
|
386
|
-
resp =
|
400
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
401
|
+
@client.terminate_instance_in_auto_scaling_group(options)
|
402
|
+
end
|
387
403
|
Activity.new(
|
388
404
|
id: resp.data.activity.activity_id,
|
389
405
|
data: resp.data.activity,
|
@@ -461,7 +477,9 @@ module Aws::AutoScaling
|
|
461
477
|
batch.each do |item|
|
462
478
|
params[:instance_ids] << item.id
|
463
479
|
end
|
464
|
-
|
480
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
481
|
+
batch[0].client.attach_instances(params)
|
482
|
+
end
|
465
483
|
end
|
466
484
|
nil
|
467
485
|
end
|
@@ -484,7 +502,9 @@ module Aws::AutoScaling
|
|
484
502
|
batch.each do |item|
|
485
503
|
params[:instance_ids] << item.id
|
486
504
|
end
|
487
|
-
|
505
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
506
|
+
batch[0].client.detach_instances(params)
|
507
|
+
end
|
488
508
|
end
|
489
509
|
nil
|
490
510
|
end
|
@@ -507,7 +527,9 @@ module Aws::AutoScaling
|
|
507
527
|
batch.each do |item|
|
508
528
|
params[:instance_ids] << item.id
|
509
529
|
end
|
510
|
-
|
530
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
531
|
+
batch[0].client.enter_standby(params)
|
532
|
+
end
|
511
533
|
end
|
512
534
|
nil
|
513
535
|
end
|
@@ -522,7 +544,9 @@ module Aws::AutoScaling
|
|
522
544
|
batch.each do |item|
|
523
545
|
params[:instance_ids] << item.id
|
524
546
|
end
|
525
|
-
|
547
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
548
|
+
batch[0].client.exit_standby(params)
|
549
|
+
end
|
526
550
|
end
|
527
551
|
nil
|
528
552
|
end
|
@@ -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,31 +78,13 @@ module Aws::AutoScaling
|
|
78
78
|
data[:security_groups]
|
79
79
|
end
|
80
80
|
|
81
|
-
#
|
82
|
-
# to. For more information, see [ClassicLink][1] in the *Amazon EC2 User
|
83
|
-
# Guide for Linux Instances* and [Linking EC2-Classic instances to a
|
84
|
-
# VPC][2] in the *Amazon EC2 Auto Scaling User Guide*.
|
85
|
-
#
|
86
|
-
#
|
87
|
-
#
|
88
|
-
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html
|
89
|
-
# [2]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink
|
81
|
+
# Available for backward compatibility.
|
90
82
|
# @return [String]
|
91
83
|
def classic_link_vpc_id
|
92
84
|
data[:classic_link_vpc_id]
|
93
85
|
end
|
94
86
|
|
95
|
-
#
|
96
|
-
# `ClassicLinkVPCId`.
|
97
|
-
#
|
98
|
-
# For more information, see [ClassicLink][1] in the *Amazon EC2 User
|
99
|
-
# Guide for Linux Instances* and [Linking EC2-Classic instances to a
|
100
|
-
# VPC][2] in the *Amazon EC2 Auto Scaling User Guide*.
|
101
|
-
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
# [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html
|
105
|
-
# [2]: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink
|
87
|
+
# Available for backward compatibility.
|
106
88
|
# @return [Array<String>]
|
107
89
|
def classic_link_vpc_security_groups
|
108
90
|
data[:classic_link_vpc_security_groups]
|
@@ -124,10 +106,9 @@ module Aws::AutoScaling
|
|
124
106
|
data[:user_data]
|
125
107
|
end
|
126
108
|
|
127
|
-
# The instance type for the instances.
|
128
|
-
#
|
129
|
-
#
|
130
|
-
# Instance Types][1] in the *Amazon EC2 User Guide for Linux Instances*.
|
109
|
+
# The instance type for the instances. For information about available
|
110
|
+
# instance types, see [Available instance types][1] in the *Amazon EC2
|
111
|
+
# User Guide for Linux Instances*.
|
131
112
|
#
|
132
113
|
#
|
133
114
|
#
|
@@ -149,9 +130,11 @@ module Aws::AutoScaling
|
|
149
130
|
data[:ramdisk_id]
|
150
131
|
end
|
151
132
|
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
133
|
+
# The block device mapping entries that define the block devices to
|
134
|
+
# attach to the instances at launch. By default, the block devices
|
135
|
+
# specified in the block device mapping for the AMI are used. For more
|
136
|
+
# information, see [Block Device Mapping][1] in the *Amazon EC2 User
|
137
|
+
# Guide for Linux Instances*.
|
155
138
|
#
|
156
139
|
#
|
157
140
|
#
|
@@ -222,10 +205,15 @@ module Aws::AutoScaling
|
|
222
205
|
data[:ebs_optimized]
|
223
206
|
end
|
224
207
|
|
225
|
-
#
|
226
|
-
#
|
227
|
-
#
|
228
|
-
#
|
208
|
+
# Specifies whether to assign a public IPv4 address to the group's
|
209
|
+
# instances. If the instance is launched into a default subnet, the
|
210
|
+
# default is to assign a public IPv4 address, unless you disabled the
|
211
|
+
# option to assign a public IPv4 address on the subnet. If the instance
|
212
|
+
# is launched into a nondefault subnet, the default is not to assign a
|
213
|
+
# public IPv4 address, unless you enabled the option to assign a public
|
214
|
+
# IPv4 address on the subnet. For more information, see [Launching Auto
|
215
|
+
# Scaling instances in a VPC][1] in the *Amazon EC2 Auto Scaling User
|
216
|
+
# Guide*.
|
229
217
|
#
|
230
218
|
#
|
231
219
|
#
|
@@ -276,7 +264,9 @@ module Aws::AutoScaling
|
|
276
264
|
#
|
277
265
|
# @return [self]
|
278
266
|
def load
|
279
|
-
resp =
|
267
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
268
|
+
@client.describe_launch_configurations(launch_configuration_names: [@name])
|
269
|
+
end
|
280
270
|
@data = resp.launch_configurations[0]
|
281
271
|
self
|
282
272
|
end
|
@@ -391,7 +381,9 @@ module Aws::AutoScaling
|
|
391
381
|
:retry
|
392
382
|
end
|
393
383
|
end
|
394
|
-
Aws::
|
384
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
385
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
386
|
+
end
|
395
387
|
end
|
396
388
|
|
397
389
|
# @!group Actions
|
@@ -403,7 +395,9 @@ module Aws::AutoScaling
|
|
403
395
|
# @return [EmptyStructure]
|
404
396
|
def delete(options = {})
|
405
397
|
options = options.merge(launch_configuration_name: @name)
|
406
|
-
resp =
|
398
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
399
|
+
@client.delete_launch_configuration(options)
|
400
|
+
end
|
407
401
|
resp.data
|
408
402
|
end
|
409
403
|
|
@@ -44,27 +44,25 @@ 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]
|
64
61
|
end
|
65
62
|
|
66
63
|
# The ARN of the IAM role that allows the Auto Scaling group to publish
|
67
|
-
# to the specified notification target
|
64
|
+
# to the specified notification target (an Amazon SNS topic or an Amazon
|
65
|
+
# SQS queue).
|
68
66
|
# @return [String]
|
69
67
|
def role_arn
|
70
68
|
data[:role_arn]
|
@@ -80,24 +78,24 @@ module Aws::AutoScaling
|
|
80
78
|
# The maximum time, in seconds, that can elapse before the lifecycle
|
81
79
|
# hook times out. If the lifecycle hook times out, Amazon EC2 Auto
|
82
80
|
# Scaling performs the action that you specified in the `DefaultResult`
|
83
|
-
#
|
81
|
+
# property.
|
84
82
|
# @return [Integer]
|
85
83
|
def heartbeat_timeout
|
86
84
|
data[:heartbeat_timeout]
|
87
85
|
end
|
88
86
|
|
89
|
-
# The maximum time, in seconds, that an instance can remain in a
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# smaller.
|
87
|
+
# The maximum time, in seconds, that an instance can remain in a wait
|
88
|
+
# state. The maximum is 172800 seconds (48 hours) or 100 times
|
89
|
+
# `HeartbeatTimeout`, whichever is smaller.
|
93
90
|
# @return [Integer]
|
94
91
|
def global_timeout
|
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]
|
@@ -117,10 +115,12 @@ module Aws::AutoScaling
|
|
117
115
|
#
|
118
116
|
# @return [self]
|
119
117
|
def load
|
120
|
-
resp =
|
118
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
119
|
+
@client.describe_lifecycle_hooks(
|
121
120
|
auto_scaling_group_name: @group_name,
|
122
121
|
lifecycle_hook_names: [@name]
|
123
122
|
)
|
123
|
+
end
|
124
124
|
@data = resp.lifecycle_hooks[0]
|
125
125
|
self
|
126
126
|
end
|
@@ -235,7 +235,9 @@ module Aws::AutoScaling
|
|
235
235
|
:retry
|
236
236
|
end
|
237
237
|
end
|
238
|
-
Aws::
|
238
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
239
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
240
|
+
end
|
239
241
|
end
|
240
242
|
|
241
243
|
# @!group Actions
|
@@ -254,8 +256,8 @@ module Aws::AutoScaling
|
|
254
256
|
# sends this token to the notification target you specified when you
|
255
257
|
# created the lifecycle hook.
|
256
258
|
# @option options [required, String] :lifecycle_action_result
|
257
|
-
# The action for the group to take.
|
258
|
-
# `
|
259
|
+
# The action for the group to take. You can specify either `CONTINUE` or
|
260
|
+
# `ABANDON`.
|
259
261
|
# @option options [String] :instance_id
|
260
262
|
# The ID of the instance.
|
261
263
|
# @return [Types::CompleteLifecycleActionAnswer]
|
@@ -264,7 +266,9 @@ module Aws::AutoScaling
|
|
264
266
|
auto_scaling_group_name: @group_name,
|
265
267
|
lifecycle_hook_name: @name
|
266
268
|
)
|
267
|
-
resp =
|
269
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
270
|
+
@client.complete_lifecycle_action(options)
|
271
|
+
end
|
268
272
|
resp.data
|
269
273
|
end
|
270
274
|
|
@@ -278,7 +282,9 @@ module Aws::AutoScaling
|
|
278
282
|
auto_scaling_group_name: @group_name,
|
279
283
|
lifecycle_hook_name: @name
|
280
284
|
)
|
281
|
-
resp =
|
285
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
286
|
+
@client.delete_lifecycle_hook(options)
|
287
|
+
end
|
282
288
|
resp.data
|
283
289
|
end
|
284
290
|
|
@@ -288,33 +294,35 @@ module Aws::AutoScaling
|
|
288
294
|
# lifecycle_transition: "LifecycleTransition",
|
289
295
|
# role_arn: "XmlStringMaxLen255",
|
290
296
|
# notification_target_arn: "NotificationTargetResourceName",
|
291
|
-
# notification_metadata: "
|
297
|
+
# notification_metadata: "AnyPrintableAsciiStringMaxLen4000",
|
292
298
|
# heartbeat_timeout: 1,
|
293
299
|
# default_result: "LifecycleActionResult",
|
294
300
|
# })
|
295
301
|
# @param [Hash] options ({})
|
296
302
|
# @option options [String] :lifecycle_transition
|
297
|
-
# The
|
298
|
-
#
|
303
|
+
# The lifecycle transition. For Auto Scaling groups, there are two major
|
304
|
+
# lifecycle transitions.
|
299
305
|
#
|
300
|
-
# *
|
306
|
+
# * To create a lifecycle hook for scale-out events, specify
|
307
|
+
# `autoscaling:EC2_INSTANCE_LAUNCHING`.
|
301
308
|
#
|
302
|
-
# *
|
309
|
+
# * To create a lifecycle hook for scale-in events, specify
|
310
|
+
# `autoscaling:EC2_INSTANCE_TERMINATING`.
|
303
311
|
#
|
304
312
|
# Required for new lifecycle hooks, but optional when updating existing
|
305
313
|
# hooks.
|
306
314
|
# @option options [String] :role_arn
|
307
315
|
# The ARN of the IAM role that allows the Auto Scaling group to publish
|
308
|
-
# to the specified notification target
|
309
|
-
# or an Amazon SQS queue.
|
316
|
+
# to the specified notification target.
|
310
317
|
#
|
311
|
-
#
|
312
|
-
# hooks
|
318
|
+
# Valid only if the notification target is an Amazon SNS topic or an
|
319
|
+
# Amazon SQS queue. Required for new lifecycle hooks, but optional when
|
320
|
+
# updating existing hooks.
|
313
321
|
# @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.
|
322
|
+
# The Amazon Resource Name (ARN) of the notification target that Amazon
|
323
|
+
# EC2 Auto Scaling uses to notify you when an instance is in a wait
|
324
|
+
# state for the lifecycle hook. You can specify either an Amazon SNS
|
325
|
+
# topic or an Amazon SQS queue.
|
318
326
|
#
|
319
327
|
# If you specify an empty string, this overrides the current ARN.
|
320
328
|
#
|
@@ -332,23 +340,21 @@ module Aws::AutoScaling
|
|
332
340
|
# The maximum time, in seconds, that can elapse before the lifecycle
|
333
341
|
# hook times out. The range is from `30` to `7200` seconds. The default
|
334
342
|
# 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
343
|
# @option options [String] :default_result
|
341
|
-
#
|
342
|
-
#
|
343
|
-
#
|
344
|
-
#
|
344
|
+
# The action the Auto Scaling group takes when the lifecycle hook
|
345
|
+
# timeout elapses or if an unexpected failure occurs. The default value
|
346
|
+
# is `ABANDON`.
|
347
|
+
#
|
348
|
+
# Valid values: `CONTINUE` \| `ABANDON`
|
345
349
|
# @return [Types::PutLifecycleHookAnswer]
|
346
350
|
def put(options = {})
|
347
351
|
options = options.merge(
|
348
352
|
auto_scaling_group_name: @group_name,
|
349
353
|
lifecycle_hook_name: @name
|
350
354
|
)
|
351
|
-
resp =
|
355
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
356
|
+
@client.put_lifecycle_hook(options)
|
357
|
+
end
|
352
358
|
resp.data
|
353
359
|
end
|
354
360
|
|
@@ -372,7 +378,9 @@ module Aws::AutoScaling
|
|
372
378
|
auto_scaling_group_name: @group_name,
|
373
379
|
lifecycle_hook_name: @name
|
374
380
|
)
|
375
|
-
resp =
|
381
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
382
|
+
@client.record_lifecycle_action_heartbeat(options)
|
383
|
+
end
|
376
384
|
resp.data
|
377
385
|
end
|
378
386
|
|
@@ -190,7 +190,9 @@ module Aws::AutoScaling
|
|
190
190
|
:retry
|
191
191
|
end
|
192
192
|
end
|
193
|
-
Aws::
|
193
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
194
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
195
|
+
end
|
194
196
|
end
|
195
197
|
|
196
198
|
# @!group Actions
|
@@ -205,7 +207,9 @@ module Aws::AutoScaling
|
|
205
207
|
auto_scaling_group_name: @group_name,
|
206
208
|
load_balancer_names: [@name]
|
207
209
|
)
|
208
|
-
resp =
|
210
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
211
|
+
@client.attach_load_balancers(options)
|
212
|
+
end
|
209
213
|
resp.data
|
210
214
|
end
|
211
215
|
|
@@ -219,7 +223,9 @@ module Aws::AutoScaling
|
|
219
223
|
auto_scaling_group_name: @group_name,
|
220
224
|
load_balancer_names: [@name]
|
221
225
|
)
|
222
|
-
resp =
|
226
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
227
|
+
@client.detach_load_balancers(options)
|
228
|
+
end
|
223
229
|
resp.data
|
224
230
|
end
|
225
231
|
|
@@ -281,7 +287,9 @@ module Aws::AutoScaling
|
|
281
287
|
batch.each do |item|
|
282
288
|
params[:load_balancer_names] << item.name
|
283
289
|
end
|
284
|
-
|
290
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
291
|
+
batch[0].client.attach_load_balancers(params)
|
292
|
+
end
|
285
293
|
end
|
286
294
|
nil
|
287
295
|
end
|
@@ -296,7 +304,9 @@ module Aws::AutoScaling
|
|
296
304
|
batch.each do |item|
|
297
305
|
params[:load_balancer_names] << item.name
|
298
306
|
end
|
299
|
-
|
307
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
308
|
+
batch[0].client.detach_load_balancers(params)
|
309
|
+
end
|
300
310
|
end
|
301
311
|
nil
|
302
312
|
end
|
@@ -176,7 +176,9 @@ module Aws::AutoScaling
|
|
176
176
|
:retry
|
177
177
|
end
|
178
178
|
end
|
179
|
-
Aws::
|
179
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
180
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
181
|
+
end
|
180
182
|
end
|
181
183
|
|
182
184
|
# @!group Actions
|
@@ -191,7 +193,9 @@ module Aws::AutoScaling
|
|
191
193
|
auto_scaling_group_name: @group_name,
|
192
194
|
topic_arn: @topic_arn
|
193
195
|
)
|
194
|
-
resp =
|
196
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
197
|
+
@client.delete_notification_configuration(options)
|
198
|
+
end
|
195
199
|
resp.data
|
196
200
|
end
|
197
201
|
|
@@ -206,7 +210,9 @@ module Aws::AutoScaling
|
|
206
210
|
topic_arn: @topic_arn,
|
207
211
|
notification_types: [@notification_type]
|
208
212
|
)
|
209
|
-
resp =
|
213
|
+
resp = Aws::Plugins::UserAgent.feature('resource') do
|
214
|
+
@client.put_notification_configuration(options)
|
215
|
+
end
|
210
216
|
resp.data
|
211
217
|
end
|
212
218
|
|
@@ -281,7 +287,9 @@ module Aws::AutoScaling
|
|
281
287
|
batch.each do |item|
|
282
288
|
params[:notification_types] << item.notification_type
|
283
289
|
end
|
284
|
-
|
290
|
+
Aws::Plugins::UserAgent.feature('resource') do
|
291
|
+
batch[0].client.put_notification_configuration(params)
|
292
|
+
end
|
285
293
|
end
|
286
294
|
nil
|
287
295
|
end
|