Class: Phase::Adapters::AWS::LoadBalancer
- Inherits:
-
Phase::Adapters::Abstract::LoadBalancer
- Object
- Phase::Adapters::Abstract::Base
- Phase::Adapters::Abstract::LoadBalancer
- Phase::Adapters::AWS::LoadBalancer
- Defined in:
- lib/phase/adapters/aws/load_balancer.rb
Instance Attribute Summary
Attributes inherited from Phase::Adapters::Abstract::Base
Class Method Summary collapse
-
.all ⇒ Array<AWS::LoadBalancer>
All known ELB instances.
-
.find(balancer_name) ⇒ AWS::LoadBalancer
The requested ELB instance.
Instance Method Summary collapse
-
#deregister_server(server_id, options = {}) ⇒ AWS::Server
The deregistered EC2 instance.
-
#register_server(server_id, options = {}) ⇒ AWS::Server
The registered EC2 instance.
-
#servers ⇒ Array<AWS::Server>
The EC2 instances registered to this ELB instance.
Methods inherited from Phase::Adapters::Abstract::Base
Constructor Details
This class inherits a constructor from Phase::Adapters::Abstract::Base
Class Method Details
.all ⇒ Array<AWS::LoadBalancer>
Returns All known ELB instances.
23 24 25 |
# File 'lib/phase/adapters/aws/load_balancer.rb', line 23 def all api.load_balancers.all.map {|balancer| new(balancer) } end |
.find(balancer_name) ⇒ AWS::LoadBalancer
Returns The requested ELB instance.
29 30 31 |
# File 'lib/phase/adapters/aws/load_balancer.rb', line 29 def find(balancer_name) new(api.load_balancers.get(balancer_name)) end |
Instance Method Details
#deregister_server(server_id, options = {}) ⇒ AWS::Server
Returns The deregistered EC2 instance.
8 9 |
# File 'lib/phase/adapters/aws/load_balancer.rb', line 8 def deregister_server(server_id, = {}) end |
#register_server(server_id, options = {}) ⇒ AWS::Server
Returns The registered EC2 instance.
13 14 |
# File 'lib/phase/adapters/aws/load_balancer.rb', line 13 def register_server(server_id, = {}) end |
#servers ⇒ Array<AWS::Server>
Returns The EC2 instances registered to this ELB instance.
17 18 19 |
# File 'lib/phase/adapters/aws/load_balancer.rb', line 17 def servers Server.all(instance_ids: resource.instances) end |