Class: Fog::AWS::ElasticBeanstalk::Application

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

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Application

Returns a new instance of Application.



12
13
14
# File 'lib/fog/aws/models/beanstalk/application.rb', line 12

def initialize(attributes={})
  super
end

Instance Method Details

#destroyObject



36
37
38
39
40
# File 'lib/fog/aws/models/beanstalk/application.rb', line 36

def destroy
  requires :name
  service.delete_application(name)
  true
end

#environmentsObject



16
17
18
19
# File 'lib/fog/aws/models/beanstalk/application.rb', line 16

def environments
  requires :name
  service.environments.all({'ApplicationName' => name})
end

#eventsObject



21
22
23
24
# File 'lib/fog/aws/models/beanstalk/application.rb', line 21

def events
  requires :name
  service.events.all({'ApplicationName' => name})
end

#saveObject



42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/fog/aws/models/beanstalk/application.rb', line 42

def save
  requires :name

  options = {
      'ApplicationName' => name
  }
  options['Description'] = description unless description.nil?

  data = service.create_application(options).body['CreateApplicationResult']['Application']
  merge_attributes(data)
  true
end

#templatesObject



26
27
28
29
# File 'lib/fog/aws/models/beanstalk/application.rb', line 26

def templates
  requires :name
  service.templates.all({'ApplicationName' => name})
end

#versionsObject



31
32
33
34
# File 'lib/fog/aws/models/beanstalk/application.rb', line 31

def versions
  requires :name
  service.versions.all({'ApplicationName' => name})
end