aws-sdk-s3 1.137.0 → 1.140.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +2 -1
- data/lib/aws-sdk-s3/bucket_logging.rb +7 -0
- data/lib/aws-sdk-s3/client.rb +114 -90
- data/lib/aws-sdk-s3/client_api.rb +29 -15
- data/lib/aws-sdk-s3/endpoint_parameters.rb +16 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +2 -0
- data/lib/aws-sdk-s3/endpoints.rb +194 -0
- data/lib/aws-sdk-s3/file_downloader.rb +0 -1
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +0 -1
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +0 -1
- data/lib/aws-sdk-s3/multipart_upload.rb +5 -4
- data/lib/aws-sdk-s3/object.rb +6 -3
- data/lib/aws-sdk-s3/object_summary.rb +5 -2
- data/lib/aws-sdk-s3/object_version.rb +1 -1
- data/lib/aws-sdk-s3/types.rb +76 -13
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f75d0aee4d0695a751671390cae885e01f2e2be81ec45872f65168cdf5628f9
|
4
|
+
data.tar.gz: 3cec853f15506694fd50b9e86d5260d332b609a17fec0fdff3e7dbe5b23d2e6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8b7a1756c9d6b6cbd13094d3ad349c10fdc5645267773fd85660da45e29da91c4fbee23be0802a8df707aca4abc7d7a371b27b43058b946dcf772af558d0e95
|
7
|
+
data.tar.gz: 8dd49de681a88fb3f92659b3159be0902b12cd924efb6801c5347dea96bf52a995ccfbb27aa82fcb6de27b71a0fa16bbe21ade4f93681404426dabce8a681378
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,23 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.140.0 (2023-11-27)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Adding new params - Key and Prefix, to S3 API operations for supporting S3 Access Grants. Note - These updates will not change any of the existing S3 API functionality.
|
8
|
+
|
9
|
+
* Issue - Fix thread interruptions in multipart `download_file`, `file_uploader` and `stream_uploader` (#2944).
|
10
|
+
|
11
|
+
1.139.0 (2023-11-22)
|
12
|
+
------------------
|
13
|
+
|
14
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
15
|
+
|
16
|
+
1.138.0 (2023-11-21)
|
17
|
+
------------------
|
18
|
+
|
19
|
+
* Feature - Add support for automatic date based partitioning in S3 Server Access Logs.
|
20
|
+
|
4
21
|
1.137.0 (2023-11-17)
|
5
22
|
------------------
|
6
23
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.140.0
|
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -641,7 +641,8 @@ module Aws::S3
|
|
641
641
|
# string holding JSON with the encryption context key-value pairs. This
|
642
642
|
# value is stored as object metadata and automatically gets passed on to
|
643
643
|
# Amazon Web Services KMS for future `GetObject` or `CopyObject`
|
644
|
-
# operations on this object.
|
644
|
+
# operations on this object. This value must be explicitly added during
|
645
|
+
# CopyObject operations.
|
645
646
|
# @option options [Boolean] :bucket_key_enabled
|
646
647
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
647
648
|
# encryption with server-side encryption using Key Management Service
|
@@ -203,6 +203,13 @@ module Aws::S3
|
|
203
203
|
# },
|
204
204
|
# ],
|
205
205
|
# target_prefix: "TargetPrefix", # required
|
206
|
+
# target_object_key_format: {
|
207
|
+
# simple_prefix: {
|
208
|
+
# },
|
209
|
+
# partitioned_prefix: {
|
210
|
+
# partition_date_source: "EventTime", # accepts EventTime, DeliveryTime
|
211
|
+
# },
|
212
|
+
# },
|
206
213
|
# },
|
207
214
|
# },
|
208
215
|
# content_md5: "ContentMD5",
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -799,13 +799,14 @@ module Aws::S3
|
|
799
799
|
#
|
800
800
|
# @option params [String] :sse_customer_algorithm
|
801
801
|
# The server-side encryption (SSE) algorithm used to encrypt the object.
|
802
|
-
# This parameter is
|
803
|
-
# checksum algorithm
|
804
|
-
# SSE-C keys][1] in the
|
802
|
+
# This parameter is required only when the object was created using a
|
803
|
+
# checksum algorithm or if your bucket policy requires the use of SSE-C.
|
804
|
+
# For more information, see [Protecting data using SSE-C keys][1] in the
|
805
|
+
# *Amazon S3 User Guide*.
|
805
806
|
#
|
806
807
|
#
|
807
808
|
#
|
808
|
-
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/
|
809
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key
|
809
810
|
#
|
810
811
|
# @option params [String] :sse_customer_key
|
811
812
|
# The server-side encryption (SSE) customer managed key. This parameter
|
@@ -1383,7 +1384,9 @@ module Aws::S3
|
|
1383
1384
|
# @option params [String] :ssekms_encryption_context
|
1384
1385
|
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
1385
1386
|
# object encryption. The value of this header is a base64-encoded UTF-8
|
1386
|
-
# string holding JSON with the encryption context key-value pairs.
|
1387
|
+
# string holding JSON with the encryption context key-value pairs. This
|
1388
|
+
# value must be explicitly added to specify encryption context for
|
1389
|
+
# CopyObject requests.
|
1387
1390
|
#
|
1388
1391
|
# @option params [Boolean] :bucket_key_enabled
|
1389
1392
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
@@ -4650,6 +4653,7 @@ module Aws::S3
|
|
4650
4653
|
# resp.logging_enabled.target_grants[0].grantee.uri #=> String
|
4651
4654
|
# resp.logging_enabled.target_grants[0].permission #=> String, one of "FULL_CONTROL", "READ", "WRITE"
|
4652
4655
|
# resp.logging_enabled.target_prefix #=> String
|
4656
|
+
# resp.logging_enabled.target_object_key_format.partitioned_prefix.partition_date_source #=> String, one of "EventTime", "DeliveryTime"
|
4653
4657
|
#
|
4654
4658
|
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging AWS API Documentation
|
4655
4659
|
#
|
@@ -5713,6 +5717,10 @@ module Aws::S3
|
|
5713
5717
|
# behaves as if the object was deleted and includes
|
5714
5718
|
# `x-amz-delete-marker: true` in the response.
|
5715
5719
|
#
|
5720
|
+
# * If the specified version is a delete marker, the response returns
|
5721
|
+
# a 405 (Method Not Allowed) error and the `Last-Modified:
|
5722
|
+
# timestamp` response header.
|
5723
|
+
#
|
5716
5724
|
# </note>
|
5717
5725
|
#
|
5718
5726
|
# For more information about versioning, see [PutBucketVersioning][8].
|
@@ -6842,49 +6850,49 @@ module Aws::S3
|
|
6842
6850
|
# * {Types::GetObjectTaggingOutput#tag_set #tag_set} => Array<Types::Tag>
|
6843
6851
|
#
|
6844
6852
|
#
|
6845
|
-
# @example Example: To retrieve tag set of
|
6853
|
+
# @example Example: To retrieve tag set of a specific object version
|
6846
6854
|
#
|
6847
|
-
# # The following example retrieves tag set of an object.
|
6855
|
+
# # The following example retrieves tag set of an object. The request specifies object version.
|
6848
6856
|
#
|
6849
6857
|
# resp = client.get_object_tagging({
|
6850
6858
|
# bucket: "examplebucket",
|
6851
|
-
# key: "
|
6859
|
+
# key: "exampleobject",
|
6860
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
6852
6861
|
# })
|
6853
6862
|
#
|
6854
6863
|
# resp.to_h outputs the following:
|
6855
6864
|
# {
|
6856
6865
|
# tag_set: [
|
6857
6866
|
# {
|
6858
|
-
# key: "
|
6859
|
-
# value: "
|
6860
|
-
# },
|
6861
|
-
# {
|
6862
|
-
# key: "Key3",
|
6863
|
-
# value: "Value3",
|
6867
|
+
# key: "Key1",
|
6868
|
+
# value: "Value1",
|
6864
6869
|
# },
|
6865
6870
|
# ],
|
6866
|
-
# version_id: "
|
6871
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
6867
6872
|
# }
|
6868
6873
|
#
|
6869
|
-
# @example Example: To retrieve tag set of
|
6874
|
+
# @example Example: To retrieve tag set of an object
|
6870
6875
|
#
|
6871
|
-
# # The following example retrieves tag set of an object.
|
6876
|
+
# # The following example retrieves tag set of an object.
|
6872
6877
|
#
|
6873
6878
|
# resp = client.get_object_tagging({
|
6874
6879
|
# bucket: "examplebucket",
|
6875
|
-
# key: "
|
6876
|
-
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
6880
|
+
# key: "HappyFace.jpg",
|
6877
6881
|
# })
|
6878
6882
|
#
|
6879
6883
|
# resp.to_h outputs the following:
|
6880
6884
|
# {
|
6881
6885
|
# tag_set: [
|
6882
6886
|
# {
|
6883
|
-
# key: "
|
6884
|
-
# value: "
|
6887
|
+
# key: "Key4",
|
6888
|
+
# value: "Value4",
|
6889
|
+
# },
|
6890
|
+
# {
|
6891
|
+
# key: "Key3",
|
6892
|
+
# value: "Value3",
|
6885
6893
|
# },
|
6886
6894
|
# ],
|
6887
|
-
# version_id: "
|
6895
|
+
# version_id: "null",
|
6888
6896
|
# }
|
6889
6897
|
#
|
6890
6898
|
# @example Request syntax with placeholder values
|
@@ -7196,9 +7204,10 @@ module Aws::S3
|
|
7196
7204
|
# A `HEAD` request has the same options as a `GET` action on an object.
|
7197
7205
|
# The response is identical to the `GET` response except that there is
|
7198
7206
|
# no response body. Because of this, if the `HEAD` request generates an
|
7199
|
-
# error, it returns a generic `400 Bad Request`, `403
|
7200
|
-
#
|
7201
|
-
#
|
7207
|
+
# error, it returns a generic code, such as `400 Bad Request`, `403
|
7208
|
+
# Forbidden`, `404 Not Found`, `405 Method Not Allowed`, `412
|
7209
|
+
# Precondition Failed`, or `304 Not Modified`. It's not possible to
|
7210
|
+
# retrieve the exact exception of these error codes.
|
7202
7211
|
#
|
7203
7212
|
# If you encrypt an object by using server-side encryption with
|
7204
7213
|
# customer-provided encryption keys (SSE-C) when you store the object in
|
@@ -7266,6 +7275,15 @@ module Aws::S3
|
|
7266
7275
|
# * If you don’t have the `s3:ListBucket` permission, Amazon S3
|
7267
7276
|
# returns an HTTP status code 403 error.
|
7268
7277
|
#
|
7278
|
+
# Versioning
|
7279
|
+
# : * If the current version of the object is a delete marker, Amazon S3
|
7280
|
+
# behaves as if the object was deleted and includes
|
7281
|
+
# `x-amz-delete-marker: true` in the response.
|
7282
|
+
#
|
7283
|
+
# * If the specified version is a delete marker, the response returns
|
7284
|
+
# a 405 (Method Not Allowed) error and the `Last-Modified:
|
7285
|
+
# timestamp` response header.
|
7286
|
+
#
|
7269
7287
|
# The following actions are related to `HeadObject`:
|
7270
7288
|
#
|
7271
7289
|
# * [GetObject][5]
|
@@ -8120,97 +8138,97 @@ module Aws::S3
|
|
8120
8138
|
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
8121
8139
|
#
|
8122
8140
|
#
|
8123
|
-
# @example Example:
|
8141
|
+
# @example Example: To list in-progress multipart uploads on a bucket
|
8124
8142
|
#
|
8125
|
-
# # The following example
|
8126
|
-
# # setup of multipart uploads.
|
8143
|
+
# # The following example lists in-progress multipart uploads on a specific bucket.
|
8127
8144
|
#
|
8128
8145
|
# resp = client.list_multipart_uploads({
|
8129
8146
|
# bucket: "examplebucket",
|
8130
|
-
# key_marker: "nextkeyfrompreviousresponse",
|
8131
|
-
# max_uploads: 2,
|
8132
|
-
# upload_id_marker: "valuefrompreviousresponse",
|
8133
8147
|
# })
|
8134
8148
|
#
|
8135
8149
|
# resp.to_h outputs the following:
|
8136
8150
|
# {
|
8137
|
-
# bucket: "acl1",
|
8138
|
-
# is_truncated: true,
|
8139
|
-
# key_marker: "",
|
8140
|
-
# max_uploads: 2,
|
8141
|
-
# next_key_marker: "someobjectkey",
|
8142
|
-
# next_upload_id_marker: "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
|
8143
|
-
# upload_id_marker: "",
|
8144
8151
|
# uploads: [
|
8145
8152
|
# {
|
8146
8153
|
# initiated: Time.parse("2014-05-01T05:40:58.000Z"),
|
8147
8154
|
# initiator: {
|
8148
|
-
# display_name: "
|
8155
|
+
# display_name: "display-name",
|
8149
8156
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
8150
8157
|
# },
|
8151
8158
|
# key: "JavaFile",
|
8152
8159
|
# owner: {
|
8153
|
-
# display_name: "
|
8154
|
-
# id: "
|
8160
|
+
# display_name: "display-name",
|
8161
|
+
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
8155
8162
|
# },
|
8156
8163
|
# storage_class: "STANDARD",
|
8157
|
-
# upload_id: "
|
8164
|
+
# upload_id: "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--",
|
8158
8165
|
# },
|
8159
8166
|
# {
|
8160
8167
|
# initiated: Time.parse("2014-05-01T05:41:27.000Z"),
|
8161
8168
|
# initiator: {
|
8162
|
-
# display_name: "
|
8169
|
+
# display_name: "display-name",
|
8163
8170
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
8164
8171
|
# },
|
8165
8172
|
# key: "JavaFile",
|
8166
8173
|
# owner: {
|
8167
|
-
# display_name: "
|
8174
|
+
# display_name: "display-name",
|
8168
8175
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
8169
8176
|
# },
|
8170
8177
|
# storage_class: "STANDARD",
|
8171
|
-
# upload_id: "
|
8178
|
+
# upload_id: "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
|
8172
8179
|
# },
|
8173
8180
|
# ],
|
8174
8181
|
# }
|
8175
8182
|
#
|
8176
|
-
# @example Example:
|
8183
|
+
# @example Example: List next set of multipart uploads when previous result is truncated
|
8177
8184
|
#
|
8178
|
-
# # The following example
|
8185
|
+
# # The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next
|
8186
|
+
# # setup of multipart uploads.
|
8179
8187
|
#
|
8180
8188
|
# resp = client.list_multipart_uploads({
|
8181
8189
|
# bucket: "examplebucket",
|
8190
|
+
# key_marker: "nextkeyfrompreviousresponse",
|
8191
|
+
# max_uploads: 2,
|
8192
|
+
# upload_id_marker: "valuefrompreviousresponse",
|
8182
8193
|
# })
|
8183
8194
|
#
|
8184
8195
|
# resp.to_h outputs the following:
|
8185
8196
|
# {
|
8197
|
+
# bucket: "acl1",
|
8198
|
+
# is_truncated: true,
|
8199
|
+
# key_marker: "",
|
8200
|
+
# max_uploads: 2,
|
8201
|
+
# next_key_marker: "someobjectkey",
|
8202
|
+
# next_upload_id_marker: "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
|
8203
|
+
# upload_id_marker: "",
|
8186
8204
|
# uploads: [
|
8187
8205
|
# {
|
8188
8206
|
# initiated: Time.parse("2014-05-01T05:40:58.000Z"),
|
8189
8207
|
# initiator: {
|
8190
|
-
# display_name: "display-name",
|
8208
|
+
# display_name: "ownder-display-name",
|
8191
8209
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
8192
8210
|
# },
|
8193
8211
|
# key: "JavaFile",
|
8194
8212
|
# owner: {
|
8195
|
-
# display_name: "
|
8196
|
-
# id: "
|
8213
|
+
# display_name: "mohanataws",
|
8214
|
+
# id: "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
8197
8215
|
# },
|
8198
8216
|
# storage_class: "STANDARD",
|
8199
|
-
# upload_id: "
|
8217
|
+
# upload_id: "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--",
|
8200
8218
|
# },
|
8201
8219
|
# {
|
8202
8220
|
# initiated: Time.parse("2014-05-01T05:41:27.000Z"),
|
8203
8221
|
# initiator: {
|
8204
|
-
# display_name: "display-name",
|
8222
|
+
# display_name: "ownder-display-name",
|
8205
8223
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
8206
8224
|
# },
|
8207
8225
|
# key: "JavaFile",
|
8208
8226
|
# owner: {
|
8209
|
-
# display_name: "display-name",
|
8227
|
+
# display_name: "ownder-display-name",
|
8210
8228
|
# id: "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc",
|
8211
8229
|
# },
|
8212
8230
|
# storage_class: "STANDARD",
|
8213
|
-
# upload_id: "
|
8231
|
+
# upload_id: "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--",
|
8214
8232
|
# },
|
8215
8233
|
# ],
|
8216
8234
|
# }
|
@@ -8279,8 +8297,6 @@ module Aws::S3
|
|
8279
8297
|
#
|
8280
8298
|
# To use this operation, you must have READ access to the bucket.
|
8281
8299
|
#
|
8282
|
-
# This action is not supported by Amazon S3 on Outposts.
|
8283
|
-
#
|
8284
8300
|
# The following operations are related to `ListObjectVersions`:
|
8285
8301
|
#
|
8286
8302
|
# * [ListObjectsV2][1]
|
@@ -10752,6 +10768,13 @@ module Aws::S3
|
|
10752
10768
|
# },
|
10753
10769
|
# ],
|
10754
10770
|
# target_prefix: "TargetPrefix", # required
|
10771
|
+
# target_object_key_format: {
|
10772
|
+
# simple_prefix: {
|
10773
|
+
# },
|
10774
|
+
# partitioned_prefix: {
|
10775
|
+
# partition_date_source: "EventTime", # accepts EventTime, DeliveryTime
|
10776
|
+
# },
|
10777
|
+
# },
|
10755
10778
|
# },
|
10756
10779
|
# },
|
10757
10780
|
# content_md5: "ContentMD5",
|
@@ -12464,7 +12487,8 @@ module Aws::S3
|
|
12464
12487
|
# string holding JSON with the encryption context key-value pairs. This
|
12465
12488
|
# value is stored as object metadata and automatically gets passed on to
|
12466
12489
|
# Amazon Web Services KMS for future `GetObject` or `CopyObject`
|
12467
|
-
# operations on this object.
|
12490
|
+
# operations on this object. This value must be explicitly added during
|
12491
|
+
# CopyObject operations.
|
12468
12492
|
#
|
12469
12493
|
# @option params [Boolean] :bucket_key_enabled
|
12470
12494
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
@@ -12530,41 +12554,22 @@ module Aws::S3
|
|
12530
12554
|
# * {Types::PutObjectOutput#request_charged #request_charged} => String
|
12531
12555
|
#
|
12532
12556
|
#
|
12533
|
-
# @example Example: To upload an object
|
12557
|
+
# @example Example: To upload an object and specify optional tags
|
12534
12558
|
#
|
12535
|
-
# # The following example uploads an object
|
12536
|
-
# #
|
12559
|
+
# # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
|
12560
|
+
# # S3 returns version ID of the newly created object.
|
12537
12561
|
#
|
12538
12562
|
# resp = client.put_object({
|
12539
|
-
# body: "HappyFace.jpg",
|
12563
|
+
# body: "c:\\HappyFace.jpg",
|
12540
12564
|
# bucket: "examplebucket",
|
12541
12565
|
# key: "HappyFace.jpg",
|
12542
|
-
# })
|
12543
|
-
#
|
12544
|
-
# resp.to_h outputs the following:
|
12545
|
-
# {
|
12546
|
-
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
12547
|
-
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
12548
|
-
# }
|
12549
|
-
#
|
12550
|
-
# @example Example: To upload an object and specify server-side encryption and object tags
|
12551
|
-
#
|
12552
|
-
# # The following example uploads an object. The request specifies the optional server-side encryption option. The request
|
12553
|
-
# # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
|
12554
|
-
#
|
12555
|
-
# resp = client.put_object({
|
12556
|
-
# body: "filetoupload",
|
12557
|
-
# bucket: "examplebucket",
|
12558
|
-
# key: "exampleobject",
|
12559
|
-
# server_side_encryption: "AES256",
|
12560
12566
|
# tagging: "key1=value1&key2=value2",
|
12561
12567
|
# })
|
12562
12568
|
#
|
12563
12569
|
# resp.to_h outputs the following:
|
12564
12570
|
# {
|
12565
12571
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
12566
|
-
#
|
12567
|
-
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
12572
|
+
# version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
|
12568
12573
|
# }
|
12569
12574
|
#
|
12570
12575
|
# @example Example: To create an object.
|
@@ -12604,22 +12609,41 @@ module Aws::S3
|
|
12604
12609
|
# version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
|
12605
12610
|
# }
|
12606
12611
|
#
|
12607
|
-
# @example Example: To upload an object
|
12612
|
+
# @example Example: To upload an object
|
12608
12613
|
#
|
12609
|
-
# # The following example uploads an object
|
12610
|
-
# # S3 returns
|
12614
|
+
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
12615
|
+
# # syntax. S3 returns VersionId of the newly created object.
|
12611
12616
|
#
|
12612
12617
|
# resp = client.put_object({
|
12613
|
-
# body: "
|
12618
|
+
# body: "HappyFace.jpg",
|
12614
12619
|
# bucket: "examplebucket",
|
12615
12620
|
# key: "HappyFace.jpg",
|
12621
|
+
# })
|
12622
|
+
#
|
12623
|
+
# resp.to_h outputs the following:
|
12624
|
+
# {
|
12625
|
+
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
12626
|
+
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
12627
|
+
# }
|
12628
|
+
#
|
12629
|
+
# @example Example: To upload an object and specify server-side encryption and object tags
|
12630
|
+
#
|
12631
|
+
# # The following example uploads an object. The request specifies the optional server-side encryption option. The request
|
12632
|
+
# # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
|
12633
|
+
#
|
12634
|
+
# resp = client.put_object({
|
12635
|
+
# body: "filetoupload",
|
12636
|
+
# bucket: "examplebucket",
|
12637
|
+
# key: "exampleobject",
|
12638
|
+
# server_side_encryption: "AES256",
|
12616
12639
|
# tagging: "key1=value1&key2=value2",
|
12617
12640
|
# })
|
12618
12641
|
#
|
12619
12642
|
# resp.to_h outputs the following:
|
12620
12643
|
# {
|
12621
12644
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
12622
|
-
#
|
12645
|
+
# server_side_encryption: "AES256",
|
12646
|
+
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
12623
12647
|
# }
|
12624
12648
|
#
|
12625
12649
|
# @example Example: To upload an object and specify canned ACL.
|
@@ -13222,15 +13246,15 @@ module Aws::S3
|
|
13222
13246
|
# you must select one. You cannot specify `Days` and `Years` at the
|
13223
13247
|
# same time.
|
13224
13248
|
#
|
13225
|
-
# * You can
|
13226
|
-
#
|
13227
|
-
# Support.
|
13249
|
+
# * You can enable Object Lock for new or existing buckets. For more
|
13250
|
+
# information, see [Configuring Object Lock][2].
|
13228
13251
|
#
|
13229
13252
|
# </note>
|
13230
13253
|
#
|
13231
13254
|
#
|
13232
13255
|
#
|
13233
13256
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
|
13257
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-configure.html
|
13234
13258
|
#
|
13235
13259
|
# @option params [required, String] :bucket
|
13236
13260
|
# The bucket whose Object Lock configuration you want to create or
|
@@ -15697,7 +15721,7 @@ module Aws::S3
|
|
15697
15721
|
params: params,
|
15698
15722
|
config: config)
|
15699
15723
|
context[:gem_name] = 'aws-sdk-s3'
|
15700
|
-
context[:gem_version] = '1.
|
15724
|
+
context[:gem_version] = '1.140.0'
|
15701
15725
|
Seahorse::Client::Request.new(handlers, context)
|
15702
15726
|
end
|
15703
15727
|
|