Sha256: f1bf2342bef1c9b3a310101e18659168515d238ada2274ca1c90c4b3555eb50c

Contents?: true

Size: 808 Bytes

Versions: 42

Compression:

Stored size: 808 Bytes

Contents

require 'fog/aws/models/auto_scaling/activity'

module Fog
  module AWS
    class AutoScaling
      class Activities < Fog::Collection

        model Fog::AWS::AutoScaling::Activity

        def all
          data = []
          next_token = nil
          loop do
            result = connection.describe_scaling_activities('NextToken' => next_token).body['DescribeScalingActivitiesResult']
            data += result['Activities']
            next_token = result['NextToken']
            break if next_token.nil?
          end
          load(data)
        end

        def get(identity)
          data = connection.describe_scaling_activities('ActivityId' => identity).body['DescribeScalingActivitiesResult']['Activities'].first
          new(data) unless data.nil?
        end

      end
    end
  end
end

Version data entries

42 entries across 42 versions & 13 rubygems

Version Path
fog-0.11.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-0.10.0 lib/fog/aws/models/auto_scaling/activities.rb