Class: Fog::AWS::ElasticBeanstalk::Versions

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/aws/models/beanstalk/versions.rb

Instance Method Summary collapse

Instance Method Details

#all(options = {}) ⇒ Object



10
11
12
13
# File 'lib/fog/aws/models/beanstalk/versions.rb', line 10

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

#get(application_name, version_label) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/fog/aws/models/beanstalk/versions.rb', line 15

def get(application_name, version_label)
  if data = service.describe_application_versions({
                                                         'ApplicationName' => application_name,
                                                         'VersionLabels' => [version_label]
                                                     }).body['DescribeApplicationVersionsResult']['ApplicationVersions']
    if data.length == 1
      new(data.first)
    end

  end
end