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.
15 16 17 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 15 def initialize(attributes={}) super end |
Instance Method Details
#destroy(delete_source_bundle = nil) ⇒ Object
37 38 39 40 41 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 37 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
29 30 31 32 33 34 35 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 29 def environments requires :label, :application_name service.environments.all({ 'ApplicationName' => application_name, 'VersionLabel' => label }) end |
#events ⇒ Object
Return events related to this version
20 21 22 23 24 25 26 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 20 def events requires :label, :application_name service.events.all({ 'ApplicationName' => application_name, 'VersionLabel' => label }) end |
#save ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 43 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
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/fog/aws/models/beanstalk/version.rb', line 61 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 |