aws-sdk-s3 1.79.0 → 1.82.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-s3.rb +2 -1
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +62 -0
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +71 -0
- data/lib/aws-sdk-s3/bucket.rb +34 -3
- data/lib/aws-sdk-s3/bucket_acl.rb +5 -0
- data/lib/aws-sdk-s3/bucket_cors.rb +12 -1
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +12 -1
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +12 -1
- data/lib/aws-sdk-s3/bucket_logging.rb +5 -0
- data/lib/aws-sdk-s3/bucket_notification.rb +5 -0
- data/lib/aws-sdk-s3/bucket_policy.rb +12 -1
- data/lib/aws-sdk-s3/bucket_request_payment.rb +5 -0
- data/lib/aws-sdk-s3/bucket_tagging.rb +12 -1
- data/lib/aws-sdk-s3/bucket_versioning.rb +15 -0
- data/lib/aws-sdk-s3/bucket_website.rb +12 -1
- data/lib/aws-sdk-s3/client.rb +1753 -555
- data/lib/aws-sdk-s3/client_api.rb +87 -0
- data/lib/aws-sdk-s3/customizations/bucket.rb +7 -4
- data/lib/aws-sdk-s3/multipart_upload.rb +15 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +63 -6
- data/lib/aws-sdk-s3/object.rb +97 -14
- data/lib/aws-sdk-s3/object_acl.rb +5 -0
- data/lib/aws-sdk-s3/object_summary.rb +92 -10
- data/lib/aws-sdk-s3/object_version.rb +22 -2
- data/lib/aws-sdk-s3/plugins/arn.rb +187 -0
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +0 -2
- data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +29 -7
- data/lib/aws-sdk-s3/presigned_post.rb +1 -0
- data/lib/aws-sdk-s3/presigner.rb +1 -0
- data/lib/aws-sdk-s3/types.rb +1296 -147
- metadata +7 -5
- data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -212
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e842f232d7e50f3e6f5a12aeecd8c1efc1cee2171e92944b773f8b66de1379f5
|
4
|
+
data.tar.gz: f30436b18bccb7cb2d20f8c024c55ea6192638d34089fd43bfef7092e1b1096e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a0e7f3d81929759b8b9e17c83f9212c40145da665b9b146061a2e6ff6b8ac6b97028d10529fedfbc561be344561098d61c8c0428b60df525dd8265f28879728
|
7
|
+
data.tar.gz: 39403a36b6fadea6ae1c9a4b029650761dc3fbee30db41fd450694dfc1f5a2297fb8012f85f82e418fff52c63e4b36ba6ecc7facb0e5629cd09725b737c659cc
|
data/lib/aws-sdk-s3.rb
CHANGED
@@ -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.
|
72
|
+
GEM_VERSION = '1.82.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
|
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -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,6 +359,7 @@ 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
|
@@ -474,7 +486,7 @@ module Aws::S3
|
|
474
486
|
# encrypting data. This value is used to store the object and then it is
|
475
487
|
# discarded; Amazon S3 does not store the encryption key. The key must
|
476
488
|
# be appropriate for use with the algorithm specified in the
|
477
|
-
# `x-amz-server-side
|
489
|
+
# `x-amz-server-side-encryption-customer-algorithm` header.
|
478
490
|
# @option options [String] :sse_customer_key_md5
|
479
491
|
# Specifies the 128-bit MD5 digest of the encryption key according to
|
480
492
|
# RFC 1321. Amazon S3 uses this header for a message integrity check to
|
@@ -519,6 +531,10 @@ module Aws::S3
|
|
519
531
|
#
|
520
532
|
#
|
521
533
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
534
|
+
# @option options [String] :expected_bucket_owner
|
535
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
536
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
537
|
+
# Denied)` error.
|
522
538
|
# @return [Object]
|
523
539
|
def put_object(options = {})
|
524
540
|
options = options.merge(bucket: @name)
|
@@ -580,6 +596,7 @@ module Aws::S3
|
|
580
596
|
# key_marker: "KeyMarker",
|
581
597
|
# prefix: "Prefix",
|
582
598
|
# upload_id_marker: "UploadIdMarker",
|
599
|
+
# expected_bucket_owner: "AccountId",
|
583
600
|
# })
|
584
601
|
# @param [Hash] options ({})
|
585
602
|
# @option options [String] :delimiter
|
@@ -622,6 +639,10 @@ module Aws::S3
|
|
622
639
|
# uploads for a key equal to the key-marker might be included in the
|
623
640
|
# list only if they have an upload ID lexicographically greater than the
|
624
641
|
# specified `upload-id-marker`.
|
642
|
+
# @option options [String] :expected_bucket_owner
|
643
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
644
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
645
|
+
# Denied)` error.
|
625
646
|
# @return [MultipartUpload::Collection]
|
626
647
|
def multipart_uploads(options = {})
|
627
648
|
batches = Enumerator.new do |y|
|
@@ -670,6 +691,7 @@ module Aws::S3
|
|
670
691
|
# key_marker: "KeyMarker",
|
671
692
|
# prefix: "Prefix",
|
672
693
|
# version_id_marker: "VersionIdMarker",
|
694
|
+
# expected_bucket_owner: "AccountId",
|
673
695
|
# })
|
674
696
|
# @param [Hash] options ({})
|
675
697
|
# @option options [String] :delimiter
|
@@ -697,6 +719,10 @@ module Aws::S3
|
|
697
719
|
# result under CommonPrefixes.
|
698
720
|
# @option options [String] :version_id_marker
|
699
721
|
# Specifies the object version you want to start listing from.
|
722
|
+
# @option options [String] :expected_bucket_owner
|
723
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
724
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
725
|
+
# Denied)` error.
|
700
726
|
# @return [ObjectVersion::Collection]
|
701
727
|
def object_versions(options = {})
|
702
728
|
batches = Enumerator.new do |y|
|
@@ -728,6 +754,7 @@ module Aws::S3
|
|
728
754
|
# fetch_owner: false,
|
729
755
|
# start_after: "StartAfter",
|
730
756
|
# request_payer: "requester", # accepts requester
|
757
|
+
# expected_bucket_owner: "AccountId",
|
731
758
|
# })
|
732
759
|
# @param [Hash] options ({})
|
733
760
|
# @option options [String] :delimiter
|
@@ -748,6 +775,10 @@ module Aws::S3
|
|
748
775
|
# Confirms that the requester knows that she or he will be charged for
|
749
776
|
# the list objects request in V2 style. Bucket owners need not specify
|
750
777
|
# this parameter in their requests.
|
778
|
+
# @option options [String] :expected_bucket_owner
|
779
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
780
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
781
|
+
# Denied)` error.
|
751
782
|
# @return [ObjectSummary::Collection]
|
752
783
|
def objects(options = {})
|
753
784
|
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)
|
@@ -203,12 +203,17 @@ module Aws::S3
|
|
203
203
|
# },
|
204
204
|
# },
|
205
205
|
# content_md5: "ContentMD5",
|
206
|
+
# expected_bucket_owner: "AccountId",
|
206
207
|
# })
|
207
208
|
# @param [Hash] options ({})
|
208
209
|
# @option options [required, Types::BucketLoggingStatus] :bucket_logging_status
|
209
210
|
# Container for logging status information.
|
210
211
|
# @option options [String] :content_md5
|
211
212
|
# The MD5 hash of the `PutBucketLogging` request body.
|
213
|
+
# @option options [String] :expected_bucket_owner
|
214
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
215
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
216
|
+
# Denied)` error.
|
212
217
|
# @return [EmptyStructure]
|
213
218
|
def put(options = {})
|
214
219
|
options = options.merge(bucket: @bucket_name)
|
@@ -245,12 +245,17 @@ module Aws::S3
|
|
245
245
|
# },
|
246
246
|
# ],
|
247
247
|
# },
|
248
|
+
# expected_bucket_owner: "AccountId",
|
248
249
|
# })
|
249
250
|
# @param [Hash] options ({})
|
250
251
|
# @option options [required, Types::NotificationConfiguration] :notification_configuration
|
251
252
|
# A container for specifying the notification configuration of the
|
252
253
|
# bucket. If this element is empty, notifications are turned off for the
|
253
254
|
# bucket.
|
255
|
+
# @option options [String] :expected_bucket_owner
|
256
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
257
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
258
|
+
# Denied)` error.
|
254
259
|
# @return [EmptyStructure]
|
255
260
|
def put(options = {})
|
256
261
|
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_policy.delete(
|
179
|
+
# bucket_policy.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)
|
@@ -191,6 +197,7 @@ module Aws::S3
|
|
191
197
|
# content_md5: "ContentMD5",
|
192
198
|
# confirm_remove_self_bucket_access: false,
|
193
199
|
# policy: "Policy", # required
|
200
|
+
# expected_bucket_owner: "AccountId",
|
194
201
|
# })
|
195
202
|
# @param [Hash] options ({})
|
196
203
|
# @option options [String] :content_md5
|
@@ -200,6 +207,10 @@ module Aws::S3
|
|
200
207
|
# permissions to change this bucket policy in the future.
|
201
208
|
# @option options [required, String] :policy
|
202
209
|
# The bucket policy as a JSON document.
|
210
|
+
# @option options [String] :expected_bucket_owner
|
211
|
+
# The account id of the expected bucket owner. If the bucket is owned by
|
212
|
+
# a different account, the request will fail with an HTTP `403 (Access
|
213
|
+
# Denied)` error.
|
203
214
|
# @return [EmptyStructure]
|
204
215
|
def put(options = {})
|
205
216
|
options = options.merge(bucket: @bucket_name)
|