aws-sdk-s3 1.86.2 → 1.89.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,8 +58,7 @@ module Aws
58
58
  # is returned instead of the default HTTPS URL.
59
59
  #
60
60
  # @option params [Boolean] :virtual_host (false) When `true`, the
61
- # bucket name will be used as the hostname. This will cause
62
- # the returned URL to be 'http' and not 'https'.
61
+ # bucket name will be used as the hostname.
63
62
  #
64
63
  # @option params [Boolean] :use_accelerate_endpoint (false) When `true`,
65
64
  # Presigner will attempt to use accelerated endpoint.
@@ -196,8 +195,6 @@ module Aws
196
195
  req.handlers.remove(Aws::S3::Plugins::S3Signer::V4Handler)
197
196
  req.handlers.remove(Seahorse::Client::Plugins::ContentLength::Handler)
198
197
 
199
- signer = build_signer(req.context, unsigned_headers)
200
-
201
198
  req.handle(step: :send) do |context|
202
199
  if scheme != http_req.endpoint.scheme
203
200
  endpoint = http_req.endpoint.dup
@@ -222,6 +219,20 @@ module Aws
222
219
  end
223
220
  http_req.endpoint.query = query.join('&') unless query.empty?
224
221
 
222
+ # If it's an ARN, get the resolved region and service
223
+ if (arn = context.metadata[:s3_arn])
224
+ region = arn[:resolved_region]
225
+ service = arn[:arn].service
226
+ end
227
+
228
+ signer = Aws::Sigv4::Signer.new(
229
+ service: service || 's3',
230
+ region: region || context.config.region,
231
+ credentials_provider: context.config.credentials,
232
+ unsigned_headers: unsigned_headers,
233
+ uri_escape_path: false
234
+ )
235
+
225
236
  url = signer.presign_url(
226
237
  http_method: http_req.http_method,
227
238
  url: http_req.endpoint,
@@ -239,29 +250,6 @@ module Aws
239
250
  # Return the headers
240
251
  x_amz_headers
241
252
  end
242
-
243
- def build_signer(context, unsigned_headers)
244
- signer_opts = {
245
- service: 's3',
246
- region: context.config.region,
247
- credentials_provider: context.config.credentials,
248
- unsigned_headers: unsigned_headers,
249
- uri_escape_path: false
250
- }
251
-
252
- resolved_region, arn = Aws::S3::Plugins::ARN.resolve_arn!(
253
- context.params[:bucket],
254
- context.config.sigv4_signer.region,
255
- context.config.s3_use_arn_region
256
- )
257
-
258
- if arn
259
- signer_opts[:region] = resolved_region
260
- signer_opts[:service] = arn.service
261
- end
262
-
263
- Aws::Sigv4::Signer.new(signer_opts)
264
- end
265
253
  end
266
254
  end
267
255
  end
@@ -1153,6 +1153,14 @@ module Aws::S3
1153
1153
  # `Condition` is specified and sibling `HttpErrorCodeReturnedEquals`
1154
1154
  # is not specified. If both conditions are specified, both must be
1155
1155
  # true for the redirect to be applied.
1156
+ #
1157
+ # Replacement must be made for object keys containing special
1158
+ # characters (such as carriage returns) when using XML requests. For
1159
+ # more information, see [ XML related object key constraints][1].
1160
+ #
1161
+ #
1162
+ #
1163
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
1156
1164
  # @return [String]
1157
1165
  #
1158
1166
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Condition AWS API Documentation
@@ -1650,11 +1658,12 @@ module Aws::S3
1650
1658
  # @!attribute [rw] etag
1651
1659
  # Returns the ETag of the new object. The ETag reflects only changes
1652
1660
  # to the contents of an object, not its metadata. The source and
1653
- # destination ETag is identical for a successfully copied object.
1661
+ # destination ETag is identical for a successfully copied
1662
+ # non-multipart object.
1654
1663
  # @return [String]
1655
1664
  #
1656
1665
  # @!attribute [rw] last_modified
1657
- # Returns the date that the object was last modified.
1666
+ # Creation date of the object.
1658
1667
  # @return [Time]
1659
1668
  #
1660
1669
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObjectResult AWS API Documentation
@@ -2881,7 +2890,8 @@ module Aws::S3
2881
2890
  # @return [String]
2882
2891
  #
2883
2892
  # @!attribute [rw] key
2884
- # Name of the object key.
2893
+ # The key that identifies the object in the bucket from which to
2894
+ # remove all tags.
2885
2895
  # @return [String]
2886
2896
  #
2887
2897
  # @!attribute [rw] version_id
@@ -4120,6 +4130,14 @@ module Aws::S3
4120
4130
  #
4121
4131
  # @!attribute [rw] key
4122
4132
  # The object key name to use when a 4XX class error occurs.
4133
+ #
4134
+ # Replacement must be made for object keys containing special
4135
+ # characters (such as carriage returns) when using XML requests. For
4136
+ # more information, see [ XML related object key constraints][1].
4137
+ #
4138
+ #
4139
+ #
4140
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
4123
4141
  # @return [String]
4124
4142
  #
4125
4143
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ErrorDocument AWS API Documentation
@@ -5321,7 +5339,7 @@ module Aws::S3
5321
5339
  # @return [String]
5322
5340
  #
5323
5341
  # @!attribute [rw] last_modified
5324
- # Last modified date of the object
5342
+ # Creation date of the object.
5325
5343
  # @return [Time]
5326
5344
  #
5327
5345
  # @!attribute [rw] content_length
@@ -5617,14 +5635,14 @@ module Aws::S3
5617
5635
  # @return [String]
5618
5636
  #
5619
5637
  # @!attribute [rw] sse_customer_algorithm
5620
- # Specifies the algorithm to use to when encrypting the object (for
5638
+ # Specifies the algorithm to use to when decrypting the object (for
5621
5639
  # example, AES256).
5622
5640
  # @return [String]
5623
5641
  #
5624
5642
  # @!attribute [rw] sse_customer_key
5625
- # Specifies the customer-provided encryption key for Amazon S3 to use
5626
- # in encrypting data. This value is used to store the object and then
5627
- # it is discarded; Amazon S3 does not store the encryption key. The
5643
+ # Specifies the customer-provided encryption key for Amazon S3 used to
5644
+ # encrypt the data. This value is used to decrypt the object when
5645
+ # recovering it and must match the one used when storing the data. The
5628
5646
  # key must be appropriate for use with the algorithm specified in the
5629
5647
  # `x-amz-server-side-encryption-customer-algorithm` header.
5630
5648
  # @return [String]
@@ -5794,6 +5812,7 @@ module Aws::S3
5794
5812
  # key: "ObjectKey", # required
5795
5813
  # version_id: "ObjectVersionId",
5796
5814
  # expected_bucket_owner: "AccountId",
5815
+ # request_payer: "requester", # accepts requester
5797
5816
  # }
5798
5817
  #
5799
5818
  # @!attribute [rw] bucket
@@ -5839,13 +5858,26 @@ module Aws::S3
5839
5858
  # (Access Denied)` error.
5840
5859
  # @return [String]
5841
5860
  #
5861
+ # @!attribute [rw] request_payer
5862
+ # Confirms that the requester knows that they will be charged for the
5863
+ # request. Bucket owners need not specify this parameter in their
5864
+ # requests. For information about downloading objects from requester
5865
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
5866
+ # in the *Amazon S3 Developer Guide*.
5867
+ #
5868
+ #
5869
+ #
5870
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
5871
+ # @return [String]
5872
+ #
5842
5873
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTaggingRequest AWS API Documentation
5843
5874
  #
5844
5875
  class GetObjectTaggingRequest < Struct.new(
5845
5876
  :bucket,
5846
5877
  :key,
5847
5878
  :version_id,
5848
- :expected_bucket_owner)
5879
+ :expected_bucket_owner,
5880
+ :request_payer)
5849
5881
  SENSITIVE = []
5850
5882
  include Aws::Structure
5851
5883
  end
@@ -6180,7 +6212,7 @@ module Aws::S3
6180
6212
  # @return [String]
6181
6213
  #
6182
6214
  # @!attribute [rw] last_modified
6183
- # Last modified date of the object
6215
+ # Creation date of the object.
6184
6216
  # @return [Time]
6185
6217
  #
6186
6218
  # @!attribute [rw] content_length
@@ -6578,6 +6610,14 @@ module Aws::S3
6578
6610
  # you make a request to samplebucket/images/ the data that is returned
6579
6611
  # will be for the object with the key name images/index.html) The
6580
6612
  # suffix must not be empty and must not include a slash character.
6613
+ #
6614
+ # Replacement must be made for object keys containing special
6615
+ # characters (such as carriage returns) when using XML requests. For
6616
+ # more information, see [ XML related object key constraints][1].
6617
+ #
6618
+ #
6619
+ #
6620
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
6581
6621
  # @return [String]
6582
6622
  #
6583
6623
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/IndexDocument AWS API Documentation
@@ -6790,6 +6830,14 @@ module Aws::S3
6790
6830
  # @!attribute [rw] prefix
6791
6831
  # An object key name prefix that identifies the subset of objects to
6792
6832
  # which the rule applies.
6833
+ #
6834
+ # Replacement must be made for object keys containing special
6835
+ # characters (such as carriage returns) when using XML requests. For
6836
+ # more information, see [ XML related object key constraints][1].
6837
+ #
6838
+ #
6839
+ #
6840
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
6793
6841
  # @return [String]
6794
6842
  #
6795
6843
  # @!attribute [rw] tag
@@ -7345,6 +7393,14 @@ module Aws::S3
7345
7393
  # @!attribute [rw] prefix
7346
7394
  # Prefix identifying one or more objects to which the rule applies.
7347
7395
  # This is No longer used; use `Filter` instead.
7396
+ #
7397
+ # Replacement must be made for object keys containing special
7398
+ # characters (such as carriage returns) when using XML requests. For
7399
+ # more information, see [ XML related object key constraints][1].
7400
+ #
7401
+ #
7402
+ #
7403
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
7348
7404
  # @return [String]
7349
7405
  #
7350
7406
  # @!attribute [rw] filter
@@ -7470,6 +7526,14 @@ module Aws::S3
7470
7526
  #
7471
7527
  # @!attribute [rw] prefix
7472
7528
  # Prefix identifying one or more objects to which the rule applies.
7529
+ #
7530
+ # Replacement must be made for object keys containing special
7531
+ # characters (such as carriage returns) when using XML requests. For
7532
+ # more information, see [ XML related object key constraints][1].
7533
+ #
7534
+ #
7535
+ #
7536
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
7473
7537
  # @return [String]
7474
7538
  #
7475
7539
  # @!attribute [rw] tag
@@ -8218,8 +8282,8 @@ module Aws::S3
8218
8282
  # @return [Integer]
8219
8283
  #
8220
8284
  # @!attribute [rw] common_prefixes
8221
- # All of the keys rolled up in a common prefix count as a single
8222
- # return when calculating the number of returns.
8285
+ # All of the keys (up to 1,000) rolled up in a common prefix count as
8286
+ # a single return when calculating the number of returns.
8223
8287
  #
8224
8288
  # A response can contain CommonPrefixes only if you specify a
8225
8289
  # delimiter.
@@ -8409,8 +8473,8 @@ module Aws::S3
8409
8473
  # @return [Integer]
8410
8474
  #
8411
8475
  # @!attribute [rw] common_prefixes
8412
- # All of the keys rolled up into a common prefix count as a single
8413
- # return when calculating the number of returns.
8476
+ # All of the keys (up to 1,000) rolled up into a common prefix count
8477
+ # as a single return when calculating the number of returns.
8414
8478
  #
8415
8479
  # A response can contain `CommonPrefixes` only if you specify a
8416
8480
  # delimiter.
@@ -8441,8 +8505,8 @@ module Aws::S3
8441
8505
  #
8442
8506
  # @!attribute [rw] key_count
8443
8507
  # KeyCount is the number of keys returned with this request. KeyCount
8444
- # will always be less than equals to MaxKeys field. Say you ask for 50
8445
- # keys, your result will include less than equals 50 keys
8508
+ # will always be less than or equals to MaxKeys field. Say you ask for
8509
+ # 50 keys, your result will include less than equals 50 keys
8446
8510
  # @return [Integer]
8447
8511
  #
8448
8512
  # @!attribute [rw] continuation_token
@@ -9358,7 +9422,7 @@ module Aws::S3
9358
9422
  # @return [String]
9359
9423
  #
9360
9424
  # @!attribute [rw] last_modified
9361
- # The date the Object was Last Modified
9425
+ # Creation date of the object.
9362
9426
  # @return [Time]
9363
9427
  #
9364
9428
  # @!attribute [rw] etag
@@ -9425,7 +9489,15 @@ module Aws::S3
9425
9489
  # }
9426
9490
  #
9427
9491
  # @!attribute [rw] key
9428
- # Key name of the object to delete.
9492
+ # Key name of the object.
9493
+ #
9494
+ # Replacement must be made for object keys containing special
9495
+ # characters (such as carriage returns) when using XML requests. For
9496
+ # more information, see [ XML related object key constraints][1].
9497
+ #
9498
+ #
9499
+ #
9500
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
9429
9501
  # @return [String]
9430
9502
  #
9431
9503
  # @!attribute [rw] version_id
@@ -11060,9 +11132,9 @@ module Aws::S3
11060
11132
  # @return [String]
11061
11133
  #
11062
11134
  # @!attribute [rw] content_md5
11063
- # &gt;The base64-encoded 128-bit MD5 digest of the data. You must use
11064
- # this header as a message integrity check to verify that the request
11065
- # body was not corrupted in transit. For more information, see [RFC
11135
+ # The base64-encoded 128-bit MD5 digest of the data. You must use this
11136
+ # header as a message integrity check to verify that the request body
11137
+ # was not corrupted in transit. For more information, see [RFC
11066
11138
  # 1864][1].
11067
11139
  #
11068
11140
  # For requests made using the AWS Command Line Interface (CLI) or AWS
@@ -12251,6 +12323,7 @@ module Aws::S3
12251
12323
  # ],
12252
12324
  # },
12253
12325
  # expected_bucket_owner: "AccountId",
12326
+ # request_payer: "requester", # accepts requester
12254
12327
  # }
12255
12328
  #
12256
12329
  # @!attribute [rw] bucket
@@ -12305,6 +12378,18 @@ module Aws::S3
12305
12378
  # (Access Denied)` error.
12306
12379
  # @return [String]
12307
12380
  #
12381
+ # @!attribute [rw] request_payer
12382
+ # Confirms that the requester knows that they will be charged for the
12383
+ # request. Bucket owners need not specify this parameter in their
12384
+ # requests. For information about downloading objects from requester
12385
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
12386
+ # in the *Amazon S3 Developer Guide*.
12387
+ #
12388
+ #
12389
+ #
12390
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
12391
+ # @return [String]
12392
+ #
12308
12393
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTaggingRequest AWS API Documentation
12309
12394
  #
12310
12395
  class PutObjectTaggingRequest < Struct.new(
@@ -12313,7 +12398,8 @@ module Aws::S3
12313
12398
  :version_id,
12314
12399
  :content_md5,
12315
12400
  :tagging,
12316
- :expected_bucket_owner)
12401
+ :expected_bucket_owner,
12402
+ :request_payer)
12317
12403
  SENSITIVE = []
12318
12404
  include Aws::Structure
12319
12405
  end
@@ -12535,6 +12621,14 @@ module Aws::S3
12535
12621
  # `ReplaceKeyPrefixWith` to `/documents`. Not required if one of the
12536
12622
  # siblings is present. Can be present only if `ReplaceKeyWith` is not
12537
12623
  # provided.
12624
+ #
12625
+ # Replacement must be made for object keys containing special
12626
+ # characters (such as carriage returns) when using XML requests. For
12627
+ # more information, see [ XML related object key constraints][1].
12628
+ #
12629
+ #
12630
+ #
12631
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
12538
12632
  # @return [String]
12539
12633
  #
12540
12634
  # @!attribute [rw] replace_key_with
@@ -12542,6 +12636,14 @@ module Aws::S3
12542
12636
  # redirect request to `error.html`. Not required if one of the
12543
12637
  # siblings is present. Can be present only if `ReplaceKeyPrefixWith`
12544
12638
  # is not provided.
12639
+ #
12640
+ # Replacement must be made for object keys containing special
12641
+ # characters (such as carriage returns) when using XML requests. For
12642
+ # more information, see [ XML related object key constraints][1].
12643
+ #
12644
+ #
12645
+ #
12646
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
12545
12647
  # @return [String]
12546
12648
  #
12547
12649
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Redirect AWS API Documentation
@@ -12805,6 +12907,14 @@ module Aws::S3
12805
12907
  # which the rule applies. The maximum prefix length is 1,024
12806
12908
  # characters. To include all objects in a bucket, specify an empty
12807
12909
  # string.
12910
+ #
12911
+ # Replacement must be made for object keys containing special
12912
+ # characters (such as carriage returns) when using XML requests. For
12913
+ # more information, see [ XML related object key constraints][1].
12914
+ #
12915
+ #
12916
+ #
12917
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
12808
12918
  # @return [String]
12809
12919
  #
12810
12920
  # @!attribute [rw] filter
@@ -12946,6 +13056,14 @@ module Aws::S3
12946
13056
  # @!attribute [rw] prefix
12947
13057
  # An object key name prefix that identifies the subset of objects to
12948
13058
  # which the rule applies.
13059
+ #
13060
+ # Replacement must be made for object keys containing special
13061
+ # characters (such as carriage returns) when using XML requests. For
13062
+ # more information, see [ XML related object key constraints][1].
13063
+ #
13064
+ #
13065
+ #
13066
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
12949
13067
  # @return [String]
12950
13068
  #
12951
13069
  # @!attribute [rw] tag
@@ -13492,6 +13610,14 @@ module Aws::S3
13492
13610
  # @!attribute [rw] prefix
13493
13611
  # Object key prefix that identifies one or more objects to which this
13494
13612
  # rule applies.
13613
+ #
13614
+ # Replacement must be made for object keys containing special
13615
+ # characters (such as carriage returns) when using XML requests. For
13616
+ # more information, see [ XML related object key constraints][1].
13617
+ #
13618
+ #
13619
+ #
13620
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints
13495
13621
  # @return [String]
13496
13622
  #
13497
13623
  # @!attribute [rw] status
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.86.2
4
+ version: 1.89.0
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: 2020-12-14 00:00:00.000000000 Z
11
+ date: 2021-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-kms
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.26'
19
+ version: '1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.26'
26
+ version: '1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aws-sigv4
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -47,7 +47,7 @@ dependencies:
47
47
  version: '3'
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 3.109.0
50
+ version: 3.112.0
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,7 +57,7 @@ dependencies:
57
57
  version: '3'
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 3.109.0
60
+ version: 3.112.0
61
61
  description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
62
62
  This gem is part of the AWS SDK for Ruby.
63
63
  email: