module AWS::ELB::ListenerOpts

@private

Protected Instance Methods

format_listener_opts(options) click to toggle source

convert protocols from symbols to strings (e.g. :http to ‘HTTP’)

# File lib/aws/elb/listener_opts.rb, line 22
def format_listener_opts options

  # accept the :load_balancer_port option by :port
  options[:load_balancer_port] = options.delete(:port) if
    options[:port]

  # convert symbolized protocol names into upper-cased strings
  [:protocol, :instance_protocol].each do |opt|
    options[opt] = options[opt].to_s.upcase if options[opt]
  end

  # convert iam server certificates into the ssl certificate id
  if cert = options.delete(:server_certificate)
    options[:ssl_certificate_id] = cert.is_a?(IAM::ServerCertificate) ?
      cert.arn : cert
  end

  options

end