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



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

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



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

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