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
.endpoints ⇒ Object
[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 |