aws-sdk-s3 1.144.0 → 1.146.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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-az2--x-s3`). For information about bucket
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 the failed requests. For more information, see
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-az2--x-s3`). For information about bucket
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][3].
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][4].
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:PubObject</code> </b> permission to write the
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][5] and [Amazon Web Services Identity and Access
1158
+ # One Zone][6] and [Amazon Web Services Identity and Access
1156
1159
  # Management (IAM) identity-based policies for S3 Express One
1157
- # Zone][6] in the *Amazon S3 User Guide*.
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
- # S3](repost.aws/knowledge-center/s3-resolve-200-internalerror).
1183
- # The `200 OK` status code means the copy was accepted, but it
1184
- # doesn't mean the copy is complete. Another example is when you
1185
- # disconnect from Amazon S3 before the copy is complete, Amazon S3
1186
- # might cancel the copy and you may receive a `200 OK` response.
1187
- # You must stay connected to Amazon S3 until the entire response
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. For pricing information, see
1205
- # [Amazon S3 pricing][7].
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][8]
1217
+ # * [PutObject][10]
1215
1218
  #
1216
- # * [GetObject][9]
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/AmazonS3/latest/dev/transfer-acceleration.html
1223
- # [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
1224
- # [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
1225
- # [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
1226
- # [7]: http://aws.amazon.com/s3/pricing/
1227
- # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
1228
- # [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
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-az2--x-s3`). For information about bucket
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
- # If your `CreateBucket` request sets `BucketOwnerEnforced` for
2096
- # Amazon S3 Object Ownership and specifies a bucket ACL that
2097
- # provides access to an external Amazon Web Services account, your
2098
- # request fails with a `400` error and returns the
2099
- # `InvalidBucketAcLWithObjectOwnership` error code. For more
2100
- # information, see [Setting Object Ownership on an existing bucket
2101
- # ][5] in the *Amazon S3 User Guide*.
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` ][6] API. To use this operation, you
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 ][7] in the *Amazon S3
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-existing-bucket.html
2153
- # [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html
2154
- # [7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html
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-az2--x-s3`). For information about
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 in a specific region
2294
+ # @example Example: To create a bucket
2281
2295
  #
2282
- # # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
2296
+ # # The following example creates a bucket.
2283
2297
  #
2284
2298
  # resp = client.create_bucket({
2285
2299
  # bucket: "examplebucket",
2286
- # create_bucket_configuration: {
2287
- # location_constraint: "eu-west-1",
2288
- # },
2289
2300
  # })
2290
2301
  #
2291
2302
  # resp.to_h outputs the following:
2292
2303
  # {
2293
- # location: "http://examplebucket.<Region>.s3.amazonaws.com/",
2304
+ # location: "/examplebucket",
2294
2305
  # }
2295
2306
  #
2296
- # @example Example: To create a bucket
2307
+ # @example Example: To create a bucket in a specific region
2297
2308
  #
2298
- # # The following example creates a bucket.
2309
+ # # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
2299
2310
  #
2300
2311
  # resp = client.create_bucket({
2301
2312
  # bucket: "examplebucket",
2313
+ # create_bucket_configuration: {
2314
+ # location_constraint: "eu-west-1",
2315
+ # },
2302
2316
  # })
2303
2317
  #
2304
2318
  # resp.to_h outputs the following:
2305
2319
  # {
2306
- # location: "/examplebucket",
2320
+ # location: "http://examplebucket.<Region>.s3.amazonaws.com/",
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-az2--x-s3`). For information about bucket
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-az2--x-s3`). For information about
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-az2--x-s3`). For information about
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 removes the null version (if
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][1] in the *Amazon S3 User Guide*.
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][2] in the *Amazon S3 User Guide*.
4258
- # To see sample requests that use versioning, see [Sample Request][3].
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][4]) to enable Amazon S3 to remove them for you.
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 versiong-enabled bucket,
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` ][5] API operation for session-based
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` ][5].
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][6]
4335
+ # * [PutObject][8]
4311
4336
  #
4312
4337
  # ^
4313
4338
  #
4314
4339
  #
4315
4340
  #
4316
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
4317
- # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html
4318
- # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete
4319
- # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html
4320
- # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
4321
- # [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
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-az2--x-s3`). For information about bucket
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
  #
@@ -4423,15 +4450,6 @@ module Aws::S3
4423
4450
  # * {Types::DeleteObjectOutput#request_charged #request_charged} => String
4424
4451
  #
4425
4452
  #
4426
- # @example Example: To delete an object (from a non-versioned bucket)
4427
- #
4428
- # # The following example deletes an object from a non-versioned bucket.
4429
- #
4430
- # resp = client.delete_object({
4431
- # bucket: "ExampleBucket",
4432
- # key: "HappyFace.jpg",
4433
- # })
4434
- #
4435
4453
  # @example Example: To delete an object
4436
4454
  #
4437
4455
  # # The following example deletes an object from an S3 bucket.
@@ -4445,6 +4463,15 @@ module Aws::S3
4445
4463
  # {
4446
4464
  # }
4447
4465
  #
4466
+ # @example Example: To delete an object (from a non-versioned bucket)
4467
+ #
4468
+ # # The following example deletes an object from a non-versioned bucket.
4469
+ #
4470
+ # resp = client.delete_object({
4471
+ # bucket: "ExampleBucket",
4472
+ # key: "HappyFace.jpg",
4473
+ # })
4474
+ #
4448
4475
  # @example Request syntax with placeholder values
4449
4476
  #
4450
4477
  # resp = client.delete_object({
@@ -4543,35 +4570,35 @@ module Aws::S3
4543
4570
  # * {Types::DeleteObjectTaggingOutput#version_id #version_id} => String
4544
4571
  #
4545
4572
  #
4546
- # @example Example: To remove tag set from an object
4573
+ # @example Example: To remove tag set from an object version
4547
4574
  #
4548
- # # The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the
4549
- # # operation removes tag set from the latest object version.
4575
+ # # The following example removes tag set associated with the specified object version. The request specifies both the
4576
+ # # object key and object version.
4550
4577
  #
4551
4578
  # resp = client.delete_object_tagging({
4552
4579
  # bucket: "examplebucket",
4553
4580
  # key: "HappyFace.jpg",
4581
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
4554
4582
  # })
4555
4583
  #
4556
4584
  # resp.to_h outputs the following:
4557
4585
  # {
4558
- # version_id: "null",
4586
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
4559
4587
  # }
4560
4588
  #
4561
- # @example Example: To remove tag set from an object version
4589
+ # @example Example: To remove tag set from an object
4562
4590
  #
4563
- # # The following example removes tag set associated with the specified object version. The request specifies both the
4564
- # # object key and object version.
4591
+ # # The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the
4592
+ # # operation removes tag set from the latest object version.
4565
4593
  #
4566
4594
  # resp = client.delete_object_tagging({
4567
4595
  # bucket: "examplebucket",
4568
4596
  # key: "HappyFace.jpg",
4569
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
4570
4597
  # })
4571
4598
  #
4572
4599
  # resp.to_h outputs the following:
4573
4600
  # {
4574
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
4601
+ # version_id: "null",
4575
4602
  # }
4576
4603
  #
4577
4604
  # @example Request syntax with placeholder values
@@ -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-az2--x-s3`). For information about bucket
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,20 +4881,22 @@ module Aws::S3
4854
4881
  # * {Types::DeleteObjectsOutput#errors #errors} => Array&lt;Types::Error&gt;
4855
4882
  #
4856
4883
  #
4857
- # @example Example: To delete multiple objects from a versioned bucket
4884
+ # @example Example: To delete multiple object versions from a versioned bucket
4858
4885
  #
4859
- # # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
4860
- # # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
4886
+ # # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
4887
+ # # versions and returns the key and versions of deleted objects in the response.
4861
4888
  #
4862
4889
  # resp = client.delete_objects({
4863
4890
  # bucket: "examplebucket",
4864
4891
  # delete: {
4865
4892
  # objects: [
4866
4893
  # {
4867
- # key: "objectkey1",
4894
+ # key: "HappyFace.jpg",
4895
+ # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
4868
4896
  # },
4869
4897
  # {
4870
- # key: "objectkey2",
4898
+ # key: "HappyFace.jpg",
4899
+ # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
4871
4900
  # },
4872
4901
  # ],
4873
4902
  # quiet: false,
@@ -4878,34 +4907,30 @@ module Aws::S3
4878
4907
  # {
4879
4908
  # deleted: [
4880
4909
  # {
4881
- # delete_marker: true,
4882
- # delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
4883
- # key: "objectkey1",
4910
+ # key: "HappyFace.jpg",
4911
+ # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
4884
4912
  # },
4885
4913
  # {
4886
- # delete_marker: true,
4887
- # delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
4888
- # key: "objectkey2",
4914
+ # key: "HappyFace.jpg",
4915
+ # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
4889
4916
  # },
4890
4917
  # ],
4891
4918
  # }
4892
4919
  #
4893
- # @example Example: To delete multiple object versions from a versioned bucket
4920
+ # @example Example: To delete multiple objects from a versioned bucket
4894
4921
  #
4895
- # # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
4896
- # # versions and returns the key and versions of deleted objects in the response.
4922
+ # # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
4923
+ # # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
4897
4924
  #
4898
4925
  # resp = client.delete_objects({
4899
4926
  # bucket: "examplebucket",
4900
4927
  # delete: {
4901
4928
  # objects: [
4902
4929
  # {
4903
- # key: "HappyFace.jpg",
4904
- # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
4930
+ # key: "objectkey1",
4905
4931
  # },
4906
4932
  # {
4907
- # key: "HappyFace.jpg",
4908
- # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
4933
+ # key: "objectkey2",
4909
4934
  # },
4910
4935
  # ],
4911
4936
  # quiet: false,
@@ -4916,12 +4941,14 @@ module Aws::S3
4916
4941
  # {
4917
4942
  # deleted: [
4918
4943
  # {
4919
- # key: "HappyFace.jpg",
4920
- # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
4944
+ # delete_marker: true,
4945
+ # delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
4946
+ # key: "objectkey1",
4921
4947
  # },
4922
4948
  # {
4923
- # key: "HappyFace.jpg",
4924
- # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
4949
+ # delete_marker: true,
4950
+ # delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
4951
+ # key: "objectkey2",
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, or a
5785
- # combination of both. Accordingly, this section describes the latest
5786
- # API. The response describes the new filter element that you can use to
5787
- # specify a filter to select a subset of objects to which the rule
5788
- # applies. If you are using a previous version of the lifecycle
5789
- # configuration, it still works. For the earlier action, see
5790
- # [GetBucketLifecycle][1].
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-az2--x-s3`). For information about
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-az2--x-s3`). For information about bucket
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
  #
@@ -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-az2--x-s3`). For information about bucket
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 error codes.
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-az2--x-s3`). For information about bucket
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-az2--x-s3`). For information about bucket
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-az2--x-s3`). For information about bucket
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 return versions of an object with specific key name prefix. The request limits the number of items
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-az2--x-s3`). For information about bucket
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-az2--x-s3`). For information about bucket
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-az2--x-s3`). For information about bucket
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, or a
12883
- # combination of both. Accordingly, this section describes the latest
12884
- # API. The previous version of the API supported filtering based only on
12885
- # an object key name prefix, which is supported for backward
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 a combination of both.
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-az2--x-s3`). For information about
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-az2--x-s3`). For information about bucket
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
  #
@@ -15342,58 +15373,62 @@ module Aws::S3
15342
15373
  # * {Types::PutObjectOutput#request_charged #request_charged} => String
15343
15374
  #
15344
15375
  #
15345
- # @example Example: To create an object.
15376
+ # @example Example: To upload an object
15346
15377
  #
15347
- # # The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
15378
+ # # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
15379
+ # # syntax. S3 returns VersionId of the newly created object.
15348
15380
  #
15349
15381
  # resp = client.put_object({
15350
- # body: "filetoupload",
15382
+ # body: "HappyFace.jpg",
15351
15383
  # bucket: "examplebucket",
15352
- # key: "objectkey",
15384
+ # key: "HappyFace.jpg",
15353
15385
  # })
15354
15386
  #
15355
15387
  # resp.to_h outputs the following:
15356
15388
  # {
15357
15389
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15358
- # version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
15390
+ # version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
15359
15391
  # }
15360
15392
  #
15361
- # @example Example: To upload object and specify user-defined metadata
15393
+ # @example Example: To upload an object (specify optional headers)
15362
15394
  #
15363
- # # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
15364
- # # enabled, S3 returns version ID in response.
15395
+ # # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
15396
+ # # storage class and use server-side encryption.
15365
15397
  #
15366
15398
  # resp = client.put_object({
15367
- # body: "filetoupload",
15399
+ # body: "HappyFace.jpg",
15368
15400
  # bucket: "examplebucket",
15369
- # key: "exampleobject",
15370
- # metadata: {
15371
- # "metadata1" => "value1",
15372
- # "metadata2" => "value2",
15373
- # },
15401
+ # key: "HappyFace.jpg",
15402
+ # server_side_encryption: "AES256",
15403
+ # storage_class: "STANDARD_IA",
15374
15404
  # })
15375
15405
  #
15376
15406
  # resp.to_h outputs the following:
15377
15407
  # {
15378
15408
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15379
- # version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
15409
+ # server_side_encryption: "AES256",
15410
+ # version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
15380
15411
  # }
15381
15412
  #
15382
- # @example Example: To upload an object
15413
+ # @example Example: To upload object and specify user-defined metadata
15383
15414
  #
15384
- # # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
15385
- # # syntax. S3 returns VersionId of the newly created object.
15415
+ # # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
15416
+ # # enabled, S3 returns version ID in response.
15386
15417
  #
15387
15418
  # resp = client.put_object({
15388
- # body: "HappyFace.jpg",
15419
+ # body: "filetoupload",
15389
15420
  # bucket: "examplebucket",
15390
- # key: "HappyFace.jpg",
15421
+ # key: "exampleobject",
15422
+ # metadata: {
15423
+ # "metadata1" => "value1",
15424
+ # "metadata2" => "value2",
15425
+ # },
15391
15426
  # })
15392
15427
  #
15393
15428
  # resp.to_h outputs the following:
15394
15429
  # {
15395
15430
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15396
- # version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
15431
+ # version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
15397
15432
  # }
15398
15433
  #
15399
15434
  # @example Example: To upload an object and specify canned ACL.
@@ -15414,62 +15449,58 @@ module Aws::S3
15414
15449
  # version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
15415
15450
  # }
15416
15451
  #
15417
- # @example Example: To upload an object (specify optional headers)
15452
+ # @example Example: To create an object.
15418
15453
  #
15419
- # # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
15420
- # # storage class and use server-side encryption.
15454
+ # # The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
15421
15455
  #
15422
15456
  # resp = client.put_object({
15423
- # body: "HappyFace.jpg",
15457
+ # body: "filetoupload",
15424
15458
  # bucket: "examplebucket",
15425
- # key: "HappyFace.jpg",
15426
- # server_side_encryption: "AES256",
15427
- # storage_class: "STANDARD_IA",
15459
+ # key: "objectkey",
15428
15460
  # })
15429
15461
  #
15430
15462
  # resp.to_h outputs the following:
15431
15463
  # {
15432
15464
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15433
- # server_side_encryption: "AES256",
15434
- # version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
15465
+ # version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
15435
15466
  # }
15436
15467
  #
15437
- # @example Example: To upload an object and specify optional tags
15468
+ # @example Example: To upload an object and specify server-side encryption and object tags
15438
15469
  #
15439
- # # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
15440
- # # S3 returns version ID of the newly created object.
15470
+ # # The following example uploads an object. The request specifies the optional server-side encryption option. The request
15471
+ # # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
15441
15472
  #
15442
15473
  # resp = client.put_object({
15443
- # body: "c:\\HappyFace.jpg",
15474
+ # body: "filetoupload",
15444
15475
  # bucket: "examplebucket",
15445
- # key: "HappyFace.jpg",
15476
+ # key: "exampleobject",
15477
+ # server_side_encryption: "AES256",
15446
15478
  # tagging: "key1=value1&key2=value2",
15447
15479
  # })
15448
15480
  #
15449
15481
  # resp.to_h outputs the following:
15450
15482
  # {
15451
15483
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15452
- # version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
15484
+ # server_side_encryption: "AES256",
15485
+ # version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
15453
15486
  # }
15454
15487
  #
15455
- # @example Example: To upload an object and specify server-side encryption and object tags
15488
+ # @example Example: To upload an object and specify optional tags
15456
15489
  #
15457
- # # The following example uploads an object. The request specifies the optional server-side encryption option. The request
15458
- # # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
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.
15459
15492
  #
15460
15493
  # resp = client.put_object({
15461
- # body: "filetoupload",
15494
+ # body: "c:\\HappyFace.jpg",
15462
15495
  # bucket: "examplebucket",
15463
- # key: "exampleobject",
15464
- # server_side_encryption: "AES256",
15496
+ # key: "HappyFace.jpg",
15465
15497
  # tagging: "key1=value1&key2=value2",
15466
15498
  # })
15467
15499
  #
15468
15500
  # resp.to_h outputs the following:
15469
15501
  # {
15470
15502
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15471
- # server_side_encryption: "AES256",
15472
- # version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
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. (This error does
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-az2--x-s3`). For information about bucket
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:PubObject</code> </b> permission to write
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-az2--x-s3`). For information about bucket
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
  #
@@ -18312,45 +18297,45 @@ module Aws::S3
18312
18297
  # * {Types::UploadPartCopyOutput#request_charged #request_charged} => String
18313
18298
  #
18314
18299
  #
18315
- # @example Example: To upload a part by copying byte range from an existing object as data source
18300
+ # @example Example: To upload a part by copying data from an existing object as data source
18316
18301
  #
18317
- # # The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as
18318
- # # data source.
18302
+ # # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
18319
18303
  #
18320
18304
  # resp = client.upload_part_copy({
18321
18305
  # bucket: "examplebucket",
18322
18306
  # copy_source: "/bucketname/sourceobjectkey",
18323
- # copy_source_range: "bytes=1-100000",
18324
18307
  # key: "examplelargeobject",
18325
- # part_number: 2,
18308
+ # part_number: 1,
18326
18309
  # upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
18327
18310
  # })
18328
18311
  #
18329
18312
  # resp.to_h outputs the following:
18330
18313
  # {
18331
18314
  # copy_part_result: {
18332
- # etag: "\"65d16d19e65a7508a51f043180edcc36\"",
18333
- # last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
18315
+ # etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
18316
+ # last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
18334
18317
  # },
18335
18318
  # }
18336
18319
  #
18337
- # @example Example: To upload a part by copying data from an existing object as data source
18320
+ # @example Example: To upload a part by copying byte range from an existing object as data source
18338
18321
  #
18339
- # # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
18322
+ # # The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as
18323
+ # # data source.
18340
18324
  #
18341
18325
  # resp = client.upload_part_copy({
18342
18326
  # bucket: "examplebucket",
18343
18327
  # copy_source: "/bucketname/sourceobjectkey",
18328
+ # copy_source_range: "bytes=1-100000",
18344
18329
  # key: "examplelargeobject",
18345
- # part_number: 1,
18330
+ # part_number: 2,
18346
18331
  # upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
18347
18332
  # })
18348
18333
  #
18349
18334
  # resp.to_h outputs the following:
18350
18335
  # {
18351
18336
  # copy_part_result: {
18352
- # etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
18353
- # last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
18337
+ # etag: "\"65d16d19e65a7508a51f043180edcc36\"",
18338
+ # last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
18354
18339
  # },
18355
18340
  # }
18356
18341
  #
@@ -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.144.0'
18795
+ context[:gem_version] = '1.146.0'
18811
18796
  Seahorse::Client::Request.new(handlers, context)
18812
18797
  end
18813
18798