aws-sdk 1.31.0 → 1.31.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws/auto_scaling/config.rb +1 -1
- data/lib/aws/cloud_formation/config.rb +1 -1
- data/lib/aws/cloud_front/config.rb +1 -1
- data/lib/aws/cloud_search/config.rb +1 -1
- data/lib/aws/cloud_trail/config.rb +1 -1
- data/lib/aws/cloud_watch/config.rb +1 -1
- data/lib/aws/core.rb +1 -0
- data/lib/aws/core/configuration.rb +7 -10
- data/lib/aws/core/endpoints.rb +35 -0
- data/lib/aws/core/region_collection.rb +2 -31
- data/lib/aws/data_pipeline/config.rb +1 -1
- data/lib/aws/direct_connect/config.rb +1 -1
- data/lib/aws/dynamo_db/config.rb +1 -1
- data/lib/aws/ec2/config.rb +1 -1
- data/lib/aws/elastic_beanstalk/config.rb +1 -1
- data/lib/aws/elastic_transcoder/config.rb +1 -1
- data/lib/aws/elasticache/config.rb +1 -1
- data/lib/aws/elb/config.rb +1 -1
- data/lib/aws/emr/client.rb +1 -1
- data/lib/aws/emr/config.rb +1 -1
- data/lib/aws/glacier/config.rb +1 -1
- data/lib/aws/iam/config.rb +1 -1
- data/lib/aws/import_export/config.rb +1 -1
- data/lib/aws/kinesis/config.rb +1 -1
- data/lib/aws/ops_works/config.rb +1 -1
- data/lib/aws/rds/config.rb +1 -1
- data/lib/aws/redshift/config.rb +1 -1
- data/lib/aws/route_53/config.rb +1 -1
- data/lib/aws/s3/config.rb +1 -7
- data/lib/aws/s3/presign_v4.rb +1 -1
- data/lib/aws/simple_db/config.rb +1 -7
- data/lib/aws/simple_email_service/config.rb +1 -1
- data/lib/aws/simple_workflow/config.rb +1 -1
- data/lib/aws/sns/config.rb +1 -1
- data/lib/aws/sqs/config.rb +1 -1
- data/lib/aws/storage_gateway/config.rb +1 -1
- data/lib/aws/sts/config.rb +2 -8
- data/lib/aws/support/config.rb +1 -1
- data/lib/aws/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea67344cc4a28f4425f78a8be89ce2394de29849
|
4
|
+
data.tar.gz: 0a21c93c8e6bfda039dd43382134f74d6ba8b7d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78621398a200b8ef1f163d2b4226b19b72ef063569785a4270ecb6d31d7459ad7da361de193fcd049d2d6e6f4b06fac49c2b754f7f417bf5800bdacfe8b4cafc
|
7
|
+
data.tar.gz: 83bc634bfc0e8ecdb2f73cbe718593d874db185fb2268719e911de60198a19ea3e381a9fe3fdd5a7dfed1e4eac1859b9c6256772e8dadeb37af68dde094990f1
|
data/lib/aws/core.rb
CHANGED
@@ -164,6 +164,7 @@ module AWS
|
|
164
164
|
autoload :CredentialProviders, "#{SRC}/core/credential_providers"
|
165
165
|
autoload :Data, "#{SRC}/core/data"
|
166
166
|
autoload :Deprecations, "#{SRC}/core/deprecations"
|
167
|
+
autoload :Endpoints, "#{SRC}/core/endpoints"
|
167
168
|
autoload :IndifferentHash, "#{SRC}/core/indifferent_hash"
|
168
169
|
autoload :Inflection, "#{SRC}/core/inflection"
|
169
170
|
autoload :JSONParser, "#{SRC}/core/json_parser"
|
@@ -392,7 +392,7 @@ module AWS
|
|
392
392
|
|
393
393
|
end
|
394
394
|
|
395
|
-
def add_service name, ruby_name,
|
395
|
+
def add_service name, ruby_name, endpoint_prefix
|
396
396
|
|
397
397
|
svc = SERVICES[name]
|
398
398
|
svc_opt = svc.method_name
|
@@ -401,15 +401,12 @@ module AWS
|
|
401
401
|
add_option(svc_opt, {})
|
402
402
|
|
403
403
|
add_option :"#{ruby_name}_endpoint" do |config,value|
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
else
|
411
|
-
endpoint_builder.call(config.endpoint_region(svc))
|
412
|
-
end
|
404
|
+
region = config.endpoint_region(svc)
|
405
|
+
endpoint = value
|
406
|
+
endpoint ||= config.send(svc_opt)[:endpoint]
|
407
|
+
endpoint ||= Endpoints.hostname(region, endpoint_prefix)
|
408
|
+
endpoint ||= "#{endpoint_prefix}.#{region}.amazonaws.com"
|
409
|
+
endpoint
|
413
410
|
end
|
414
411
|
|
415
412
|
add_option(:"#{ruby_name}_port") do |config,value|
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# Copyright 2011-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License"). You
|
4
|
+
# may not use this file except in compliance with the License. A copy of
|
5
|
+
# the License is located at
|
6
|
+
#
|
7
|
+
# http://aws.amazon.com/apache2.0/
|
8
|
+
#
|
9
|
+
# or in the "license" file accompanying this file. This file is
|
10
|
+
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11
|
+
# ANY KIND, either express or implied. See the License for the specific
|
12
|
+
# language governing permissions and limitations under the License.
|
13
|
+
|
14
|
+
module AWS
|
15
|
+
module Core
|
16
|
+
# Provides a read-only interface to the bundled endpoints.json file.
|
17
|
+
module Endpoints
|
18
|
+
|
19
|
+
def hostname(region, endpoint_prefix)
|
20
|
+
region = endpoints["regions"][region] || {}
|
21
|
+
endpoint = region[endpoint_prefix] || {}
|
22
|
+
endpoint["hostname"]
|
23
|
+
end
|
24
|
+
module_function :hostname
|
25
|
+
|
26
|
+
def endpoints
|
27
|
+
@endpoints ||= begin
|
28
|
+
JSON.parse(File.read(File.join(AWS::ROOT, 'endpoints.json')))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
module_function :endpoints
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -68,40 +68,11 @@ module AWS
|
|
68
68
|
# @return [Array<String>] Returns an array of non-gov-cloud region names.
|
69
69
|
def public_regions
|
70
70
|
return ['us-east-1'] if @service and @service.global_endpoint?
|
71
|
-
data =
|
71
|
+
data = Endpoints.endpoints
|
72
72
|
regions = @service ?
|
73
73
|
data['services'][@service.endpoint_prefix] :
|
74
74
|
data['regions'].keys
|
75
|
-
regions.reject{|r| r =~ /us-gov/ }
|
76
|
-
end
|
77
|
-
|
78
|
-
class << self
|
79
|
-
|
80
|
-
# @return [nil]
|
81
|
-
# @api private
|
82
|
-
def clear!
|
83
|
-
@data = nil
|
84
|
-
end
|
85
|
-
|
86
|
-
# @return [Hash] Returns a hash of region metadata.
|
87
|
-
# @api private
|
88
|
-
def data
|
89
|
-
@data ||= load_data
|
90
|
-
end
|
91
|
-
|
92
|
-
private
|
93
|
-
|
94
|
-
# @return [Hash]
|
95
|
-
def load_data
|
96
|
-
#return JSON.parse(File.read(File.join(AWS::ROOT, 'endpoints.json')))
|
97
|
-
host = 'aws-sdk-configurations.amazonwebservices.com'
|
98
|
-
path = '/endpoints.json'
|
99
|
-
http = Net::HTTP
|
100
|
-
proxy = AWS.config.proxy_uri
|
101
|
-
http = Net::HTTP::Proxy(proxy.host, proxy.port) unless proxy.nil?
|
102
|
-
JSON.parse(http.get(host, path))
|
103
|
-
end
|
104
|
-
|
75
|
+
regions.reject{ |r| r =~ /us-gov/ }.reject{ |r| r =~ /^cn-/ }
|
105
76
|
end
|
106
77
|
|
107
78
|
end
|
data/lib/aws/dynamo_db/config.rb
CHANGED
data/lib/aws/ec2/config.rb
CHANGED
data/lib/aws/elb/config.rb
CHANGED
data/lib/aws/emr/client.rb
CHANGED
data/lib/aws/emr/config.rb
CHANGED
data/lib/aws/glacier/config.rb
CHANGED
data/lib/aws/iam/config.rb
CHANGED
data/lib/aws/kinesis/config.rb
CHANGED
data/lib/aws/ops_works/config.rb
CHANGED
data/lib/aws/rds/config.rb
CHANGED
data/lib/aws/redshift/config.rb
CHANGED
data/lib/aws/route_53/config.rb
CHANGED
data/lib/aws/s3/config.rb
CHANGED
@@ -13,13 +13,7 @@
|
|
13
13
|
|
14
14
|
AWS::Core::Configuration.module_eval do
|
15
15
|
|
16
|
-
add_service 'S3', 's3'
|
17
|
-
if region == 'us-east-1'
|
18
|
-
's3.amazonaws.com'
|
19
|
-
else
|
20
|
-
's3-%s.amazonaws.com' % region
|
21
|
-
end
|
22
|
-
end
|
16
|
+
add_service 'S3', 's3', 's3'
|
23
17
|
|
24
18
|
add_option :s3_force_path_style, false, :boolean => true
|
25
19
|
|
data/lib/aws/s3/presign_v4.rb
CHANGED
@@ -84,7 +84,7 @@ module AWS
|
|
84
84
|
params = options.merge(
|
85
85
|
:bucket_name => object.bucket.name,
|
86
86
|
:key => object.key,
|
87
|
-
:data => ''
|
87
|
+
:data => ''
|
88
88
|
)
|
89
89
|
req = client.send(:build_request, operation_name(method), params)
|
90
90
|
req.force_path_style = options.fetch(:force_path_style, path_style)
|
data/lib/aws/simple_db/config.rb
CHANGED
@@ -13,13 +13,7 @@
|
|
13
13
|
|
14
14
|
AWS::Core::Configuration.module_eval do
|
15
15
|
|
16
|
-
add_service 'SimpleDB', 'simple_db'
|
17
|
-
if region == 'us-east-1'
|
18
|
-
'sdb.amazonaws.com'
|
19
|
-
else
|
20
|
-
'sdb.%s.amazonaws.com' % region
|
21
|
-
end
|
22
|
-
end
|
16
|
+
add_service 'SimpleDB', 'simple_db', 'sdb'
|
23
17
|
|
24
18
|
add_option :simple_db_consistent_reads, false, :boolean => true
|
25
19
|
|
data/lib/aws/sns/config.rb
CHANGED
data/lib/aws/sqs/config.rb
CHANGED
data/lib/aws/sts/config.rb
CHANGED
data/lib/aws/support/config.rb
CHANGED
data/lib/aws/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.31.
|
4
|
+
version: 1.31.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
@@ -135,6 +135,7 @@ files:
|
|
135
135
|
- lib/aws/core/credential_providers.rb
|
136
136
|
- lib/aws/core/data.rb
|
137
137
|
- lib/aws/core/deprecations.rb
|
138
|
+
- lib/aws/core/endpoints.rb
|
138
139
|
- lib/aws/core/http/connection_pool.rb
|
139
140
|
- lib/aws/core/http/curb_handler.rb
|
140
141
|
- lib/aws/core/http/handler.rb
|