Sha256: 1ad7df3ac650c68022bd054d1cdc416dc3cec4ae5c59e95ac5a69f70b3b5f7a1

Contents?: true

Size: 781 Bytes

Versions: 22

Compression:

Stored size: 781 Bytes

Contents

require 'fog/core/collection'
require 'fog/aws/models/beanstalk/environment'

module Fog
  module AWS
    class ElasticBeanstalk
      class Environments < Fog::Collection
        model Fog::AWS::ElasticBeanstalk::Environment

        def all(options={})
          data = service.describe_environments(options).body['DescribeEnvironmentsResult']['Environments']
          load(data) # data is an array of attribute hashes
        end

        # Gets an environment given a name.
        #
        def get(environment_name)
          options = { 'EnvironmentNames' => [environment_name] }

          if data = service.describe_environments(options).body['DescribeEnvironmentsResult']['Environments'].first
            new(data)
          end
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 5 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/aws/models/beanstalk/environments.rb
fog-aws-0.1.1 lib/fog/aws/models/beanstalk/environments.rb
fog-aws-0.1.0 lib/fog/aws/models/beanstalk/environments.rb
fog-aws-0.0.8 lib/fog/aws/models/beanstalk/environments.rb
fog-aws-0.0.7 lib/fog/aws/models/beanstalk/environments.rb
fog-aws-0.0.6 lib/fog/aws/models/beanstalk/environments.rb
fog-aws-0.0.5 lib/fog/aws/models/beanstalk/environments.rb
fog-1.26.0 lib/fog/aws/models/beanstalk/environments.rb
fog-1.25.0 lib/fog/aws/models/beanstalk/environments.rb
nsidc-fog-1.24.1 lib/fog/aws/models/beanstalk/environments.rb
fog-1.24.0 lib/fog/aws/models/beanstalk/environments.rb
ns-fog-1.22.11 lib/fog/aws/models/beanstalk/environments.rb
ns-fog-1.22.10 lib/fog/aws/models/beanstalk/environments.rb
ns-fog-1.22.9 lib/fog/aws/models/beanstalk/environments.rb
ns-fog-1.22.8 lib/fog/aws/models/beanstalk/environments.rb
ns-fog-1.22.7 lib/fog/aws/models/beanstalk/environments.rb
ns-fog-1.22.6 lib/fog/aws/models/beanstalk/environments.rb
fog-1.23.0 lib/fog/aws/models/beanstalk/environments.rb
ns-fog-1.22.4 lib/fog/aws/models/beanstalk/environments.rb
ns-fog-1.22.3 lib/fog/aws/models/beanstalk/environments.rb