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

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(options = {})
  options[:max_results] ||= 1000
  super(options)
end

#instances(options = {}) ⇒ Object



16
17
18
19
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/customizations/resource.rb', line 16

def instances(options = {})
  options[:max_results] ||= 1000
  super(options)
end

#snapshots(options = {}) ⇒ Object



21
22
23
24
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/customizations/resource.rb', line 21

def snapshots(options = {})
  options[:max_results] ||= 1000
  super(options)
end

#volumes(options = {}) ⇒ Object



26
27
28
29
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/customizations/resource.rb', line 26

def volumes(options = {})
  options[:max_results] ||= 1000
  super(options)
end