You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.
Class: AWS::ELB::ListenerCollection
- Inherits:
-
Object
- Object
- AWS::ELB::ListenerCollection
- Includes:
- Core::Collection::Simple
- Defined in:
- lib/aws/elb/listener_collection.rb
Instance Attribute Summary collapse
-
#load_balancer ⇒ LoadBalancer
readonly
Instance Method Summary collapse
-
#[](port) ⇒ Listener
-
#create(options = {}) ⇒ Listener
-
#initialize(load_balancer, options = {}) ⇒ ListenerCollection
constructor
A new instance of ListenerCollection.
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Constructor Details
#initialize(load_balancer, options = {}) ⇒ ListenerCollection
Returns a new instance of ListenerCollection
22 23 24 25 |
# File 'lib/aws/elb/listener_collection.rb', line 22 def initialize load_balancer, = {} @load_balancer = load_balancer super end |
Instance Attribute Details
#load_balancer ⇒ LoadBalancer (readonly)
28 29 30 |
# File 'lib/aws/elb/listener_collection.rb', line 28 def load_balancer @load_balancer end |
Instance Method Details
#[](port) ⇒ Listener
91 92 93 |
# File 'lib/aws/elb/listener_collection.rb', line 91 def [] port Listener.new(load_balancer, port, :config => config) end |
#create(options = {}) ⇒ Listener
76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/aws/elb/listener_collection.rb', line 76 def create = {} format_listener_opts() client.create_load_balancer_listeners( :load_balancer_name => load_balancer.name, :listeners => []) Listener.new(load_balancer, [:load_balancer_port], .merge(:config => config)) end |