aws-sdk-core 2.6.19 → 2.6.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fd46323933d8a315d6cd710f33a6802c15b34e50
4
- data.tar.gz: 0d62e89a67eb9b4b759ce167c27f0fb7dc2829dc
3
+ metadata.gz: 680cdded197f7f1ba3442224ae298c891ee13fb8
4
+ data.tar.gz: 37124fc30972cf641ed0c127c540abdeaeae5801
5
5
  SHA512:
6
- metadata.gz: 8f82ad47c9d138a56149e3bfdb2b2b17a975d694871dd15d26fa1cd8946f28cccf730a10d09ee1549b83899ca86d3a4b2c57d44e6f76562d6c29abc5ada02594
7
- data.tar.gz: 42cfd68fed57106049a44eeb84b02624538e7957acd2225f2b7465ef121b9f7571a797bec5e3313761bd95e33d5503cd20d54bf1c118a8f309dd66044dd371b0
6
+ metadata.gz: 345c4e53595df6fbf176fca8e7db0e179045b4bdc5c13c45ffa52f0bd9cca15f10d4542555ac0cc64db794a913a5d6a0884df7bcce65f965d25f27f47f98c477
7
+ data.tar.gz: 2338962a859d6ed36ab77383dd82af17d1361421f42cc051e37e9328b11a5c94599a5a4227bb6af4a22a7caf9f89ca3a3e36c092e74bb6fa698cfe95dd10ac19
@@ -1796,7 +1796,8 @@
1796
1796
  "DeviceConfiguration":{"shape":"DeviceConfigurationType"},
1797
1797
  "EmailConfiguration":{"shape":"EmailConfigurationType"},
1798
1798
  "SmsConfiguration":{"shape":"SmsConfigurationType"},
1799
- "AdminCreateUserConfig":{"shape":"AdminCreateUserConfigType"}
1799
+ "AdminCreateUserConfig":{"shape":"AdminCreateUserConfigType"},
1800
+ "Schema":{"shape":"SchemaAttributesListType"}
1800
1801
  }
1801
1802
  },
1802
1803
  "CreateUserPoolResponse":{
@@ -2467,9 +2468,18 @@
2467
2468
  "members":{
2468
2469
  "Name":{"shape":"CustomAttributeNameType"},
2469
2470
  "AttributeDataType":{"shape":"AttributeDataType"},
2470
- "DeveloperOnlyAttribute":{"shape":"BooleanType"},
2471
- "Mutable":{"shape":"BooleanType"},
2472
- "Required":{"shape":"BooleanType"},
2471
+ "DeveloperOnlyAttribute":{
2472
+ "shape":"BooleanType",
2473
+ "box":true
2474
+ },
2475
+ "Mutable":{
2476
+ "shape":"BooleanType",
2477
+ "box":true
2478
+ },
2479
+ "Required":{
2480
+ "shape":"BooleanType",
2481
+ "box":true
2482
+ },
2473
2483
  "NumberAttributeConstraints":{"shape":"NumberAttributeConstraintsType"},
2474
2484
  "StringAttributeConstraints":{"shape":"StringAttributeConstraintsType"}
2475
2485
  }
@@ -2542,6 +2552,7 @@
2542
2552
  },
2543
2553
  "SmsConfigurationType":{
2544
2554
  "type":"structure",
2555
+ "required":["SnsCallerArn"],
2545
2556
  "members":{
2546
2557
  "SnsCallerArn":{"shape":"ArnType"},
2547
2558
  "ExternalId":{"shape":"StringType"}
@@ -72,11 +72,11 @@ module Aws
72
72
  # fails, it raises an error. **All errors raised extend from
73
73
  # {Aws::Waiters::Errors::WaiterFailed}**.
74
74
  #
75
- # begin
76
- # client.wait_until(...)
77
- # rescue Aws::Waiters::Errors::WaiterFailed
78
- # # resource did not enter the desired state in time
79
- # end
75
+ # begin
76
+ # client.wait_until(...)
77
+ # rescue Aws::Waiters::Errors::WaiterFailed
78
+ # # resource did not enter the desired state in time
79
+ # end
80
80
  #
81
81
  # @param [Symbol] waiter_name The name of the waiter. See {#waiter_names}
82
82
  # for a full list of supported waiters.
@@ -1,3 +1,5 @@
1
+ require 'aws-sigv4'
2
+
1
3
  module Aws
2
4
  module Plugins
3
5
 
@@ -16,66 +18,33 @@ module Aws
16
18
  def call(context)
17
19
  params = context.params
18
20
  params[:destination_region] = context.config.region
19
- params[:presigned_url] = presigned_url(context.client, params)
21
+ params[:presigned_url] = presigned_url(context, params)
20
22
  @handler.call(context)
21
23
  end
22
24
 
23
25
  private
24
26
 
25
- def presigned_url(client, params)
26
- client = source_region_client(client, params)
27
- client.handle(PresignHandler, step: :build, priority: 0)
28
- client.handlers.remove(Handler)
29
- client.copy_snapshot(params).data # presigned url
30
- end
31
-
32
- def source_region_client(client, params)
33
- EC2::Client.new({
34
- region: params[:source_region] || 'region',
35
- credentials: client.config.credentials,
36
- })
37
- end
38
-
39
- end
40
-
41
- # This handler intentionally does NOT call the next handler in
42
- # the stack. It generates a presigned url from the request
43
- # and returns it as the response data.
44
- #
45
- # Before signing:
46
- #
47
- # * The HTTP method is changed from POST to GET
48
- # * The url-encoded body is moved to the querystring
49
- #
50
- # @api private
51
- class PresignHandler < Seahorse::Client::Handler
52
-
53
- def call(context)
54
- convert_post_2_get(context)
55
- Seahorse::Client::Response.new(
56
- context: context,
57
- data: presigned_url(context.http_request, context.config))
58
- end
59
-
60
- private
61
-
62
- def convert_post_2_get(context)
63
- context.http_request.http_method = 'GET'
64
- context.http_request.endpoint = new_endpoint(context)
65
- context.http_request.body = ''
66
- context.http_request.headers.delete('Content-Type')
67
- end
68
-
69
- def new_endpoint(context)
70
- body = context.http_request.body_contents
71
- endpoint = context.http_request.endpoint
72
- endpoint.query = body
73
- endpoint
74
- end
75
-
76
- def presigned_url(http_request, config)
77
- signer = Signers::V4.new(config.credentials, 'ec2', config.region)
78
- signer.presigned_url(http_request, expires_in: 3600)
27
+ def presigned_url(context, params)
28
+ param_list = Aws::Query::ParamList.new
29
+ param_list.set('Action', 'CopySnapshot')
30
+ param_list.set('DestinationRegion', context.config.region)
31
+ param_list.set('Version', context.config.api.metadata['apiVersion'])
32
+ Aws::Query::EC2ParamBuilder.new(param_list).apply(context.operation.input, params)
33
+
34
+ signer = Aws::Sigv4::Signer.new(
35
+ service: 'ec2',
36
+ region: params[:source_region],
37
+ credentials_provider: context.config.credentials
38
+ )
39
+ url = Aws::EndpointProvider.resolve(signer.region, 'ec2')
40
+ url += "?#{param_list.to_s}"
41
+
42
+ signer.presign_url(
43
+ http_method: 'GET',
44
+ url: url,
45
+ body: '',
46
+ expires_in: 3600
47
+ ).to_s
79
48
  end
80
49
 
81
50
  end
@@ -1,3 +1,3 @@
1
1
  module Aws
2
- VERSION = '2.6.19'
2
+ VERSION = '2.6.20'
3
3
  end
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.6.19
4
+ version: 2.6.20
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: 2016-11-10 00:00:00.000000000 Z
11
+ date: 2016-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jmespath
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: aws-sigv4
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.0'
27
41
  description: Provides API clients for AWS. This gem is part of the official AWS SDK
28
42
  for Ruby.
29
43
  email: