mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[aws] adding ap-northeast-1 (tokyo) region options
This commit is contained in:
parent
cb4a9d0cd9
commit
1397c2d613
6 changed files with 44 additions and 4 deletions
|
@ -47,7 +47,22 @@ module Fog
|
||||||
@aws_access_key_id = options[:aws_access_key_id]
|
@aws_access_key_id = options[:aws_access_key_id]
|
||||||
@aws_secret_access_key = options[:aws_secret_access_key]
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
||||||
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
||||||
@host = options[:host] || 'cloudformation.us-east-1.amazonaws.com'
|
|
||||||
|
options[:region] ||= 'us-east-1'
|
||||||
|
@host = options[:host] || case options[:region]
|
||||||
|
when 'ap-northeast-1'
|
||||||
|
'cloudformation.ap-northeast-1.amazonaws.com'
|
||||||
|
when 'ap-southeast-1'
|
||||||
|
'cloudformation.ap-southeast-1.amazonaws.com'
|
||||||
|
when 'eu-west-1'
|
||||||
|
'cloudformation.eu-west-1.amazonaws.com'
|
||||||
|
when 'us-east-1'
|
||||||
|
'cloudformation.us-east-1.amazonaws.com'
|
||||||
|
when 'us-west-1'
|
||||||
|
'cloudformation.us-west-1.amazonaws.com'
|
||||||
|
else
|
||||||
|
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
||||||
|
end
|
||||||
@path = options[:path] || '/'
|
@path = options[:path] || '/'
|
||||||
@port = options[:port] || 443
|
@port = options[:port] || 443
|
||||||
@scheme = options[:scheme] || 'https'
|
@scheme = options[:scheme] || 'https'
|
||||||
|
|
|
@ -48,8 +48,11 @@ module Fog
|
||||||
@aws_access_key_id = options[:aws_access_key_id]
|
@aws_access_key_id = options[:aws_access_key_id]
|
||||||
@aws_secret_access_key = options[:aws_secret_access_key]
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
||||||
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
||||||
|
|
||||||
options[:region] ||= 'us-east-1'
|
options[:region] ||= 'us-east-1'
|
||||||
@host = options[:host] || case options[:region]
|
@host = options[:host] || case options[:region]
|
||||||
|
when 'ap-northeast-1'
|
||||||
|
'elasticloadbalancing.ap-northeast-1.amazonaws.com'
|
||||||
when 'ap-southeast-1'
|
when 'ap-southeast-1'
|
||||||
'elasticloadbalancing.ap-southeast-1.amazonaws.com'
|
'elasticloadbalancing.ap-southeast-1.amazonaws.com'
|
||||||
when 'eu-west-1'
|
when 'eu-west-1'
|
||||||
|
|
|
@ -71,8 +71,11 @@ module Fog
|
||||||
@aws_access_key_id = options[:aws_access_key_id]
|
@aws_access_key_id = options[:aws_access_key_id]
|
||||||
@aws_secret_access_key = options[:aws_secret_access_key]
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
||||||
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
||||||
|
|
||||||
options[:region] ||= 'us-east-1'
|
options[:region] ||= 'us-east-1'
|
||||||
@host = options[:host] || case options[:region]
|
@host = options[:host] || case options[:region]
|
||||||
|
when 'ap-northeast-1'
|
||||||
|
'rds.ap-northeast-1.amazonaws.com'
|
||||||
when 'ap-southeast-1'
|
when 'ap-southeast-1'
|
||||||
'rds.ap-southeast-1.amazonaws.com'
|
'rds.ap-southeast-1.amazonaws.com'
|
||||||
when 'eu-west-1'
|
when 'eu-west-1'
|
||||||
|
|
|
@ -64,8 +64,23 @@ module Fog
|
||||||
@aws_access_key_id = options[:aws_access_key_id]
|
@aws_access_key_id = options[:aws_access_key_id]
|
||||||
@aws_secret_access_key = options[:aws_secret_access_key]
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
||||||
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
||||||
@host = options[:host] || 'sdb.amazonaws.com'
|
|
||||||
@nil_string = options[:nil_string]|| 'nil'
|
@nil_string = options[:nil_string]|| 'nil'
|
||||||
|
|
||||||
|
options[:region] ||= 'us-east-1'
|
||||||
|
@host = options[:host] || case options[:region]
|
||||||
|
when 'ap-northeast-1'
|
||||||
|
'sdb.ap-northeast-1.amazonaws.com'
|
||||||
|
when 'ap-southeast-1'
|
||||||
|
'sdb.ap-southeast-1.amazonaws.com'
|
||||||
|
when 'eu-west-1'
|
||||||
|
'sdb.eu-west-1.amazonaws.com'
|
||||||
|
when 'us-east-1'
|
||||||
|
'sdb.us-east-1.amazonaws.com'
|
||||||
|
when 'us-west-1'
|
||||||
|
'sdb.us-west-1.amazonaws.com'
|
||||||
|
else
|
||||||
|
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
||||||
|
end
|
||||||
@path = options[:path] || '/'
|
@path = options[:path] || '/'
|
||||||
@port = options[:port] || 443
|
@port = options[:port] || 443
|
||||||
@scheme = options[:scheme] || 'https'
|
@scheme = options[:scheme] || 'https'
|
||||||
|
|
|
@ -188,6 +188,8 @@ module Fog
|
||||||
else
|
else
|
||||||
options[:region] ||= 'us-east-1'
|
options[:region] ||= 'us-east-1'
|
||||||
@host = options[:host] || case options[:region]
|
@host = options[:host] || case options[:region]
|
||||||
|
when 'ap-northeast-1'
|
||||||
|
'ec2.ap-northeast-1.amazonaws.com'
|
||||||
when 'ap-southeast-1'
|
when 'ap-southeast-1'
|
||||||
'ec2.ap-southeast-1.amazonaws.com'
|
'ec2.ap-southeast-1.amazonaws.com'
|
||||||
when 'eu-west-1'
|
when 'eu-west-1'
|
||||||
|
|
|
@ -188,12 +188,14 @@ module Fog
|
||||||
@aws_secret_access_key = options[:aws_secret_access_key]
|
@aws_secret_access_key = options[:aws_secret_access_key]
|
||||||
options[:region] ||= 'us-east-1'
|
options[:region] ||= 'us-east-1'
|
||||||
@host = options[:host] || case options[:region]
|
@host = options[:host] || case options[:region]
|
||||||
|
when 'ap-northeast-1'
|
||||||
|
's3-ap-northeast-1.amazonaws.com'
|
||||||
|
when 'ap-southeast-1'
|
||||||
|
's3-ap-southeast-1.amazonaws.com'
|
||||||
when 'eu-west-1'
|
when 'eu-west-1'
|
||||||
's3-eu-west-1.amazonaws.com'
|
's3-eu-west-1.amazonaws.com'
|
||||||
when 'us-east-1'
|
when 'us-east-1'
|
||||||
's3.amazonaws.com'
|
's3.amazonaws.com'
|
||||||
when 'ap-southeast-1'
|
|
||||||
's3-ap-southeast-1.amazonaws.com'
|
|
||||||
when 'us-west-1'
|
when 'us-west-1'
|
||||||
's3-us-west-1.amazonaws.com'
|
's3-us-west-1.amazonaws.com'
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue