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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/lib/aws/auto_scaling/config.rb +1 -1
  3. data/lib/aws/cloud_formation/config.rb +1 -1
  4. data/lib/aws/cloud_front/config.rb +1 -1
  5. data/lib/aws/cloud_search/config.rb +1 -1
  6. data/lib/aws/cloud_trail/config.rb +1 -1
  7. data/lib/aws/cloud_watch/config.rb +1 -1
  8. data/lib/aws/core.rb +1 -0
  9. data/lib/aws/core/configuration.rb +7 -10
  10. data/lib/aws/core/endpoints.rb +35 -0
  11. data/lib/aws/core/region_collection.rb +2 -31
  12. data/lib/aws/data_pipeline/config.rb +1 -1
  13. data/lib/aws/direct_connect/config.rb +1 -1
  14. data/lib/aws/dynamo_db/config.rb +1 -1
  15. data/lib/aws/ec2/config.rb +1 -1
  16. data/lib/aws/elastic_beanstalk/config.rb +1 -1
  17. data/lib/aws/elastic_transcoder/config.rb +1 -1
  18. data/lib/aws/elasticache/config.rb +1 -1
  19. data/lib/aws/elb/config.rb +1 -1
  20. data/lib/aws/emr/client.rb +1 -1
  21. data/lib/aws/emr/config.rb +1 -1
  22. data/lib/aws/glacier/config.rb +1 -1
  23. data/lib/aws/iam/config.rb +1 -1
  24. data/lib/aws/import_export/config.rb +1 -1
  25. data/lib/aws/kinesis/config.rb +1 -1
  26. data/lib/aws/ops_works/config.rb +1 -1
  27. data/lib/aws/rds/config.rb +1 -1
  28. data/lib/aws/redshift/config.rb +1 -1
  29. data/lib/aws/route_53/config.rb +1 -1
  30. data/lib/aws/s3/config.rb +1 -7
  31. data/lib/aws/s3/presign_v4.rb +1 -1
  32. data/lib/aws/simple_db/config.rb +1 -7
  33. data/lib/aws/simple_email_service/config.rb +1 -1
  34. data/lib/aws/simple_workflow/config.rb +1 -1
  35. data/lib/aws/sns/config.rb +1 -1
  36. data/lib/aws/sqs/config.rb +1 -1
  37. data/lib/aws/storage_gateway/config.rb +1 -1
  38. data/lib/aws/sts/config.rb +2 -8
  39. data/lib/aws/support/config.rb +1 -1
  40. data/lib/aws/version.rb +1 -1
  41. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fae7bb3d331e550e7ff9f8908be0c7c45016dd48
4
- data.tar.gz: 626caf07a67cd5992430ce126c0696e859e4cd05
3
+ metadata.gz: ea67344cc4a28f4425f78a8be89ce2394de29849
4
+ data.tar.gz: 0a21c93c8e6bfda039dd43382134f74d6ba8b7d1
5
5
  SHA512:
6
- metadata.gz: 83793899c266bf432015d268b2a812c2fd4ee174676d02f495d5e4db2214233029373c6f61dfbaf87fa7171d8454e6c08bc69e0b804928bb30299537ddfb5ef3
7
- data.tar.gz: 0d890e1035c3d7d9a664dc3342e9f5e0e9f0867da10718b2f0c8f5e590a1ee4cad109477956f2dcd00a7d978aafc4170b5502c7d860e297851194573df08cad0
6
+ metadata.gz: 78621398a200b8ef1f163d2b4226b19b72ef063569785a4270ecb6d31d7459ad7da361de193fcd049d2d6e6f4b06fac49c2b754f7f417bf5800bdacfe8b4cafc
7
+ data.tar.gz: 83bc634bfc0e8ecdb2f73cbe718593d874db185fb2268719e911de60198a19ea3e381a9fe3fdd5a7dfed1e4eac1859b9c6256772e8dadeb37af68dde094990f1
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'AutoScaling', 'auto_scaling', 'autoscaling.%s.amazonaws.com'
16
+ add_service 'AutoScaling', 'auto_scaling', 'autoscaling'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'CloudFormation', 'cloud_formation', 'cloudformation.%s.amazonaws.com'
16
+ add_service 'CloudFormation', 'cloud_formation', 'cloudformation'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'CloudFront', 'cloud_front', 'cloudfront.amazonaws.com'
16
+ add_service 'CloudFront', 'cloud_front', 'cloudfront'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'CloudSearch', 'cloud_search', 'cloudsearch.%s.amazonaws.com'
16
+ add_service 'CloudSearch', 'cloud_search', 'cloudsearch'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'CloudTrail', 'cloud_trail', 'cloudtrail.%s.amazonaws.com'
16
+ add_service 'CloudTrail', 'cloud_trail', 'cloudtrail'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'CloudWatch', 'cloud_watch', 'monitoring.%s.amazonaws.com'
16
+ add_service 'CloudWatch', 'cloud_watch', 'monitoring'
17
17
 
18
18
  end
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, endpoint_pattern = nil, &endpoint_builder
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
- if value
405
- value
406
- elsif endpoint = config.send(svc_opt)[:endpoint]
407
- endpoint
408
- elsif endpoint_pattern
409
- endpoint_pattern % config.endpoint_region(svc)
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 = self.class.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
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'DataPipeline', 'data_pipeline', 'datapipeline.%s.amazonaws.com'
16
+ add_service 'DataPipeline', 'data_pipeline', 'datapipeline'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'DirectConnect', 'direct_connect', 'directconnect.%s.amazonaws.com'
16
+ add_service 'DirectConnect', 'direct_connect', 'directconnect'
17
17
 
18
18
  end
@@ -13,7 +13,7 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'DynamoDB', 'dynamo_db', 'dynamodb.%s.amazonaws.com'
16
+ add_service 'DynamoDB', 'dynamo_db', 'dynamodb'
17
17
 
18
18
  add_option :dynamo_db_retry_throughput_errors, true, :boolean => true
19
19
 
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'EC2', 'ec2', 'ec2.%s.amazonaws.com'
16
+ add_service 'EC2', 'ec2', 'ec2'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'ElasticBeanstalk', 'elastic_beanstalk', 'elasticbeanstalk.%s.amazonaws.com'
16
+ add_service 'ElasticBeanstalk', 'elastic_beanstalk', 'elasticbeanstalk'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'ElasticTranscoder', 'elastic_transcoder', 'elastictranscoder.%s.amazonaws.com'
16
+ add_service 'ElasticTranscoder', 'elastic_transcoder', 'elastictranscoder'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'ElastiCache', 'elasticache', 'elasticache.%s.amazonaws.com'
16
+ add_service 'ElastiCache', 'elasticache', 'elasticache'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'ELB', 'elb', 'elasticloadbalancing.%s.amazonaws.com'
16
+ add_service 'ELB', 'elb', 'elasticloadbalancing'
17
17
 
18
18
  end
@@ -19,7 +19,7 @@ module AWS
19
19
 
20
20
  API_VERSION = '2009-03-31'
21
21
 
22
- signature_version :Version4, 'emr'
22
+ signature_version :Version4, 'elasticmapreduce'
23
23
 
24
24
  # @api private
25
25
  CACHEABLE_REQUESTS = Set[]
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'EMR', 'emr', 'elasticmapreduce.%s.amazonaws.com'
16
+ add_service 'EMR', 'emr', 'elasticmapreduce'
17
17
 
18
18
  end
@@ -14,6 +14,6 @@
14
14
 
15
15
  AWS::Core::Configuration.module_eval do
16
16
 
17
- add_service 'Glacier', 'glacier', 'glacier.%s.amazonaws.com'
17
+ add_service 'Glacier', 'glacier', 'glacier'
18
18
 
19
19
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'IAM', 'iam', 'iam.amazonaws.com'
16
+ add_service 'IAM', 'iam', 'iam'
17
17
 
18
18
  end
@@ -14,6 +14,6 @@
14
14
 
15
15
  AWS::Core::Configuration.module_eval do
16
16
 
17
- add_service 'ImportExport', 'import_export', 'importexport.amazonaws.com'
17
+ add_service 'ImportExport', 'import_export', 'importexport'
18
18
 
19
19
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'Kinesis', 'kinesis', 'kinesis.%s.amazonaws.com'
16
+ add_service 'Kinesis', 'kinesis', 'kinesis'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'OpsWorks', 'ops_works', 'opsworks.%s.amazonaws.com'
16
+ add_service 'OpsWorks', 'ops_works', 'opsworks'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'RDS', 'rds', 'rds.%s.amazonaws.com'
16
+ add_service 'RDS', 'rds', 'rds'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'Redshift', 'redshift', 'redshift.%s.amazonaws.com'
16
+ add_service 'Redshift', 'redshift', 'redshift'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'Route53', 'route_53', 'route53.amazonaws.com'
16
+ add_service 'Route53', 'route_53', 'route53'
17
17
 
18
18
  end
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' do |region|
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
 
@@ -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)
@@ -13,13 +13,7 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'SimpleDB', 'simple_db' do |region|
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
 
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'SimpleEmailService', 'simple_email_service', 'email.%s.amazonaws.com'
16
+ add_service 'SimpleEmailService', 'simple_email_service', 'email'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'SimpleWorkflow', 'simple_workflow', 'swf.%s.amazonaws.com'
16
+ add_service 'SimpleWorkflow', 'simple_workflow', 'swf'
17
17
 
18
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'SNS', 'sns', 'sns.%s.amazonaws.com'
16
+ add_service 'SNS', 'sns', 'sns'
17
17
 
18
18
  end
@@ -13,7 +13,7 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'SQS', 'sqs', 'sqs.%s.amazonaws.com'
16
+ add_service 'SQS', 'sqs', 'sqs'
17
17
 
18
18
  add_option :sqs_verify_checksums, true, :boolean => true
19
19
 
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'StorageGateway', 'storage_gateway', 'storagegateway.%s.amazonaws.com'
16
+ add_service 'StorageGateway', 'storage_gateway', 'storagegateway'
17
17
 
18
18
  end
@@ -13,12 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'STS', 'sts' do |region|
17
- if region =~ /gov/
18
- 'sts.%s.amazonaws.com' % region
19
- else
20
- 'sts.amazonaws.com'
21
- end
22
- end
23
-
16
+ add_service 'STS', 'sts', 'sts'
17
+
24
18
  end
@@ -13,6 +13,6 @@
13
13
 
14
14
  AWS::Core::Configuration.module_eval do
15
15
 
16
- add_service 'Support', 'support', 'support.%s.amazonaws.com'
16
+ add_service 'Support', 'support', 'support'
17
17
 
18
18
  end
data/lib/aws/version.rb CHANGED
@@ -13,5 +13,5 @@
13
13
 
14
14
  module AWS
15
15
  # Current version of the AWS SDK for Ruby
16
- VERSION = '1.31.0'
16
+ VERSION = '1.31.1'
17
17
  end
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.0
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