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