Class AWS::ELB::LoadBalancerCollection
In: lib/aws/elb/load_balancer_collection.rb
Parent: Object

Methods

[]   _each_item   create  

Included Modules

ListenerOpts Core::Collection::Simple

Public Instance methods

@return [LoadBalancer] Returns the load balancer with the given

  name.  This does not make a request, just returns a reference.

Creates and returns a load balancer. A load balancer requires:

  • a unique name
  • at least one availability zone
  • at least one listener

An example that creates a load balancer in two availability zones with a single listener:

    load_balancer = elb.load_balancers.create('my-load-balancer',
      :availability_zones => %w(us-west-2a us-west-2b),
      :listeners => [{
        :port => 80,
        :protocol => :http,
        :instance_port => 80,
        :instance_protocol => :http,
      }])

@param [String] name The name of your load balancer. The name must

  be unique within your set of load balancers.

@param [Hash] options

@option options [required,Array] :availability_zones An array of

  one or more availability zones.  Values may be availability zone
  name strings, or {AWS::EC2::AvailabilityZone} objects.

@option options [required,Array<Hash>] :listeners An array of load

  balancer listener options:
    * `:protocol` - *required* - (String) Specifies the LoadBalancer
      transport protocol to use for routing - HTTP, HTTPS, TCP or SSL.
      This property cannot be modified for the life of the
      LoadBalancer.
    * `:load_balancer_port` - *required* - (Integer) Specifies the
      external LoadBalancer port number. This property cannot be
      modified for the life of the LoadBalancer.
    * `:instance_protocol` - (String) Specifies the protocol to use for
      routing traffic to back-end instances - HTTP, HTTPS, TCP, or SSL.
      This property cannot be modified for the life of the
      LoadBalancer. If the front-end protocol is HTTP or HTTPS,
      InstanceProtocol has to be at the same protocol layer, i.e., HTTP
      or HTTPS. Likewise, if the front-end protocol is TCP or SSL,
      InstanceProtocol has to be TCP or SSL. If there is another
      listener with the same InstancePort whose InstanceProtocol is
      secure, i.e., HTTPS or SSL, the listener's InstanceProtocol has
      to be secure, i.e., HTTPS or SSL. If there is another listener
      with the same InstancePort whose InstanceProtocol is HTTP or TCP,
      the listener's InstanceProtocol must be either HTTP or TCP.
    * `:instance_port` - *required* - (Integer) Specifies the TCP port
      on which the instance server is listening. This property cannot
      be modified for the life of the LoadBalancer.
    * `:ssl_certificate_id` - (String) The ARN string of the server
      certificate. To get the ARN of the server certificate, call the
      AWS Identity and Access Management UploadServerCertificate API.

@option options [Array] :subnets An list of VPC subets to attach the

  load balancer to.  This can be an array of subnet ids (strings) or
  {EC2::Subnet} objects. VPC only.

@option options [Array] :security_groups The security groups assigned to

  your load balancer within your VPC.  This can be an array of
  security group ids or {EC2::SecurityGroup} objects. VPC only.

@option options [String] :scheme (‘internal’ The type of a load

  balancer.  Accepts 'internet-facing' or 'internal'. VPC only.

Protected Instance methods

[Validate]