aws-sdk-s3 1.166.0 → 1.167.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -949,9 +949,9 @@ module Aws::S3
949
949
  # @option params [String] :checksum_crc32
950
950
  # This header can be used as a data integrity check to verify that the
951
951
  # data received is the same data that was originally sent. This header
952
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
953
- # more information, see [Checking object integrity][1] in the *Amazon S3
954
- # User Guide*.
952
+ # specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
953
+ # For more information, see [Checking object integrity][1] in the
954
+ # *Amazon S3 User Guide*.
955
955
  #
956
956
  #
957
957
  #
@@ -960,7 +960,7 @@ module Aws::S3
960
960
  # @option params [String] :checksum_crc32c
961
961
  # This header can be used as a data integrity check to verify that the
962
962
  # data received is the same data that was originally sent. This header
963
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
963
+ # specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
964
964
  # For more information, see [Checking object integrity][1] in the
965
965
  # *Amazon S3 User Guide*.
966
966
  #
@@ -4960,15 +4960,6 @@ module Aws::S3
4960
4960
  # * {Types::DeleteObjectOutput#request_charged #request_charged} => String
4961
4961
  #
4962
4962
  #
4963
- # @example Example: To delete an object (from a non-versioned bucket)
4964
- #
4965
- # # The following example deletes an object from a non-versioned bucket.
4966
- #
4967
- # resp = client.delete_object({
4968
- # bucket: "ExampleBucket",
4969
- # key: "HappyFace.jpg",
4970
- # })
4971
- #
4972
4963
  # @example Example: To delete an object
4973
4964
  #
4974
4965
  # # The following example deletes an object from an S3 bucket.
@@ -4982,6 +4973,15 @@ module Aws::S3
4982
4973
  # {
4983
4974
  # }
4984
4975
  #
4976
+ # @example Example: To delete an object (from a non-versioned bucket)
4977
+ #
4978
+ # # The following example deletes an object from a non-versioned bucket.
4979
+ #
4980
+ # resp = client.delete_object({
4981
+ # bucket: "ExampleBucket",
4982
+ # key: "HappyFace.jpg",
4983
+ # })
4984
+ #
4985
4985
  # @example Request syntax with placeholder values
4986
4986
  #
4987
4987
  # resp = client.delete_object({
@@ -5360,13 +5360,13 @@ module Aws::S3
5360
5360
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
5361
5361
  # the supported algorithm from the following list:
5362
5362
  #
5363
- # * CRC32
5363
+ # * `CRC32`
5364
5364
  #
5365
- # * CRC32C
5365
+ # * `CRC32C`
5366
5366
  #
5367
- # * SHA1
5367
+ # * `SHA1`
5368
5368
  #
5369
- # * SHA256
5369
+ # * `SHA256`
5370
5370
  #
5371
5371
  # For more information, see [Checking object integrity][1] in the
5372
5372
  # *Amazon S3 User Guide*.
@@ -5391,22 +5391,20 @@ module Aws::S3
5391
5391
  # * {Types::DeleteObjectsOutput#errors #errors} => Array<Types::Error>
5392
5392
  #
5393
5393
  #
5394
- # @example Example: To delete multiple object versions from a versioned bucket
5394
+ # @example Example: To delete multiple objects from a versioned bucket
5395
5395
  #
5396
- # # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
5397
- # # versions and returns the key and versions of deleted objects in the response.
5396
+ # # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
5397
+ # # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
5398
5398
  #
5399
5399
  # resp = client.delete_objects({
5400
5400
  # bucket: "examplebucket",
5401
5401
  # delete: {
5402
5402
  # objects: [
5403
5403
  # {
5404
- # key: "HappyFace.jpg",
5405
- # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
5404
+ # key: "objectkey1",
5406
5405
  # },
5407
5406
  # {
5408
- # key: "HappyFace.jpg",
5409
- # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
5407
+ # key: "objectkey2",
5410
5408
  # },
5411
5409
  # ],
5412
5410
  # quiet: false,
@@ -5417,30 +5415,34 @@ module Aws::S3
5417
5415
  # {
5418
5416
  # deleted: [
5419
5417
  # {
5420
- # key: "HappyFace.jpg",
5421
- # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
5418
+ # delete_marker: true,
5419
+ # delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
5420
+ # key: "objectkey1",
5422
5421
  # },
5423
5422
  # {
5424
- # key: "HappyFace.jpg",
5425
- # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
5423
+ # delete_marker: true,
5424
+ # delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
5425
+ # key: "objectkey2",
5426
5426
  # },
5427
5427
  # ],
5428
5428
  # }
5429
5429
  #
5430
- # @example Example: To delete multiple objects from a versioned bucket
5430
+ # @example Example: To delete multiple object versions from a versioned bucket
5431
5431
  #
5432
- # # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
5433
- # # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
5432
+ # # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
5433
+ # # versions and returns the key and versions of deleted objects in the response.
5434
5434
  #
5435
5435
  # resp = client.delete_objects({
5436
5436
  # bucket: "examplebucket",
5437
5437
  # delete: {
5438
5438
  # objects: [
5439
5439
  # {
5440
- # key: "objectkey1",
5440
+ # key: "HappyFace.jpg",
5441
+ # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
5441
5442
  # },
5442
5443
  # {
5443
- # key: "objectkey2",
5444
+ # key: "HappyFace.jpg",
5445
+ # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
5444
5446
  # },
5445
5447
  # ],
5446
5448
  # quiet: false,
@@ -5451,14 +5453,12 @@ module Aws::S3
5451
5453
  # {
5452
5454
  # deleted: [
5453
5455
  # {
5454
- # delete_marker: true,
5455
- # delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
5456
- # key: "objectkey1",
5456
+ # key: "HappyFace.jpg",
5457
+ # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
5457
5458
  # },
5458
5459
  # {
5459
- # delete_marker: true,
5460
- # delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
5461
- # key: "objectkey2",
5460
+ # key: "HappyFace.jpg",
5461
+ # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
5462
5462
  # },
5463
5463
  # ],
5464
5464
  # }
@@ -6427,6 +6427,7 @@ module Aws::S3
6427
6427
  # @return [Types::GetBucketLifecycleConfigurationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
6428
6428
  #
6429
6429
  # * {Types::GetBucketLifecycleConfigurationOutput#rules #rules} => Array<Types::LifecycleRule>
6430
+ # * {Types::GetBucketLifecycleConfigurationOutput#transition_default_minimum_object_size #transition_default_minimum_object_size} => String
6430
6431
  #
6431
6432
  #
6432
6433
  # @example Example: To get lifecycle configuration on a bucket
@@ -6492,6 +6493,7 @@ module Aws::S3
6492
6493
  # resp.rules[0].noncurrent_version_expiration.noncurrent_days #=> Integer
6493
6494
  # resp.rules[0].noncurrent_version_expiration.newer_noncurrent_versions #=> Integer
6494
6495
  # resp.rules[0].abort_incomplete_multipart_upload.days_after_initiation #=> Integer
6496
+ # resp.transition_default_minimum_object_size #=> String, one of "varies_by_storage_class", "all_storage_classes_128K"
6495
6497
  #
6496
6498
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration AWS API Documentation
6497
6499
  #
@@ -8231,49 +8233,49 @@ module Aws::S3
8231
8233
  # * {Types::GetObjectOutput#object_lock_legal_hold_status #object_lock_legal_hold_status} => String
8232
8234
  #
8233
8235
  #
8234
- # @example Example: To retrieve an object
8236
+ # @example Example: To retrieve a byte range of an object
8235
8237
  #
8236
- # # The following example retrieves an object for an S3 bucket.
8238
+ # # The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a
8239
+ # # specific byte range.
8237
8240
  #
8238
8241
  # resp = client.get_object({
8239
8242
  # bucket: "examplebucket",
8240
- # key: "HappyFace.jpg",
8243
+ # key: "SampleFile.txt",
8244
+ # range: "bytes=0-9",
8241
8245
  # })
8242
8246
  #
8243
8247
  # resp.to_h outputs the following:
8244
8248
  # {
8245
8249
  # accept_ranges: "bytes",
8246
- # content_length: 3191,
8247
- # content_type: "image/jpeg",
8248
- # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
8249
- # last_modified: Time.parse("Thu, 15 Dec 2016 01:19:41 GMT"),
8250
+ # content_length: 10,
8251
+ # content_range: "bytes 0-9/43",
8252
+ # content_type: "text/plain",
8253
+ # etag: "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
8254
+ # last_modified: Time.parse("Thu, 09 Oct 2014 22:57:28 GMT"),
8250
8255
  # metadata: {
8251
8256
  # },
8252
- # tag_count: 2,
8253
8257
  # version_id: "null",
8254
8258
  # }
8255
8259
  #
8256
- # @example Example: To retrieve a byte range of an object
8260
+ # @example Example: To retrieve an object
8257
8261
  #
8258
- # # The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a
8259
- # # specific byte range.
8262
+ # # The following example retrieves an object for an S3 bucket.
8260
8263
  #
8261
8264
  # resp = client.get_object({
8262
8265
  # bucket: "examplebucket",
8263
- # key: "SampleFile.txt",
8264
- # range: "bytes=0-9",
8266
+ # key: "HappyFace.jpg",
8265
8267
  # })
8266
8268
  #
8267
8269
  # resp.to_h outputs the following:
8268
8270
  # {
8269
8271
  # accept_ranges: "bytes",
8270
- # content_length: 10,
8271
- # content_range: "bytes 0-9/43",
8272
- # content_type: "text/plain",
8273
- # etag: "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
8274
- # last_modified: Time.parse("Thu, 09 Oct 2014 22:57:28 GMT"),
8272
+ # content_length: 3191,
8273
+ # content_type: "image/jpeg",
8274
+ # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
8275
+ # last_modified: Time.parse("Thu, 15 Dec 2016 01:19:41 GMT"),
8275
8276
  # metadata: {
8276
8277
  # },
8278
+ # tag_count: 2,
8277
8279
  # version_id: "null",
8278
8280
  # }
8279
8281
  #
@@ -9289,49 +9291,49 @@ module Aws::S3
9289
9291
  # * {Types::GetObjectTaggingOutput#tag_set #tag_set} => Array<Types::Tag>
9290
9292
  #
9291
9293
  #
9292
- # @example Example: To retrieve tag set of a specific object version
9294
+ # @example Example: To retrieve tag set of an object
9293
9295
  #
9294
- # # The following example retrieves tag set of an object. The request specifies object version.
9296
+ # # The following example retrieves tag set of an object.
9295
9297
  #
9296
9298
  # resp = client.get_object_tagging({
9297
9299
  # bucket: "examplebucket",
9298
- # key: "exampleobject",
9299
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
9300
+ # key: "HappyFace.jpg",
9300
9301
  # })
9301
9302
  #
9302
9303
  # resp.to_h outputs the following:
9303
9304
  # {
9304
9305
  # tag_set: [
9305
9306
  # {
9306
- # key: "Key1",
9307
- # value: "Value1",
9307
+ # key: "Key4",
9308
+ # value: "Value4",
9309
+ # },
9310
+ # {
9311
+ # key: "Key3",
9312
+ # value: "Value3",
9308
9313
  # },
9309
9314
  # ],
9310
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
9315
+ # version_id: "null",
9311
9316
  # }
9312
9317
  #
9313
- # @example Example: To retrieve tag set of an object
9318
+ # @example Example: To retrieve tag set of a specific object version
9314
9319
  #
9315
- # # The following example retrieves tag set of an object.
9320
+ # # The following example retrieves tag set of an object. The request specifies object version.
9316
9321
  #
9317
9322
  # resp = client.get_object_tagging({
9318
9323
  # bucket: "examplebucket",
9319
- # key: "HappyFace.jpg",
9324
+ # key: "exampleobject",
9325
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
9320
9326
  # })
9321
9327
  #
9322
9328
  # resp.to_h outputs the following:
9323
9329
  # {
9324
9330
  # tag_set: [
9325
9331
  # {
9326
- # key: "Key4",
9327
- # value: "Value4",
9328
- # },
9329
- # {
9330
- # key: "Key3",
9331
- # value: "Value3",
9332
+ # key: "Key1",
9333
+ # value: "Value1",
9332
9334
  # },
9333
9335
  # ],
9334
- # version_id: "null",
9336
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
9335
9337
  # }
9336
9338
  #
9337
9339
  # @example Request syntax with placeholder values
@@ -9737,7 +9739,11 @@ module Aws::S3
9737
9739
  # have the `s3:GetObject` permission. You need the relevant read
9738
9740
  # object (or version) permission for this operation. For more
9739
9741
  # information, see [Actions, resources, and condition keys for
9740
- # Amazon S3][2] in the *Amazon S3 User Guide*.
9742
+ # Amazon S3][2] in the *Amazon S3 User Guide*. For more information
9743
+ # about the permissions to S3 API operations by S3 resource types,
9744
+ # see [Required permissions for Amazon S3 API
9745
+ # operations](/AmazonS3/latest/userguide/using-with-s3-policy-actions.html)
9746
+ # in the *Amazon S3 User Guide*.
9741
9747
  #
9742
9748
  # If the object you request doesn't exist, the error that Amazon S3
9743
9749
  # returns depends on whether you also have the `s3:ListBucket`
@@ -13749,23 +13755,22 @@ module Aws::S3
13749
13755
  # lifecycle configuration. For information about lifecycle
13750
13756
  # configuration, see [Managing your storage lifecycle][1].
13751
13757
  #
13752
- # <note markdown="1"> Bucket lifecycle configuration now supports specifying a lifecycle
13753
- # rule using an object key name prefix, one or more object tags, object
13754
- # size, or any combination of these. Accordingly, this section describes
13755
- # the latest API. The previous version of the API supported filtering
13756
- # based only on an object key name prefix, which is supported for
13757
- # backward compatibility. For the related API description, see
13758
- # [PutBucketLifecycle][2].
13759
- #
13760
- # </note>
13761
- #
13762
13758
  # Rules
13763
13759
  #
13764
13760
  # : You specify the lifecycle configuration in your request body. The
13765
13761
  # lifecycle configuration is specified as XML consisting of one or
13766
13762
  # more rules. An Amazon S3 Lifecycle configuration can have up to
13767
- # 1,000 rules. This limit is not adjustable. Each rule consists of the
13768
- # following:
13763
+ # 1,000 rules. This limit is not adjustable.
13764
+ #
13765
+ # Bucket lifecycle configuration supports specifying a lifecycle rule
13766
+ # using an object key name prefix, one or more object tags, object
13767
+ # size, or any combination of these. Accordingly, this section
13768
+ # describes the latest API. The previous version of the API supported
13769
+ # filtering based only on an object key name prefix, which is
13770
+ # supported for backward compatibility. For the related API
13771
+ # description, see [PutBucketLifecycle][2].
13772
+ #
13773
+ # A lifecycle rule consists of the following:
13769
13774
  #
13770
13775
  # * A filter identifying a subset of objects to which the rule
13771
13776
  # applies. The filter can be based on a key name prefix, object
@@ -13856,7 +13861,26 @@ module Aws::S3
13856
13861
  # you provide does not match the actual owner of the bucket, the request
13857
13862
  # fails with the HTTP status code `403 Forbidden` (access denied).
13858
13863
  #
13859
- # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
13864
+ # @option params [String] :transition_default_minimum_object_size
13865
+ # Indicates which default minimum object size behavior is applied to the
13866
+ # lifecycle configuration.
13867
+ #
13868
+ # * `all_storage_classes_128K` - Objects smaller than 128 KB will not
13869
+ # transition to any storage class by default.
13870
+ #
13871
+ # * `varies_by_storage_class` - Objects smaller than 128 KB will
13872
+ # transition to Glacier Flexible Retrieval or Glacier Deep Archive
13873
+ # storage classes. By default, all other storage classes will prevent
13874
+ # transitions smaller than 128 KB.
13875
+ #
13876
+ # To customize the minimum object size for any transition you can add a
13877
+ # filter that specifies a custom `ObjectSizeGreaterThan` or
13878
+ # `ObjectSizeLessThan` in the body of your transition rule. Custom
13879
+ # filters always take precedence over the default transition behavior.
13880
+ #
13881
+ # @return [Types::PutBucketLifecycleConfigurationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
13882
+ #
13883
+ # * {Types::PutBucketLifecycleConfigurationOutput#transition_default_minimum_object_size #transition_default_minimum_object_size} => String
13860
13884
  #
13861
13885
  #
13862
13886
  # @example Example: Put bucket lifecycle
@@ -13948,8 +13972,13 @@ module Aws::S3
13948
13972
  # ],
13949
13973
  # },
13950
13974
  # expected_bucket_owner: "AccountId",
13975
+ # transition_default_minimum_object_size: "varies_by_storage_class", # accepts varies_by_storage_class, all_storage_classes_128K
13951
13976
  # })
13952
13977
  #
13978
+ # @example Response structure
13979
+ #
13980
+ # resp.transition_default_minimum_object_size #=> String, one of "varies_by_storage_class", "all_storage_classes_128K"
13981
+ #
13953
13982
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration AWS API Documentation
13954
13983
  #
13955
13984
  # @overload put_bucket_lifecycle_configuration(params = {})
@@ -14702,13 +14731,13 @@ module Aws::S3
14702
14731
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
14703
14732
  # the supported algorithm from the following list:
14704
14733
  #
14705
- # * CRC32
14734
+ # * `CRC32`
14706
14735
  #
14707
- # * CRC32C
14736
+ # * `CRC32C`
14708
14737
  #
14709
- # * SHA1
14738
+ # * `SHA1`
14710
14739
  #
14711
- # * SHA256
14740
+ # * `SHA256`
14712
14741
  #
14713
14742
  # For more information, see [Checking object integrity][1] in the
14714
14743
  # *Amazon S3 User Guide*.
@@ -15883,13 +15912,13 @@ module Aws::S3
15883
15912
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
15884
15913
  # the supported algorithm from the following list:
15885
15914
  #
15886
- # * CRC32
15915
+ # * `CRC32`
15887
15916
  #
15888
- # * CRC32C
15917
+ # * `CRC32C`
15889
15918
  #
15890
- # * SHA1
15919
+ # * `SHA1`
15891
15920
  #
15892
- # * SHA256
15921
+ # * `SHA256`
15893
15922
  #
15894
15923
  # For more information, see [Checking object integrity][1] in the
15895
15924
  # *Amazon S3 User Guide*.
@@ -15912,9 +15941,9 @@ module Aws::S3
15912
15941
  # @option params [String] :checksum_crc32
15913
15942
  # This header can be used as a data integrity check to verify that the
15914
15943
  # data received is the same data that was originally sent. This header
15915
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
15916
- # more information, see [Checking object integrity][1] in the *Amazon S3
15917
- # User Guide*.
15944
+ # specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
15945
+ # For more information, see [Checking object integrity][1] in the
15946
+ # *Amazon S3 User Guide*.
15918
15947
  #
15919
15948
  #
15920
15949
  #
@@ -15923,7 +15952,7 @@ module Aws::S3
15923
15952
  # @option params [String] :checksum_crc32c
15924
15953
  # This header can be used as a data integrity check to verify that the
15925
15954
  # data received is the same data that was originally sent. This header
15926
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
15955
+ # specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
15927
15956
  # For more information, see [Checking object integrity][1] in the
15928
15957
  # *Amazon S3 User Guide*.
15929
15958
  #
@@ -16321,22 +16350,22 @@ module Aws::S3
16321
16350
  # * {Types::PutObjectOutput#request_charged #request_charged} => String
16322
16351
  #
16323
16352
  #
16324
- # @example Example: To upload an object and specify optional tags
16353
+ # @example Example: To upload an object and specify canned ACL.
16325
16354
  #
16326
- # # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
16327
- # # S3 returns version ID of the newly created object.
16355
+ # # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
16356
+ # # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
16328
16357
  #
16329
16358
  # resp = client.put_object({
16330
- # body: "c:\\HappyFace.jpg",
16359
+ # acl: "authenticated-read",
16360
+ # body: "filetoupload",
16331
16361
  # bucket: "examplebucket",
16332
- # key: "HappyFace.jpg",
16333
- # tagging: "key1=value1&key2=value2",
16362
+ # key: "exampleobject",
16334
16363
  # })
16335
16364
  #
16336
16365
  # resp.to_h outputs the following:
16337
16366
  # {
16338
16367
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
16339
- # version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
16368
+ # version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
16340
16369
  # }
16341
16370
  #
16342
16371
  # @example Example: To create an object.
@@ -16355,42 +16384,39 @@ module Aws::S3
16355
16384
  # version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
16356
16385
  # }
16357
16386
  #
16358
- # @example Example: To upload object and specify user-defined metadata
16387
+ # @example Example: To upload an object
16359
16388
  #
16360
- # # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
16361
- # # enabled, S3 returns version ID in response.
16389
+ # # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
16390
+ # # syntax. S3 returns VersionId of the newly created object.
16362
16391
  #
16363
16392
  # resp = client.put_object({
16364
- # body: "filetoupload",
16393
+ # body: "HappyFace.jpg",
16365
16394
  # bucket: "examplebucket",
16366
- # key: "exampleobject",
16367
- # metadata: {
16368
- # "metadata1" => "value1",
16369
- # "metadata2" => "value2",
16370
- # },
16395
+ # key: "HappyFace.jpg",
16371
16396
  # })
16372
16397
  #
16373
16398
  # resp.to_h outputs the following:
16374
16399
  # {
16375
16400
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
16376
- # version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
16401
+ # version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
16377
16402
  # }
16378
16403
  #
16379
- # @example Example: To upload an object
16404
+ # @example Example: To upload an object and specify optional tags
16380
16405
  #
16381
- # # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
16382
- # # syntax. S3 returns VersionId of the newly created object.
16406
+ # # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
16407
+ # # S3 returns version ID of the newly created object.
16383
16408
  #
16384
16409
  # resp = client.put_object({
16385
- # body: "HappyFace.jpg",
16410
+ # body: "c:\\HappyFace.jpg",
16386
16411
  # bucket: "examplebucket",
16387
16412
  # key: "HappyFace.jpg",
16413
+ # tagging: "key1=value1&key2=value2",
16388
16414
  # })
16389
16415
  #
16390
16416
  # resp.to_h outputs the following:
16391
16417
  # {
16392
16418
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
16393
- # version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
16419
+ # version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
16394
16420
  # }
16395
16421
  #
16396
16422
  # @example Example: To upload an object and specify server-side encryption and object tags
@@ -16413,42 +16439,45 @@ module Aws::S3
16413
16439
  # version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
16414
16440
  # }
16415
16441
  #
16416
- # @example Example: To upload an object and specify canned ACL.
16442
+ # @example Example: To upload an object (specify optional headers)
16417
16443
  #
16418
- # # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
16419
- # # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
16444
+ # # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
16445
+ # # storage class and use server-side encryption.
16420
16446
  #
16421
16447
  # resp = client.put_object({
16422
- # acl: "authenticated-read",
16423
- # body: "filetoupload",
16448
+ # body: "HappyFace.jpg",
16424
16449
  # bucket: "examplebucket",
16425
- # key: "exampleobject",
16450
+ # key: "HappyFace.jpg",
16451
+ # server_side_encryption: "AES256",
16452
+ # storage_class: "STANDARD_IA",
16426
16453
  # })
16427
16454
  #
16428
16455
  # resp.to_h outputs the following:
16429
16456
  # {
16430
16457
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
16431
- # version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
16458
+ # server_side_encryption: "AES256",
16459
+ # version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
16432
16460
  # }
16433
16461
  #
16434
- # @example Example: To upload an object (specify optional headers)
16462
+ # @example Example: To upload object and specify user-defined metadata
16435
16463
  #
16436
- # # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
16437
- # # storage class and use server-side encryption.
16464
+ # # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
16465
+ # # enabled, S3 returns version ID in response.
16438
16466
  #
16439
16467
  # resp = client.put_object({
16440
- # body: "HappyFace.jpg",
16468
+ # body: "filetoupload",
16441
16469
  # bucket: "examplebucket",
16442
- # key: "HappyFace.jpg",
16443
- # server_side_encryption: "AES256",
16444
- # storage_class: "STANDARD_IA",
16470
+ # key: "exampleobject",
16471
+ # metadata: {
16472
+ # "metadata1" => "value1",
16473
+ # "metadata2" => "value2",
16474
+ # },
16445
16475
  # })
16446
16476
  #
16447
16477
  # resp.to_h outputs the following:
16448
16478
  # {
16449
16479
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
16450
- # server_side_encryption: "AES256",
16451
- # version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
16480
+ # version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
16452
16481
  # }
16453
16482
  #
16454
16483
  # @example Streaming a file from disk
@@ -18652,9 +18681,9 @@ module Aws::S3
18652
18681
  # @option params [String] :checksum_crc32
18653
18682
  # This header can be used as a data integrity check to verify that the
18654
18683
  # data received is the same data that was originally sent. This header
18655
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
18656
- # more information, see [Checking object integrity][1] in the *Amazon S3
18657
- # User Guide*.
18684
+ # specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
18685
+ # For more information, see [Checking object integrity][1] in the
18686
+ # *Amazon S3 User Guide*.
18658
18687
  #
18659
18688
  #
18660
18689
  #
@@ -18663,7 +18692,7 @@ module Aws::S3
18663
18692
  # @option params [String] :checksum_crc32c
18664
18693
  # This header can be used as a data integrity check to verify that the
18665
18694
  # data received is the same data that was originally sent. This header
18666
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
18695
+ # specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
18667
18696
  # For more information, see [Checking object integrity][1] in the
18668
18697
  # *Amazon S3 User Guide*.
18669
18698
  #
@@ -19312,45 +19341,45 @@ module Aws::S3
19312
19341
  # * {Types::UploadPartCopyOutput#request_charged #request_charged} => String
19313
19342
  #
19314
19343
  #
19315
- # @example Example: To upload a part by copying byte range from an existing object as data source
19344
+ # @example Example: To upload a part by copying data from an existing object as data source
19316
19345
  #
19317
- # # The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as
19318
- # # data source.
19346
+ # # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
19319
19347
  #
19320
19348
  # resp = client.upload_part_copy({
19321
19349
  # bucket: "examplebucket",
19322
19350
  # copy_source: "/bucketname/sourceobjectkey",
19323
- # copy_source_range: "bytes=1-100000",
19324
19351
  # key: "examplelargeobject",
19325
- # part_number: 2,
19352
+ # part_number: 1,
19326
19353
  # upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
19327
19354
  # })
19328
19355
  #
19329
19356
  # resp.to_h outputs the following:
19330
19357
  # {
19331
19358
  # copy_part_result: {
19332
- # etag: "\"65d16d19e65a7508a51f043180edcc36\"",
19333
- # last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
19359
+ # etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
19360
+ # last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
19334
19361
  # },
19335
19362
  # }
19336
19363
  #
19337
- # @example Example: To upload a part by copying data from an existing object as data source
19364
+ # @example Example: To upload a part by copying byte range from an existing object as data source
19338
19365
  #
19339
- # # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
19366
+ # # The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as
19367
+ # # data source.
19340
19368
  #
19341
19369
  # resp = client.upload_part_copy({
19342
19370
  # bucket: "examplebucket",
19343
19371
  # copy_source: "/bucketname/sourceobjectkey",
19372
+ # copy_source_range: "bytes=1-100000",
19344
19373
  # key: "examplelargeobject",
19345
- # part_number: 1,
19374
+ # part_number: 2,
19346
19375
  # upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
19347
19376
  # })
19348
19377
  #
19349
19378
  # resp.to_h outputs the following:
19350
19379
  # {
19351
19380
  # copy_part_result: {
19352
- # etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
19353
- # last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
19381
+ # etag: "\"65d16d19e65a7508a51f043180edcc36\"",
19382
+ # last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
19354
19383
  # },
19355
19384
  # }
19356
19385
  #
@@ -19549,7 +19578,7 @@ module Aws::S3
19549
19578
  # @option params [String] :checksum_crc32
19550
19579
  # This header can be used as a data integrity check to verify that the
19551
19580
  # data received is the same data that was originally sent. This
19552
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object
19581
+ # specifies the base64-encoded, 32-bit CRC-32 checksum of the object
19553
19582
  # returned by the Object Lambda function. This may not match the
19554
19583
  # checksum for the object stored in Amazon S3. Amazon S3 will perform
19555
19584
  # validation of the checksum values only when the original `GetObject`
@@ -19569,7 +19598,7 @@ module Aws::S3
19569
19598
  # @option params [String] :checksum_crc32c
19570
19599
  # This header can be used as a data integrity check to verify that the
19571
19600
  # data received is the same data that was originally sent. This
19572
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object
19601
+ # specifies the base64-encoded, 32-bit CRC-32C checksum of the object
19573
19602
  # returned by the Object Lambda function. This may not match the
19574
19603
  # checksum for the object stored in Amazon S3. Amazon S3 will perform
19575
19604
  # validation of the checksum values only when the original `GetObject`
@@ -19812,7 +19841,7 @@ module Aws::S3
19812
19841
  tracer: tracer
19813
19842
  )
19814
19843
  context[:gem_name] = 'aws-sdk-s3'
19815
- context[:gem_version] = '1.166.0'
19844
+ context[:gem_version] = '1.167.0'
19816
19845
  Seahorse::Client::Request.new(handlers, context)
19817
19846
  end
19818
19847