Module: Aws::EC2::ResourcePaginationFix
- Included in:
- Resource
- Defined in:
- gems/aws-sdk-ec2/lib/aws-sdk-ec2/customizations/resource.rb
Overview
5 of EC2's old APIs DescribeInstances, DescribeImages, DescribeSnapshots, DescribeVolumes and DescribeTag support paginated calls and will not paginate server side unless max_results is set to a non-nil value. This module customizes the resource association methods by adding a default value of 1000 to max_results to ensure results are paginated.
Instance Method Summary collapse
-
#images(options = {}) ⇒ Object
-
#instances(options = {}) ⇒ Object
-
#snapshots(options = {}) ⇒ Object
-
#volumes(options = {}) ⇒ Object
Instance Method Details
#images(options = {}) ⇒ Object
11 12 13 14 |
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/customizations/resource.rb', line 11 def images( = {}) [:max_results] ||= 1000 super() end |
#instances(options = {}) ⇒ Object
16 17 18 19 |
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/customizations/resource.rb', line 16 def instances( = {}) [:max_results] ||= 1000 super() end |
#snapshots(options = {}) ⇒ Object
21 22 23 24 |
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/customizations/resource.rb', line 21 def snapshots( = {}) [:max_results] ||= 1000 super() end |
#volumes(options = {}) ⇒ Object
26 27 28 29 |
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/customizations/resource.rb', line 26 def volumes( = {}) [:max_results] ||= 1000 super() end |