Class: Fog::AWS::AutoScaling::Configuration
- Inherits:
-
Model
- Object
- Model
- Fog::AWS::AutoScaling::Configuration
- Defined in:
- lib/fog/aws/models/auto_scaling/configuration.rb
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(attributes = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #ready? ⇒ Boolean
- #reload ⇒ Object
- #save ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Configuration
Returns a new instance of Configuration.
26 27 28 29 30 31 32 33 34 |
# File 'lib/fog/aws/models/auto_scaling/configuration.rb', line 26 def initialize(attributes={}) #attributes[:availability_zones] ||= %w(us-east-1a us-east-1b us-east-1c us-east-1d) #attributes['ListenerDescriptions'] ||= [{ # 'Listener' => {'LoadBalancerPort' => 80, 'InstancePort' => 80, 'Protocol' => 'http'}, # 'PolicyNames' => [] #}] #attributes['Policies'] ||= {'AppCookieStickinessPolicies' => [], 'LBCookieStickinessPolicies' => []} super end |
Instance Method Details
#destroy ⇒ Object
61 62 63 64 |
# File 'lib/fog/aws/models/auto_scaling/configuration.rb', line 61 def destroy requires :id service.delete_launch_configuration(id) end |
#ready? ⇒ Boolean
36 37 38 39 |
# File 'lib/fog/aws/models/auto_scaling/configuration.rb', line 36 def ready? # AutoScaling requests are synchronous true end |
#reload ⇒ Object
56 57 58 59 |
# File 'lib/fog/aws/models/auto_scaling/configuration.rb', line 56 def reload super self end |
#save ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/fog/aws/models/auto_scaling/configuration.rb', line 41 def save requires :id requires :image_id requires :instance_type = Hash[self.class.aliases.map { |key, value| [key, send(value)] }] .delete_if { |key, value| value.nil? } service.create_launch_configuration(image_id, instance_type, id, ) #, listeners.map{|l| l.to_params}) # reload instead of merge attributes b/c some attrs (like HealthCheck) # may be set, but only the DNS name is returned in the create_load_balance # API call reload end |