aws-sdk-autoscaling 1.0.0.rc1 → 1.0.0.rc2
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/lib/aws-sdk-autoscaling.rb +2 -2
- data/lib/aws-sdk-autoscaling/activity.rb +131 -133
- data/lib/aws-sdk-autoscaling/auto_scaling_group.rb +940 -942
- data/lib/aws-sdk-autoscaling/client.rb +3146 -2674
- data/lib/aws-sdk-autoscaling/client_api.rb +1403 -1405
- data/lib/aws-sdk-autoscaling/errors.rb +4 -13
- data/lib/aws-sdk-autoscaling/instance.rb +351 -359
- data/lib/aws-sdk-autoscaling/launch_configuration.rb +198 -200
- data/lib/aws-sdk-autoscaling/lifecycle_hook.rb +288 -290
- data/lib/aws-sdk-autoscaling/load_balancer.rb +179 -187
- data/lib/aws-sdk-autoscaling/notification_configuration.rb +162 -167
- data/lib/aws-sdk-autoscaling/resource.rb +645 -647
- data/lib/aws-sdk-autoscaling/scaling_policy.rb +216 -218
- data/lib/aws-sdk-autoscaling/scheduled_action.rb +152 -154
- data/lib/aws-sdk-autoscaling/tag.rb +216 -224
- data/lib/aws-sdk-autoscaling/types.rb +3987 -3547
- data/lib/aws-sdk-autoscaling/waiters.rb +126 -127
- metadata +2 -2
@@ -1,695 +1,693 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
class Resource
|
8
|
+
module Aws::AutoScaling
|
9
|
+
class Resource
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
# @param options ({})
|
12
|
+
# @option options [Client] :client
|
13
|
+
def initialize(options = {})
|
14
|
+
@client = options[:client] || Client.new(options)
|
15
|
+
end
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
# @return [Client]
|
18
|
+
def client
|
19
|
+
@client
|
20
|
+
end
|
22
21
|
|
23
|
-
|
22
|
+
# @!group Actions
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
24
|
+
# @example Request syntax with placeholder values
|
25
|
+
#
|
26
|
+
# autoscalinggroup = auto_scaling.create_group({
|
27
|
+
# auto_scaling_group_name: "XmlStringMaxLen255", # required
|
28
|
+
# launch_configuration_name: "ResourceName",
|
29
|
+
# instance_id: "XmlStringMaxLen19",
|
30
|
+
# min_size: 1, # required
|
31
|
+
# max_size: 1, # required
|
32
|
+
# desired_capacity: 1,
|
33
|
+
# default_cooldown: 1,
|
34
|
+
# availability_zones: ["XmlStringMaxLen255"],
|
35
|
+
# load_balancer_names: ["XmlStringMaxLen255"],
|
36
|
+
# target_group_arns: ["XmlStringMaxLen511"],
|
37
|
+
# health_check_type: "XmlStringMaxLen32",
|
38
|
+
# health_check_grace_period: 1,
|
39
|
+
# placement_group: "XmlStringMaxLen255",
|
40
|
+
# vpc_zone_identifier: "XmlStringMaxLen2047",
|
41
|
+
# termination_policies: ["XmlStringMaxLen1600"],
|
42
|
+
# new_instances_protected_from_scale_in: false,
|
43
|
+
# tags: [
|
44
|
+
# {
|
45
|
+
# resource_id: "XmlString",
|
46
|
+
# resource_type: "XmlString",
|
47
|
+
# key: "TagKey", # required
|
48
|
+
# value: "TagValue",
|
49
|
+
# propagate_at_launch: false,
|
50
|
+
# },
|
51
|
+
# ],
|
52
|
+
# })
|
53
|
+
# @param [Hash] options ({})
|
54
|
+
# @option options [required, String] :auto_scaling_group_name
|
55
|
+
# The name of the group. This name must be unique within the scope of
|
56
|
+
# your AWS account.
|
57
|
+
# @option options [String] :launch_configuration_name
|
58
|
+
# The name of the launch configuration. Alternatively, specify an EC2
|
59
|
+
# instance instead of a launch configuration.
|
60
|
+
# @option options [String] :instance_id
|
61
|
+
# The ID of the instance used to create a launch configuration for the
|
62
|
+
# group. Alternatively, specify a launch configuration instead of an EC2
|
63
|
+
# instance.
|
64
|
+
#
|
65
|
+
# When you specify an ID of an instance, Auto Scaling creates a new
|
66
|
+
# launch configuration and associates it with the group. This launch
|
67
|
+
# configuration derives its attributes from the specified instance, with
|
68
|
+
# the exception of the block device mapping.
|
69
|
+
#
|
70
|
+
# For more information, see [Create an Auto Scaling Group Using an EC2
|
71
|
+
# Instance][1] in the *Auto Scaling User Guide*.
|
72
|
+
#
|
73
|
+
#
|
74
|
+
#
|
75
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/create-asg-from-instance.html
|
76
|
+
# @option options [required, Integer] :min_size
|
77
|
+
# The minimum size of the group.
|
78
|
+
# @option options [required, Integer] :max_size
|
79
|
+
# The maximum size of the group.
|
80
|
+
# @option options [Integer] :desired_capacity
|
81
|
+
# The number of EC2 instances that should be running in the group. This
|
82
|
+
# number must be greater than or equal to the minimum size of the group
|
83
|
+
# and less than or equal to the maximum size of the group.
|
84
|
+
# @option options [Integer] :default_cooldown
|
85
|
+
# The amount of time, in seconds, after a scaling activity completes
|
86
|
+
# before another scaling activity can start. The default is 300.
|
87
|
+
#
|
88
|
+
# For more information, see [Auto Scaling Cooldowns][1] in the *Auto
|
89
|
+
# Scaling User Guide*.
|
90
|
+
#
|
91
|
+
#
|
92
|
+
#
|
93
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/Cooldown.html
|
94
|
+
# @option options [Array<String>] :availability_zones
|
95
|
+
# One or more Availability Zones for the group. This parameter is
|
96
|
+
# optional if you specify one or more subnets.
|
97
|
+
# @option options [Array<String>] :load_balancer_names
|
98
|
+
# One or more Classic load balancers. To specify an Application load
|
99
|
+
# balancer, use `TargetGroupARNs` instead.
|
100
|
+
#
|
101
|
+
# For more information, see [Using a Load Balancer With an Auto Scaling
|
102
|
+
# Group][1] in the *Auto Scaling User Guide*.
|
103
|
+
#
|
104
|
+
#
|
105
|
+
#
|
106
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/create-asg-from-instance.html
|
107
|
+
# @option options [Array<String>] :target_group_arns
|
108
|
+
# The Amazon Resource Names (ARN) of the target groups.
|
109
|
+
# @option options [String] :health_check_type
|
110
|
+
# The service to use for the health checks. The valid values are `EC2`
|
111
|
+
# and `ELB`.
|
112
|
+
#
|
113
|
+
# By default, health checks use Amazon EC2 instance status checks to
|
114
|
+
# determine the health of an instance. For more information, see [Health
|
115
|
+
# Checks][1] in the *Auto Scaling User Guide*.
|
116
|
+
#
|
117
|
+
#
|
118
|
+
#
|
119
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html
|
120
|
+
# @option options [Integer] :health_check_grace_period
|
121
|
+
# The amount of time, in seconds, that Auto Scaling waits before
|
122
|
+
# checking the health status of an EC2 instance that has come into
|
123
|
+
# service. During this time, any health check failures for the instance
|
124
|
+
# are ignored. The default is 0.
|
125
|
+
#
|
126
|
+
# This parameter is required if you are adding an `ELB` health check.
|
127
|
+
#
|
128
|
+
# For more information, see [Health Checks][1] in the *Auto Scaling User
|
129
|
+
# Guide*.
|
130
|
+
#
|
131
|
+
#
|
132
|
+
#
|
133
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/healthcheck.html
|
134
|
+
# @option options [String] :placement_group
|
135
|
+
# The name of the placement group into which you'll launch your
|
136
|
+
# instances, if any. For more information, see [Placement Groups][1] in
|
137
|
+
# the *Amazon Elastic Compute Cloud User Guide*.
|
138
|
+
#
|
139
|
+
#
|
140
|
+
#
|
141
|
+
# [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html
|
142
|
+
# @option options [String] :vpc_zone_identifier
|
143
|
+
# A comma-separated list of subnet identifiers for your virtual private
|
144
|
+
# cloud (VPC).
|
145
|
+
#
|
146
|
+
# If you specify subnets and Availability Zones with this call, ensure
|
147
|
+
# that the subnets' Availability Zones match the Availability Zones
|
148
|
+
# specified.
|
149
|
+
#
|
150
|
+
# For more information, see [Launching Auto Scaling Instances in a
|
151
|
+
# VPC][1] in the *Auto Scaling User Guide*.
|
152
|
+
#
|
153
|
+
#
|
154
|
+
#
|
155
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html
|
156
|
+
# @option options [Array<String>] :termination_policies
|
157
|
+
# One or more termination policies used to select the instance to
|
158
|
+
# terminate. These policies are executed in the order that they are
|
159
|
+
# listed.
|
160
|
+
#
|
161
|
+
# For more information, see [Controlling Which Instances Auto Scaling
|
162
|
+
# Terminates During Scale In][1] in the *Auto Scaling User Guide*.
|
163
|
+
#
|
164
|
+
#
|
165
|
+
#
|
166
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-termination.html
|
167
|
+
# @option options [Boolean] :new_instances_protected_from_scale_in
|
168
|
+
# Indicates whether newly launched instances are protected from
|
169
|
+
# termination by Auto Scaling when scaling in.
|
170
|
+
# @option options [Array<Types::Tag>] :tags
|
171
|
+
# One or more tags.
|
172
|
+
#
|
173
|
+
# For more information, see [Tagging Auto Scaling Groups and
|
174
|
+
# Instances][1] in the *Auto Scaling User Guide*.
|
175
|
+
#
|
176
|
+
#
|
177
|
+
#
|
178
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/autoscaling-tagging.html
|
179
|
+
# @return [AutoScalingGroup]
|
180
|
+
def create_group(options = {})
|
181
|
+
resp = @client.create_auto_scaling_group(options)
|
182
|
+
AutoScalingGroup.new(
|
183
|
+
name: options[:auto_scaling_group_name],
|
184
|
+
client: @client
|
185
|
+
)
|
186
|
+
end
|
188
187
|
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
188
|
+
# @example Request syntax with placeholder values
|
189
|
+
#
|
190
|
+
# launchconfiguration = auto_scaling.create_launch_configuration({
|
191
|
+
# launch_configuration_name: "XmlStringMaxLen255", # required
|
192
|
+
# image_id: "XmlStringMaxLen255",
|
193
|
+
# key_name: "XmlStringMaxLen255",
|
194
|
+
# security_groups: ["XmlString"],
|
195
|
+
# classic_link_vpc_id: "XmlStringMaxLen255",
|
196
|
+
# classic_link_vpc_security_groups: ["XmlStringMaxLen255"],
|
197
|
+
# user_data: "XmlStringUserData",
|
198
|
+
# instance_id: "XmlStringMaxLen19",
|
199
|
+
# instance_type: "XmlStringMaxLen255",
|
200
|
+
# kernel_id: "XmlStringMaxLen255",
|
201
|
+
# ramdisk_id: "XmlStringMaxLen255",
|
202
|
+
# block_device_mappings: [
|
203
|
+
# {
|
204
|
+
# virtual_name: "XmlStringMaxLen255",
|
205
|
+
# device_name: "XmlStringMaxLen255", # required
|
206
|
+
# ebs: {
|
207
|
+
# snapshot_id: "XmlStringMaxLen255",
|
208
|
+
# volume_size: 1,
|
209
|
+
# volume_type: "BlockDeviceEbsVolumeType",
|
210
|
+
# delete_on_termination: false,
|
211
|
+
# iops: 1,
|
212
|
+
# encrypted: false,
|
213
|
+
# },
|
214
|
+
# no_device: false,
|
215
|
+
# },
|
216
|
+
# ],
|
217
|
+
# instance_monitoring: {
|
218
|
+
# enabled: false,
|
219
|
+
# },
|
220
|
+
# spot_price: "SpotPrice",
|
221
|
+
# iam_instance_profile: "XmlStringMaxLen1600",
|
222
|
+
# ebs_optimized: false,
|
223
|
+
# associate_public_ip_address: false,
|
224
|
+
# placement_tenancy: "XmlStringMaxLen64",
|
225
|
+
# })
|
226
|
+
# @param [Hash] options ({})
|
227
|
+
# @option options [required, String] :launch_configuration_name
|
228
|
+
# The name of the launch configuration. This name must be unique within
|
229
|
+
# the scope of your AWS account.
|
230
|
+
# @option options [String] :image_id
|
231
|
+
# The ID of the Amazon Machine Image (AMI) to use to launch your EC2
|
232
|
+
# instances. For more information, see [Finding an AMI][1] in the
|
233
|
+
# *Amazon Elastic Compute Cloud User Guide*.
|
234
|
+
#
|
235
|
+
#
|
236
|
+
#
|
237
|
+
# [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html
|
238
|
+
# @option options [String] :key_name
|
239
|
+
# The name of the key pair. For more information, see [Amazon EC2 Key
|
240
|
+
# Pairs][1] in the *Amazon Elastic Compute Cloud User Guide*.
|
241
|
+
#
|
242
|
+
#
|
243
|
+
#
|
244
|
+
# [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html
|
245
|
+
# @option options [Array<String>] :security_groups
|
246
|
+
# One or more security groups with which to associate the instances.
|
247
|
+
#
|
248
|
+
# If your instances are launched in EC2-Classic, you can either specify
|
249
|
+
# security group names or the security group IDs. For more information
|
250
|
+
# about security groups for EC2-Classic, see [Amazon EC2 Security
|
251
|
+
# Groups][1] in the *Amazon Elastic Compute Cloud User Guide*.
|
252
|
+
#
|
253
|
+
# If your instances are launched into a VPC, specify security group IDs.
|
254
|
+
# For more information, see [Security Groups for Your VPC][2] in the
|
255
|
+
# *Amazon Virtual Private Cloud User Guide*.
|
256
|
+
#
|
257
|
+
#
|
258
|
+
#
|
259
|
+
# [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html
|
260
|
+
# [2]: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html
|
261
|
+
# @option options [String] :classic_link_vpc_id
|
262
|
+
# The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances
|
263
|
+
# to. This parameter is supported only if you are launching EC2-Classic
|
264
|
+
# instances. For more information, see [ClassicLink][1] in the *Amazon
|
265
|
+
# Elastic Compute Cloud User Guide*.
|
266
|
+
#
|
267
|
+
#
|
268
|
+
#
|
269
|
+
# [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html
|
270
|
+
# @option options [Array<String>] :classic_link_vpc_security_groups
|
271
|
+
# The IDs of one or more security groups for the specified
|
272
|
+
# ClassicLink-enabled VPC. This parameter is required if you specify a
|
273
|
+
# ClassicLink-enabled VPC, and is not supported otherwise. For more
|
274
|
+
# information, see [ClassicLink][1] in the *Amazon Elastic Compute Cloud
|
275
|
+
# User Guide*.
|
276
|
+
#
|
277
|
+
#
|
278
|
+
#
|
279
|
+
# [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html
|
280
|
+
# @option options [String] :user_data
|
281
|
+
# The user data to make available to the launched EC2 instances. For
|
282
|
+
# more information, see [Instance Metadata and User Data][1] in the
|
283
|
+
# *Amazon Elastic Compute Cloud User Guide*.
|
284
|
+
#
|
285
|
+
#
|
286
|
+
#
|
287
|
+
# [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html
|
288
|
+
# @option options [String] :instance_id
|
289
|
+
# The ID of the instance to use to create the launch configuration.
|
290
|
+
#
|
291
|
+
# The new launch configuration derives attributes from the instance,
|
292
|
+
# with the exception of the block device mapping.
|
293
|
+
#
|
294
|
+
# To create a launch configuration with a block device mapping or
|
295
|
+
# override any other instance attributes, specify them as part of the
|
296
|
+
# same request.
|
297
|
+
#
|
298
|
+
# For more information, see [Create a Launch Configuration Using an EC2
|
299
|
+
# Instance][1] in the *Auto Scaling User Guide*.
|
300
|
+
#
|
301
|
+
#
|
302
|
+
#
|
303
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/create-lc-with-instanceID.html
|
304
|
+
# @option options [String] :instance_type
|
305
|
+
# The instance type of the EC2 instance. For information about available
|
306
|
+
# instance types, see [ Available Instance Types][1] in the *Amazon
|
307
|
+
# Elastic Compute Cloud User Guide.*
|
308
|
+
#
|
309
|
+
#
|
310
|
+
#
|
311
|
+
# [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes
|
312
|
+
# @option options [String] :kernel_id
|
313
|
+
# The ID of the kernel associated with the AMI.
|
314
|
+
# @option options [String] :ramdisk_id
|
315
|
+
# The ID of the RAM disk associated with the AMI.
|
316
|
+
# @option options [Array<Types::BlockDeviceMapping>] :block_device_mappings
|
317
|
+
# One or more mappings that specify how block devices are exposed to the
|
318
|
+
# instance. For more information, see [Block Device Mapping][1] in the
|
319
|
+
# *Amazon Elastic Compute Cloud User Guide*.
|
320
|
+
#
|
321
|
+
#
|
322
|
+
#
|
323
|
+
# [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html
|
324
|
+
# @option options [Types::InstanceMonitoring] :instance_monitoring
|
325
|
+
# Enables detailed monitoring (`true`) or basic monitoring (`false`) for
|
326
|
+
# the Auto Scaling instances.
|
327
|
+
# @option options [String] :spot_price
|
328
|
+
# The maximum hourly price to be paid for any Spot Instance launched to
|
329
|
+
# fulfill the request. Spot Instances are launched when the price you
|
330
|
+
# specify exceeds the current Spot market price. For more information,
|
331
|
+
# see [Launching Spot Instances in Your Auto Scaling Group][1] in the
|
332
|
+
# *Auto Scaling User Guide*.
|
333
|
+
#
|
334
|
+
#
|
335
|
+
#
|
336
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/US-SpotInstances.html
|
337
|
+
# @option options [String] :iam_instance_profile
|
338
|
+
# The name or the Amazon Resource Name (ARN) of the instance profile
|
339
|
+
# associated with the IAM role for the instance.
|
340
|
+
#
|
341
|
+
# EC2 instances launched with an IAM role will automatically have AWS
|
342
|
+
# security credentials available. You can use IAM roles with Auto
|
343
|
+
# Scaling to automatically enable applications running on your EC2
|
344
|
+
# instances to securely access other AWS resources. For more
|
345
|
+
# information, see [Launch Auto Scaling Instances with an IAM Role][1]
|
346
|
+
# in the *Auto Scaling User Guide*.
|
347
|
+
#
|
348
|
+
#
|
349
|
+
#
|
350
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/us-iam-role.html
|
351
|
+
# @option options [Boolean] :ebs_optimized
|
352
|
+
# Indicates whether the instance is optimized for Amazon EBS I/O. By
|
353
|
+
# default, the instance is not optimized for EBS I/O. The optimization
|
354
|
+
# provides dedicated throughput to Amazon EBS and an optimized
|
355
|
+
# configuration stack to provide optimal I/O performance. This
|
356
|
+
# optimization is not available with all instance types. Additional
|
357
|
+
# usage charges apply. For more information, see [Amazon EBS-Optimized
|
358
|
+
# Instances][1] in the *Amazon Elastic Compute Cloud User Guide*.
|
359
|
+
#
|
360
|
+
#
|
361
|
+
#
|
362
|
+
# [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html
|
363
|
+
# @option options [Boolean] :associate_public_ip_address
|
364
|
+
# Used for groups that launch instances into a virtual private cloud
|
365
|
+
# (VPC). Specifies whether to assign a public IP address to each
|
366
|
+
# instance. For more information, see [Launching Auto Scaling Instances
|
367
|
+
# in a VPC][1] in the *Auto Scaling User Guide*.
|
368
|
+
#
|
369
|
+
# If you specify this parameter, be sure to specify at least one subnet
|
370
|
+
# when you create your group.
|
371
|
+
#
|
372
|
+
# Default: If the instance is launched into a default subnet, the
|
373
|
+
# default is `true`. If the instance is launched into a nondefault
|
374
|
+
# subnet, the default is `false`. For more information, see [Supported
|
375
|
+
# Platforms][2] in the *Amazon Elastic Compute Cloud User Guide*.
|
376
|
+
#
|
377
|
+
#
|
378
|
+
#
|
379
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html
|
380
|
+
# [2]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html
|
381
|
+
# @option options [String] :placement_tenancy
|
382
|
+
# The tenancy of the instance. An instance with a tenancy of `dedicated`
|
383
|
+
# runs on single-tenant hardware and can only be launched into a VPC.
|
384
|
+
#
|
385
|
+
# You must set the value of this parameter to `dedicated` if want to
|
386
|
+
# launch Dedicated Instances into a shared tenancy VPC (VPC with
|
387
|
+
# instance placement tenancy attribute set to `default`).
|
388
|
+
#
|
389
|
+
# If you specify this parameter, be sure to specify at least one subnet
|
390
|
+
# when you create your group.
|
391
|
+
#
|
392
|
+
# For more information, see [Launching Auto Scaling Instances in a
|
393
|
+
# VPC][1] in the *Auto Scaling User Guide*.
|
394
|
+
#
|
395
|
+
# Valid values: `default` \| `dedicated`
|
396
|
+
#
|
397
|
+
#
|
398
|
+
#
|
399
|
+
# [1]: http://docs.aws.amazon.com/autoscaling/latest/userguide/asg-in-vpc.html
|
400
|
+
# @return [LaunchConfiguration]
|
401
|
+
def create_launch_configuration(options = {})
|
402
|
+
resp = @client.create_launch_configuration(options)
|
403
|
+
LaunchConfiguration.new(
|
404
|
+
name: options[:launch_configuration_name],
|
405
|
+
client: @client
|
406
|
+
)
|
407
|
+
end
|
409
408
|
|
410
|
-
|
409
|
+
# @!group Associations
|
411
410
|
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
end
|
440
|
-
y.yield(batch)
|
411
|
+
# @example Request syntax with placeholder values
|
412
|
+
#
|
413
|
+
# activities = auto_scaling.activities({
|
414
|
+
# activity_ids: ["XmlString"],
|
415
|
+
# auto_scaling_group_name: "ResourceName",
|
416
|
+
# })
|
417
|
+
# @param [Hash] options ({})
|
418
|
+
# @option options [Array<String>] :activity_ids
|
419
|
+
# The activity IDs of the desired scaling activities. If you omit this
|
420
|
+
# parameter, all activities for the past six weeks are described. If you
|
421
|
+
# specify an Auto Scaling group, the results are limited to that group.
|
422
|
+
# The list of requested activities cannot contain more than 50 items. If
|
423
|
+
# unknown activities are requested, they are ignored with no error.
|
424
|
+
# @option options [String] :auto_scaling_group_name
|
425
|
+
# The name of the group.
|
426
|
+
# @return [Activity::Collection]
|
427
|
+
def activities(options = {})
|
428
|
+
batches = Enumerator.new do |y|
|
429
|
+
resp = @client.describe_scaling_activities(options)
|
430
|
+
resp.each_page do |page|
|
431
|
+
batch = []
|
432
|
+
page.data.activities.each do |a|
|
433
|
+
batch << Activity.new(
|
434
|
+
id: a.activity_id,
|
435
|
+
data: a,
|
436
|
+
client: @client
|
437
|
+
)
|
441
438
|
end
|
439
|
+
y.yield(batch)
|
442
440
|
end
|
443
|
-
Activity::Collection.new(batches)
|
444
441
|
end
|
442
|
+
Activity::Collection.new(batches)
|
443
|
+
end
|
445
444
|
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
445
|
+
# @param [String] id
|
446
|
+
# @return [Activity]
|
447
|
+
def activity(id)
|
448
|
+
Activity.new(
|
449
|
+
id: id,
|
450
|
+
client: @client
|
451
|
+
)
|
452
|
+
end
|
454
453
|
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
454
|
+
# @param [String] name
|
455
|
+
# @return [AutoScalingGroup]
|
456
|
+
def group(name)
|
457
|
+
AutoScalingGroup.new(
|
458
|
+
name: name,
|
459
|
+
client: @client
|
460
|
+
)
|
461
|
+
end
|
463
462
|
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
end
|
486
|
-
y.yield(batch)
|
463
|
+
# @example Request syntax with placeholder values
|
464
|
+
#
|
465
|
+
# groups = auto_scaling.groups({
|
466
|
+
# auto_scaling_group_names: ["ResourceName"],
|
467
|
+
# })
|
468
|
+
# @param [Hash] options ({})
|
469
|
+
# @option options [Array<String>] :auto_scaling_group_names
|
470
|
+
# The group names. If you omit this parameter, all Auto Scaling groups
|
471
|
+
# are described.
|
472
|
+
# @return [AutoScalingGroup::Collection]
|
473
|
+
def groups(options = {})
|
474
|
+
batches = Enumerator.new do |y|
|
475
|
+
resp = @client.describe_auto_scaling_groups(options)
|
476
|
+
resp.each_page do |page|
|
477
|
+
batch = []
|
478
|
+
page.data.auto_scaling_groups.each do |a|
|
479
|
+
batch << AutoScalingGroup.new(
|
480
|
+
name: a.auto_scaling_group_name,
|
481
|
+
data: a,
|
482
|
+
client: @client
|
483
|
+
)
|
487
484
|
end
|
485
|
+
y.yield(batch)
|
488
486
|
end
|
489
|
-
AutoScalingGroup::Collection.new(batches)
|
490
487
|
end
|
488
|
+
AutoScalingGroup::Collection.new(batches)
|
489
|
+
end
|
491
490
|
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
end
|
516
|
-
y.yield(batch)
|
491
|
+
# @example Request syntax with placeholder values
|
492
|
+
#
|
493
|
+
# instances = auto_scaling.instances({
|
494
|
+
# instance_ids: ["XmlStringMaxLen19"],
|
495
|
+
# })
|
496
|
+
# @param [Hash] options ({})
|
497
|
+
# @option options [Array<String>] :instance_ids
|
498
|
+
# The instances to describe; up to 50 instance IDs. If you omit this
|
499
|
+
# parameter, all Auto Scaling instances are described. If you specify an
|
500
|
+
# ID that does not exist, it is ignored with no error.
|
501
|
+
# @return [Instance::Collection]
|
502
|
+
def instances(options = {})
|
503
|
+
batches = Enumerator.new do |y|
|
504
|
+
resp = @client.describe_auto_scaling_instances(options)
|
505
|
+
resp.each_page do |page|
|
506
|
+
batch = []
|
507
|
+
page.data.auto_scaling_instances.each do |a|
|
508
|
+
batch << Instance.new(
|
509
|
+
group_name: a.auto_scaling_group_name,
|
510
|
+
id: a.instance_id,
|
511
|
+
data: a,
|
512
|
+
client: @client
|
513
|
+
)
|
517
514
|
end
|
515
|
+
y.yield(batch)
|
518
516
|
end
|
519
|
-
Instance::Collection.new(batches)
|
520
517
|
end
|
518
|
+
Instance::Collection.new(batches)
|
519
|
+
end
|
521
520
|
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
521
|
+
# @param [String] name
|
522
|
+
# @return [LaunchConfiguration]
|
523
|
+
def launch_configuration(name)
|
524
|
+
LaunchConfiguration.new(
|
525
|
+
name: name,
|
526
|
+
client: @client
|
527
|
+
)
|
528
|
+
end
|
530
529
|
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
end
|
553
|
-
y.yield(batch)
|
530
|
+
# @example Request syntax with placeholder values
|
531
|
+
#
|
532
|
+
# launch_configurations = auto_scaling.launch_configurations({
|
533
|
+
# launch_configuration_names: ["ResourceName"],
|
534
|
+
# })
|
535
|
+
# @param [Hash] options ({})
|
536
|
+
# @option options [Array<String>] :launch_configuration_names
|
537
|
+
# The launch configuration names. If you omit this parameter, all launch
|
538
|
+
# configurations are described.
|
539
|
+
# @return [LaunchConfiguration::Collection]
|
540
|
+
def launch_configurations(options = {})
|
541
|
+
batches = Enumerator.new do |y|
|
542
|
+
resp = @client.describe_launch_configurations(options)
|
543
|
+
resp.each_page do |page|
|
544
|
+
batch = []
|
545
|
+
page.data.launch_configurations.each do |l|
|
546
|
+
batch << LaunchConfiguration.new(
|
547
|
+
name: l.launch_configuration_name,
|
548
|
+
data: l,
|
549
|
+
client: @client
|
550
|
+
)
|
554
551
|
end
|
552
|
+
y.yield(batch)
|
555
553
|
end
|
556
|
-
LaunchConfiguration::Collection.new(batches)
|
557
554
|
end
|
555
|
+
LaunchConfiguration::Collection.new(batches)
|
556
|
+
end
|
558
557
|
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
end
|
591
|
-
y.yield(batch)
|
558
|
+
# @example Request syntax with placeholder values
|
559
|
+
#
|
560
|
+
# policies = auto_scaling.policies({
|
561
|
+
# auto_scaling_group_name: "ResourceName",
|
562
|
+
# policy_names: ["ResourceName"],
|
563
|
+
# policy_types: ["XmlStringMaxLen64"],
|
564
|
+
# })
|
565
|
+
# @param [Hash] options ({})
|
566
|
+
# @option options [String] :auto_scaling_group_name
|
567
|
+
# The name of the group.
|
568
|
+
# @option options [Array<String>] :policy_names
|
569
|
+
# One or more policy names or policy ARNs to be described. If you omit
|
570
|
+
# this parameter, all policy names are described. If an group name is
|
571
|
+
# provided, the results are limited to that group. This list is limited
|
572
|
+
# to 50 items. If you specify an unknown policy name, it is ignored with
|
573
|
+
# no error.
|
574
|
+
# @option options [Array<String>] :policy_types
|
575
|
+
# One or more policy types. Valid values are `SimpleScaling` and
|
576
|
+
# `StepScaling`.
|
577
|
+
# @return [ScalingPolicy::Collection]
|
578
|
+
def policies(options = {})
|
579
|
+
batches = Enumerator.new do |y|
|
580
|
+
resp = @client.describe_policies(options)
|
581
|
+
resp.each_page do |page|
|
582
|
+
batch = []
|
583
|
+
page.data.scaling_policies.each do |s|
|
584
|
+
batch << ScalingPolicy.new(
|
585
|
+
name: s.policy_name,
|
586
|
+
data: s,
|
587
|
+
client: @client
|
588
|
+
)
|
592
589
|
end
|
590
|
+
y.yield(batch)
|
593
591
|
end
|
594
|
-
ScalingPolicy::Collection.new(batches)
|
595
592
|
end
|
593
|
+
ScalingPolicy::Collection.new(batches)
|
594
|
+
end
|
596
595
|
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
596
|
+
# @param [String] name
|
597
|
+
# @return [ScalingPolicy]
|
598
|
+
def policy(name)
|
599
|
+
ScalingPolicy.new(
|
600
|
+
name: name,
|
601
|
+
client: @client
|
602
|
+
)
|
603
|
+
end
|
605
604
|
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
605
|
+
# @param [String] name
|
606
|
+
# @return [ScheduledAction]
|
607
|
+
def scheduled_action(name)
|
608
|
+
ScheduledAction.new(
|
609
|
+
name: name,
|
610
|
+
client: @client
|
611
|
+
)
|
612
|
+
end
|
614
613
|
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
end
|
653
|
-
y.yield(batch)
|
614
|
+
# @example Request syntax with placeholder values
|
615
|
+
#
|
616
|
+
# scheduled_actions = auto_scaling.scheduled_actions({
|
617
|
+
# auto_scaling_group_name: "ResourceName",
|
618
|
+
# scheduled_action_names: ["ResourceName"],
|
619
|
+
# start_time: Time.now,
|
620
|
+
# end_time: Time.now,
|
621
|
+
# })
|
622
|
+
# @param [Hash] options ({})
|
623
|
+
# @option options [String] :auto_scaling_group_name
|
624
|
+
# The name of the group.
|
625
|
+
# @option options [Array<String>] :scheduled_action_names
|
626
|
+
# Describes one or more scheduled actions. If you omit this parameter,
|
627
|
+
# all scheduled actions are described. If you specify an unknown
|
628
|
+
# scheduled action, it is ignored with no error.
|
629
|
+
#
|
630
|
+
# You can describe up to a maximum of 50 instances with a single call.
|
631
|
+
# If there are more items to return, the call returns a token. To get
|
632
|
+
# the next set of items, repeat the call with the returned token.
|
633
|
+
# @option options [Time,DateTime,Date,Integer,String] :start_time
|
634
|
+
# The earliest scheduled start time to return. If scheduled action names
|
635
|
+
# are provided, this parameter is ignored.
|
636
|
+
# @option options [Time,DateTime,Date,Integer,String] :end_time
|
637
|
+
# The latest scheduled start time to return. If scheduled action names
|
638
|
+
# are provided, this parameter is ignored.
|
639
|
+
# @return [ScheduledAction::Collection]
|
640
|
+
def scheduled_actions(options = {})
|
641
|
+
batches = Enumerator.new do |y|
|
642
|
+
resp = @client.describe_scheduled_actions(options)
|
643
|
+
resp.each_page do |page|
|
644
|
+
batch = []
|
645
|
+
page.data.scheduled_update_group_actions.each do |s|
|
646
|
+
batch << ScheduledAction.new(
|
647
|
+
name: s.scheduled_action_name,
|
648
|
+
data: s,
|
649
|
+
client: @client
|
650
|
+
)
|
654
651
|
end
|
652
|
+
y.yield(batch)
|
655
653
|
end
|
656
|
-
ScheduledAction::Collection.new(batches)
|
657
654
|
end
|
655
|
+
ScheduledAction::Collection.new(batches)
|
656
|
+
end
|
658
657
|
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
end
|
687
|
-
y.yield(batch)
|
658
|
+
# @example Request syntax with placeholder values
|
659
|
+
#
|
660
|
+
# tags = auto_scaling.tags({
|
661
|
+
# filters: [
|
662
|
+
# {
|
663
|
+
# name: "XmlString",
|
664
|
+
# values: ["XmlString"],
|
665
|
+
# },
|
666
|
+
# ],
|
667
|
+
# })
|
668
|
+
# @param [Hash] options ({})
|
669
|
+
# @option options [Array<Types::Filter>] :filters
|
670
|
+
# A filter used to scope the tags to return.
|
671
|
+
# @return [Tag::Collection]
|
672
|
+
def tags(options = {})
|
673
|
+
batches = Enumerator.new do |y|
|
674
|
+
resp = @client.describe_tags(options)
|
675
|
+
resp.each_page do |page|
|
676
|
+
batch = []
|
677
|
+
page.data.tags.each do |t|
|
678
|
+
batch << Tag.new(
|
679
|
+
key: t.key,
|
680
|
+
resource_id: t.resource_id,
|
681
|
+
resource_type: t.resource_type,
|
682
|
+
data: t,
|
683
|
+
client: @client
|
684
|
+
)
|
688
685
|
end
|
686
|
+
y.yield(batch)
|
689
687
|
end
|
690
|
-
Tag::Collection.new(batches)
|
691
688
|
end
|
692
|
-
|
689
|
+
Tag::Collection.new(batches)
|
693
690
|
end
|
691
|
+
|
694
692
|
end
|
695
693
|
end
|