aws-sdk-s3 1.167.0 → 1.176.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -723,17 +723,17 @@ module Aws::S3
723
723
  # * To encrypt new object copies to a directory bucket with SSE-KMS, we
724
724
  # recommend you specify SSE-KMS as the directory bucket's default
725
725
  # encryption configuration with a KMS key (specifically, a [customer
726
- # managed key][4]). [Amazon Web Services managed key][5] (`aws/s3`)
727
- # isn't supported. Your SSE-KMS configuration can only support 1
728
- # [customer managed key][4] per directory bucket for the lifetime of
729
- # the bucket. After you specify a customer managed key for SSE-KMS,
730
- # you can't override the customer managed key for the bucket's
731
- # SSE-KMS configuration. Then, when you perform a `CopyObject`
732
- # operation and want to specify server-side encryption settings for
733
- # new object copies with SSE-KMS in the encryption-related request
734
- # headers, you must ensure the encryption key is the same customer
735
- # managed key that you specified for the directory bucket's default
736
- # encryption configuration.
726
+ # managed key][4]). The [Amazon Web Services managed key][5]
727
+ # (`aws/s3`) isn't supported. Your SSE-KMS configuration can only
728
+ # support 1 [customer managed key][4] per directory bucket for the
729
+ # lifetime of the bucket. After you specify a customer managed key for
730
+ # SSE-KMS, you can't override the customer managed key for the
731
+ # bucket's SSE-KMS configuration. Then, when you perform a
732
+ # `CopyObject` operation and want to specify server-side encryption
733
+ # settings for new object copies with SSE-KMS in the
734
+ # encryption-related request headers, you must ensure the encryption
735
+ # key is the same customer managed key that you specified for the
736
+ # directory bucket's default encryption configuration.
737
737
  #
738
738
  #
739
739
  #
@@ -841,14 +841,19 @@ module Aws::S3
841
841
  # Guide*.
842
842
  #
843
843
  # **Directory buckets** - If you specify `x-amz-server-side-encryption`
844
- # with `aws:kms`, you must specify the `
845
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
846
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
847
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
848
- # key ID or key ARN. The key alias format of the KMS key isn't
849
- # supported. Your SSE-KMS configuration can only support 1 [customer
850
- # managed key][2] per directory bucket for the lifetime of the bucket.
851
- # [Amazon Web Services managed key][3] (`aws/s3`) isn't supported.
844
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
845
+ # header is implicitly assigned the ID of the KMS symmetric encryption
846
+ # customer managed key that's configured for your directory bucket's
847
+ # default encryption setting. If you want to specify the `
848
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
849
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
850
+ # customer managed key that's configured for your directory bucket's
851
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
852
+ # Request` error. Only use the key ID or key ARN. The key alias format
853
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
854
+ # support 1 [customer managed key][2] per directory bucket for the
855
+ # lifetime of the bucket. The [Amazon Web Services managed key][3]
856
+ # (`aws/s3`) isn't supported.
852
857
  #
853
858
  #
854
859
  #
@@ -1055,6 +1060,9 @@ module Aws::S3
1055
1060
  # request_payer: "requester", # accepts requester
1056
1061
  # bypass_governance_retention: false,
1057
1062
  # expected_bucket_owner: "AccountId",
1063
+ # if_match: "IfMatch",
1064
+ # if_match_last_modified_time: Time.now,
1065
+ # if_match_size: 1,
1058
1066
  # })
1059
1067
  # @param [Hash] options ({})
1060
1068
  # @option options [String] :mfa
@@ -1101,6 +1109,46 @@ module Aws::S3
1101
1109
  # The account ID of the expected bucket owner. If the account ID that
1102
1110
  # you provide does not match the actual owner of the bucket, the request
1103
1111
  # fails with the HTTP status code `403 Forbidden` (access denied).
1112
+ # @option options [String] :if_match
1113
+ # The `If-Match` header field makes the request method conditional on
1114
+ # ETags. If the ETag value does not match, the operation returns a `412
1115
+ # Precondition Failed` error. If the ETag matches or if the object
1116
+ # doesn't exist, the operation will return a `204 Success (No Content)
1117
+ # response`.
1118
+ #
1119
+ # For more information about conditional requests, see [RFC 7232][1].
1120
+ #
1121
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1122
+ #
1123
+ # </note>
1124
+ #
1125
+ #
1126
+ #
1127
+ # [1]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232
1128
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
1129
+ # If present, the object is deleted only if its modification times
1130
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
1131
+ # match, the operation returns a `412 Precondition Failed` error. If the
1132
+ # `Timestamp` matches or if the object doesn’t exist, the operation
1133
+ # returns a `204 Success (No Content)` response.
1134
+ #
1135
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1136
+ #
1137
+ # </note>
1138
+ # @option options [Integer] :if_match_size
1139
+ # If present, the object is deleted only if its size matches the
1140
+ # provided size in bytes. If the `Size` value does not match, the
1141
+ # operation returns a `412 Precondition Failed` error. If the `Size`
1142
+ # matches or if the object doesn’t exist, the operation returns a `204
1143
+ # Success (No Content)` response.
1144
+ #
1145
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1146
+ #
1147
+ # </note>
1148
+ #
1149
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
1150
+ # `x-amz-if-match-size` conditional headers in conjunction with
1151
+ # each-other or individually.
1104
1152
  # @return [Types::DeleteObjectOutput]
1105
1153
  def delete(options = {})
1106
1154
  options = options.merge(
@@ -1826,14 +1874,19 @@ module Aws::S3
1826
1874
  # Amazon Web Services managed key (`aws/s3`) to protect the data.
1827
1875
  #
1828
1876
  # **Directory buckets** - If you specify `x-amz-server-side-encryption`
1829
- # with `aws:kms`, you must specify the `
1830
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
1831
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
1832
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
1833
- # key ID or key ARN. The key alias format of the KMS key isn't
1834
- # supported. Your SSE-KMS configuration can only support 1 [customer
1835
- # managed key][1] per directory bucket for the lifetime of the bucket.
1836
- # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
1877
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
1878
+ # header is implicitly assigned the ID of the KMS symmetric encryption
1879
+ # customer managed key that's configured for your directory bucket's
1880
+ # default encryption setting. If you want to specify the `
1881
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
1882
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
1883
+ # customer managed key that's configured for your directory bucket's
1884
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
1885
+ # Request` error. Only use the key ID or key ARN. The key alias format
1886
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
1887
+ # support 1 [customer managed key][1] per directory bucket for the
1888
+ # lifetime of the bucket. The [Amazon Web Services managed key][2]
1889
+ # (`aws/s3`) isn't supported.
1837
1890
  #
1838
1891
  #
1839
1892
  #
@@ -1965,11 +2018,13 @@ module Aws::S3
1965
2018
  # checksum_sha1: "ChecksumSHA1",
1966
2019
  # checksum_sha256: "ChecksumSHA256",
1967
2020
  # expires: Time.now,
2021
+ # if_match: "IfMatch",
1968
2022
  # if_none_match: "IfNoneMatch",
1969
2023
  # grant_full_control: "GrantFullControl",
1970
2024
  # grant_read: "GrantRead",
1971
2025
  # grant_read_acp: "GrantReadACP",
1972
2026
  # grant_write_acp: "GrantWriteACP",
2027
+ # write_offset_bytes: 1,
1973
2028
  # metadata: {
1974
2029
  # "MetadataKey" => "MetadataValue",
1975
2030
  # },
@@ -2073,10 +2128,11 @@ module Aws::S3
2073
2128
  # information about REST request authentication, see [REST
2074
2129
  # Authentication][1].
2075
2130
  #
2076
- # <note markdown="1"> The `Content-MD5` header is required for any request to upload an
2077
- # object with a retention period configured using Amazon S3 Object Lock.
2078
- # For more information about Amazon S3 Object Lock, see [Amazon S3
2079
- # Object Lock Overview][2] in the *Amazon S3 User Guide*.
2131
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2132
+ # for any request to upload an object with a retention period configured
2133
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2134
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2135
+ # Guide*.
2080
2136
  #
2081
2137
  # </note>
2082
2138
  #
@@ -2087,7 +2143,7 @@ module Aws::S3
2087
2143
  #
2088
2144
  #
2089
2145
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
2090
- # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html
2146
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
2091
2147
  # @option options [String] :content_type
2092
2148
  # A standard MIME type describing the format of the contents. For more
2093
2149
  # information, see
@@ -2124,14 +2180,21 @@ module Aws::S3
2124
2180
  # provided `ChecksumAlgorithm` parameter and uses the checksum algorithm
2125
2181
  # that matches the provided value in `x-amz-checksum-algorithm `.
2126
2182
  #
2127
- # <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2128
- # is the default checksum algorithm that's used for performance.
2183
+ # <note markdown="1"> The `Content-MD5` or `x-amz-sdk-checksum-algorithm` header is required
2184
+ # for any request to upload an object with a retention period configured
2185
+ # using Amazon S3 Object Lock. For more information, see [Uploading
2186
+ # objects to an Object Lock enabled bucket ][2] in the *Amazon S3 User
2187
+ # Guide*.
2129
2188
  #
2130
2189
  # </note>
2131
2190
  #
2191
+ # For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
2192
+ # is the default checksum algorithm that's used for performance.
2193
+ #
2132
2194
  #
2133
2195
  #
2134
2196
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
2197
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-managing.html#object-lock-put-object
2135
2198
  # @option options [String] :checksum_crc32
2136
2199
  # This header can be used as a data integrity check to verify that the
2137
2200
  # data received is the same data that was originally sent. This header
@@ -2180,6 +2243,25 @@ module Aws::S3
2180
2243
  #
2181
2244
  #
2182
2245
  # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
2246
+ # @option options [String] :if_match
2247
+ # Uploads the object only if the ETag (entity tag) value provided during
2248
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
2249
+ # values do not match, the operation returns a `412 Precondition Failed`
2250
+ # error.
2251
+ #
2252
+ # If a conflicting operation occurs during the upload S3 returns a `409
2253
+ # ConditionalRequestConflict` response. On a 409 failure you should
2254
+ # fetch the object's ETag and retry the upload.
2255
+ #
2256
+ # Expects the ETag value as a string.
2257
+ #
2258
+ # For more information about conditional requests, see [RFC 7232][1], or
2259
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2260
+ #
2261
+ #
2262
+ #
2263
+ # [1]: https://tools.ietf.org/html/rfc7232
2264
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
2183
2265
  # @option options [String] :if_none_match
2184
2266
  # Uploads the object only if the object key name does not already exist
2185
2267
  # in the bucket specified. Otherwise, Amazon S3 returns a `412
@@ -2231,6 +2313,16 @@ module Aws::S3
2231
2313
  # * This functionality is not supported for Amazon S3 on Outposts.
2232
2314
  #
2233
2315
  # </note>
2316
+ # @option options [Integer] :write_offset_bytes
2317
+ # Specifies the offset for appending data to existing objects in bytes.
2318
+ # The offset must be equal to the size of the existing object being
2319
+ # appended to. If no object exists, setting this header to 0 will create
2320
+ # a new object.
2321
+ #
2322
+ # <note markdown="1"> This functionality is only supported for objects in the Amazon S3
2323
+ # Express One Zone storage class in directory buckets.
2324
+ #
2325
+ # </note>
2234
2326
  # @option options [Hash<String,String>] :metadata
2235
2327
  # A map of metadata to store with the object in S3.
2236
2328
  # @option options [String] :server_side_encryption
@@ -2384,14 +2476,19 @@ module Aws::S3
2384
2476
  # Amazon Web Services managed key (`aws/s3`) to protect the data.
2385
2477
  #
2386
2478
  # **Directory buckets** - If you specify `x-amz-server-side-encryption`
2387
- # with `aws:kms`, you must specify the `
2388
- # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
2389
- # ID or Key ARN) of the KMS symmetric encryption customer managed key to
2390
- # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
2391
- # key ID or key ARN. The key alias format of the KMS key isn't
2392
- # supported. Your SSE-KMS configuration can only support 1 [customer
2393
- # managed key][1] per directory bucket for the lifetime of the bucket.
2394
- # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
2479
+ # with `aws:kms`, the ` x-amz-server-side-encryption-aws-kms-key-id`
2480
+ # header is implicitly assigned the ID of the KMS symmetric encryption
2481
+ # customer managed key that's configured for your directory bucket's
2482
+ # default encryption setting. If you want to specify the `
2483
+ # x-amz-server-side-encryption-aws-kms-key-id` header explicitly, you
2484
+ # can only specify it with the ID (Key ID or Key ARN) of the KMS
2485
+ # customer managed key that's configured for your directory bucket's
2486
+ # default encryption setting. Otherwise, you get an HTTP `400 Bad
2487
+ # Request` error. Only use the key ID or key ARN. The key alias format
2488
+ # of the KMS key isn't supported. Your SSE-KMS configuration can only
2489
+ # support 1 [customer managed key][1] per directory bucket for the
2490
+ # lifetime of the bucket. The [Amazon Web Services managed key][2]
2491
+ # (`aws/s3`) isn't supported.
2395
2492
  #
2396
2493
  #
2397
2494
  #
@@ -257,6 +257,9 @@ module Aws::S3
257
257
  # request_payer: "requester", # accepts requester
258
258
  # bypass_governance_retention: false,
259
259
  # expected_bucket_owner: "AccountId",
260
+ # if_match: "IfMatch",
261
+ # if_match_last_modified_time: Time.now,
262
+ # if_match_size: 1,
260
263
  # })
261
264
  # @param [Hash] options ({})
262
265
  # @option options [String] :mfa
@@ -296,6 +299,46 @@ module Aws::S3
296
299
  # The account ID of the expected bucket owner. If the account ID that
297
300
  # you provide does not match the actual owner of the bucket, the request
298
301
  # fails with the HTTP status code `403 Forbidden` (access denied).
302
+ # @option options [String] :if_match
303
+ # The `If-Match` header field makes the request method conditional on
304
+ # ETags. If the ETag value does not match, the operation returns a `412
305
+ # Precondition Failed` error. If the ETag matches or if the object
306
+ # doesn't exist, the operation will return a `204 Success (No Content)
307
+ # response`.
308
+ #
309
+ # For more information about conditional requests, see [RFC 7232][1].
310
+ #
311
+ # <note markdown="1"> This functionality is only supported for directory buckets.
312
+ #
313
+ # </note>
314
+ #
315
+ #
316
+ #
317
+ # [1]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232
318
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
319
+ # If present, the object is deleted only if its modification times
320
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
321
+ # match, the operation returns a `412 Precondition Failed` error. If the
322
+ # `Timestamp` matches or if the object doesn’t exist, the operation
323
+ # returns a `204 Success (No Content)` response.
324
+ #
325
+ # <note markdown="1"> This functionality is only supported for directory buckets.
326
+ #
327
+ # </note>
328
+ # @option options [Integer] :if_match_size
329
+ # If present, the object is deleted only if its size matches the
330
+ # provided size in bytes. If the `Size` value does not match, the
331
+ # operation returns a `412 Precondition Failed` error. If the `Size`
332
+ # matches or if the object doesn’t exist, the operation returns a `204
333
+ # Success (No Content)` response.
334
+ #
335
+ # <note markdown="1"> This functionality is only supported for directory buckets.
336
+ #
337
+ # </note>
338
+ #
339
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
340
+ # `x-amz-if-match-size` conditional headers in conjunction with
341
+ # each-other or individually.
299
342
  # @return [Types::DeleteObjectOutput]
300
343
  def delete(options = {})
301
344
  options = options.merge(
@@ -36,7 +36,7 @@ Parameter to indicate whether S3Express session auth should be disabled
36
36
  class Handler < Seahorse::Client::Handler
37
37
  def call(context)
38
38
  unless context[:discovered_endpoint]
39
- params = parameters_for_operation(context)
39
+ params = Aws::S3::Endpoints.parameters_for_operation(context)
40
40
  endpoint = context.config.endpoint_provider.resolve_endpoint(params)
41
41
 
42
42
  context.http_request.endpoint = endpoint.url
@@ -76,209 +76,6 @@ Parameter to indicate whether S3Express session auth should be disabled
76
76
  context.http_request.headers[key] = value
77
77
  end
78
78
  end
79
-
80
- def parameters_for_operation(context)
81
- case context.operation_name
82
- when :abort_multipart_upload
83
- Aws::S3::Endpoints::AbortMultipartUpload.build(context)
84
- when :complete_multipart_upload
85
- Aws::S3::Endpoints::CompleteMultipartUpload.build(context)
86
- when :copy_object
87
- Aws::S3::Endpoints::CopyObject.build(context)
88
- when :create_bucket
89
- Aws::S3::Endpoints::CreateBucket.build(context)
90
- when :create_multipart_upload
91
- Aws::S3::Endpoints::CreateMultipartUpload.build(context)
92
- when :create_session
93
- Aws::S3::Endpoints::CreateSession.build(context)
94
- when :delete_bucket
95
- Aws::S3::Endpoints::DeleteBucket.build(context)
96
- when :delete_bucket_analytics_configuration
97
- Aws::S3::Endpoints::DeleteBucketAnalyticsConfiguration.build(context)
98
- when :delete_bucket_cors
99
- Aws::S3::Endpoints::DeleteBucketCors.build(context)
100
- when :delete_bucket_encryption
101
- Aws::S3::Endpoints::DeleteBucketEncryption.build(context)
102
- when :delete_bucket_intelligent_tiering_configuration
103
- Aws::S3::Endpoints::DeleteBucketIntelligentTieringConfiguration.build(context)
104
- when :delete_bucket_inventory_configuration
105
- Aws::S3::Endpoints::DeleteBucketInventoryConfiguration.build(context)
106
- when :delete_bucket_lifecycle
107
- Aws::S3::Endpoints::DeleteBucketLifecycle.build(context)
108
- when :delete_bucket_metrics_configuration
109
- Aws::S3::Endpoints::DeleteBucketMetricsConfiguration.build(context)
110
- when :delete_bucket_ownership_controls
111
- Aws::S3::Endpoints::DeleteBucketOwnershipControls.build(context)
112
- when :delete_bucket_policy
113
- Aws::S3::Endpoints::DeleteBucketPolicy.build(context)
114
- when :delete_bucket_replication
115
- Aws::S3::Endpoints::DeleteBucketReplication.build(context)
116
- when :delete_bucket_tagging
117
- Aws::S3::Endpoints::DeleteBucketTagging.build(context)
118
- when :delete_bucket_website
119
- Aws::S3::Endpoints::DeleteBucketWebsite.build(context)
120
- when :delete_object
121
- Aws::S3::Endpoints::DeleteObject.build(context)
122
- when :delete_object_tagging
123
- Aws::S3::Endpoints::DeleteObjectTagging.build(context)
124
- when :delete_objects
125
- Aws::S3::Endpoints::DeleteObjects.build(context)
126
- when :delete_public_access_block
127
- Aws::S3::Endpoints::DeletePublicAccessBlock.build(context)
128
- when :get_bucket_accelerate_configuration
129
- Aws::S3::Endpoints::GetBucketAccelerateConfiguration.build(context)
130
- when :get_bucket_acl
131
- Aws::S3::Endpoints::GetBucketAcl.build(context)
132
- when :get_bucket_analytics_configuration
133
- Aws::S3::Endpoints::GetBucketAnalyticsConfiguration.build(context)
134
- when :get_bucket_cors
135
- Aws::S3::Endpoints::GetBucketCors.build(context)
136
- when :get_bucket_encryption
137
- Aws::S3::Endpoints::GetBucketEncryption.build(context)
138
- when :get_bucket_intelligent_tiering_configuration
139
- Aws::S3::Endpoints::GetBucketIntelligentTieringConfiguration.build(context)
140
- when :get_bucket_inventory_configuration
141
- Aws::S3::Endpoints::GetBucketInventoryConfiguration.build(context)
142
- when :get_bucket_lifecycle
143
- Aws::S3::Endpoints::GetBucketLifecycle.build(context)
144
- when :get_bucket_lifecycle_configuration
145
- Aws::S3::Endpoints::GetBucketLifecycleConfiguration.build(context)
146
- when :get_bucket_location
147
- Aws::S3::Endpoints::GetBucketLocation.build(context)
148
- when :get_bucket_logging
149
- Aws::S3::Endpoints::GetBucketLogging.build(context)
150
- when :get_bucket_metrics_configuration
151
- Aws::S3::Endpoints::GetBucketMetricsConfiguration.build(context)
152
- when :get_bucket_notification
153
- Aws::S3::Endpoints::GetBucketNotification.build(context)
154
- when :get_bucket_notification_configuration
155
- Aws::S3::Endpoints::GetBucketNotificationConfiguration.build(context)
156
- when :get_bucket_ownership_controls
157
- Aws::S3::Endpoints::GetBucketOwnershipControls.build(context)
158
- when :get_bucket_policy
159
- Aws::S3::Endpoints::GetBucketPolicy.build(context)
160
- when :get_bucket_policy_status
161
- Aws::S3::Endpoints::GetBucketPolicyStatus.build(context)
162
- when :get_bucket_replication
163
- Aws::S3::Endpoints::GetBucketReplication.build(context)
164
- when :get_bucket_request_payment
165
- Aws::S3::Endpoints::GetBucketRequestPayment.build(context)
166
- when :get_bucket_tagging
167
- Aws::S3::Endpoints::GetBucketTagging.build(context)
168
- when :get_bucket_versioning
169
- Aws::S3::Endpoints::GetBucketVersioning.build(context)
170
- when :get_bucket_website
171
- Aws::S3::Endpoints::GetBucketWebsite.build(context)
172
- when :get_object
173
- Aws::S3::Endpoints::GetObject.build(context)
174
- when :get_object_acl
175
- Aws::S3::Endpoints::GetObjectAcl.build(context)
176
- when :get_object_attributes
177
- Aws::S3::Endpoints::GetObjectAttributes.build(context)
178
- when :get_object_legal_hold
179
- Aws::S3::Endpoints::GetObjectLegalHold.build(context)
180
- when :get_object_lock_configuration
181
- Aws::S3::Endpoints::GetObjectLockConfiguration.build(context)
182
- when :get_object_retention
183
- Aws::S3::Endpoints::GetObjectRetention.build(context)
184
- when :get_object_tagging
185
- Aws::S3::Endpoints::GetObjectTagging.build(context)
186
- when :get_object_torrent
187
- Aws::S3::Endpoints::GetObjectTorrent.build(context)
188
- when :get_public_access_block
189
- Aws::S3::Endpoints::GetPublicAccessBlock.build(context)
190
- when :head_bucket
191
- Aws::S3::Endpoints::HeadBucket.build(context)
192
- when :head_object
193
- Aws::S3::Endpoints::HeadObject.build(context)
194
- when :list_bucket_analytics_configurations
195
- Aws::S3::Endpoints::ListBucketAnalyticsConfigurations.build(context)
196
- when :list_bucket_intelligent_tiering_configurations
197
- Aws::S3::Endpoints::ListBucketIntelligentTieringConfigurations.build(context)
198
- when :list_bucket_inventory_configurations
199
- Aws::S3::Endpoints::ListBucketInventoryConfigurations.build(context)
200
- when :list_bucket_metrics_configurations
201
- Aws::S3::Endpoints::ListBucketMetricsConfigurations.build(context)
202
- when :list_buckets
203
- Aws::S3::Endpoints::ListBuckets.build(context)
204
- when :list_directory_buckets
205
- Aws::S3::Endpoints::ListDirectoryBuckets.build(context)
206
- when :list_multipart_uploads
207
- Aws::S3::Endpoints::ListMultipartUploads.build(context)
208
- when :list_object_versions
209
- Aws::S3::Endpoints::ListObjectVersions.build(context)
210
- when :list_objects
211
- Aws::S3::Endpoints::ListObjects.build(context)
212
- when :list_objects_v2
213
- Aws::S3::Endpoints::ListObjectsV2.build(context)
214
- when :list_parts
215
- Aws::S3::Endpoints::ListParts.build(context)
216
- when :put_bucket_accelerate_configuration
217
- Aws::S3::Endpoints::PutBucketAccelerateConfiguration.build(context)
218
- when :put_bucket_acl
219
- Aws::S3::Endpoints::PutBucketAcl.build(context)
220
- when :put_bucket_analytics_configuration
221
- Aws::S3::Endpoints::PutBucketAnalyticsConfiguration.build(context)
222
- when :put_bucket_cors
223
- Aws::S3::Endpoints::PutBucketCors.build(context)
224
- when :put_bucket_encryption
225
- Aws::S3::Endpoints::PutBucketEncryption.build(context)
226
- when :put_bucket_intelligent_tiering_configuration
227
- Aws::S3::Endpoints::PutBucketIntelligentTieringConfiguration.build(context)
228
- when :put_bucket_inventory_configuration
229
- Aws::S3::Endpoints::PutBucketInventoryConfiguration.build(context)
230
- when :put_bucket_lifecycle
231
- Aws::S3::Endpoints::PutBucketLifecycle.build(context)
232
- when :put_bucket_lifecycle_configuration
233
- Aws::S3::Endpoints::PutBucketLifecycleConfiguration.build(context)
234
- when :put_bucket_logging
235
- Aws::S3::Endpoints::PutBucketLogging.build(context)
236
- when :put_bucket_metrics_configuration
237
- Aws::S3::Endpoints::PutBucketMetricsConfiguration.build(context)
238
- when :put_bucket_notification
239
- Aws::S3::Endpoints::PutBucketNotification.build(context)
240
- when :put_bucket_notification_configuration
241
- Aws::S3::Endpoints::PutBucketNotificationConfiguration.build(context)
242
- when :put_bucket_ownership_controls
243
- Aws::S3::Endpoints::PutBucketOwnershipControls.build(context)
244
- when :put_bucket_policy
245
- Aws::S3::Endpoints::PutBucketPolicy.build(context)
246
- when :put_bucket_replication
247
- Aws::S3::Endpoints::PutBucketReplication.build(context)
248
- when :put_bucket_request_payment
249
- Aws::S3::Endpoints::PutBucketRequestPayment.build(context)
250
- when :put_bucket_tagging
251
- Aws::S3::Endpoints::PutBucketTagging.build(context)
252
- when :put_bucket_versioning
253
- Aws::S3::Endpoints::PutBucketVersioning.build(context)
254
- when :put_bucket_website
255
- Aws::S3::Endpoints::PutBucketWebsite.build(context)
256
- when :put_object
257
- Aws::S3::Endpoints::PutObject.build(context)
258
- when :put_object_acl
259
- Aws::S3::Endpoints::PutObjectAcl.build(context)
260
- when :put_object_legal_hold
261
- Aws::S3::Endpoints::PutObjectLegalHold.build(context)
262
- when :put_object_lock_configuration
263
- Aws::S3::Endpoints::PutObjectLockConfiguration.build(context)
264
- when :put_object_retention
265
- Aws::S3::Endpoints::PutObjectRetention.build(context)
266
- when :put_object_tagging
267
- Aws::S3::Endpoints::PutObjectTagging.build(context)
268
- when :put_public_access_block
269
- Aws::S3::Endpoints::PutPublicAccessBlock.build(context)
270
- when :restore_object
271
- Aws::S3::Endpoints::RestoreObject.build(context)
272
- when :select_object_content
273
- Aws::S3::Endpoints::SelectObjectContent.build(context)
274
- when :upload_part
275
- Aws::S3::Endpoints::UploadPart.build(context)
276
- when :upload_part_copy
277
- Aws::S3::Endpoints::UploadPartCopy.build(context)
278
- when :write_get_object_response
279
- Aws::S3::Endpoints::WriteGetObjectResponse.build(context)
280
- end
281
- end
282
79
  end
283
80
 
284
81
  def add_handlers(handlers, _config)
@@ -71,9 +71,9 @@ module Aws
71
71
 
72
72
  def check_for_error(context)
73
73
  xml = context.http_response.body_contents
74
- if xml.match(/\?>\s*<Error>/)
75
- error_code = xml.match(/<Code>(.+?)<\/Code>/)[1]
76
- error_message = xml.match(/<Message>(.+?)<\/Message>/)[1]
74
+ if xml.match(/<\?xml\s[^>]*\?>\s*<Error>/)
75
+ error_code = xml.match(%r{<Code>(.+?)</Code>})[1]
76
+ error_message = xml.match(%r{<Message>(.+?)</Message>})[1]
77
77
  S3::Errors.error_class(error_code).new(context, error_message)
78
78
  elsif incomplete_xml_body?(xml, context.operation.output)
79
79
  Seahorse::Client::NetworkingError.new(
@@ -238,6 +238,7 @@ module Aws
238
238
  credentials_provider: context[:sigv4_credentials] || context.config.credentials,
239
239
  signing_algorithm: scheme_name.to_sym,
240
240
  uri_escape_path: !!!auth_scheme['disableDoubleEncoding'],
241
+ normalize_path: !!!auth_scheme['disableNormalizePath'],
241
242
  unsigned_headers: unsigned_headers,
242
243
  apply_checksum_header: false
243
244
  )
@@ -43,11 +43,11 @@ module Aws::S3
43
43
  # create_bucket_configuration: {
44
44
  # location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-south-2, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
45
45
  # location: {
46
- # type: "AvailabilityZone", # accepts AvailabilityZone
46
+ # type: "AvailabilityZone", # accepts AvailabilityZone, LocalZone
47
47
  # name: "LocationNameAsString",
48
48
  # },
49
49
  # bucket: {
50
- # data_redundancy: "SingleAvailabilityZone", # accepts SingleAvailabilityZone
50
+ # data_redundancy: "SingleAvailabilityZone", # accepts SingleAvailabilityZone, SingleLocalZone
51
51
  # type: "Directory", # accepts Directory
52
52
  # },
53
53
  # },
@@ -75,13 +75,14 @@ module Aws::S3
75
75
  #
76
76
  # <b>Directory buckets </b> - When you use this operation with a
77
77
  # directory bucket, you must use path-style requests in the format
78
- # `https://s3express-control.region_code.amazonaws.com/bucket-name `.
78
+ # `https://s3express-control.region-code.amazonaws.com/bucket-name `.
79
79
  # Virtual-hosted-style requests aren't supported. Directory bucket
80
- # names must be unique in the chosen Availability Zone. Bucket names
81
- # must also follow the format ` bucket_base_name--az_id--x-s3` (for
82
- # example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
83
- # bucket naming restrictions, see [Directory bucket naming rules][2] in
84
- # the *Amazon S3 User Guide*
80
+ # names must be unique in the chosen Zone (Availability Zone or Local
81
+ # Zone). Bucket names must also follow the format `
82
+ # bucket-base-name--zone-id--x-s3` (for example, `
83
+ # DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
84
+ # naming restrictions, see [Directory bucket naming rules][2] in the
85
+ # *Amazon S3 User Guide*
85
86
  #
86
87
  #
87
88
  #
@@ -188,8 +189,32 @@ module Aws::S3
188
189
 
189
190
  # @example Request syntax with placeholder values
190
191
  #
191
- # s3.buckets()
192
+ # buckets = s3.buckets({
193
+ # prefix: "Prefix",
194
+ # bucket_region: "BucketRegion",
195
+ # })
192
196
  # @param [Hash] options ({})
197
+ # @option options [String] :prefix
198
+ # Limits the response to bucket names that begin with the specified
199
+ # bucket name prefix.
200
+ # @option options [String] :bucket_region
201
+ # Limits the response to buckets that are located in the specified
202
+ # Amazon Web Services Region. The Amazon Web Services Region must be
203
+ # expressed according to the Amazon Web Services Region code, such as
204
+ # `us-west-2` for the US West (Oregon) Region. For a list of the valid
205
+ # values for all of the Amazon Web Services Regions, see [Regions and
206
+ # Endpoints][1].
207
+ #
208
+ # <note markdown="1"> Requests made to a Regional endpoint that is different from the
209
+ # `bucket-region` parameter are not supported. For example, if you want
210
+ # to limit the response to your buckets in Region `us-west-2`, the
211
+ # request must be made to an endpoint in Region `us-west-2`.
212
+ #
213
+ # </note>
214
+ #
215
+ #
216
+ #
217
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
193
218
  # @return [Bucket::Collection]
194
219
  def buckets(options = {})
195
220
  batches = Enumerator.new do |y|