Class: Fog::AWS::ElasticBeanstalk::Environments
- Inherits:
-
Collection
- Object
- Collection
- Fog::AWS::ElasticBeanstalk::Environments
- Defined in:
- lib/fog/aws/models/beanstalk/environments.rb
Instance Method Summary collapse
- #all(options = {}) ⇒ Object
-
#get(environment_name) ⇒ Object
Gets an environment given a name.
Instance Method Details
#all(options = {}) ⇒ Object
9 10 11 12 |
# File 'lib/fog/aws/models/beanstalk/environments.rb', line 9 def all(={}) data = service.describe_environments().body['DescribeEnvironmentsResult']['Environments'] load(data) # data is an array of attribute hashes end |
#get(environment_name) ⇒ Object
Gets an environment given a name.
16 17 18 19 20 21 22 |
# File 'lib/fog/aws/models/beanstalk/environments.rb', line 16 def get(environment_name) = { 'EnvironmentNames' => [environment_name] } if data = service.describe_environments().body['DescribeEnvironmentsResult']['Environments'].first new(data) end end |