Class: Fog::AWS::AutoScaling::Instances

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/aws/models/auto_scaling/instances.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/fog/aws/models/auto_scaling/instances.rb', line 10

def all
  data = []
  next_token = nil
  loop do
    result = service.describe_auto_scaling_instances('NextToken' => next_token).body['DescribeAutoScalingInstancesResult']
    data += result['AutoScalingInstances']
    next_token = result['NextToken']
    break if next_token.nil?
  end
  load(data)
end

#get(identity) ⇒ Object



22
23
24
25
# File 'lib/fog/aws/models/auto_scaling/instances.rb', line 22

def get(identity)
  data = service.describe_auto_scaling_instances('InstanceIds' => identity).body['DescribeAutoScalingInstancesResult']['AutoScalingInstances'].first
  new(data) unless data.nil?
end