class DynamoDB::Endpoint

Constants

ENDPOINTS

docs.aws.amazon.com/general/latest/gr/rande.html#ddb_region

Public Class Methods

endpoint_and_region(endpoint_or_region) click to toggle source
# File lib/ddbcli/ddb-endpoint.rb, line 20
def self.endpoint_and_region(endpoint_or_region)
  if ENDPOINTS.key?(endpoint_or_region)
    [endpoint_or_region, ENDPOINTS[endpoint_or_region]]
  elsif ENDPOINTS.value?(endpoint_or_region)
    ep_key = ENDPOINTS.respond_to?(:key) ? ENDPOINTS.key(endpoint_or_region) : ENDPOINTS.index(endpoint_or_region)
    [ep_key, endpoint_or_region]
  else
    raise DynamoDB::Error, 'Unknown endpoint or region'
  end
end
regions() click to toggle source
# File lib/ddbcli/ddb-endpoint.rb, line 31
def self.regions
  ENDPOINTS.values.dup
end