Method: AwsElbs#fetch_from_api

Defined in:
lib/resources/aws/aws_elbs.rb

#fetch_from_apiObject



45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/resources/aws/aws_elbs.rb', line 45

def fetch_from_api
  backend = BackendFactory.create(inspec_runner)
  @table = []
  pagination_opts = {}
  loop do
    api_result = backend.describe_load_balancers(pagination_opts)
    @table += unpack_describe_elbs_response(api_result.load_balancer_descriptions)
    break unless api_result.next_marker

    pagination_opts = { marker: api_result.next_marker }
  end
end