aws-sdk-s3 1.143.0 → 1.145.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 +4 -4
- data/CHANGELOG.md +15 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +3 -0
- data/lib/aws-sdk-s3/client.rb +223 -238
- data/lib/aws-sdk-s3/endpoint_provider.rb +6 -6
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +3 -2
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +3 -2
- data/lib/aws-sdk-s3/resource.rb +1 -1
- data/lib/aws-sdk-s3/types.rb +55 -36
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +2 -2
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -561,7 +561,7 @@ module Aws::S3
|
|
561
561
|
# are not supported. Directory bucket names must be unique in the chosen
|
562
562
|
# Availability Zone. Bucket names must follow the format `
|
563
563
|
# bucket_base_name--az-id--x-s3` (for example, `
|
564
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
564
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
565
565
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
566
566
|
# *Amazon S3 User Guide*.
|
567
567
|
#
|
@@ -699,8 +699,8 @@ module Aws::S3
|
|
699
699
|
# error).
|
700
700
|
#
|
701
701
|
# Note that if `CompleteMultipartUpload` fails, applications should be
|
702
|
-
# prepared to retry
|
703
|
-
# [Amazon S3 Error Best Practices][3].
|
702
|
+
# prepared to retry any failed requests (including 500 error responses).
|
703
|
+
# For more information, see [Amazon S3 Error Best Practices][3].
|
704
704
|
#
|
705
705
|
# You can't use `Content-Type: application/x-www-form-urlencoded` for
|
706
706
|
# the CompleteMultipartUpload requests. Also, if you don't provide a
|
@@ -812,7 +812,7 @@ module Aws::S3
|
|
812
812
|
# are not supported. Directory bucket names must be unique in the chosen
|
813
813
|
# Availability Zone. Bucket names must follow the format `
|
814
814
|
# bucket_base_name--az-id--x-s3` (for example, `
|
815
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
815
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
816
816
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
817
817
|
# *Amazon S3 User Guide*.
|
818
818
|
#
|
@@ -1094,11 +1094,14 @@ module Aws::S3
|
|
1094
1094
|
#
|
1095
1095
|
# Both the Region that you want to copy the object from and the Region
|
1096
1096
|
# that you want to copy the object to must be enabled for your account.
|
1097
|
+
# For more information about how to enable a Region for your account,
|
1098
|
+
# see [Enable or disable a Region for standalone accounts][3] in the
|
1099
|
+
# *Amazon Web Services Account Management Guide*.
|
1097
1100
|
#
|
1098
1101
|
# Amazon S3 transfer acceleration does not support cross-Region copies.
|
1099
1102
|
# If you request a cross-Region copy using a transfer acceleration
|
1100
1103
|
# endpoint, you get a `400 Bad Request` error. For more information, see
|
1101
|
-
# [Transfer Acceleration][
|
1104
|
+
# [Transfer Acceleration][4].
|
1102
1105
|
#
|
1103
1106
|
# Authentication and authorization
|
1104
1107
|
#
|
@@ -1106,7 +1109,7 @@ module Aws::S3
|
|
1106
1109
|
# IAM credentials (access key ID and secret access key for the IAM
|
1107
1110
|
# identities). All headers with the `x-amz-` prefix, including
|
1108
1111
|
# `x-amz-copy-source`, must be signed. For more information, see [REST
|
1109
|
-
# Authentication][
|
1112
|
+
# Authentication][5].
|
1110
1113
|
#
|
1111
1114
|
# **Directory buckets** - You must use the IAM credentials to
|
1112
1115
|
# authenticate and authorize your access to the `CopyObject` API
|
@@ -1130,7 +1133,7 @@ module Aws::S3
|
|
1130
1133
|
# source object that is being copied.
|
1131
1134
|
#
|
1132
1135
|
# * If the destination bucket is a general purpose bucket, you must
|
1133
|
-
# have <b> <code>s3:
|
1136
|
+
# have <b> <code>s3:PutObject</code> </b> permission to write the
|
1134
1137
|
# object copy to the destination bucket.
|
1135
1138
|
#
|
1136
1139
|
# * **Directory bucket permissions** - You must have permissions in a
|
@@ -1152,9 +1155,9 @@ module Aws::S3
|
|
1152
1155
|
# set to `ReadOnly` on the copy destination bucket.
|
1153
1156
|
#
|
1154
1157
|
# For example policies, see [Example bucket policies for S3 Express
|
1155
|
-
# One Zone][
|
1158
|
+
# One Zone][6] and [Amazon Web Services Identity and Access
|
1156
1159
|
# Management (IAM) identity-based policies for S3 Express One
|
1157
|
-
# Zone][
|
1160
|
+
# Zone][7] in the *Amazon S3 User Guide*.
|
1158
1161
|
#
|
1159
1162
|
# Response and special errors
|
1160
1163
|
#
|
@@ -1178,14 +1181,13 @@ module Aws::S3
|
|
1178
1181
|
# response is embedded in the `200 OK` response. For example, in a
|
1179
1182
|
# cross-region copy, you may encounter throttling and receive a
|
1180
1183
|
# `200 OK` response. For more information, see [Resolve the Error
|
1181
|
-
# 200 response when copying objects to Amazon
|
1182
|
-
#
|
1183
|
-
#
|
1184
|
-
#
|
1185
|
-
#
|
1186
|
-
#
|
1187
|
-
#
|
1188
|
-
# is successfully received and processed.
|
1184
|
+
# 200 response when copying objects to Amazon S3][8]. The `200 OK`
|
1185
|
+
# status code means the copy was accepted, but it doesn't mean
|
1186
|
+
# the copy is complete. Another example is when you disconnect
|
1187
|
+
# from Amazon S3 before the copy is complete, Amazon S3 might
|
1188
|
+
# cancel the copy and you may receive a `200 OK` response. You
|
1189
|
+
# must stay connected to Amazon S3 until the entire response is
|
1190
|
+
# successfully received and processed.
|
1189
1191
|
#
|
1190
1192
|
# If you call this API operation directly, make sure to design
|
1191
1193
|
# your application to parse the content of the response and handle
|
@@ -1201,8 +1203,9 @@ module Aws::S3
|
|
1201
1203
|
# : The copy request charge is based on the storage class and Region
|
1202
1204
|
# that you specify for the destination object. The request can also
|
1203
1205
|
# result in a data retrieval charge for the source if the source
|
1204
|
-
# storage class bills for data retrieval.
|
1205
|
-
#
|
1206
|
+
# storage class bills for data retrieval. If the copy source is in a
|
1207
|
+
# different region, the data transfer is billed to the copy source
|
1208
|
+
# account. For pricing information, see [Amazon S3 pricing][9].
|
1206
1209
|
#
|
1207
1210
|
# HTTP Host header syntax
|
1208
1211
|
#
|
@@ -1211,21 +1214,23 @@ module Aws::S3
|
|
1211
1214
|
#
|
1212
1215
|
# The following operations are related to `CopyObject`:
|
1213
1216
|
#
|
1214
|
-
# * [PutObject][
|
1217
|
+
# * [PutObject][10]
|
1215
1218
|
#
|
1216
|
-
# * [GetObject][
|
1219
|
+
# * [GetObject][11]
|
1217
1220
|
#
|
1218
1221
|
#
|
1219
1222
|
#
|
1220
1223
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html
|
1221
1224
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
1222
|
-
# [3]: https://docs.aws.amazon.com/
|
1223
|
-
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/
|
1224
|
-
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/
|
1225
|
-
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-
|
1226
|
-
# [7]:
|
1227
|
-
# [8]: https://
|
1228
|
-
# [9]:
|
1225
|
+
# [3]: https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-regions.html#manage-acct-regions-enable-standalone
|
1226
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html
|
1227
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
1228
|
+
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
|
1229
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
|
1230
|
+
# [8]: https://repost.aws/knowledge-center/s3-resolve-200-internalerror
|
1231
|
+
# [9]: http://aws.amazon.com/s3/pricing/
|
1232
|
+
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
|
1233
|
+
# [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
|
1229
1234
|
#
|
1230
1235
|
# @option params [String] :acl
|
1231
1236
|
# The canned access control list (ACL) to apply to the object.
|
@@ -1269,7 +1274,7 @@ module Aws::S3
|
|
1269
1274
|
# are not supported. Directory bucket names must be unique in the chosen
|
1270
1275
|
# Availability Zone. Bucket names must follow the format `
|
1271
1276
|
# bucket_base_name--az-id--x-s3` (for example, `
|
1272
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
1277
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
1273
1278
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
1274
1279
|
# *Amazon S3 User Guide*.
|
1275
1280
|
#
|
@@ -2092,22 +2097,31 @@ module Aws::S3
|
|
2092
2097
|
# includes the `x-amz-object-ownership` header, then the
|
2093
2098
|
# `s3:PutBucketOwnershipControls` permission is required.
|
2094
2099
|
#
|
2095
|
-
#
|
2096
|
-
#
|
2097
|
-
#
|
2098
|
-
#
|
2099
|
-
#
|
2100
|
-
#
|
2101
|
-
#
|
2100
|
+
# To set an ACL on a bucket as part of a `CreateBucket` request,
|
2101
|
+
# you must explicitly set S3 Object Ownership for the bucket to a
|
2102
|
+
# different value than the default, `BucketOwnerEnforced`.
|
2103
|
+
# Additionally, if your desired bucket ACL grants public access,
|
2104
|
+
# you must first create the bucket (without the bucket ACL) and
|
2105
|
+
# then explicitly disable Block Public Access on the bucket before
|
2106
|
+
# using `PutBucketAcl` to set the ACL. If you try to create a
|
2107
|
+
# bucket with a public ACL, the request will fail.
|
2108
|
+
#
|
2109
|
+
# For the majority of modern use cases in S3, we recommend that
|
2110
|
+
# you keep all Block Public Access settings enabled and keep ACLs
|
2111
|
+
# disabled. If you would like to share data with users outside of
|
2112
|
+
# your account, you can use bucket policies as needed. For more
|
2113
|
+
# information, see [Controlling ownership of objects and disabling
|
2114
|
+
# ACLs for your bucket ][5] and [Blocking public access to your
|
2115
|
+
# Amazon S3 storage ][6] in the *Amazon S3 User Guide*.
|
2102
2116
|
#
|
2103
2117
|
# * **S3 Block Public Access** - If your specific use case requires
|
2104
2118
|
# granting public access to your S3 resources, you can disable
|
2105
2119
|
# Block Public Access. Specifically, you can create a new bucket
|
2106
2120
|
# with Block Public Access enabled, then separately call the [
|
2107
|
-
# `DeletePublicAccessBlock` ][
|
2121
|
+
# `DeletePublicAccessBlock` ][7] API. To use this operation, you
|
2108
2122
|
# must have the `s3:PutBucketPublicAccessBlock` permission. For
|
2109
2123
|
# more information about S3 Block Public Access, see [Blocking
|
2110
|
-
# public access to your Amazon S3 storage ][
|
2124
|
+
# public access to your Amazon S3 storage ][6] in the *Amazon S3
|
2111
2125
|
# User Guide*.
|
2112
2126
|
#
|
2113
2127
|
# * **Directory bucket permissions** - You must have the
|
@@ -2149,9 +2163,9 @@ module Aws::S3
|
|
2149
2163
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html
|
2150
2164
|
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
|
2151
2165
|
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
2152
|
-
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-ownership
|
2153
|
-
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/
|
2154
|
-
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/
|
2166
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
2167
|
+
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html
|
2168
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html
|
2155
2169
|
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
|
2156
2170
|
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html
|
2157
2171
|
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-one-zone.html#s3-express-features
|
@@ -2178,7 +2192,7 @@ module Aws::S3
|
|
2178
2192
|
# Virtual-hosted-style requests aren't supported. Directory bucket
|
2179
2193
|
# names must be unique in the chosen Availability Zone. Bucket names
|
2180
2194
|
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
2181
|
-
# example, ` DOC-EXAMPLE-BUCKET--usw2-
|
2195
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
2182
2196
|
# bucket naming restrictions, see [Directory bucket naming rules][2] in
|
2183
2197
|
# the *Amazon S3 User Guide*
|
2184
2198
|
#
|
@@ -2277,33 +2291,33 @@ module Aws::S3
|
|
2277
2291
|
# * {Types::CreateBucketOutput#location #location} => String
|
2278
2292
|
#
|
2279
2293
|
#
|
2280
|
-
# @example Example: To create a bucket
|
2294
|
+
# @example Example: To create a bucket in a specific region
|
2281
2295
|
#
|
2282
|
-
# # The following example creates a bucket.
|
2296
|
+
# # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
|
2283
2297
|
#
|
2284
2298
|
# resp = client.create_bucket({
|
2285
2299
|
# bucket: "examplebucket",
|
2300
|
+
# create_bucket_configuration: {
|
2301
|
+
# location_constraint: "eu-west-1",
|
2302
|
+
# },
|
2286
2303
|
# })
|
2287
2304
|
#
|
2288
2305
|
# resp.to_h outputs the following:
|
2289
2306
|
# {
|
2290
|
-
# location: "/
|
2307
|
+
# location: "http://examplebucket.<Region>.s3.amazonaws.com/",
|
2291
2308
|
# }
|
2292
2309
|
#
|
2293
|
-
# @example Example: To create a bucket
|
2310
|
+
# @example Example: To create a bucket
|
2294
2311
|
#
|
2295
|
-
# # The following example creates a bucket.
|
2312
|
+
# # The following example creates a bucket.
|
2296
2313
|
#
|
2297
2314
|
# resp = client.create_bucket({
|
2298
2315
|
# bucket: "examplebucket",
|
2299
|
-
# create_bucket_configuration: {
|
2300
|
-
# location_constraint: "eu-west-1",
|
2301
|
-
# },
|
2302
2316
|
# })
|
2303
2317
|
#
|
2304
2318
|
# resp.to_h outputs the following:
|
2305
2319
|
# {
|
2306
|
-
# location: "
|
2320
|
+
# location: "/examplebucket",
|
2307
2321
|
# }
|
2308
2322
|
#
|
2309
2323
|
# @example Request syntax with placeholder values
|
@@ -2588,7 +2602,7 @@ module Aws::S3
|
|
2588
2602
|
# are not supported. Directory bucket names must be unique in the chosen
|
2589
2603
|
# Availability Zone. Bucket names must follow the format `
|
2590
2604
|
# bucket_base_name--az-id--x-s3` (for example, `
|
2591
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
2605
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
2592
2606
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
2593
2607
|
# *Amazon S3 User Guide*.
|
2594
2608
|
#
|
@@ -3350,7 +3364,7 @@ module Aws::S3
|
|
3350
3364
|
# Virtual-hosted-style requests aren't supported. Directory bucket
|
3351
3365
|
# names must be unique in the chosen Availability Zone. Bucket names
|
3352
3366
|
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
3353
|
-
# example, ` DOC-EXAMPLE-BUCKET--usw2-
|
3367
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
3354
3368
|
# bucket naming restrictions, see [Directory bucket naming rules][1] in
|
3355
3369
|
# the *Amazon S3 User Guide*
|
3356
3370
|
#
|
@@ -3979,7 +3993,7 @@ module Aws::S3
|
|
3979
3993
|
# Virtual-hosted-style requests aren't supported. Directory bucket
|
3980
3994
|
# names must be unique in the chosen Availability Zone. Bucket names
|
3981
3995
|
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
3982
|
-
# example, ` DOC-EXAMPLE-BUCKET--usw2-
|
3996
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
3983
3997
|
# bucket naming restrictions, see [Directory bucket naming rules][1] in
|
3984
3998
|
# the *Amazon S3 User Guide*
|
3985
3999
|
#
|
@@ -4222,15 +4236,26 @@ module Aws::S3
|
|
4222
4236
|
# Removes an object from a bucket. The behavior depends on the bucket's
|
4223
4237
|
# versioning state:
|
4224
4238
|
#
|
4225
|
-
# * If versioning is enabled, the operation
|
4226
|
-
# there is one) of an object and inserts a delete marker, which
|
4227
|
-
# becomes the latest version of the object. If there isn't a null
|
4228
|
-
# version, Amazon S3 does not remove any objects but will still
|
4229
|
-
# respond that the command was successful.
|
4230
|
-
#
|
4231
|
-
# * If versioning is suspended or not enabled, the operation permanently
|
4239
|
+
# * If bucket versioning is not enabled, the operation permanently
|
4232
4240
|
# deletes the object.
|
4233
4241
|
#
|
4242
|
+
# * If bucket versioning is enabled, the operation inserts a delete
|
4243
|
+
# marker, which becomes the current version of the object. To
|
4244
|
+
# permanently delete an object in a versioned bucket, you must include
|
4245
|
+
# the object’s `versionId` in the request. For more information about
|
4246
|
+
# versioning-enabled buckets, see [Deleting object versions from a
|
4247
|
+
# versioning-enabled bucket][1].
|
4248
|
+
#
|
4249
|
+
# * If bucket versioning is suspended, the operation removes the object
|
4250
|
+
# that has a null `versionId`, if there is one, and inserts a delete
|
4251
|
+
# marker that becomes the current version of the object. If there
|
4252
|
+
# isn't an object with a null `versionId`, and all versions of the
|
4253
|
+
# object have a `versionId`, Amazon S3 does not remove the object and
|
4254
|
+
# only inserts a delete marker. To permanently delete an object that
|
4255
|
+
# has a `versionId`, you must include the object’s `versionId` in the
|
4256
|
+
# request. For more information about versioning-suspended buckets,
|
4257
|
+
# see [Deleting objects from versioning-suspended buckets][2].
|
4258
|
+
#
|
4234
4259
|
# <note markdown="1"> * **Directory buckets** - S3 Versioning isn't enabled and supported
|
4235
4260
|
# for directory buckets. For this API operation, only the `null` value
|
4236
4261
|
# of the version ID is supported by directory buckets. You can only
|
@@ -4241,7 +4266,7 @@ module Aws::S3
|
|
4241
4266
|
# endpoints support virtual-hosted-style requests in the format
|
4242
4267
|
# `https://bucket_name.s3express-az_id.region.amazonaws.com/key-name
|
4243
4268
|
# `. Path-style requests are not supported. For more information, see
|
4244
|
-
# [Regional and Zonal endpoints][
|
4269
|
+
# [Regional and Zonal endpoints][3] in the *Amazon S3 User Guide*.
|
4245
4270
|
#
|
4246
4271
|
# </note>
|
4247
4272
|
#
|
@@ -4254,8 +4279,8 @@ module Aws::S3
|
|
4254
4279
|
# versioning configuration is MFA Delete enabled, you must include the
|
4255
4280
|
# `x-amz-mfa` request header in the DELETE `versionId` request. Requests
|
4256
4281
|
# that include `x-amz-mfa` must use HTTPS. For more information about
|
4257
|
-
# MFA Delete, see [Using MFA Delete][
|
4258
|
-
# To see sample requests that use versioning, see [Sample Request][
|
4282
|
+
# MFA Delete, see [Using MFA Delete][4] in the *Amazon S3 User Guide*.
|
4283
|
+
# To see sample requests that use versioning, see [Sample Request][5].
|
4259
4284
|
#
|
4260
4285
|
# <note markdown="1"> **Directory buckets** - MFA delete is not supported by directory
|
4261
4286
|
# buckets.
|
@@ -4263,7 +4288,7 @@ module Aws::S3
|
|
4263
4288
|
# </note>
|
4264
4289
|
#
|
4265
4290
|
# You can delete objects by explicitly calling DELETE Object or calling
|
4266
|
-
# ([PutBucketLifecycle][
|
4291
|
+
# ([PutBucketLifecycle][6]) to enable Amazon S3 to remove them for you.
|
4267
4292
|
# If you want to block users or accounts from removing or deleting
|
4268
4293
|
# objects from your bucket, you must deny them the `s3:DeleteObject`,
|
4269
4294
|
# `s3:DeleteObjectVersion`, and `s3:PutLifeCycleConfiguration` actions.
|
@@ -4282,12 +4307,12 @@ module Aws::S3
|
|
4282
4307
|
# a bucket, you must always have the `s3:DeleteObject` permission.
|
4283
4308
|
#
|
4284
4309
|
# * <b> <code>s3:DeleteObjectVersion</code> </b> - To delete a
|
4285
|
-
# specific version of an object from a
|
4310
|
+
# specific version of an object from a versioning-enabled bucket,
|
4286
4311
|
# you must have the `s3:DeleteObjectVersion` permission.
|
4287
4312
|
#
|
4288
4313
|
# * **Directory bucket permissions** - To grant access to this API
|
4289
4314
|
# operation on a directory bucket, we recommend that you use the [
|
4290
|
-
# `CreateSession` ][
|
4315
|
+
# `CreateSession` ][7] API operation for session-based
|
4291
4316
|
# authorization. Specifically, you grant the
|
4292
4317
|
# `s3express:CreateSession` permission to the directory bucket in a
|
4293
4318
|
# bucket policy or an IAM identity-based policy. Then, you make the
|
@@ -4298,7 +4323,7 @@ module Aws::S3
|
|
4298
4323
|
# token for use. Amazon Web Services CLI or SDKs create session and
|
4299
4324
|
# refresh the session token automatically to avoid service
|
4300
4325
|
# interruptions when a session expires. For more information about
|
4301
|
-
# authorization, see [ `CreateSession` ][
|
4326
|
+
# authorization, see [ `CreateSession` ][7].
|
4302
4327
|
#
|
4303
4328
|
# HTTP Host header syntax
|
4304
4329
|
#
|
@@ -4307,18 +4332,20 @@ module Aws::S3
|
|
4307
4332
|
#
|
4308
4333
|
# The following action is related to `DeleteObject`:
|
4309
4334
|
#
|
4310
|
-
# * [PutObject][
|
4335
|
+
# * [PutObject][8]
|
4311
4336
|
#
|
4312
4337
|
# ^
|
4313
4338
|
#
|
4314
4339
|
#
|
4315
4340
|
#
|
4316
|
-
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/
|
4317
|
-
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/
|
4318
|
-
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/
|
4319
|
-
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/
|
4320
|
-
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
4321
|
-
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
4341
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html
|
4342
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectsfromVersioningSuspendedBuckets.html
|
4343
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
4344
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html
|
4345
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete
|
4346
|
+
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html
|
4347
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
4348
|
+
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
|
4322
4349
|
#
|
4323
4350
|
# @option params [required, String] :bucket
|
4324
4351
|
# The bucket name of the bucket containing the object.
|
@@ -4329,7 +4356,7 @@ module Aws::S3
|
|
4329
4356
|
# are not supported. Directory bucket names must be unique in the chosen
|
4330
4357
|
# Availability Zone. Bucket names must follow the format `
|
4331
4358
|
# bucket_base_name--az-id--x-s3` (for example, `
|
4332
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
4359
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
4333
4360
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
4334
4361
|
# *Amazon S3 User Guide*.
|
4335
4362
|
#
|
@@ -4720,7 +4747,7 @@ module Aws::S3
|
|
4720
4747
|
# are not supported. Directory bucket names must be unique in the chosen
|
4721
4748
|
# Availability Zone. Bucket names must follow the format `
|
4722
4749
|
# bucket_base_name--az-id--x-s3` (for example, `
|
4723
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
4750
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
4724
4751
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
4725
4752
|
# *Amazon S3 User Guide*.
|
4726
4753
|
#
|
@@ -4854,22 +4881,20 @@ module Aws::S3
|
|
4854
4881
|
# * {Types::DeleteObjectsOutput#errors #errors} => Array<Types::Error>
|
4855
4882
|
#
|
4856
4883
|
#
|
4857
|
-
# @example Example: To delete multiple
|
4884
|
+
# @example Example: To delete multiple objects from a versioned bucket
|
4858
4885
|
#
|
4859
|
-
# # The following example deletes objects from a bucket. The
|
4860
|
-
# #
|
4886
|
+
# # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
|
4887
|
+
# # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
|
4861
4888
|
#
|
4862
4889
|
# resp = client.delete_objects({
|
4863
4890
|
# bucket: "examplebucket",
|
4864
4891
|
# delete: {
|
4865
4892
|
# objects: [
|
4866
4893
|
# {
|
4867
|
-
# key: "
|
4868
|
-
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4894
|
+
# key: "objectkey1",
|
4869
4895
|
# },
|
4870
4896
|
# {
|
4871
|
-
# key: "
|
4872
|
-
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4897
|
+
# key: "objectkey2",
|
4873
4898
|
# },
|
4874
4899
|
# ],
|
4875
4900
|
# quiet: false,
|
@@ -4880,30 +4905,34 @@ module Aws::S3
|
|
4880
4905
|
# {
|
4881
4906
|
# deleted: [
|
4882
4907
|
# {
|
4883
|
-
#
|
4884
|
-
#
|
4908
|
+
# delete_marker: true,
|
4909
|
+
# delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
|
4910
|
+
# key: "objectkey1",
|
4885
4911
|
# },
|
4886
4912
|
# {
|
4887
|
-
#
|
4888
|
-
#
|
4913
|
+
# delete_marker: true,
|
4914
|
+
# delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
|
4915
|
+
# key: "objectkey2",
|
4889
4916
|
# },
|
4890
4917
|
# ],
|
4891
4918
|
# }
|
4892
4919
|
#
|
4893
|
-
# @example Example: To delete multiple
|
4920
|
+
# @example Example: To delete multiple object versions from a versioned bucket
|
4894
4921
|
#
|
4895
|
-
# # The following example deletes objects from a bucket. The
|
4896
|
-
# #
|
4922
|
+
# # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
|
4923
|
+
# # versions and returns the key and versions of deleted objects in the response.
|
4897
4924
|
#
|
4898
4925
|
# resp = client.delete_objects({
|
4899
4926
|
# bucket: "examplebucket",
|
4900
4927
|
# delete: {
|
4901
4928
|
# objects: [
|
4902
4929
|
# {
|
4903
|
-
# key: "
|
4930
|
+
# key: "HappyFace.jpg",
|
4931
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4904
4932
|
# },
|
4905
4933
|
# {
|
4906
|
-
# key: "
|
4934
|
+
# key: "HappyFace.jpg",
|
4935
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4907
4936
|
# },
|
4908
4937
|
# ],
|
4909
4938
|
# quiet: false,
|
@@ -4914,14 +4943,12 @@ module Aws::S3
|
|
4914
4943
|
# {
|
4915
4944
|
# deleted: [
|
4916
4945
|
# {
|
4917
|
-
#
|
4918
|
-
#
|
4919
|
-
# key: "objectkey1",
|
4946
|
+
# key: "HappyFace.jpg",
|
4947
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4920
4948
|
# },
|
4921
4949
|
# {
|
4922
|
-
#
|
4923
|
-
#
|
4924
|
-
# key: "objectkey2",
|
4950
|
+
# key: "HappyFace.jpg",
|
4951
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4925
4952
|
# },
|
4926
4953
|
# ],
|
4927
4954
|
# }
|
@@ -5781,13 +5808,16 @@ module Aws::S3
|
|
5781
5808
|
# </note>
|
5782
5809
|
#
|
5783
5810
|
# <note markdown="1"> Bucket lifecycle configuration now supports specifying a lifecycle
|
5784
|
-
# rule using an object key name prefix, one or more object tags,
|
5785
|
-
# combination of
|
5786
|
-
# API. The
|
5787
|
-
#
|
5788
|
-
#
|
5789
|
-
#
|
5790
|
-
#
|
5811
|
+
# rule using an object key name prefix, one or more object tags, object
|
5812
|
+
# size, or any combination of these. Accordingly, this section describes
|
5813
|
+
# the latest API. The previous version of the API supported filtering
|
5814
|
+
# based only on an object key name prefix, which is supported for
|
5815
|
+
# backward compatibility. For the related API description, see
|
5816
|
+
# [GetBucketLifecycle][1]. Accordingly, this section describes the
|
5817
|
+
# latest API. The response describes the new filter element that you can
|
5818
|
+
# use to specify a filter to select a subset of objects to which the
|
5819
|
+
# rule applies. If you are using a previous version of the lifecycle
|
5820
|
+
# configuration, it still works. For the earlier action,
|
5791
5821
|
#
|
5792
5822
|
# </note>
|
5793
5823
|
#
|
@@ -6547,7 +6577,7 @@ module Aws::S3
|
|
6547
6577
|
# Virtual-hosted-style requests aren't supported. Directory bucket
|
6548
6578
|
# names must be unique in the chosen Availability Zone. Bucket names
|
6549
6579
|
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
6550
|
-
# example, ` DOC-EXAMPLE-BUCKET--usw2-
|
6580
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
6551
6581
|
# bucket naming restrictions, see [Directory bucket naming rules][1] in
|
6552
6582
|
# the *Amazon S3 User Guide*
|
6553
6583
|
#
|
@@ -7302,7 +7332,7 @@ module Aws::S3
|
|
7302
7332
|
# are not supported. Directory bucket names must be unique in the chosen
|
7303
7333
|
# Availability Zone. Bucket names must follow the format `
|
7304
7334
|
# bucket_base_name--az-id--x-s3` (for example, `
|
7305
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
7335
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
7306
7336
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
7307
7337
|
# *Amazon S3 User Guide*.
|
7308
7338
|
#
|
@@ -7626,49 +7656,49 @@ module Aws::S3
|
|
7626
7656
|
# * {Types::GetObjectOutput#object_lock_legal_hold_status #object_lock_legal_hold_status} => String
|
7627
7657
|
#
|
7628
7658
|
#
|
7629
|
-
# @example Example: To retrieve
|
7659
|
+
# @example Example: To retrieve an object
|
7630
7660
|
#
|
7631
|
-
# # The following example retrieves an object for an S3 bucket.
|
7632
|
-
# # specific byte range.
|
7661
|
+
# # The following example retrieves an object for an S3 bucket.
|
7633
7662
|
#
|
7634
7663
|
# resp = client.get_object({
|
7635
7664
|
# bucket: "examplebucket",
|
7636
|
-
# key: "
|
7637
|
-
# range: "bytes=0-9",
|
7665
|
+
# key: "HappyFace.jpg",
|
7638
7666
|
# })
|
7639
7667
|
#
|
7640
7668
|
# resp.to_h outputs the following:
|
7641
7669
|
# {
|
7642
7670
|
# accept_ranges: "bytes",
|
7643
|
-
# content_length:
|
7644
|
-
#
|
7645
|
-
#
|
7646
|
-
#
|
7647
|
-
# last_modified: Time.parse("Thu, 09 Oct 2014 22:57:28 GMT"),
|
7671
|
+
# content_length: 3191,
|
7672
|
+
# content_type: "image/jpeg",
|
7673
|
+
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
7674
|
+
# last_modified: Time.parse("Thu, 15 Dec 2016 01:19:41 GMT"),
|
7648
7675
|
# metadata: {
|
7649
7676
|
# },
|
7677
|
+
# tag_count: 2,
|
7650
7678
|
# version_id: "null",
|
7651
7679
|
# }
|
7652
7680
|
#
|
7653
|
-
# @example Example: To retrieve an object
|
7681
|
+
# @example Example: To retrieve a byte range of an object
|
7654
7682
|
#
|
7655
|
-
# # The following example retrieves an object for an S3 bucket.
|
7683
|
+
# # The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a
|
7684
|
+
# # specific byte range.
|
7656
7685
|
#
|
7657
7686
|
# resp = client.get_object({
|
7658
7687
|
# bucket: "examplebucket",
|
7659
|
-
# key: "
|
7688
|
+
# key: "SampleFile.txt",
|
7689
|
+
# range: "bytes=0-9",
|
7660
7690
|
# })
|
7661
7691
|
#
|
7662
7692
|
# resp.to_h outputs the following:
|
7663
7693
|
# {
|
7664
7694
|
# accept_ranges: "bytes",
|
7665
|
-
# content_length:
|
7666
|
-
#
|
7667
|
-
#
|
7668
|
-
#
|
7695
|
+
# content_length: 10,
|
7696
|
+
# content_range: "bytes 0-9/43",
|
7697
|
+
# content_type: "text/plain",
|
7698
|
+
# etag: "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
|
7699
|
+
# last_modified: Time.parse("Thu, 09 Oct 2014 22:57:28 GMT"),
|
7669
7700
|
# metadata: {
|
7670
7701
|
# },
|
7671
|
-
# tag_count: 2,
|
7672
7702
|
# version_id: "null",
|
7673
7703
|
# }
|
7674
7704
|
#
|
@@ -8135,7 +8165,7 @@ module Aws::S3
|
|
8135
8165
|
# are not supported. Directory bucket names must be unique in the chosen
|
8136
8166
|
# Availability Zone. Bucket names must follow the format `
|
8137
8167
|
# bucket_base_name--az-id--x-s3` (for example, `
|
8138
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
8168
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
8139
8169
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
8140
8170
|
# *Amazon S3 User Guide*.
|
8141
8171
|
#
|
@@ -8922,7 +8952,7 @@ module Aws::S3
|
|
8922
8952
|
# If the bucket does not exist or you do not have permission to access
|
8923
8953
|
# it, the `HEAD` request returns a generic `400 Bad Request`, `403
|
8924
8954
|
# Forbidden` or `404 Not Found` code. A message body is not included, so
|
8925
|
-
# you cannot determine the exception beyond these
|
8955
|
+
# you cannot determine the exception beyond these HTTP response codes.
|
8926
8956
|
#
|
8927
8957
|
# <note markdown="1"> <b>Directory buckets </b> - You must make requests for this API
|
8928
8958
|
# operation to the Zonal endpoint. These endpoints support
|
@@ -8995,7 +9025,7 @@ module Aws::S3
|
|
8995
9025
|
# are not supported. Directory bucket names must be unique in the chosen
|
8996
9026
|
# Availability Zone. Bucket names must follow the format `
|
8997
9027
|
# bucket_base_name--az-id--x-s3` (for example, `
|
8998
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
9028
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
8999
9029
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
9000
9030
|
# *Amazon S3 User Guide*.
|
9001
9031
|
#
|
@@ -9236,7 +9266,7 @@ module Aws::S3
|
|
9236
9266
|
# are not supported. Directory bucket names must be unique in the chosen
|
9237
9267
|
# Availability Zone. Bucket names must follow the format `
|
9238
9268
|
# bucket_base_name--az-id--x-s3` (for example, `
|
9239
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
9269
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
9240
9270
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
9241
9271
|
# *Amazon S3 User Guide*.
|
9242
9272
|
#
|
@@ -10225,7 +10255,7 @@ module Aws::S3
|
|
10225
10255
|
# are not supported. Directory bucket names must be unique in the chosen
|
10226
10256
|
# Availability Zone. Bucket names must follow the format `
|
10227
10257
|
# bucket_base_name--az-id--x-s3` (for example, `
|
10228
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
10258
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
10229
10259
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
10230
10260
|
# *Amazon S3 User Guide*.
|
10231
10261
|
#
|
@@ -10650,9 +10680,7 @@ module Aws::S3
|
|
10650
10680
|
#
|
10651
10681
|
# @example Example: To list object versions
|
10652
10682
|
#
|
10653
|
-
# # The following example
|
10654
|
-
# # returned to two. If there are are more than two object version, S3 returns NextToken in the response. You can specify
|
10655
|
-
# # this token value in your next request to fetch next set of object versions.
|
10683
|
+
# # The following example returns versions of an object with specific key name prefix.
|
10656
10684
|
#
|
10657
10685
|
# resp = client.list_object_versions({
|
10658
10686
|
# bucket: "examplebucket",
|
@@ -10795,7 +10823,7 @@ module Aws::S3
|
|
10795
10823
|
# are not supported. Directory bucket names must be unique in the chosen
|
10796
10824
|
# Availability Zone. Bucket names must follow the format `
|
10797
10825
|
# bucket_base_name--az-id--x-s3` (for example, `
|
10798
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
10826
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
10799
10827
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
10800
10828
|
# *Amazon S3 User Guide*.
|
10801
10829
|
#
|
@@ -11060,7 +11088,7 @@ module Aws::S3
|
|
11060
11088
|
# are not supported. Directory bucket names must be unique in the chosen
|
11061
11089
|
# Availability Zone. Bucket names must follow the format `
|
11062
11090
|
# bucket_base_name--az-id--x-s3` (for example, `
|
11063
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
11091
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
11064
11092
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
11065
11093
|
# *Amazon S3 User Guide*.
|
11066
11094
|
#
|
@@ -11116,6 +11144,9 @@ module Aws::S3
|
|
11116
11144
|
#
|
11117
11145
|
# @option params [String] :encoding_type
|
11118
11146
|
# Encoding type used by Amazon S3 to encode object keys in the response.
|
11147
|
+
# If using `url`, non-ASCII characters used in an object's key name
|
11148
|
+
# will be URL encoded. For example, the object test\_file(3).png will
|
11149
|
+
# appear as test\_file%283%29.png.
|
11119
11150
|
#
|
11120
11151
|
# @option params [Integer] :max_keys
|
11121
11152
|
# Sets the maximum number of keys returned in the response. By default,
|
@@ -11382,7 +11413,7 @@ module Aws::S3
|
|
11382
11413
|
# are not supported. Directory bucket names must be unique in the chosen
|
11383
11414
|
# Availability Zone. Bucket names must follow the format `
|
11384
11415
|
# bucket_base_name--az-id--x-s3` (for example, `
|
11385
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
11416
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
11386
11417
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
11387
11418
|
# *Amazon S3 User Guide*.
|
11388
11419
|
#
|
@@ -12879,11 +12910,11 @@ module Aws::S3
|
|
12879
12910
|
# configuration, see [Managing your storage lifecycle][1].
|
12880
12911
|
#
|
12881
12912
|
# <note markdown="1"> Bucket lifecycle configuration now supports specifying a lifecycle
|
12882
|
-
# rule using an object key name prefix, one or more object tags,
|
12883
|
-
# combination of
|
12884
|
-
# API. The previous version of the API supported filtering
|
12885
|
-
# an object key name prefix, which is supported for
|
12886
|
-
# compatibility. For the related API description, see
|
12913
|
+
# rule using an object key name prefix, one or more object tags, object
|
12914
|
+
# size, or any combination of these. Accordingly, this section describes
|
12915
|
+
# the latest API. The previous version of the API supported filtering
|
12916
|
+
# based only on an object key name prefix, which is supported for
|
12917
|
+
# backward compatibility. For the related API description, see
|
12887
12918
|
# [PutBucketLifecycle][2].
|
12888
12919
|
#
|
12889
12920
|
# </note>
|
@@ -12898,7 +12929,7 @@ module Aws::S3
|
|
12898
12929
|
#
|
12899
12930
|
# * A filter identifying a subset of objects to which the rule
|
12900
12931
|
# applies. The filter can be based on a key name prefix, object
|
12901
|
-
# tags, or
|
12932
|
+
# tags, object size, or any combination of these.
|
12902
12933
|
#
|
12903
12934
|
# * A status indicating whether the rule is in effect.
|
12904
12935
|
#
|
@@ -13801,7 +13832,7 @@ module Aws::S3
|
|
13801
13832
|
# Virtual-hosted-style requests aren't supported. Directory bucket
|
13802
13833
|
# names must be unique in the chosen Availability Zone. Bucket names
|
13803
13834
|
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
13804
|
-
# example, ` DOC-EXAMPLE-BUCKET--usw2-
|
13835
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
13805
13836
|
# bucket naming restrictions, see [Directory bucket naming rules][1] in
|
13806
13837
|
# the *Amazon S3 User Guide*
|
13807
13838
|
#
|
@@ -14880,7 +14911,7 @@ module Aws::S3
|
|
14880
14911
|
# are not supported. Directory bucket names must be unique in the chosen
|
14881
14912
|
# Availability Zone. Bucket names must follow the format `
|
14882
14913
|
# bucket_base_name--az-id--x-s3` (for example, `
|
14883
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
14914
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
14884
14915
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
14885
14916
|
# *Amazon S3 User Guide*.
|
14886
14917
|
#
|
@@ -15362,114 +15393,114 @@ module Aws::S3
|
|
15362
15393
|
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
15363
15394
|
# }
|
15364
15395
|
#
|
15365
|
-
# @example Example: To
|
15396
|
+
# @example Example: To upload object and specify user-defined metadata
|
15366
15397
|
#
|
15367
|
-
# # The following example creates an object.
|
15398
|
+
# # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
|
15399
|
+
# # enabled, S3 returns version ID in response.
|
15368
15400
|
#
|
15369
15401
|
# resp = client.put_object({
|
15370
15402
|
# body: "filetoupload",
|
15371
15403
|
# bucket: "examplebucket",
|
15372
|
-
# key: "
|
15404
|
+
# key: "exampleobject",
|
15405
|
+
# metadata: {
|
15406
|
+
# "metadata1" => "value1",
|
15407
|
+
# "metadata2" => "value2",
|
15408
|
+
# },
|
15373
15409
|
# })
|
15374
15410
|
#
|
15375
15411
|
# resp.to_h outputs the following:
|
15376
15412
|
# {
|
15377
15413
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15378
|
-
# version_id: "
|
15414
|
+
# version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
|
15379
15415
|
# }
|
15380
15416
|
#
|
15381
|
-
# @example Example: To upload an object
|
15417
|
+
# @example Example: To upload an object and specify canned ACL.
|
15382
15418
|
#
|
15383
|
-
# # The following example uploads
|
15384
|
-
# #
|
15419
|
+
# # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
|
15420
|
+
# # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
|
15385
15421
|
#
|
15386
15422
|
# resp = client.put_object({
|
15387
|
-
#
|
15423
|
+
# acl: "authenticated-read",
|
15424
|
+
# body: "filetoupload",
|
15388
15425
|
# bucket: "examplebucket",
|
15389
|
-
# key: "
|
15390
|
-
# server_side_encryption: "AES256",
|
15391
|
-
# storage_class: "STANDARD_IA",
|
15426
|
+
# key: "exampleobject",
|
15392
15427
|
# })
|
15393
15428
|
#
|
15394
15429
|
# resp.to_h outputs the following:
|
15395
15430
|
# {
|
15396
15431
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15397
|
-
#
|
15398
|
-
# version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
|
15432
|
+
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
15399
15433
|
# }
|
15400
15434
|
#
|
15401
|
-
# @example Example: To upload an object
|
15435
|
+
# @example Example: To upload an object
|
15402
15436
|
#
|
15403
|
-
# # The following example uploads an object
|
15404
|
-
# # S3 returns
|
15437
|
+
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
15438
|
+
# # syntax. S3 returns VersionId of the newly created object.
|
15405
15439
|
#
|
15406
15440
|
# resp = client.put_object({
|
15407
|
-
# body: "
|
15441
|
+
# body: "HappyFace.jpg",
|
15408
15442
|
# bucket: "examplebucket",
|
15409
15443
|
# key: "HappyFace.jpg",
|
15410
|
-
# tagging: "key1=value1&key2=value2",
|
15411
15444
|
# })
|
15412
15445
|
#
|
15413
15446
|
# resp.to_h outputs the following:
|
15414
15447
|
# {
|
15415
15448
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15416
|
-
# version_id: "
|
15449
|
+
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
15417
15450
|
# }
|
15418
15451
|
#
|
15419
|
-
# @example Example: To
|
15452
|
+
# @example Example: To create an object.
|
15420
15453
|
#
|
15421
|
-
# # The following example creates an object.
|
15422
|
-
# # enabled, S3 returns version ID in response.
|
15454
|
+
# # The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
|
15423
15455
|
#
|
15424
15456
|
# resp = client.put_object({
|
15425
15457
|
# body: "filetoupload",
|
15426
15458
|
# bucket: "examplebucket",
|
15427
|
-
# key: "
|
15428
|
-
# metadata: {
|
15429
|
-
# "metadata1" => "value1",
|
15430
|
-
# "metadata2" => "value2",
|
15431
|
-
# },
|
15459
|
+
# key: "objectkey",
|
15432
15460
|
# })
|
15433
15461
|
#
|
15434
15462
|
# resp.to_h outputs the following:
|
15435
15463
|
# {
|
15436
15464
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15437
|
-
# version_id: "
|
15465
|
+
# version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
|
15438
15466
|
# }
|
15439
15467
|
#
|
15440
|
-
# @example Example: To upload an object
|
15468
|
+
# @example Example: To upload an object (specify optional headers)
|
15441
15469
|
#
|
15442
|
-
# # The following example uploads
|
15443
|
-
# #
|
15470
|
+
# # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
|
15471
|
+
# # storage class and use server-side encryption.
|
15444
15472
|
#
|
15445
15473
|
# resp = client.put_object({
|
15446
|
-
#
|
15447
|
-
# body: "filetoupload",
|
15474
|
+
# body: "HappyFace.jpg",
|
15448
15475
|
# bucket: "examplebucket",
|
15449
|
-
# key: "
|
15476
|
+
# key: "HappyFace.jpg",
|
15477
|
+
# server_side_encryption: "AES256",
|
15478
|
+
# storage_class: "STANDARD_IA",
|
15450
15479
|
# })
|
15451
15480
|
#
|
15452
15481
|
# resp.to_h outputs the following:
|
15453
15482
|
# {
|
15454
15483
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15455
|
-
#
|
15484
|
+
# server_side_encryption: "AES256",
|
15485
|
+
# version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
|
15456
15486
|
# }
|
15457
15487
|
#
|
15458
|
-
# @example Example: To upload an object
|
15488
|
+
# @example Example: To upload an object and specify optional tags
|
15459
15489
|
#
|
15460
|
-
# # The following example uploads an object
|
15461
|
-
# #
|
15490
|
+
# # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
|
15491
|
+
# # S3 returns version ID of the newly created object.
|
15462
15492
|
#
|
15463
15493
|
# resp = client.put_object({
|
15464
|
-
# body: "HappyFace.jpg",
|
15494
|
+
# body: "c:\\HappyFace.jpg",
|
15465
15495
|
# bucket: "examplebucket",
|
15466
15496
|
# key: "HappyFace.jpg",
|
15497
|
+
# tagging: "key1=value1&key2=value2",
|
15467
15498
|
# })
|
15468
15499
|
#
|
15469
15500
|
# resp.to_h outputs the following:
|
15470
15501
|
# {
|
15471
15502
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15472
|
-
# version_id: "
|
15503
|
+
# version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
|
15473
15504
|
# }
|
15474
15505
|
#
|
15475
15506
|
# @example Streaming a file from disk
|
@@ -16602,10 +16633,10 @@ module Aws::S3
|
|
16602
16633
|
#
|
16603
16634
|
# This action performs the following types of requests:
|
16604
16635
|
#
|
16605
|
-
# * `select` - Perform a select query on an archived object
|
16606
|
-
#
|
16607
16636
|
# * `restore an archive` - Restore an archived object
|
16608
16637
|
#
|
16638
|
+
# ^
|
16639
|
+
#
|
16609
16640
|
# For more information about the `S3` structure in the request body, see
|
16610
16641
|
# the following:
|
16611
16642
|
#
|
@@ -16616,51 +16647,6 @@ module Aws::S3
|
|
16616
16647
|
# * [Protecting Data Using Server-Side Encryption][3] in the *Amazon S3
|
16617
16648
|
# User Guide*
|
16618
16649
|
#
|
16619
|
-
# Define the SQL expression for the `SELECT` type of restoration for
|
16620
|
-
# your query in the request body's `SelectParameters` structure. You
|
16621
|
-
# can use expressions like the following examples.
|
16622
|
-
#
|
16623
|
-
# * The following expression returns all records from the specified
|
16624
|
-
# object.
|
16625
|
-
#
|
16626
|
-
# `SELECT * FROM Object`
|
16627
|
-
#
|
16628
|
-
# * Assuming that you are not using any headers for data stored in the
|
16629
|
-
# object, you can specify columns with positional headers.
|
16630
|
-
#
|
16631
|
-
# `SELECT s._1, s._2 FROM Object s WHERE s._3 > 100`
|
16632
|
-
#
|
16633
|
-
# * If you have headers and you set the `fileHeaderInfo` in the `CSV`
|
16634
|
-
# structure in the request body to `USE`, you can specify headers in
|
16635
|
-
# the query. (If you set the `fileHeaderInfo` field to `IGNORE`, the
|
16636
|
-
# first row is skipped for the query.) You cannot mix ordinal
|
16637
|
-
# positions with header column names.
|
16638
|
-
#
|
16639
|
-
# `SELECT s.Id, s.FirstName, s.SSN FROM S3Object s`
|
16640
|
-
#
|
16641
|
-
# When making a select request, you can also do the following:
|
16642
|
-
#
|
16643
|
-
# * To expedite your queries, specify the `Expedited` tier. For more
|
16644
|
-
# information about tiers, see "Restoring Archives," later in this
|
16645
|
-
# topic.
|
16646
|
-
#
|
16647
|
-
# * Specify details about the data serialization format of both the
|
16648
|
-
# input object that is being queried and the serialization of the
|
16649
|
-
# CSV-encoded query results.
|
16650
|
-
#
|
16651
|
-
# The following are additional important facts about the select feature:
|
16652
|
-
#
|
16653
|
-
# * The output results are new Amazon S3 objects. Unlike archive
|
16654
|
-
# retrievals, they are stored until explicitly deleted-manually or
|
16655
|
-
# through a lifecycle configuration.
|
16656
|
-
#
|
16657
|
-
# * You can issue more than one select request on the same Amazon S3
|
16658
|
-
# object. Amazon S3 doesn't duplicate requests, so avoid issuing
|
16659
|
-
# duplicate requests.
|
16660
|
-
#
|
16661
|
-
# * Amazon S3 accepts a select request even if the object has already
|
16662
|
-
# been restored. A select request doesn’t return error response `409`.
|
16663
|
-
#
|
16664
16650
|
# Permissions
|
16665
16651
|
#
|
16666
16652
|
# : To use this operation, you must have permissions to perform the
|
@@ -16778,8 +16764,7 @@ module Aws::S3
|
|
16778
16764
|
#
|
16779
16765
|
# * *Code: RestoreAlreadyInProgress*
|
16780
16766
|
#
|
16781
|
-
# * *Cause: Object restore is already in progress
|
16782
|
-
# not apply to SELECT type requests.)*
|
16767
|
+
# * *Cause: Object restore is already in progress.*
|
16783
16768
|
#
|
16784
16769
|
# * *HTTP Status Code: 409 Conflict*
|
16785
16770
|
#
|
@@ -17619,7 +17604,7 @@ module Aws::S3
|
|
17619
17604
|
# are not supported. Directory bucket names must be unique in the chosen
|
17620
17605
|
# Availability Zone. Bucket names must follow the format `
|
17621
17606
|
# bucket_base_name--az-id--x-s3` (for example, `
|
17622
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
17607
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
17623
17608
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
17624
17609
|
# *Amazon S3 User Guide*.
|
17625
17610
|
#
|
@@ -17935,7 +17920,7 @@ module Aws::S3
|
|
17935
17920
|
# the source object that is being copied.
|
17936
17921
|
#
|
17937
17922
|
# * If the destination bucket is a general purpose bucket, you must
|
17938
|
-
# have the <b> <code>s3:
|
17923
|
+
# have the <b> <code>s3:PutObject</code> </b> permission to write
|
17939
17924
|
# the object copy to the destination bucket.
|
17940
17925
|
#
|
17941
17926
|
# For information about permissions required to use the multipart
|
@@ -18037,7 +18022,7 @@ module Aws::S3
|
|
18037
18022
|
# are not supported. Directory bucket names must be unique in the chosen
|
18038
18023
|
# Availability Zone. Bucket names must follow the format `
|
18039
18024
|
# bucket_base_name--az-id--x-s3` (for example, `
|
18040
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
18025
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
18041
18026
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
18042
18027
|
# *Amazon S3 User Guide*.
|
18043
18028
|
#
|
@@ -18807,7 +18792,7 @@ module Aws::S3
|
|
18807
18792
|
params: params,
|
18808
18793
|
config: config)
|
18809
18794
|
context[:gem_name] = 'aws-sdk-s3'
|
18810
|
-
context[:gem_version] = '1.
|
18795
|
+
context[:gem_version] = '1.145.0'
|
18811
18796
|
Seahorse::Client::Request.new(handlers, context)
|
18812
18797
|
end
|
18813
18798
|
|