Class: Fog::AWS::ELB::Listener
- Defined in:
- lib/fog/aws/models/elb/listener.rb
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
- #destroy ⇒ Object
- #load_balancer ⇒ Object
-
#policy ⇒ Object
Return the policy associated with this load balancer.
- #reload ⇒ Object
- #save ⇒ Object
- #to_params ⇒ Object
Methods inherited from Model
#initialize, #inspect, #to_json, #wait_for
Methods included from Fog::Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Fog::Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires
Constructor Details
This class inherits a constructor from Fog::Model
Instance Method Details
#destroy ⇒ Object
19 20 21 22 23 |
# File 'lib/fog/aws/models/elb/listener.rb', line 19 def destroy requires :load_balancer, :lb_port connection.delete_load_balancer_listeners(load_balancer.id, [lb_port]) reload end |
#load_balancer ⇒ Object
34 35 36 |
# File 'lib/fog/aws/models/elb/listener.rb', line 34 def load_balancer collection.load_balancer end |
#policy ⇒ Object
Return the policy associated with this load balancer
26 27 28 |
# File 'lib/fog/aws/models/elb/listener.rb', line 26 def policy load_balancer.policies.get(policy_names.first) end |
#reload ⇒ Object
30 31 32 |
# File 'lib/fog/aws/models/elb/listener.rb', line 30 def reload load_balancer.reload end |
#save ⇒ Object
13 14 15 16 17 |
# File 'lib/fog/aws/models/elb/listener.rb', line 13 def save requires :load_balancer, :instance_port, :lb_port, :protocol connection.create_load_balancer_listeners(load_balancer.id, [to_params]) reload end |
#to_params ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/fog/aws/models/elb/listener.rb', line 38 def to_params { 'InstancePort' => instance_port, 'LoadBalancerPort' => lb_port, 'Protocol' => protocol, 'SSLCertificateId' => ssl_id } end |