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
10 11 12 13 |
# File 'lib/fog/aws/models/beanstalk/environments.rb', line 10 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.
17 18 19 20 21 22 23 |
# File 'lib/fog/aws/models/beanstalk/environments.rb', line 17 def get(environment_name) = { 'EnvironmentNames' => [environment_name] } if data = service.describe_environments().body['DescribeEnvironmentsResult']['Environments'].first new(data) end end |