Sha256: 77062de629c97e354286285a7c75cbf710b11196b07d978adcfd81c55d5b7e1b

Contents?: true

Size: 867 Bytes

Versions: 15

Compression:

Stored size: 867 Bytes

Contents

module AWS
  module EC2

    # Which host FQDN will we connect to for all API calls to AWS?
    # If EC2_URL is defined in the users ENV we can override the default with that.
    #
    # @example
    #   export EC2_URL='https://ec2.amazonaws.com'
    if ENV['EC2_URL']
      EC2_URL = ENV['EC2_URL']
      VALID_HOSTS = ['https://ec2.amazonaws.com', 'https://us-east-1.ec2.amazonaws.com', 'https://eu-west-1.ec2.amazonaws.com']
      raise ArgumentError, "Invalid EC2_URL environment variable : #{EC2_URL}" unless VALID_HOSTS.include?(EC2_URL)
      DEFAULT_HOST = URI.parse(EC2_URL).host
    else
      # Default US API endpoint
      DEFAULT_HOST = 'ec2.amazonaws.com'
    end

    API_VERSION = '2009-07-15'

    class Base < AWS::Base
      def api_version
        API_VERSION
      end

      def default_host
        DEFAULT_HOST
      end
    end

  end
end

Version data entries

15 entries across 15 versions & 3 rubygems

Version Path
newrelic-amazon-ec2-0.6.2 lib/AWS/EC2.rb
poolparty-1.4.6 vendor/gems/amazon-ec2/lib/AWS/EC2.rb
poolparty-1.4.5 vendor/gems/amazon-ec2/lib/AWS/EC2.rb
poolparty-1.4.4 vendor/gems/amazon-ec2/lib/AWS/EC2.rb
poolparty-1.4.3 vendor/gems/amazon-ec2/lib/AWS/EC2.rb
poolparty-1.4.2 vendor/gems/amazon-ec2/lib/AWS/EC2.rb
poolparty-1.4.1 vendor/gems/amazon-ec2/lib/AWS/EC2.rb
amazon-ec2-0.7.3 lib/AWS/EC2.rb
amazon-ec2-0.7.2 lib/AWS/EC2.rb
amazon-ec2-0.7.1 lib/AWS/EC2.rb
amazon-ec2-0.7.0 lib/AWS/EC2.rb
poolparty-1.4.0 vendor/gems/amazon-ec2/lib/AWS/EC2.rb
amazon-ec2-0.6.2 lib/AWS/EC2.rb
amazon-ec2-0.6.1 lib/AWS/EC2.rb
amazon-ec2-0.6.0 lib/AWS/EC2.rb