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-3.30.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.29.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.28.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.27.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.26.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.25.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.24.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.23.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.22.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.21.1 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.21.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.20.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.19.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.18.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.17.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.16.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.15.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.14.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.13.0 lib/fog/aws/models/auto_scaling/activities.rb
fog-aws-3.12.0 lib/fog/aws/models/auto_scaling/activities.rb