Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Module: AWS::Core::Endpoints

Defined in:
lib/aws/core/endpoints.rb

Overview

Provides a read-only interface to the bundled endpoints.json file.

Class Method Summary collapse

Class Method Details

.endpointsObject

[View source]

28
29
30
31
32
# File 'lib/aws/core/endpoints.rb', line 28

def endpoints
  @endpoints ||= begin
    JSON.parse(File.read(File.join(AWS::ROOT, 'endpoints.json')))
  end
end

.hostname(region, endpoint_prefix) ⇒ Object

[View source]

21
22
23
24
25
# File 'lib/aws/core/endpoints.rb', line 21

def hostname(region, endpoint_prefix)
  region = endpoints["regions"][region] || {}
  endpoint = region[endpoint_prefix] || {}
  endpoint["hostname"]
end