Sha256: 0b33129c0c18ac53a5a2b15cf8bb33de4e98dbbe00d82131ec4312d5542edf50

Contents?: true

Size: 967 Bytes

Versions: 65

Compression:

Stored size: 967 Bytes

Contents

require 'fog/aws/models/auto_scaling/configuration'

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

        model Fog::AWS::AutoScaling::Configuration

        # Creates a new launch configuration
        def initialize(attributes={})
          super
        end

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

        def get(identity)
          data = service.describe_launch_configurations('LaunchConfigurationNames' => identity).body['DescribeLaunchConfigurationsResult']['LaunchConfigurations'].first
	  new(data) unless data.nil?
        end

      end
    end
  end
end

Version data entries

65 entries across 65 versions & 6 rubygems

Version Path
fog-1.10.0 lib/fog/aws/models/auto_scaling/configurations.rb
fog-1.9.0 lib/fog/aws/models/auto_scaling/configurations.rb
fog-maestrodev-1.8.0.20130114204828 lib/fog/aws/models/auto_scaling/configurations.rb
fog-maestrodev-1.8.0.20130111070250 lib/fog/aws/models/auto_scaling/configurations.rb
fog-maestrodev-1.8.0.20130109172219 lib/fog/aws/models/auto_scaling/configurations.rb