mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Properly return all alarms
This commit is contained in:
parent
c7f6c692d8
commit
db98589b63
1 changed files with 3 additions and 3 deletions
|
@ -12,9 +12,9 @@ module Fog
|
|||
data = []
|
||||
next_token = nil
|
||||
loop do
|
||||
result = service.describe_alarms('NextToken' => next_token).body['DescribeAlarmsResult']
|
||||
data += result['MetricAlarms']
|
||||
next_token = result['NextToken']
|
||||
body = service.describe_alarms('NextToken' => next_token).body
|
||||
data += body['DescribeAlarmsResult']['MetricAlarms']
|
||||
next_token = body['ResponseMetadata']['NextToken']
|
||||
break if next_token.nil?
|
||||
end
|
||||
load(data)
|
||||
|
|
Loading…
Reference in a new issue