Module: OracleBMC::Regions
- Defined in:
- lib/oraclebmc/regions.rb
Constant Summary collapse
- REGION_ENUM =
[REGION_US_PHOENIX_1 = 'us-phoenix-1']
Class Method Summary collapse
-
.get_service_endpoint(region, service) ⇒ String
Returns an endpoint for the given region and service.
-
.valid_region?(region) ⇒ Boolean
Returns true if the given string corresponds to a known region, as defined in REGION_ENUM.
Class Method Details
.get_service_endpoint(region, service) ⇒ String
Returns an endpoint for the given region and service.
15 16 17 18 19 |
# File 'lib/oraclebmc/regions.rb', line 15 def self.get_service_endpoint(region, service) prefix = SERVICE_ENDPOINT_PREFIX_MAPPING[service] fail "Service '#{service}' is not supported." unless prefix format_endpoint(prefix, region) end |
.valid_region?(region) ⇒ Boolean
Returns true if the given string corresponds to a known region, as defined in REGION_ENUM.
22 23 24 |
# File 'lib/oraclebmc/regions.rb', line 22 def self.valid_region? region return REGION_ENUM.include? region end |