Class: Fog::AWS::ElasticBeanstalk::Template
- Inherits:
-
Model
- Object
- Model
- Fog::AWS::ElasticBeanstalk::Template
- Defined in:
- lib/fog/aws/models/beanstalk/template.rb
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(attributes = {}) ⇒ Template
constructor
A new instance of Template.
- #modify(new_attributes) ⇒ Object
-
#options ⇒ Object
Returns an array of options that may be set on this template.
- #save ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Template
Returns a new instance of Template.
17 18 19 |
# File 'lib/fog/aws/models/beanstalk/template.rb', line 17 def initialize(attributes={}) super end |
Instance Method Details
#destroy ⇒ Object
31 32 33 34 35 |
# File 'lib/fog/aws/models/beanstalk/template.rb', line 31 def destroy requires :name, :application_name service.delete_configuration_template(application_name, name) true end |
#modify(new_attributes) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/fog/aws/models/beanstalk/template.rb', line 56 def modify(new_attributes) requires :name, :application_name = { 'ApplicationName' => application_name, 'Description' => new_attributes[:description], 'OptionSettings' => new_attributes[:option_settings], 'TemplateName' => name } .delete_if {|key, value| value.nil?} data = service.update_configuration_template().body['UpdateConfigurationTemplateResult'] merge_attributes(data) true end |
#options ⇒ Object
Returns an array of options that may be set on this template
22 23 24 25 26 27 28 29 |
# File 'lib/fog/aws/models/beanstalk/template.rb', line 22 def requires :name, :application_name data = service.({ 'ApplicationName' => application_name, 'TemplateName' => name }) data.body['DescribeConfigurationOptionsResult']['Options'] end |
#save ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/fog/aws/models/beanstalk/template.rb', line 37 def save requires :name, :application_name = { 'ApplicationName' => application_name, 'Description' => description, 'EnvironmentId' => environment_id, 'OptionSettings' => option_settings, 'SolutionStackName' => solution_stack_name, 'SourceConfiguration' => source_configuration, 'TemplateName' => name } .delete_if {|key, value| value.nil?} data = service.create_configuration_template().body['CreateConfigurationTemplateResult'] merge_attributes(data) true end |