aws-sdk-s3 1.51.0 → 1.52.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-s3.rb +1 -1
- data/lib/aws-sdk-s3/bucket.rb +14 -9
- data/lib/aws-sdk-s3/client.rb +130 -119
- data/lib/aws-sdk-s3/client_api.rb +8 -0
- data/lib/aws-sdk-s3/types.rb +41 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a814ef8e6233874dde5cb44e6ed61021bbdc2fb
|
4
|
+
data.tar.gz: c1d403ff3fb5bbdd20118a87d4972f6a2aa80d6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3de3fea7d0e8591c938ab2051a44234e8d53799448e9607f50d6f91dbe1b3a810030756a0ea7100f6af7c9d6bef739ef4103cb515d2aa62bf8100e62b6d81d54
|
7
|
+
data.tar.gz: 9fabeff2d629b993d671c3651ad924434fee176658c1013176a827b70a28cc42283c56cfc8bd312a4c3f167d90bc9e799d3c9dd579bfefec317f0386e9cfc4eb
|
data/lib/aws-sdk-s3.rb
CHANGED
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -596,29 +596,34 @@ module Aws::S3
|
|
596
596
|
# delimiter: "Delimiter",
|
597
597
|
# encoding_type: "url", # accepts url
|
598
598
|
# prefix: "Prefix",
|
599
|
+
# fetch_owner: false,
|
600
|
+
# start_after: "StartAfter",
|
599
601
|
# request_payer: "requester", # accepts requester
|
600
602
|
# })
|
601
603
|
# @param [Hash] options ({})
|
602
604
|
# @option options [String] :delimiter
|
603
605
|
# A delimiter is a character you use to group keys.
|
604
606
|
# @option options [String] :encoding_type
|
605
|
-
#
|
606
|
-
# specifies the encoding method to use. An object key may contain any
|
607
|
-
# Unicode character; however, XML 1.0 parser cannot parse some
|
608
|
-
# characters, such as characters with an ASCII value from 0 to 10. For
|
609
|
-
# characters that are not supported in XML 1.0, you can add this
|
610
|
-
# parameter to request that Amazon S3 encode the keys in the response.
|
607
|
+
# Encoding type used by Amazon S3 to encode object keys in the response.
|
611
608
|
# @option options [String] :prefix
|
612
609
|
# Limits the response to keys that begin with the specified prefix.
|
610
|
+
# @option options [Boolean] :fetch_owner
|
611
|
+
# The owner field is not present in listV2 by default, if you want to
|
612
|
+
# return owner field with each key in the result then set the fetch
|
613
|
+
# owner field to true
|
614
|
+
# @option options [String] :start_after
|
615
|
+
# StartAfter is where you want Amazon S3 to start listing from. Amazon
|
616
|
+
# S3 starts listing after this specified key. StartAfter can be any key
|
617
|
+
# in the bucket
|
613
618
|
# @option options [String] :request_payer
|
614
619
|
# Confirms that the requester knows that she or he will be charged for
|
615
|
-
# the list objects request. Bucket owners need not specify
|
616
|
-
# parameter in their requests.
|
620
|
+
# the list objects request in V2 style. Bucket owners need not specify
|
621
|
+
# this parameter in their requests.
|
617
622
|
# @return [ObjectSummary::Collection]
|
618
623
|
def objects(options = {})
|
619
624
|
batches = Enumerator.new do |y|
|
620
625
|
options = options.merge(bucket: @name)
|
621
|
-
resp = @client.
|
626
|
+
resp = @client.list_objects_v2(options)
|
622
627
|
resp.each_page do |page|
|
623
628
|
batch = []
|
624
629
|
page.data.contents.each do |c|
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -1450,35 +1450,35 @@ module Aws::S3
|
|
1450
1450
|
# * {Types::DeleteObjectTaggingOutput#version_id #version_id} => String
|
1451
1451
|
#
|
1452
1452
|
#
|
1453
|
-
# @example Example: To remove tag set from an object
|
1453
|
+
# @example Example: To remove tag set from an object version
|
1454
1454
|
#
|
1455
|
-
# # The following example removes tag set associated with the specified object.
|
1456
|
-
# #
|
1455
|
+
# # The following example removes tag set associated with the specified object version. The request specifies both the
|
1456
|
+
# # object key and object version.
|
1457
1457
|
#
|
1458
1458
|
# resp = client.delete_object_tagging({
|
1459
1459
|
# bucket: "examplebucket",
|
1460
1460
|
# key: "HappyFace.jpg",
|
1461
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
1461
1462
|
# })
|
1462
1463
|
#
|
1463
1464
|
# resp.to_h outputs the following:
|
1464
1465
|
# {
|
1465
|
-
# version_id: "
|
1466
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
1466
1467
|
# }
|
1467
1468
|
#
|
1468
|
-
# @example Example: To remove tag set from an object
|
1469
|
+
# @example Example: To remove tag set from an object
|
1469
1470
|
#
|
1470
|
-
# # The following example removes tag set associated with the specified object
|
1471
|
-
# #
|
1471
|
+
# # The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the
|
1472
|
+
# # operation removes tag set from the latest object version.
|
1472
1473
|
#
|
1473
1474
|
# resp = client.delete_object_tagging({
|
1474
1475
|
# bucket: "examplebucket",
|
1475
1476
|
# key: "HappyFace.jpg",
|
1476
|
-
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
1477
1477
|
# })
|
1478
1478
|
#
|
1479
1479
|
# resp.to_h outputs the following:
|
1480
1480
|
# {
|
1481
|
-
# version_id: "
|
1481
|
+
# version_id: "null",
|
1482
1482
|
# }
|
1483
1483
|
#
|
1484
1484
|
# @example Request syntax with placeholder values
|
@@ -1532,22 +1532,20 @@ module Aws::S3
|
|
1532
1532
|
# * {Types::DeleteObjectsOutput#errors #errors} => Array<Types::Error>
|
1533
1533
|
#
|
1534
1534
|
#
|
1535
|
-
# @example Example: To delete multiple
|
1535
|
+
# @example Example: To delete multiple objects from a versioned bucket
|
1536
1536
|
#
|
1537
|
-
# # The following example deletes objects from a bucket. The
|
1538
|
-
# #
|
1537
|
+
# # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
|
1538
|
+
# # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
|
1539
1539
|
#
|
1540
1540
|
# resp = client.delete_objects({
|
1541
1541
|
# bucket: "examplebucket",
|
1542
1542
|
# delete: {
|
1543
1543
|
# objects: [
|
1544
1544
|
# {
|
1545
|
-
# key: "
|
1546
|
-
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
1545
|
+
# key: "objectkey1",
|
1547
1546
|
# },
|
1548
1547
|
# {
|
1549
|
-
# key: "
|
1550
|
-
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
1548
|
+
# key: "objectkey2",
|
1551
1549
|
# },
|
1552
1550
|
# ],
|
1553
1551
|
# quiet: false,
|
@@ -1558,30 +1556,34 @@ module Aws::S3
|
|
1558
1556
|
# {
|
1559
1557
|
# deleted: [
|
1560
1558
|
# {
|
1561
|
-
#
|
1562
|
-
#
|
1559
|
+
# delete_marker: true,
|
1560
|
+
# delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
|
1561
|
+
# key: "objectkey1",
|
1563
1562
|
# },
|
1564
1563
|
# {
|
1565
|
-
#
|
1566
|
-
#
|
1564
|
+
# delete_marker: true,
|
1565
|
+
# delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
|
1566
|
+
# key: "objectkey2",
|
1567
1567
|
# },
|
1568
1568
|
# ],
|
1569
1569
|
# }
|
1570
1570
|
#
|
1571
|
-
# @example Example: To delete multiple
|
1571
|
+
# @example Example: To delete multiple object versions from a versioned bucket
|
1572
1572
|
#
|
1573
|
-
# # The following example deletes objects from a bucket. The
|
1574
|
-
# #
|
1573
|
+
# # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
|
1574
|
+
# # versions and returns the key and versions of deleted objects in the response.
|
1575
1575
|
#
|
1576
1576
|
# resp = client.delete_objects({
|
1577
1577
|
# bucket: "examplebucket",
|
1578
1578
|
# delete: {
|
1579
1579
|
# objects: [
|
1580
1580
|
# {
|
1581
|
-
# key: "
|
1581
|
+
# key: "HappyFace.jpg",
|
1582
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
1582
1583
|
# },
|
1583
1584
|
# {
|
1584
|
-
# key: "
|
1585
|
+
# key: "HappyFace.jpg",
|
1586
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
1585
1587
|
# },
|
1586
1588
|
# ],
|
1587
1589
|
# quiet: false,
|
@@ -1592,14 +1594,12 @@ module Aws::S3
|
|
1592
1594
|
# {
|
1593
1595
|
# deleted: [
|
1594
1596
|
# {
|
1595
|
-
#
|
1596
|
-
#
|
1597
|
-
# key: "objectkey1",
|
1597
|
+
# key: "HappyFace.jpg",
|
1598
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
1598
1599
|
# },
|
1599
1600
|
# {
|
1600
|
-
#
|
1601
|
-
#
|
1602
|
-
# key: "objectkey2",
|
1601
|
+
# key: "HappyFace.jpg",
|
1602
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
1603
1603
|
# },
|
1604
1604
|
# ],
|
1605
1605
|
# }
|
@@ -3811,97 +3811,97 @@ module Aws::S3
|
|
3811
3811
|
# * {Types::ListMultipartUploadsOutput#encoding_type #encoding_type} => String
|
3812
3812
|
#
|
3813
3813
|
#
|
3814
|
-
# @example Example:
|
3814
|
+
# @example Example: To list in-progress multipart uploads on a bucket
|
3815
3815
|
#
|
3816
|
-
# # The following example
|
3817
|
-
# # setup of multipart uploads.
|
3816
|
+
# # The following example lists in-progress multipart uploads on a specific bucket.
|
3818
3817
|
#
|
3819
3818
|
# resp = client.list_multipart_uploads({
|
3820
3819
|
# bucket: "examplebucket",
|
3821
|
-
# key_marker: "nextkeyfrompreviousresponse",
|
3822
|
-
# max_uploads: 2,
|
3823
|
-
# upload_id_marker: "valuefrompreviousresponse",
|
3824
3820
|
# })
|
3825
3821
|
#
|
3826
3822
|
# resp.to_h outputs the following:
|
3827
3823
|
# {
|
3828
|
-
# bucket: "acl1",
|
3829
|
-
# is_truncated: true,
|
3830
|
-
# key_marker: "",
|
3831
|
-
# max_uploads: 2,
|
3832
|
-
# next_key_marker: "someobjectkey",
|
3833
|
-
# next_upload_id_marker: "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
|
3834
|
-
# upload_id_marker: "",
|
3835
3824
|
# uploads: [
|
3836
3825
|
# {
|
3837
3826
|
# initiated: Time.parse("2014-05-01T05:40:58.000Z"),
|
3838
3827
|
# initiator: {
|
3839
|
-
# display_name: "
|
3828
|
+
# display_name: "display-name",
|
3840
3829
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
3841
3830
|
# },
|
3842
3831
|
# key: "JavaFile",
|
3843
3832
|
# owner: {
|
3844
|
-
# display_name: "
|
3845
|
-
# id: "
|
3833
|
+
# display_name: "display-name",
|
3834
|
+
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
3846
3835
|
# },
|
3847
3836
|
# storage_class: "STANDARD",
|
3848
|
-
# upload_id: "
|
3837
|
+
# upload_id: "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--",
|
3849
3838
|
# },
|
3850
3839
|
# {
|
3851
3840
|
# initiated: Time.parse("2014-05-01T05:41:27.000Z"),
|
3852
3841
|
# initiator: {
|
3853
|
-
# display_name: "
|
3842
|
+
# display_name: "display-name",
|
3854
3843
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
3855
3844
|
# },
|
3856
3845
|
# key: "JavaFile",
|
3857
3846
|
# owner: {
|
3858
|
-
# display_name: "
|
3847
|
+
# display_name: "display-name",
|
3859
3848
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
3860
3849
|
# },
|
3861
3850
|
# storage_class: "STANDARD",
|
3862
|
-
# upload_id: "
|
3851
|
+
# upload_id: "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
|
3863
3852
|
# },
|
3864
3853
|
# ],
|
3865
3854
|
# }
|
3866
3855
|
#
|
3867
|
-
# @example Example:
|
3856
|
+
# @example Example: List next set of multipart uploads when previous result is truncated
|
3868
3857
|
#
|
3869
|
-
# # The following example
|
3858
|
+
# # The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next
|
3859
|
+
# # setup of multipart uploads.
|
3870
3860
|
#
|
3871
3861
|
# resp = client.list_multipart_uploads({
|
3872
3862
|
# bucket: "examplebucket",
|
3863
|
+
# key_marker: "nextkeyfrompreviousresponse",
|
3864
|
+
# max_uploads: 2,
|
3865
|
+
# upload_id_marker: "valuefrompreviousresponse",
|
3873
3866
|
# })
|
3874
3867
|
#
|
3875
3868
|
# resp.to_h outputs the following:
|
3876
3869
|
# {
|
3870
|
+
# bucket: "acl1",
|
3871
|
+
# is_truncated: true,
|
3872
|
+
# key_marker: "",
|
3873
|
+
# max_uploads: 2,
|
3874
|
+
# next_key_marker: "someobjectkey",
|
3875
|
+
# next_upload_id_marker: "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
|
3876
|
+
# upload_id_marker: "",
|
3877
3877
|
# uploads: [
|
3878
3878
|
# {
|
3879
3879
|
# initiated: Time.parse("2014-05-01T05:40:58.000Z"),
|
3880
3880
|
# initiator: {
|
3881
|
-
# display_name: "display-name",
|
3881
|
+
# display_name: "ownder-display-name",
|
3882
3882
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
3883
3883
|
# },
|
3884
3884
|
# key: "JavaFile",
|
3885
3885
|
# owner: {
|
3886
|
-
# display_name: "
|
3887
|
-
# id: "
|
3886
|
+
# display_name: "mohanataws",
|
3887
|
+
# id: "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
3888
3888
|
# },
|
3889
3889
|
# storage_class: "STANDARD",
|
3890
|
-
# upload_id: "
|
3890
|
+
# upload_id: "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--",
|
3891
3891
|
# },
|
3892
3892
|
# {
|
3893
3893
|
# initiated: Time.parse("2014-05-01T05:41:27.000Z"),
|
3894
3894
|
# initiator: {
|
3895
|
-
# display_name: "display-name",
|
3895
|
+
# display_name: "ownder-display-name",
|
3896
3896
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
3897
3897
|
# },
|
3898
3898
|
# key: "JavaFile",
|
3899
3899
|
# owner: {
|
3900
|
-
# display_name: "display-name",
|
3900
|
+
# display_name: "ownder-display-name",
|
3901
3901
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
3902
3902
|
# },
|
3903
3903
|
# storage_class: "STANDARD",
|
3904
|
-
# upload_id: "
|
3904
|
+
# upload_id: "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
|
3905
3905
|
# },
|
3906
3906
|
# ],
|
3907
3907
|
# }
|
@@ -5767,24 +5767,6 @@ module Aws::S3
|
|
5767
5767
|
# * {Types::PutObjectOutput#request_charged #request_charged} => String
|
5768
5768
|
#
|
5769
5769
|
#
|
5770
|
-
# @example Example: To upload an object and specify canned ACL.
|
5771
|
-
#
|
5772
|
-
# # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
|
5773
|
-
# # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
|
5774
|
-
#
|
5775
|
-
# resp = client.put_object({
|
5776
|
-
# acl: "authenticated-read",
|
5777
|
-
# body: "filetoupload",
|
5778
|
-
# bucket: "examplebucket",
|
5779
|
-
# key: "exampleobject",
|
5780
|
-
# })
|
5781
|
-
#
|
5782
|
-
# resp.to_h outputs the following:
|
5783
|
-
# {
|
5784
|
-
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
5785
|
-
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
5786
|
-
# }
|
5787
|
-
#
|
5788
5770
|
# @example Example: To upload an object and specify optional tags
|
5789
5771
|
#
|
5790
5772
|
# # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
|
@@ -5803,61 +5785,58 @@ module Aws::S3
|
|
5803
5785
|
# version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
|
5804
5786
|
# }
|
5805
5787
|
#
|
5806
|
-
# @example Example: To upload object and specify
|
5788
|
+
# @example Example: To upload an object and specify canned ACL.
|
5807
5789
|
#
|
5808
|
-
# # The following example
|
5809
|
-
# # enabled, S3 returns version ID in response.
|
5790
|
+
# # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
|
5791
|
+
# # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
|
5810
5792
|
#
|
5811
5793
|
# resp = client.put_object({
|
5794
|
+
# acl: "authenticated-read",
|
5812
5795
|
# body: "filetoupload",
|
5813
5796
|
# bucket: "examplebucket",
|
5814
5797
|
# key: "exampleobject",
|
5815
|
-
# metadata: {
|
5816
|
-
# "metadata1" => "value1",
|
5817
|
-
# "metadata2" => "value2",
|
5818
|
-
# },
|
5819
5798
|
# })
|
5820
5799
|
#
|
5821
5800
|
# resp.to_h outputs the following:
|
5822
5801
|
# {
|
5823
5802
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
5824
|
-
# version_id: "
|
5803
|
+
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
5825
5804
|
# }
|
5826
5805
|
#
|
5827
|
-
# @example Example: To
|
5806
|
+
# @example Example: To create an object.
|
5828
5807
|
#
|
5829
|
-
# # The following example
|
5830
|
-
# # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
|
5808
|
+
# # The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
|
5831
5809
|
#
|
5832
5810
|
# resp = client.put_object({
|
5833
5811
|
# body: "filetoupload",
|
5834
5812
|
# bucket: "examplebucket",
|
5835
|
-
# key: "
|
5836
|
-
# server_side_encryption: "AES256",
|
5837
|
-
# tagging: "key1=value1&key2=value2",
|
5813
|
+
# key: "objectkey",
|
5838
5814
|
# })
|
5839
5815
|
#
|
5840
5816
|
# resp.to_h outputs the following:
|
5841
5817
|
# {
|
5842
5818
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
5843
|
-
#
|
5844
|
-
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
5819
|
+
# version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
|
5845
5820
|
# }
|
5846
5821
|
#
|
5847
|
-
# @example Example: To
|
5822
|
+
# @example Example: To upload an object (specify optional headers)
|
5848
5823
|
#
|
5849
|
-
# # The following example
|
5824
|
+
# # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
|
5825
|
+
# # storage class and use server-side encryption.
|
5850
5826
|
#
|
5851
5827
|
# resp = client.put_object({
|
5852
|
-
# body: "
|
5828
|
+
# body: "HappyFace.jpg",
|
5853
5829
|
# bucket: "examplebucket",
|
5854
|
-
# key: "
|
5830
|
+
# key: "HappyFace.jpg",
|
5831
|
+
# server_side_encryption: "AES256",
|
5832
|
+
# storage_class: "STANDARD_IA",
|
5855
5833
|
# })
|
5856
5834
|
#
|
5857
5835
|
# resp.to_h outputs the following:
|
5858
5836
|
# {
|
5859
5837
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
5860
|
-
#
|
5838
|
+
# server_side_encryption: "AES256",
|
5839
|
+
# version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
|
5861
5840
|
# }
|
5862
5841
|
#
|
5863
5842
|
# @example Example: To upload an object
|
@@ -5877,24 +5856,45 @@ module Aws::S3
|
|
5877
5856
|
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
5878
5857
|
# }
|
5879
5858
|
#
|
5880
|
-
# @example Example: To upload
|
5859
|
+
# @example Example: To upload object and specify user-defined metadata
|
5881
5860
|
#
|
5882
|
-
# # The following example
|
5883
|
-
# #
|
5861
|
+
# # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
|
5862
|
+
# # enabled, S3 returns version ID in response.
|
5884
5863
|
#
|
5885
5864
|
# resp = client.put_object({
|
5886
|
-
# body: "
|
5865
|
+
# body: "filetoupload",
|
5887
5866
|
# bucket: "examplebucket",
|
5888
|
-
# key: "
|
5867
|
+
# key: "exampleobject",
|
5868
|
+
# metadata: {
|
5869
|
+
# "metadata1" => "value1",
|
5870
|
+
# "metadata2" => "value2",
|
5871
|
+
# },
|
5872
|
+
# })
|
5873
|
+
#
|
5874
|
+
# resp.to_h outputs the following:
|
5875
|
+
# {
|
5876
|
+
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
5877
|
+
# version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
|
5878
|
+
# }
|
5879
|
+
#
|
5880
|
+
# @example Example: To upload an object and specify server-side encryption and object tags
|
5881
|
+
#
|
5882
|
+
# # The following example uploads and object. The request specifies the optional server-side encryption option. The request
|
5883
|
+
# # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
|
5884
|
+
#
|
5885
|
+
# resp = client.put_object({
|
5886
|
+
# body: "filetoupload",
|
5887
|
+
# bucket: "examplebucket",
|
5888
|
+
# key: "exampleobject",
|
5889
5889
|
# server_side_encryption: "AES256",
|
5890
|
-
#
|
5890
|
+
# tagging: "key1=value1&key2=value2",
|
5891
5891
|
# })
|
5892
5892
|
#
|
5893
5893
|
# resp.to_h outputs the following:
|
5894
5894
|
# {
|
5895
5895
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
5896
5896
|
# server_side_encryption: "AES256",
|
5897
|
-
# version_id: "
|
5897
|
+
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
5898
5898
|
# }
|
5899
5899
|
#
|
5900
5900
|
# @example Streaming a file from disk
|
@@ -6574,6 +6574,13 @@ module Aws::S3
|
|
6574
6574
|
# Describes the format of the data that you want Amazon S3 to return in
|
6575
6575
|
# response.
|
6576
6576
|
#
|
6577
|
+
# @option params [Types::ScanRange] :scan_range
|
6578
|
+
# Specifies the byte range of the object to get the records from. A
|
6579
|
+
# record is processed when its first byte is contained by the range.
|
6580
|
+
# This parameter is optional, but when specified, it must not be empty.
|
6581
|
+
# See RFC 2616, Section 14.35.1 about how to specify the start and end
|
6582
|
+
# of the range.
|
6583
|
+
#
|
6577
6584
|
# @return [Types::SelectObjectContentOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
6578
6585
|
#
|
6579
6586
|
# * {Types::SelectObjectContentOutput#payload #payload} => Types::SelectObjectContentEventStream
|
@@ -6740,6 +6747,10 @@ module Aws::S3
|
|
6740
6747
|
# record_delimiter: "RecordDelimiter",
|
6741
6748
|
# },
|
6742
6749
|
# },
|
6750
|
+
# scan_range: {
|
6751
|
+
# start: 1,
|
6752
|
+
# end: 1,
|
6753
|
+
# },
|
6743
6754
|
# })
|
6744
6755
|
#
|
6745
6756
|
# @example Response structure
|
@@ -7002,45 +7013,45 @@ module Aws::S3
|
|
7002
7013
|
# * {Types::UploadPartCopyOutput#request_charged #request_charged} => String
|
7003
7014
|
#
|
7004
7015
|
#
|
7005
|
-
# @example Example: To upload a part by copying
|
7016
|
+
# @example Example: To upload a part by copying byte range from an existing object as data source
|
7006
7017
|
#
|
7007
|
-
# # The following example uploads a part of a multipart upload by copying
|
7018
|
+
# # The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as
|
7019
|
+
# # data source.
|
7008
7020
|
#
|
7009
7021
|
# resp = client.upload_part_copy({
|
7010
7022
|
# bucket: "examplebucket",
|
7011
7023
|
# copy_source: "/bucketname/sourceobjectkey",
|
7024
|
+
# copy_source_range: "bytes=1-100000",
|
7012
7025
|
# key: "examplelargeobject",
|
7013
|
-
# part_number:
|
7026
|
+
# part_number: 2,
|
7014
7027
|
# upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
|
7015
7028
|
# })
|
7016
7029
|
#
|
7017
7030
|
# resp.to_h outputs the following:
|
7018
7031
|
# {
|
7019
7032
|
# copy_part_result: {
|
7020
|
-
# etag: "\"
|
7021
|
-
# last_modified: Time.parse("2016-12-29T21:
|
7033
|
+
# etag: "\"65d16d19e65a7508a51f043180edcc36\"",
|
7034
|
+
# last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
|
7022
7035
|
# },
|
7023
7036
|
# }
|
7024
7037
|
#
|
7025
|
-
# @example Example: To upload a part by copying
|
7038
|
+
# @example Example: To upload a part by copying data from an existing object as data source
|
7026
7039
|
#
|
7027
|
-
# # The following example uploads a part of a multipart upload by copying
|
7028
|
-
# # data source.
|
7040
|
+
# # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
|
7029
7041
|
#
|
7030
7042
|
# resp = client.upload_part_copy({
|
7031
7043
|
# bucket: "examplebucket",
|
7032
7044
|
# copy_source: "/bucketname/sourceobjectkey",
|
7033
|
-
# copy_source_range: "bytes=1-100000",
|
7034
7045
|
# key: "examplelargeobject",
|
7035
|
-
# part_number:
|
7046
|
+
# part_number: 1,
|
7036
7047
|
# upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
|
7037
7048
|
# })
|
7038
7049
|
#
|
7039
7050
|
# resp.to_h outputs the following:
|
7040
7051
|
# {
|
7041
7052
|
# copy_part_result: {
|
7042
|
-
# etag: "\"
|
7043
|
-
# last_modified: Time.parse("2016-12-29T21:
|
7053
|
+
# etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
|
7054
|
+
# last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
|
7044
7055
|
# },
|
7045
7056
|
# }
|
7046
7057
|
#
|
@@ -7099,7 +7110,7 @@ module Aws::S3
|
|
7099
7110
|
params: params,
|
7100
7111
|
config: config)
|
7101
7112
|
context[:gem_name] = 'aws-sdk-s3'
|
7102
|
-
context[:gem_version] = '1.
|
7113
|
+
context[:gem_version] = '1.52.0'
|
7103
7114
|
Seahorse::Client::Request.new(handlers, context)
|
7104
7115
|
end
|
7105
7116
|
|
@@ -143,6 +143,7 @@ module Aws::S3
|
|
143
143
|
EncodingType = Shapes::StringShape.new(name: 'EncodingType')
|
144
144
|
Encryption = Shapes::StructureShape.new(name: 'Encryption')
|
145
145
|
EncryptionConfiguration = Shapes::StructureShape.new(name: 'EncryptionConfiguration')
|
146
|
+
End = Shapes::IntegerShape.new(name: 'End')
|
146
147
|
EndEvent = Shapes::StructureShape.new(name: 'EndEvent')
|
147
148
|
Error = Shapes::StructureShape.new(name: 'Error')
|
148
149
|
ErrorDocument = Shapes::StructureShape.new(name: 'ErrorDocument')
|
@@ -463,6 +464,7 @@ module Aws::S3
|
|
463
464
|
SSEKMSEncryptionContext = Shapes::StringShape.new(name: 'SSEKMSEncryptionContext')
|
464
465
|
SSEKMSKeyId = Shapes::StringShape.new(name: 'SSEKMSKeyId')
|
465
466
|
SSES3 = Shapes::StructureShape.new(name: 'SSES3')
|
467
|
+
ScanRange = Shapes::StructureShape.new(name: 'ScanRange')
|
466
468
|
SelectObjectContentEventStream = Shapes::StructureShape.new(name: 'SelectObjectContentEventStream')
|
467
469
|
SelectObjectContentOutput = Shapes::StructureShape.new(name: 'SelectObjectContentOutput')
|
468
470
|
SelectObjectContentRequest = Shapes::StructureShape.new(name: 'SelectObjectContentRequest')
|
@@ -477,6 +479,7 @@ module Aws::S3
|
|
477
479
|
SourceSelectionCriteria = Shapes::StructureShape.new(name: 'SourceSelectionCriteria')
|
478
480
|
SseKmsEncryptedObjects = Shapes::StructureShape.new(name: 'SseKmsEncryptedObjects')
|
479
481
|
SseKmsEncryptedObjectsStatus = Shapes::StringShape.new(name: 'SseKmsEncryptedObjectsStatus')
|
482
|
+
Start = Shapes::IntegerShape.new(name: 'Start')
|
480
483
|
StartAfter = Shapes::StringShape.new(name: 'StartAfter')
|
481
484
|
Stats = Shapes::StructureShape.new(name: 'Stats')
|
482
485
|
StatsEvent = Shapes::StructureShape.new(name: 'StatsEvent')
|
@@ -1997,6 +2000,10 @@ module Aws::S3
|
|
1997
2000
|
|
1998
2001
|
SSES3.struct_class = Types::SSES3
|
1999
2002
|
|
2003
|
+
ScanRange.add_member(:start, Shapes::ShapeRef.new(shape: Start, location_name: "Start"))
|
2004
|
+
ScanRange.add_member(:end, Shapes::ShapeRef.new(shape: End, location_name: "End"))
|
2005
|
+
ScanRange.struct_class = Types::ScanRange
|
2006
|
+
|
2000
2007
|
SelectObjectContentEventStream.add_member(:records, Shapes::ShapeRef.new(shape: RecordsEvent, event: true, location_name: "Records"))
|
2001
2008
|
SelectObjectContentEventStream.add_member(:stats, Shapes::ShapeRef.new(shape: StatsEvent, event: true, location_name: "Stats"))
|
2002
2009
|
SelectObjectContentEventStream.add_member(:progress, Shapes::ShapeRef.new(shape: ProgressEvent, event: true, location_name: "Progress"))
|
@@ -2019,6 +2026,7 @@ module Aws::S3
|
|
2019
2026
|
SelectObjectContentRequest.add_member(:request_progress, Shapes::ShapeRef.new(shape: RequestProgress, location_name: "RequestProgress"))
|
2020
2027
|
SelectObjectContentRequest.add_member(:input_serialization, Shapes::ShapeRef.new(shape: InputSerialization, required: true, location_name: "InputSerialization"))
|
2021
2028
|
SelectObjectContentRequest.add_member(:output_serialization, Shapes::ShapeRef.new(shape: OutputSerialization, required: true, location_name: "OutputSerialization"))
|
2029
|
+
SelectObjectContentRequest.add_member(:scan_range, Shapes::ShapeRef.new(shape: ScanRange, location_name: "ScanRange"))
|
2022
2030
|
SelectObjectContentRequest.struct_class = Types::SelectObjectContentRequest
|
2023
2031
|
|
2024
2032
|
SelectParameters.add_member(:input_serialization, Shapes::ShapeRef.new(shape: InputSerialization, required: true, location_name: "InputSerialization"))
|
data/lib/aws-sdk-s3/types.rb
CHANGED
@@ -9245,6 +9245,33 @@ module Aws::S3
|
|
9245
9245
|
#
|
9246
9246
|
class SSES3 < Aws::EmptyStructure; end
|
9247
9247
|
|
9248
|
+
# @note When making an API call, you may pass ScanRange
|
9249
|
+
# data as a hash:
|
9250
|
+
#
|
9251
|
+
# {
|
9252
|
+
# start: 1,
|
9253
|
+
# end: 1,
|
9254
|
+
# }
|
9255
|
+
#
|
9256
|
+
# @!attribute [rw] start
|
9257
|
+
# Specifies the start of the byte range. This parameter is optional.
|
9258
|
+
# Valid values: non-negative integers. The default value is 0.
|
9259
|
+
# @return [Integer]
|
9260
|
+
#
|
9261
|
+
# @!attribute [rw] end
|
9262
|
+
# Specifies the end of the byte range. This parameter is optional.
|
9263
|
+
# Valid values: non-negative integers. The default value is one less
|
9264
|
+
# than the size of the object being queried.
|
9265
|
+
# @return [Integer]
|
9266
|
+
#
|
9267
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ScanRange AWS API Documentation
|
9268
|
+
#
|
9269
|
+
class ScanRange < Struct.new(
|
9270
|
+
:start,
|
9271
|
+
:end)
|
9272
|
+
include Aws::Structure
|
9273
|
+
end
|
9274
|
+
|
9248
9275
|
# @!attribute [rw] payload
|
9249
9276
|
# @return [Types::SelectObjectContentEventStream]
|
9250
9277
|
#
|
@@ -9311,6 +9338,10 @@ module Aws::S3
|
|
9311
9338
|
# record_delimiter: "RecordDelimiter",
|
9312
9339
|
# },
|
9313
9340
|
# },
|
9341
|
+
# scan_range: {
|
9342
|
+
# start: 1,
|
9343
|
+
# end: 1,
|
9344
|
+
# },
|
9314
9345
|
# }
|
9315
9346
|
#
|
9316
9347
|
# @!attribute [rw] bucket
|
@@ -9372,6 +9403,14 @@ module Aws::S3
|
|
9372
9403
|
# in response.
|
9373
9404
|
# @return [Types::OutputSerialization]
|
9374
9405
|
#
|
9406
|
+
# @!attribute [rw] scan_range
|
9407
|
+
# Specifies the byte range of the object to get the records from. A
|
9408
|
+
# record is processed when its first byte is contained by the range.
|
9409
|
+
# This parameter is optional, but when specified, it must not be
|
9410
|
+
# empty. See RFC 2616, Section 14.35.1 about how to specify the start
|
9411
|
+
# and end of the range.
|
9412
|
+
# @return [Types::ScanRange]
|
9413
|
+
#
|
9375
9414
|
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContentRequest AWS API Documentation
|
9376
9415
|
#
|
9377
9416
|
class SelectObjectContentRequest < Struct.new(
|
@@ -9384,7 +9423,8 @@ module Aws::S3
|
|
9384
9423
|
:expression_type,
|
9385
9424
|
:request_progress,
|
9386
9425
|
:input_serialization,
|
9387
|
-
:output_serialization
|
9426
|
+
:output_serialization,
|
9427
|
+
:scan_range)
|
9388
9428
|
include Aws::Structure
|
9389
9429
|
end
|
9390
9430
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.52.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-kms
|