Sha256: 1c002adb741000f34f90a2d3d1514e2e5e9909f7b128005300ac6fa6fad639ab

Contents?: true

Size: 1.01 KB

Versions: 79

Compression:

Stored size: 1.01 KB

Contents

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

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

        attribute :filters

        # Creates a new scaling policy.
        def initialize(attributes={})
          self.filters ||= {}
          super
        end

        def all(filters_arg = filters)
          data = []
          next_token = nil
          filters = filters_arg
          loop do
            result = service.describe_scaling_activities(filters.merge('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 = service.describe_scaling_activities('ActivityId' => identity).body['DescribeScalingActivitiesResult']['Activities'].first
          new(data) unless data.nil?
        end
      end
    end
  end
end

Version data entries

79 entries across 77 versions & 3 rubygems

Version Path
fog-aws-0.8.1 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.8.0 lib/fog/aws/models/auto_scaling/activities.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-aws-0.7.5/lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.7.6 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.7.5 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.7.4 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.7.3 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.7.2 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.6.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.5.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.4.1 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.4.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.3.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.2.2 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.2.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.1.2 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.1.1 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.1.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-0.0.8 lib/fog/aws/models/auto_scaling/activities.rb