Class: AWS::ELB::ListenerCollection
- Inherits:
-
Object
- Object
- AWS::ELB::ListenerCollection
- Includes:
- Core::Collection::Simple, ListenerOpts
- Defined in:
- lib/aws/elb/listener_collection.rb
Instance Attribute Summary collapse
- #load_balancer ⇒ LoadBalancer readonly
Attributes included from Core::Model
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::Simple
Methods included from Core::Collection
#each, #each_batch, #enum, #first, #in_groups_of, #page
Methods included from Core::Model
#client, #config_prefix, #inspect
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 |