Class: Fog::AWS::ElasticBeanstalk::Version
- Inherits:
-
Model
- Object
- Model
- Fog::AWS::ElasticBeanstalk::Version
- Defined in:
- lib/fog/aws/models/beanstalk/version.rb
Instance Method Summary collapse
- #destroy(delete_source_bundle = nil) ⇒ Object
-
#environments ⇒ Object
Returns environments running this version.
-
#events ⇒ Object
Return events related to this version.
-
#initialize(attributes = {}) ⇒ Version
constructor
A new instance of Version.
- #save ⇒ Object
-
#update ⇒ Object
Updates the version label with the current property values.
Constructor Details
#initialize(attributes = {}) ⇒ Version
Returns a new instance of Version.
13 14 15 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 13 def initialize(attributes={}) super end |
Instance Method Details
#destroy(delete_source_bundle = nil) ⇒ Object
35 36 37 38 39 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 35 def destroy(delete_source_bundle = nil) requires :label, :application_name service.delete_application_version(application_name, label, delete_source_bundle) true end |
#environments ⇒ Object
Returns environments running this version
27 28 29 30 31 32 33 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 27 def environments requires :label, :application_name service.environments.all({ 'ApplicationName' => application_name, 'VersionLabel' => label }) end |
#events ⇒ Object
Return events related to this version
18 19 20 21 22 23 24 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 18 def events requires :label, :application_name service.events.all({ 'ApplicationName' => application_name, 'VersionLabel' => label }) end |
#save ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 41 def save requires :label, :application_name = { 'ApplicationName' => application_name, 'AutoCreateApplication' => auto_create_application, 'Description' => description, 'SourceBundle' => source_bundle, 'VersionLabel' => label } .delete_if {|key, value| value.nil?} data = service.create_application_version().body['CreateApplicationVersionResult']['ApplicationVersion'] merge_attributes(data) true end |
#update ⇒ Object
Updates the version label with the current property values. Currently only updates description
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 59 def update requires :label, :application_name = { 'ApplicationName' => application_name, 'Description' => description, 'VersionLabel' => label } .delete_if {|key, value| value.nil?} data = service.update_application_version().body['UpdateApplicationVersionResult']['ApplicationVersion'] merge_attributes(data) end |