module Aliyun::DataCenter
Constants
- AVAILABLE_DATA_CENTERS
Public Instance Methods
get_endpoint(options)
click to toggle source
# File lib/aliyun/data_center.rb, line 30 def get_endpoint(options) data_center = options[:data_center] data_center = 'oss-' + data_center unless data_center.match(/^oss/) unless AVAILABLE_DATA_CENTERS.include?(data_center) fail InvalildDataCenter, "Unsupported Data Center #{options[:data_center]} Detected" end "#{data_center}#{options[:internal] ? '-internal' : ''}.aliyuncs.com" end