aws-sdk-s3 1.79.1 → 1.83.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da602f15baa7e2102b675dc8b13aae19954e04df5be6120a09b634a69b195043
4
- data.tar.gz: 8667cc19707dc6da21e9483904c9f652b9e665ae82f86599a54a52a29e3a1e40
3
+ metadata.gz: 27e8142d94b3b51ad2725ffab43afcc4bbd80562eb8370ae34dd5833001e850f
4
+ data.tar.gz: a8ca9825f4ec5e42f6c126d41e3073c618525082a0e07196073d4bd68bc5c0de
5
5
  SHA512:
6
- metadata.gz: 0a7baa7b2490bd556dc00d6a08218fd071f688d9a7b870e43b8dd73dd930677df899d2cc24e642f48bbb2e8f9f3fca0866613905777bf41b2a7b0373c2724a88
7
- data.tar.gz: ecc4134f3f59c49f7f195029639e236022a6702af191074da6a7cbede7f406db0d465fb364e87a314ea51675af85e75d585985aac0720a8e6e596e915af4aaa8
6
+ metadata.gz: 6ede8e603a7ae101eb9e3eaec06dddb179654f73ce1df05a7eeee4629a2a48c0feef529b6a0a6cf35508c2666e02df6414b215c7631c07cd83303aaf8e16b127
7
+ data.tar.gz: 05fa2eb62aa82394adf13d2262faf9a29c685ca001316e8001b6c760e534a1e736c4663564ef2f75f074abea8cd5f4956e6063569ce7200d062afd2684a03f82
@@ -7,6 +7,7 @@
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
+
10
11
  require 'aws-sdk-kms'
11
12
  require 'aws-sigv4'
12
13
  require 'aws-sdk-core'
@@ -68,6 +69,6 @@ require_relative 'aws-sdk-s3/event_streams'
68
69
  # @!group service
69
70
  module Aws::S3
70
71
 
71
- GEM_VERSION = '1.79.1'
72
+ GEM_VERSION = '1.83.0'
72
73
 
73
74
  end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ module S3
5
+ # @api private
6
+ class AccessPointARN < Aws::ARN
7
+ def initialize(options)
8
+ super(options)
9
+ @type, @access_point_name, @extra = @resource.split(/[:,\/]/)
10
+ end
11
+
12
+ attr_reader :access_point_name
13
+
14
+ def support_dualstack?
15
+ true
16
+ end
17
+
18
+ def support_fips?
19
+ true
20
+ end
21
+
22
+ def validate_arn!
23
+ unless @service == 's3'
24
+ raise ArgumentError, 'Must provide a valid S3 accesspoint ARN.'
25
+ end
26
+
27
+ if @region.empty? || @account_id.empty?
28
+ raise ArgumentError,
29
+ 'S3 accesspoint ARNs must contain both a region '\
30
+ 'and an account id.'
31
+ end
32
+
33
+ if @type != 'accesspoint'
34
+ raise ArgumentError, 'Invalid ARN, resource format is not correct'
35
+ end
36
+
37
+ if @access_point_name.nil? || @access_point_name.empty?
38
+ raise ArgumentError, 'Missing ARN accesspoint name.'
39
+ end
40
+
41
+ if @extra
42
+ raise ArgumentError,
43
+ 'ARN accesspoint resource must be a single value.'
44
+ end
45
+
46
+ unless Seahorse::Util.host_label?(
47
+ "#{@access_point_name}-#{@account_id}"
48
+ )
49
+ raise ArgumentError,
50
+ "#{@access_point_name}-#{@account_id} is not a valid "\
51
+ 'host label.'
52
+ end
53
+ end
54
+
55
+ def host_url(region, dualstack = false)
56
+ sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region)
57
+ "#{@access_point_name}-#{@account_id}"\
58
+ ".s3-accesspoint#{'.dualstack' if dualstack}.#{region}.#{sfx}"
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Aws
4
+ module S3
5
+ # @api private
6
+ class OutpostAccessPointARN < Aws::ARN
7
+ def initialize(options)
8
+ super(options)
9
+ @type, @outpost_id, @subtype, @access_point_name, @extra =
10
+ @resource.split(/[:,\/]/)
11
+ end
12
+
13
+ attr_reader :outpost_id, :access_point_name
14
+
15
+ def support_dualstack?
16
+ false
17
+ end
18
+
19
+ def support_fips?
20
+ false
21
+ end
22
+
23
+ def validate_arn!
24
+ unless @service == 's3-outposts'
25
+ raise ArgumentError, 'Must provide a valid S3 outposts ARN.'
26
+ end
27
+
28
+ if @region.empty? || @account_id.empty?
29
+ raise ArgumentError,
30
+ 'S3 accesspoint ARNs must contain both a region '\
31
+ 'and an account id.'
32
+ end
33
+
34
+ if @type != 'outpost' && @subtype != 'accesspoint'
35
+ raise ArgumentError, 'Invalid ARN, resource format is not correct'
36
+ end
37
+
38
+ if @outpost_id.nil? || @outpost_id.empty?
39
+ raise ArgumentError, 'Missing ARN outpost id.'
40
+ end
41
+
42
+ if @access_point_name.nil? || @access_point_name.empty?
43
+ raise ArgumentError, 'Missing ARN accesspoint name.'
44
+ end
45
+
46
+ if @extra
47
+ raise ArgumentError,
48
+ 'ARN accesspoint resource must be a single value.'
49
+ end
50
+
51
+ unless Seahorse::Util.host_label?(
52
+ "#{@access_point_name}-#{@account_id}"
53
+ )
54
+ raise ArgumentError,
55
+ "#{@access_point_name}-#{@account_id} is not a valid "\
56
+ 'host label.'
57
+ end
58
+
59
+ unless Seahorse::Util.host_label?(@outpost_id)
60
+ raise ArgumentError, "#{@outpost_id} is not a valid host label."
61
+ end
62
+ end
63
+
64
+ # Outpost ARNs currently do not support dualstack
65
+ def host_url(region, _dualstack = false)
66
+ "#{@access_point_name}-#{@account_id}.#{@outpost_id}"\
67
+ ".s3-outposts.#{region}.amazonaws.com"
68
+ end
69
+ end
70
+ end
71
+ end
@@ -260,8 +260,14 @@ module Aws::S3
260
260
 
261
261
  # @example Request syntax with placeholder values
262
262
  #
263
- # bucket.delete()
263
+ # bucket.delete({
264
+ # expected_bucket_owner: "AccountId",
265
+ # })
264
266
  # @param [Hash] options ({})
267
+ # @option options [String] :expected_bucket_owner
268
+ # The account id of the expected bucket owner. If the bucket is owned by
269
+ # a different account, the request will fail with an HTTP `403 (Access
270
+ # Denied)` error.
265
271
  # @return [EmptyStructure]
266
272
  def delete(options = {})
267
273
  options = options.merge(bucket: @name)
@@ -284,6 +290,7 @@ module Aws::S3
284
290
  # mfa: "MFA",
285
291
  # request_payer: "requester", # accepts requester
286
292
  # bypass_governance_retention: false,
293
+ # expected_bucket_owner: "AccountId",
287
294
  # })
288
295
  # @param [Hash] options ({})
289
296
  # @option options [required, Types::Delete] :delete
@@ -307,6 +314,10 @@ module Aws::S3
307
314
  # Specifies whether you want to delete this object even if it has a
308
315
  # Governance-type Object Lock in place. You must have sufficient
309
316
  # permissions to perform this operation.
317
+ # @option options [String] :expected_bucket_owner
318
+ # The account id of the expected bucket owner. If the bucket is owned by
319
+ # a different account, the request will fail with an HTTP `403 (Access
320
+ # Denied)` error.
310
321
  # @return [Types::DeleteObjectsOutput]
311
322
  def delete_objects(options = {})
312
323
  options = options.merge(bucket: @name)
@@ -336,7 +347,7 @@ module Aws::S3
336
347
  # "MetadataKey" => "MetadataValue",
337
348
  # },
338
349
  # server_side_encryption: "AES256", # accepts AES256, aws:kms
339
- # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
350
+ # storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE, OUTPOSTS
340
351
  # website_redirect_location: "WebsiteRedirectLocation",
341
352
  # sse_customer_algorithm: "SSECustomerAlgorithm",
342
353
  # sse_customer_key: "SSECustomerKey",
@@ -348,12 +359,15 @@ module Aws::S3
348
359
  # object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
349
360
  # object_lock_retain_until_date: Time.now,
350
361
  # object_lock_legal_hold_status: "ON", # accepts ON, OFF
362
+ # expected_bucket_owner: "AccountId",
351
363
  # })
352
364
  # @param [Hash] options ({})
353
365
  # @option options [String] :acl
354
366
  # The canned ACL to apply to the object. For more information, see
355
367
  # [Canned ACL][1].
356
368
  #
369
+ # This action is not supported by Amazon S3 on Outposts.
370
+ #
357
371
  #
358
372
  #
359
373
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
@@ -425,12 +439,20 @@ module Aws::S3
425
439
  # @option options [String] :grant_full_control
426
440
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
427
441
  # object.
442
+ #
443
+ # This action is not supported by Amazon S3 on Outposts.
428
444
  # @option options [String] :grant_read
429
445
  # Allows grantee to read the object data and its metadata.
446
+ #
447
+ # This action is not supported by Amazon S3 on Outposts.
430
448
  # @option options [String] :grant_read_acp
431
449
  # Allows grantee to read the object ACL.
450
+ #
451
+ # This action is not supported by Amazon S3 on Outposts.
432
452
  # @option options [String] :grant_write_acp
433
453
  # Allows grantee to write the ACL for the applicable object.
454
+ #
455
+ # This action is not supported by Amazon S3 on Outposts.
434
456
  # @option options [required, String] :key
435
457
  # Object key for which the PUT operation was initiated.
436
458
  # @option options [Hash<String,String>] :metadata
@@ -439,8 +461,16 @@ module Aws::S3
439
461
  # The server-side encryption algorithm used when storing this object in
440
462
  # Amazon S3 (for example, AES256, aws:kms).
441
463
  # @option options [String] :storage_class
442
- # If you don't specify, S3 Standard is the default storage class.
443
- # Amazon S3 supports other storage classes.
464
+ # By default, Amazon S3 uses the STANDARD Storage Class to store newly
465
+ # created objects. The STANDARD storage class provides high durability
466
+ # and high availability. Depending on performance needs, you can specify
467
+ # a different Storage Class. Amazon S3 on Outposts only uses the
468
+ # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
469
+ # in the *Amazon S3 Service Developer Guide*.
470
+ #
471
+ #
472
+ #
473
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html
444
474
  # @option options [String] :website_redirect_location
445
475
  # If the bucket is configured as a website, redirects requests for this
446
476
  # object to another object in the same bucket or to an external URL.
@@ -474,7 +504,7 @@ module Aws::S3
474
504
  # encrypting data. This value is used to store the object and then it is
475
505
  # discarded; Amazon S3 does not store the encryption key. The key must
476
506
  # be appropriate for use with the algorithm specified in the
477
- # `x-amz-server-side​-encryption​-customer-algorithm` header.
507
+ # `x-amz-server-side-encryption-customer-algorithm` header.
478
508
  # @option options [String] :sse_customer_key_md5
479
509
  # Specifies the 128-bit MD5 digest of the encryption key according to
480
510
  # RFC 1321. Amazon S3 uses this header for a message integrity check to
@@ -519,6 +549,10 @@ module Aws::S3
519
549
  #
520
550
  #
521
551
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
552
+ # @option options [String] :expected_bucket_owner
553
+ # The account id of the expected bucket owner. If the bucket is owned by
554
+ # a different account, the request will fail with an HTTP `403 (Access
555
+ # Denied)` error.
522
556
  # @return [Object]
523
557
  def put_object(options = {})
524
558
  options = options.merge(bucket: @name)
@@ -580,6 +614,7 @@ module Aws::S3
580
614
  # key_marker: "KeyMarker",
581
615
  # prefix: "Prefix",
582
616
  # upload_id_marker: "UploadIdMarker",
617
+ # expected_bucket_owner: "AccountId",
583
618
  # })
584
619
  # @param [Hash] options ({})
585
620
  # @option options [String] :delimiter
@@ -622,6 +657,10 @@ module Aws::S3
622
657
  # uploads for a key equal to the key-marker might be included in the
623
658
  # list only if they have an upload ID lexicographically greater than the
624
659
  # specified `upload-id-marker`.
660
+ # @option options [String] :expected_bucket_owner
661
+ # The account id of the expected bucket owner. If the bucket is owned by
662
+ # a different account, the request will fail with an HTTP `403 (Access
663
+ # Denied)` error.
625
664
  # @return [MultipartUpload::Collection]
626
665
  def multipart_uploads(options = {})
627
666
  batches = Enumerator.new do |y|
@@ -670,6 +709,7 @@ module Aws::S3
670
709
  # key_marker: "KeyMarker",
671
710
  # prefix: "Prefix",
672
711
  # version_id_marker: "VersionIdMarker",
712
+ # expected_bucket_owner: "AccountId",
673
713
  # })
674
714
  # @param [Hash] options ({})
675
715
  # @option options [String] :delimiter
@@ -697,6 +737,10 @@ module Aws::S3
697
737
  # result under CommonPrefixes.
698
738
  # @option options [String] :version_id_marker
699
739
  # Specifies the object version you want to start listing from.
740
+ # @option options [String] :expected_bucket_owner
741
+ # The account id of the expected bucket owner. If the bucket is owned by
742
+ # a different account, the request will fail with an HTTP `403 (Access
743
+ # Denied)` error.
700
744
  # @return [ObjectVersion::Collection]
701
745
  def object_versions(options = {})
702
746
  batches = Enumerator.new do |y|
@@ -728,6 +772,7 @@ module Aws::S3
728
772
  # fetch_owner: false,
729
773
  # start_after: "StartAfter",
730
774
  # request_payer: "requester", # accepts requester
775
+ # expected_bucket_owner: "AccountId",
731
776
  # })
732
777
  # @param [Hash] options ({})
733
778
  # @option options [String] :delimiter
@@ -748,6 +793,10 @@ module Aws::S3
748
793
  # Confirms that the requester knows that she or he will be charged for
749
794
  # the list objects request in V2 style. Bucket owners need not specify
750
795
  # this parameter in their requests.
796
+ # @option options [String] :expected_bucket_owner
797
+ # The account id of the expected bucket owner. If the bucket is owned by
798
+ # a different account, the request will fail with an HTTP `403 (Access
799
+ # Denied)` error.
751
800
  # @return [ObjectSummary::Collection]
752
801
  def objects(options = {})
753
802
  batches = Enumerator.new do |y|
@@ -208,6 +208,7 @@ module Aws::S3
208
208
  # grant_read_acp: "GrantReadACP",
209
209
  # grant_write: "GrantWrite",
210
210
  # grant_write_acp: "GrantWriteACP",
211
+ # expected_bucket_owner: "AccountId",
211
212
  # })
212
213
  # @param [Hash] options ({})
213
214
  # @option options [String] :acl
@@ -235,6 +236,10 @@ module Aws::S3
235
236
  # bucket.
236
237
  # @option options [String] :grant_write_acp
237
238
  # Allows grantee to write the ACL for the applicable bucket.
239
+ # @option options [String] :expected_bucket_owner
240
+ # The account id of the expected bucket owner. If the bucket is owned by
241
+ # a different account, the request will fail with an HTTP `403 (Access
242
+ # Denied)` error.
238
243
  # @return [EmptyStructure]
239
244
  def put(options = {})
240
245
  options = options.merge(bucket: @bucket_name)
@@ -177,8 +177,14 @@ module Aws::S3
177
177
 
178
178
  # @example Request syntax with placeholder values
179
179
  #
180
- # bucket_cors.delete()
180
+ # bucket_cors.delete({
181
+ # expected_bucket_owner: "AccountId",
182
+ # })
181
183
  # @param [Hash] options ({})
184
+ # @option options [String] :expected_bucket_owner
185
+ # The account id of the expected bucket owner. If the bucket is owned by
186
+ # a different account, the request will fail with an HTTP `403 (Access
187
+ # Denied)` error.
182
188
  # @return [EmptyStructure]
183
189
  def delete(options = {})
184
190
  options = options.merge(bucket: @bucket_name)
@@ -201,6 +207,7 @@ module Aws::S3
201
207
  # ],
202
208
  # },
203
209
  # content_md5: "ContentMD5",
210
+ # expected_bucket_owner: "AccountId",
204
211
  # })
205
212
  # @param [Hash] options ({})
206
213
  # @option options [required, Types::CORSConfiguration] :cors_configuration
@@ -220,6 +227,10 @@ module Aws::S3
220
227
  #
221
228
  #
222
229
  # [1]: http://www.ietf.org/rfc/rfc1864.txt
230
+ # @option options [String] :expected_bucket_owner
231
+ # The account id of the expected bucket owner. If the bucket is owned by
232
+ # a different account, the request will fail with an HTTP `403 (Access
233
+ # Denied)` error.
223
234
  # @return [EmptyStructure]
224
235
  def put(options = {})
225
236
  options = options.merge(bucket: @bucket_name)
@@ -176,8 +176,14 @@ module Aws::S3
176
176
 
177
177
  # @example Request syntax with placeholder values
178
178
  #
179
- # bucket_lifecycle.delete()
179
+ # bucket_lifecycle.delete({
180
+ # expected_bucket_owner: "AccountId",
181
+ # })
180
182
  # @param [Hash] options ({})
183
+ # @option options [String] :expected_bucket_owner
184
+ # The account id of the expected bucket owner. If the bucket is owned by
185
+ # a different account, the request will fail with an HTTP `403 (Access
186
+ # Denied)` error.
181
187
  # @return [EmptyStructure]
182
188
  def delete(options = {})
183
189
  options = options.merge(bucket: @bucket_name)
@@ -218,10 +224,15 @@ module Aws::S3
218
224
  # },
219
225
  # ],
220
226
  # },
227
+ # expected_bucket_owner: "AccountId",
221
228
  # })
222
229
  # @param [Hash] options ({})
223
230
  # @option options [String] :content_md5
224
231
  # @option options [Types::LifecycleConfiguration] :lifecycle_configuration
232
+ # @option options [String] :expected_bucket_owner
233
+ # The account id of the expected bucket owner. If the bucket is owned by
234
+ # a different account, the request will fail with an HTTP `403 (Access
235
+ # Denied)` error.
225
236
  # @return [EmptyStructure]
226
237
  def put(options = {})
227
238
  options = options.merge(bucket: @bucket_name)
@@ -176,8 +176,14 @@ module Aws::S3
176
176
 
177
177
  # @example Request syntax with placeholder values
178
178
  #
179
- # bucket_lifecycle_configuration.delete()
179
+ # bucket_lifecycle_configuration.delete({
180
+ # expected_bucket_owner: "AccountId",
181
+ # })
180
182
  # @param [Hash] options ({})
183
+ # @option options [String] :expected_bucket_owner
184
+ # The account id of the expected bucket owner. If the bucket is owned by
185
+ # a different account, the request will fail with an HTTP `403 (Access
186
+ # Denied)` error.
181
187
  # @return [EmptyStructure]
182
188
  def delete(options = {})
183
189
  options = options.merge(bucket: @bucket_name)
@@ -237,10 +243,15 @@ module Aws::S3
237
243
  # },
238
244
  # ],
239
245
  # },
246
+ # expected_bucket_owner: "AccountId",
240
247
  # })
241
248
  # @param [Hash] options ({})
242
249
  # @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
243
250
  # Container for lifecycle rules. You can add as many as 1,000 rules.
251
+ # @option options [String] :expected_bucket_owner
252
+ # The account id of the expected bucket owner. If the bucket is owned by
253
+ # a different account, the request will fail with an HTTP `403 (Access
254
+ # Denied)` error.
244
255
  # @return [EmptyStructure]
245
256
  def put(options = {})
246
257
  options = options.merge(bucket: @bucket_name)