aws-sdk-core 2.11.418 → 2.11.419

Sign up to get free protection for your applications and to get access to all the features.
@@ -3006,6 +3006,13 @@
3006
3006
  "hostname" : "s3.ap-southeast-2.amazonaws.com",
3007
3007
  "signatureVersions" : [ "s3", "s3v4" ]
3008
3008
  },
3009
+ "aws-global" : {
3010
+ "credentialScope" : {
3011
+ "region" : "us-east-1"
3012
+ },
3013
+ "hostname" : "s3.amazonaws.com",
3014
+ "signatureVersions" : [ "s3", "s3v4" ]
3015
+ },
3009
3016
  "ca-central-1" : { },
3010
3017
  "eu-central-1" : { },
3011
3018
  "eu-north-1" : { },
@@ -3028,7 +3035,7 @@
3028
3035
  "signatureVersions" : [ "s3", "s3v4" ]
3029
3036
  },
3030
3037
  "us-east-1" : {
3031
- "hostname" : "s3.amazonaws.com",
3038
+ "hostname" : "s3.us-east-1.amazonaws.com",
3032
3039
  "signatureVersions" : [ "s3", "s3v4" ]
3033
3040
  },
3034
3041
  "us-east-2" : { },
@@ -3042,7 +3049,7 @@
3042
3049
  }
3043
3050
  },
3044
3051
  "isRegionalized" : true,
3045
- "partitionEndpoint" : "us-east-1"
3052
+ "partitionEndpoint" : "aws-global"
3046
3053
  },
3047
3054
  "s3-control" : {
3048
3055
  "defaults" : {
@@ -66,6 +66,7 @@ module Aws
66
66
  CodePipeline
67
67
  CodeStar
68
68
  CodeStarNotifications
69
+ CodeStarconnections
69
70
  CognitoIdentity
70
71
  CognitoIdentityProvider
71
72
  CognitoSync
@@ -348,6 +349,7 @@ module Aws
348
349
  autoload :S3GetBucketLocationFix, 'aws-sdk-core/plugins/s3_get_bucket_location_fix'
349
350
  autoload :S3Http200Errors, 'aws-sdk-core/plugins/s3_http_200_errors'
350
351
  autoload :S3HostId, 'aws-sdk-core/plugins/s3_host_id'
352
+ autoload :S3IADRegionalEndpoint, 'aws-sdk-core/plugins/s3_iad_regional_endpoint'
351
353
  autoload :S3LocationConstraint, 'aws-sdk-core/plugins/s3_location_constraint'
352
354
  autoload :S3Md5s, 'aws-sdk-core/plugins/s3_md5s'
353
355
  autoload :S3Redirects, 'aws-sdk-core/plugins/s3_redirects'
@@ -265,6 +265,7 @@ module Aws
265
265
  Aws::Plugins::S3Expect100Continue
266
266
  Aws::Plugins::S3HostId
267
267
  Aws::Plugins::S3Http200Errors
268
+ Aws::Plugins::S3IADRegionalEndpoint
268
269
  Aws::Plugins::S3GetBucketLocationFix
269
270
  Aws::Plugins::S3LocationConstraint
270
271
  Aws::Plugins::S3Md5s
@@ -0,0 +1,6 @@
1
+ Aws.add_service(:CodeStarconnections, {
2
+ api: "#{Aws::API_DIR}/codestar-connections/2019-12-01/api-2.json",
3
+ docs: "#{Aws::API_DIR}/codestar-connections/2019-12-01/docs-2.json",
4
+ examples: "#{Aws::API_DIR}/codestar-connections/2019-12-01/examples-1.json",
5
+ paginators: "#{Aws::API_DIR}/codestar-connections/2019-12-01/paginators-1.json",
6
+ })
@@ -28,7 +28,7 @@ module Aws
28
28
  @rules = rules
29
29
  end
30
30
 
31
- def resolve(region, service, sts_regional_endpoints = nil)
31
+ def resolve(region, service, sts_regional_endpoints)
32
32
  "https://" + endpoint_for(region, service, sts_regional_endpoints)
33
33
  end
34
34
 
@@ -49,7 +49,7 @@ module Aws
49
49
 
50
50
  private
51
51
 
52
- def endpoint_for(region, service, sts_regional_endpoints)
52
+ def endpoint_for(region, service, sts_regional_endpoints = 'legacy')
53
53
  partition = get_partition(region)
54
54
  endpoint = default_endpoint(partition, service, region)
55
55
  service_cfg = partition.fetch("services", {}).fetch(service, {})
@@ -25,8 +25,9 @@ module Aws
25
25
  option(:endpoint) do |cfg|
26
26
  endpoint_prefix = cfg.api.metadata['endpointPrefix']
27
27
  if cfg.region && endpoint_prefix
28
- EndpointProvider.resolve(cfg.region, endpoint_prefix)
29
- sts_regional = cfg.respond_to?(:sts_regional_endpoints) ? cfg.sts_regional_endpoints : nil
28
+ if cfg.respond_to?(:sts_regional_endpoints)
29
+ sts_regional = cfg.sts_regional_endpoints
30
+ end
30
31
  EndpointProvider.resolve(cfg.region, endpoint_prefix, sts_regional)
31
32
  end
32
33
  end
@@ -0,0 +1,58 @@
1
+ module Aws
2
+ module Plugins
3
+
4
+ class S3IADRegionalEndpoint < Seahorse::Client::Plugin
5
+
6
+ option(:s3_us_east_1_regional_endpoint,
7
+ default: 'legacy',
8
+ doc_type: String,
9
+ docstring: <<-DOCS) do |cfg|
10
+ Passing in `regional` to enable regional endpoint for S3's `us-east-1`
11
+ region. Defaults to `legacy` mode using global endpoint.
12
+ DOCS
13
+ resolve_iad_regional_endpoint(cfg)
14
+ end
15
+
16
+ def add_handlers(handlers, config)
17
+ if config.region == 'us-east-1'
18
+ handlers.add(Handler)
19
+ end
20
+ end
21
+
22
+ # @api private
23
+ class Handler < Seahorse::Client::Handler
24
+
25
+ def call(context)
26
+ # keep legacy global endpoint pattern by default
27
+ if context.config.s3_us_east_1_regional_endpoint == 'legacy'
28
+ context.http_request.endpoint.host = S3IADRegionalEndpoint.legacy_host(
29
+ context.http_request.endpoint.host)
30
+ end
31
+ @handler.call(context)
32
+ end
33
+
34
+ end
35
+
36
+ def self.legacy_host(host)
37
+ host.sub(".us-east-1", '')
38
+ end
39
+
40
+ private
41
+
42
+ def self.resolve_iad_regional_endpoint(cfg)
43
+ mode = ENV['AWS_S3_US_EAST_1_REGIONAL_ENDPOINT'] ||
44
+ Aws.shared_config.s3_us_east_1_regional_endpoint(profile: cfg.profile) ||
45
+ 'legacy'
46
+ mode.downcase!
47
+ unless %w(legacy regional).include?(mode)
48
+ raise ArgumentError, "expected :s3_us_east_1_regional_endpoint or"\
49
+ " ENV['AWS_S3_US_EAST_1_REGIONAL_ENDPOINT'] to be `legacy` or"\
50
+ " `regional`."
51
+ end
52
+ mode
53
+ end
54
+
55
+ end
56
+
57
+ end
58
+ end
@@ -143,6 +143,21 @@ module Aws
143
143
  end
144
144
  end
145
145
 
146
+ def s3_us_east_1_regional_endpoint(opts = {})
147
+ p = opts[:profile] || @profile_name
148
+ if @config_enabled
149
+ if @parsed_credentials
150
+ mode = @parsed_credentials.fetch(p, {})["s3_us_east_1_regional_endpoint"]
151
+ end
152
+ if @parsed_config
153
+ mode ||= @parsed_config.fetch(p, {})["s3_us_east_1_regional_endpoint"]
154
+ end
155
+ mode
156
+ else
157
+ nil
158
+ end
159
+ end
160
+
146
161
  def endpoint_discovery(opts = {})
147
162
  p = opts[:profile] || @profile_name
148
163
  if @config_enabled && @parsed_config
@@ -1,3 +1,3 @@
1
1
  module Aws
2
- VERSION = '2.11.418'
2
+ VERSION = '2.11.419'
3
3
  end
@@ -170,6 +170,10 @@
170
170
  "models": "codestar-notifications/2019-10-15",
171
171
  "endpoint": "codestar-notifications"
172
172
  },
173
+ "CodeStarconnections": {
174
+ "models": "codestar-connections/2019-12-01",
175
+ "endpoint": "codestar-connections"
176
+ },
173
177
  "CognitoIdentity": {
174
178
  "models": "cognito-identity/2014-06-30",
175
179
  "endpoint": "cognito-identity"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.418
4
+ version: 2.11.419
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-17 00:00:00.000000000 Z
11
+ date: 2019-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -231,6 +231,9 @@ files:
231
231
  - apis/codepipeline/2015-07-09/examples-1.json
232
232
  - apis/codepipeline/2015-07-09/paginators-1.json
233
233
  - apis/codepipeline/2015-07-09/smoke.json
234
+ - apis/codestar-connections/2019-12-01/api-2.json
235
+ - apis/codestar-connections/2019-12-01/examples-1.json
236
+ - apis/codestar-connections/2019-12-01/paginators-1.json
234
237
  - apis/codestar-notifications/2019-10-15/api-2.json
235
238
  - apis/codestar-notifications/2019-10-15/examples-1.json
236
239
  - apis/codestar-notifications/2019-10-15/paginators-1.json
@@ -964,6 +967,7 @@ files:
964
967
  - lib/aws-sdk-core/codegurureviewer.rb
965
968
  - lib/aws-sdk-core/codepipeline.rb
966
969
  - lib/aws-sdk-core/codestar.rb
970
+ - lib/aws-sdk-core/codestarconnections.rb
967
971
  - lib/aws-sdk-core/codestarnotifications.rb
968
972
  - lib/aws-sdk-core/cognitoidentity.rb
969
973
  - lib/aws-sdk-core/cognitoidentityprovider.rb
@@ -1159,6 +1163,7 @@ files:
1159
1163
  - lib/aws-sdk-core/plugins/s3_get_bucket_location_fix.rb
1160
1164
  - lib/aws-sdk-core/plugins/s3_host_id.rb
1161
1165
  - lib/aws-sdk-core/plugins/s3_http_200_errors.rb
1166
+ - lib/aws-sdk-core/plugins/s3_iad_regional_endpoint.rb
1162
1167
  - lib/aws-sdk-core/plugins/s3_location_constraint.rb
1163
1168
  - lib/aws-sdk-core/plugins/s3_md5s.rb
1164
1169
  - lib/aws-sdk-core/plugins/s3_redirects.rb