aws-sdk-s3 1.86.2 → 1.89.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/arn/access_point_arn.rb +8 -4
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +7 -3
- data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -4
- data/lib/aws-sdk-s3/client.rb +177 -105
- data/lib/aws-sdk-s3/client_api.rb +3 -1
- data/lib/aws-sdk-s3/customizations/bucket.rb +8 -3
- data/lib/aws-sdk-s3/customizations/object.rb +9 -3
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +3 -3
- data/lib/aws-sdk-s3/object.rb +6 -6
- data/lib/aws-sdk-s3/object_summary.rb +6 -6
- data/lib/aws-sdk-s3/object_version.rb +5 -5
- data/lib/aws-sdk-s3/plugins/accelerate.rb +7 -4
- data/lib/aws-sdk-s3/plugins/arn.rb +44 -26
- data/lib/aws-sdk-s3/plugins/dualstack.rb +10 -3
- data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +4 -4
- data/lib/aws-sdk-s3/plugins/md5s.rb +1 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +18 -26
- data/lib/aws-sdk-s3/presigner.rb +15 -27
- data/lib/aws-sdk-s3/types.rb +148 -22
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45e0db7fe593769589489e9cb17f1ede51174ab9be36a8d0d6d542f33416fde4
|
4
|
+
data.tar.gz: 45a8c14b5864962f8c32c53534b4ea2aca589758e0bccbec781bda283bfff609
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f360edf433428fb6171426ffc404cd0b09f4d75337c24d60dbfb545b469cc3cd9eeebb3a815c23f823047487a5324a445bfeac64571c394e486c9ba6de905de
|
7
|
+
data.tar.gz: 931f79ee39c5895137a8aa15662d91dfc78b7008be57ac00f1bc58ad9a1ad1ff80e3c052de7a8fdd4879c51f1cabe72536b8ab63f9ec5d59e6c1303fc1c4ad59
|
data/lib/aws-sdk-s3.rb
CHANGED
@@ -52,10 +52,14 @@ module Aws
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
-
def host_url(region, dualstack = false)
|
56
|
-
|
57
|
-
|
58
|
-
|
55
|
+
def host_url(region, dualstack = false, custom_endpoint = nil)
|
56
|
+
pfx = "#{@access_point_name}-#{@account_id}"
|
57
|
+
if custom_endpoint
|
58
|
+
"#{pfx}.#{custom_endpoint}"
|
59
|
+
else
|
60
|
+
sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region)
|
61
|
+
"#{pfx}.s3-accesspoint#{'.dualstack' if dualstack}.#{region}.#{sfx}"
|
62
|
+
end
|
59
63
|
end
|
60
64
|
end
|
61
65
|
end
|
@@ -62,9 +62,13 @@ module Aws
|
|
62
62
|
end
|
63
63
|
|
64
64
|
# Outpost ARNs currently do not support dualstack
|
65
|
-
def host_url(region, _dualstack = false)
|
66
|
-
"#{@access_point_name}-#{@account_id}.#{@outpost_id}"
|
67
|
-
|
65
|
+
def host_url(region, _dualstack = false, custom_endpoint = nil)
|
66
|
+
pfx = "#{@access_point_name}-#{@account_id}.#{@outpost_id}"
|
67
|
+
if custom_endpoint
|
68
|
+
"#{pfx}.#{custom_endpoint}"
|
69
|
+
else
|
70
|
+
"#{pfx}.s3-outposts.#{region}.amazonaws.com"
|
71
|
+
end
|
68
72
|
end
|
69
73
|
end
|
70
74
|
end
|
@@ -185,10 +185,9 @@ module Aws::S3
|
|
185
185
|
# })
|
186
186
|
# @param [Hash] options ({})
|
187
187
|
# @option options [String] :content_md5
|
188
|
-
#
|
189
|
-
#
|
190
|
-
#
|
191
|
-
# 1864][1].
|
188
|
+
# The base64-encoded 128-bit MD5 digest of the data. You must use this
|
189
|
+
# header as a message integrity check to verify that the request body
|
190
|
+
# was not corrupted in transit. For more information, see [RFC 1864][1].
|
192
191
|
#
|
193
192
|
# For requests made using the AWS Command Line Interface (CLI) or AWS
|
194
193
|
# SDKs, this field is calculated automatically.
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -1418,33 +1418,33 @@ module Aws::S3
|
|
1418
1418
|
# * {Types::CreateBucketOutput#location #location} => String
|
1419
1419
|
#
|
1420
1420
|
#
|
1421
|
-
# @example Example: To create a bucket
|
1421
|
+
# @example Example: To create a bucket
|
1422
1422
|
#
|
1423
|
-
# # The following example creates a bucket.
|
1423
|
+
# # The following example creates a bucket.
|
1424
1424
|
#
|
1425
1425
|
# resp = client.create_bucket({
|
1426
1426
|
# bucket: "examplebucket",
|
1427
|
-
# create_bucket_configuration: {
|
1428
|
-
# location_constraint: "eu-west-1",
|
1429
|
-
# },
|
1430
1427
|
# })
|
1431
1428
|
#
|
1432
1429
|
# resp.to_h outputs the following:
|
1433
1430
|
# {
|
1434
|
-
# location: "
|
1431
|
+
# location: "/examplebucket",
|
1435
1432
|
# }
|
1436
1433
|
#
|
1437
|
-
# @example Example: To create a bucket
|
1434
|
+
# @example Example: To create a bucket in a specific region
|
1438
1435
|
#
|
1439
|
-
# # The following example creates a bucket.
|
1436
|
+
# # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
|
1440
1437
|
#
|
1441
1438
|
# resp = client.create_bucket({
|
1442
1439
|
# bucket: "examplebucket",
|
1440
|
+
# create_bucket_configuration: {
|
1441
|
+
# location_constraint: "eu-west-1",
|
1442
|
+
# },
|
1443
1443
|
# })
|
1444
1444
|
#
|
1445
1445
|
# resp.to_h outputs the following:
|
1446
1446
|
# {
|
1447
|
-
# location: "/
|
1447
|
+
# location: "http://examplebucket.<Region>.s3.amazonaws.com/",
|
1448
1448
|
# }
|
1449
1449
|
#
|
1450
1450
|
# @example Request syntax with placeholder values
|
@@ -2939,7 +2939,8 @@ module Aws::S3
|
|
2939
2939
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/S3onOutposts.html
|
2940
2940
|
#
|
2941
2941
|
# @option params [required, String] :key
|
2942
|
-
#
|
2942
|
+
# The key that identifies the object in the bucket from which to remove
|
2943
|
+
# all tags.
|
2943
2944
|
#
|
2944
2945
|
# @option params [String] :version_id
|
2945
2946
|
# The versionId of the object that the tag-set will be removed from.
|
@@ -2954,35 +2955,35 @@ module Aws::S3
|
|
2954
2955
|
# * {Types::DeleteObjectTaggingOutput#version_id #version_id} => String
|
2955
2956
|
#
|
2956
2957
|
#
|
2957
|
-
# @example Example: To remove tag set from an object
|
2958
|
+
# @example Example: To remove tag set from an object version
|
2958
2959
|
#
|
2959
|
-
# # The following example removes tag set associated with the specified object.
|
2960
|
-
# #
|
2960
|
+
# # The following example removes tag set associated with the specified object version. The request specifies both the
|
2961
|
+
# # object key and object version.
|
2961
2962
|
#
|
2962
2963
|
# resp = client.delete_object_tagging({
|
2963
2964
|
# bucket: "examplebucket",
|
2964
2965
|
# key: "HappyFace.jpg",
|
2966
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
2965
2967
|
# })
|
2966
2968
|
#
|
2967
2969
|
# resp.to_h outputs the following:
|
2968
2970
|
# {
|
2969
|
-
# version_id: "
|
2971
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
2970
2972
|
# }
|
2971
2973
|
#
|
2972
|
-
# @example Example: To remove tag set from an object
|
2974
|
+
# @example Example: To remove tag set from an object
|
2973
2975
|
#
|
2974
|
-
# # The following example removes tag set associated with the specified object
|
2975
|
-
# #
|
2976
|
+
# # The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the
|
2977
|
+
# # operation removes tag set from the latest object version.
|
2976
2978
|
#
|
2977
2979
|
# resp = client.delete_object_tagging({
|
2978
2980
|
# bucket: "examplebucket",
|
2979
2981
|
# key: "HappyFace.jpg",
|
2980
|
-
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
2981
2982
|
# })
|
2982
2983
|
#
|
2983
2984
|
# resp.to_h outputs the following:
|
2984
2985
|
# {
|
2985
|
-
# version_id: "
|
2986
|
+
# version_id: "null",
|
2986
2987
|
# }
|
2987
2988
|
#
|
2988
2989
|
# @example Request syntax with placeholder values
|
@@ -3590,6 +3591,10 @@ module Aws::S3
|
|
3590
3591
|
end
|
3591
3592
|
|
3592
3593
|
# Returns the default encryption configuration for an Amazon S3 bucket.
|
3594
|
+
# If the bucket does not have a default encryption configuration,
|
3595
|
+
# GetBucketEncryption returns
|
3596
|
+
# `ServerSideEncryptionConfigurationNotFoundError`.
|
3597
|
+
#
|
3593
3598
|
# For information about the Amazon S3 default encryption feature, see
|
3594
3599
|
# [Amazon S3 Default Bucket Encryption][1].
|
3595
3600
|
#
|
@@ -5297,14 +5302,14 @@ module Aws::S3
|
|
5297
5302
|
# VersionId used to reference a specific version of the object.
|
5298
5303
|
#
|
5299
5304
|
# @option params [String] :sse_customer_algorithm
|
5300
|
-
# Specifies the algorithm to use to when
|
5305
|
+
# Specifies the algorithm to use to when decrypting the object (for
|
5301
5306
|
# example, AES256).
|
5302
5307
|
#
|
5303
5308
|
# @option params [String] :sse_customer_key
|
5304
|
-
# Specifies the customer-provided encryption key for Amazon S3 to
|
5305
|
-
#
|
5306
|
-
#
|
5307
|
-
# be appropriate for use with the algorithm specified in the
|
5309
|
+
# Specifies the customer-provided encryption key for Amazon S3 used to
|
5310
|
+
# encrypt the data. This value is used to decrypt the object when
|
5311
|
+
# recovering it and must match the one used when storing the data. The
|
5312
|
+
# key must be appropriate for use with the algorithm specified in the
|
5308
5313
|
# `x-amz-server-side-encryption-customer-algorithm` header.
|
5309
5314
|
#
|
5310
5315
|
# @option params [String] :sse_customer_key_md5
|
@@ -5899,12 +5904,13 @@ module Aws::S3
|
|
5899
5904
|
#
|
5900
5905
|
# * [PutObjectTagging][2]
|
5901
5906
|
#
|
5902
|
-
#
|
5907
|
+
# * [DeleteObjectTagging][3]
|
5903
5908
|
#
|
5904
5909
|
#
|
5905
5910
|
#
|
5906
5911
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html
|
5907
5912
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html
|
5913
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html
|
5908
5914
|
#
|
5909
5915
|
# @option params [required, String] :bucket
|
5910
5916
|
# The bucket name containing the object for which to get the tagging
|
@@ -5943,55 +5949,66 @@ module Aws::S3
|
|
5943
5949
|
# a different account, the request will fail with an HTTP `403 (Access
|
5944
5950
|
# Denied)` error.
|
5945
5951
|
#
|
5952
|
+
# @option params [String] :request_payer
|
5953
|
+
# Confirms that the requester knows that they will be charged for the
|
5954
|
+
# request. Bucket owners need not specify this parameter in their
|
5955
|
+
# requests. For information about downloading objects from requester
|
5956
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
5957
|
+
# in the *Amazon S3 Developer Guide*.
|
5958
|
+
#
|
5959
|
+
#
|
5960
|
+
#
|
5961
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
5962
|
+
#
|
5946
5963
|
# @return [Types::GetObjectTaggingOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
5947
5964
|
#
|
5948
5965
|
# * {Types::GetObjectTaggingOutput#version_id #version_id} => String
|
5949
5966
|
# * {Types::GetObjectTaggingOutput#tag_set #tag_set} => Array<Types::Tag>
|
5950
5967
|
#
|
5951
5968
|
#
|
5952
|
-
# @example Example: To retrieve tag set of
|
5969
|
+
# @example Example: To retrieve tag set of a specific object version
|
5953
5970
|
#
|
5954
|
-
# # The following example retrieves tag set of an object.
|
5971
|
+
# # The following example retrieves tag set of an object. The request specifies object version.
|
5955
5972
|
#
|
5956
5973
|
# resp = client.get_object_tagging({
|
5957
5974
|
# bucket: "examplebucket",
|
5958
|
-
# key: "
|
5975
|
+
# key: "exampleobject",
|
5976
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
5959
5977
|
# })
|
5960
5978
|
#
|
5961
5979
|
# resp.to_h outputs the following:
|
5962
5980
|
# {
|
5963
5981
|
# tag_set: [
|
5964
5982
|
# {
|
5965
|
-
# key: "
|
5966
|
-
# value: "
|
5967
|
-
# },
|
5968
|
-
# {
|
5969
|
-
# key: "Key3",
|
5970
|
-
# value: "Value3",
|
5983
|
+
# key: "Key1",
|
5984
|
+
# value: "Value1",
|
5971
5985
|
# },
|
5972
5986
|
# ],
|
5973
|
-
# version_id: "
|
5987
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
5974
5988
|
# }
|
5975
5989
|
#
|
5976
|
-
# @example Example: To retrieve tag set of
|
5990
|
+
# @example Example: To retrieve tag set of an object
|
5977
5991
|
#
|
5978
|
-
# # The following example retrieves tag set of an object.
|
5992
|
+
# # The following example retrieves tag set of an object.
|
5979
5993
|
#
|
5980
5994
|
# resp = client.get_object_tagging({
|
5981
5995
|
# bucket: "examplebucket",
|
5982
|
-
# key: "
|
5983
|
-
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
5996
|
+
# key: "HappyFace.jpg",
|
5984
5997
|
# })
|
5985
5998
|
#
|
5986
5999
|
# resp.to_h outputs the following:
|
5987
6000
|
# {
|
5988
6001
|
# tag_set: [
|
5989
6002
|
# {
|
5990
|
-
# key: "
|
5991
|
-
# value: "
|
6003
|
+
# key: "Key4",
|
6004
|
+
# value: "Value4",
|
6005
|
+
# },
|
6006
|
+
# {
|
6007
|
+
# key: "Key3",
|
6008
|
+
# value: "Value3",
|
5992
6009
|
# },
|
5993
6010
|
# ],
|
5994
|
-
# version_id: "
|
6011
|
+
# version_id: "null",
|
5995
6012
|
# }
|
5996
6013
|
#
|
5997
6014
|
# @example Request syntax with placeholder values
|
@@ -6001,6 +6018,7 @@ module Aws::S3
|
|
6001
6018
|
# key: "ObjectKey", # required
|
6002
6019
|
# version_id: "ObjectVersionId",
|
6003
6020
|
# expected_bucket_owner: "AccountId",
|
6021
|
+
# request_payer: "requester", # accepts requester
|
6004
6022
|
# })
|
6005
6023
|
#
|
6006
6024
|
# @example Response structure
|
@@ -6185,9 +6203,12 @@ module Aws::S3
|
|
6185
6203
|
|
6186
6204
|
# This operation is useful to determine if a bucket exists and you have
|
6187
6205
|
# permission to access it. The operation returns a `200 OK` if the
|
6188
|
-
# bucket exists and you have permission to access it.
|
6189
|
-
#
|
6190
|
-
#
|
6206
|
+
# bucket exists and you have permission to access it.
|
6207
|
+
#
|
6208
|
+
# If the bucket does not exist or you do not have permission to access
|
6209
|
+
# it, the `HEAD` request returns a generic `404 Not Found` or `403
|
6210
|
+
# Forbidden` code. A message body is not included, so you cannot
|
6211
|
+
# determine the exception beyond these error codes.
|
6191
6212
|
#
|
6192
6213
|
# To use this operation, you must have permissions to perform the
|
6193
6214
|
# `s3:ListBucket` action. The bucket owner has this permission by
|
@@ -6271,7 +6292,10 @@ module Aws::S3
|
|
6271
6292
|
#
|
6272
6293
|
# A `HEAD` request has the same options as a `GET` operation on an
|
6273
6294
|
# object. The response is identical to the `GET` response except that
|
6274
|
-
# there is no response body.
|
6295
|
+
# there is no response body. Because of this, if the `HEAD` request
|
6296
|
+
# generates an error, it returns a generic `404 Not Found` or `403
|
6297
|
+
# Forbidden` code. It is not possible to retrieve the exact exception
|
6298
|
+
# beyond these error codes.
|
6275
6299
|
#
|
6276
6300
|
# If you encrypt an object by using server-side encryption with
|
6277
6301
|
# customer-provided encryption keys (SSE-C) when you store the object in
|
@@ -6287,12 +6311,15 @@ module Aws::S3
|
|
6287
6311
|
# For more information about SSE-C, see [Server-Side Encryption (Using
|
6288
6312
|
# Customer-Provided Encryption Keys)][1].
|
6289
6313
|
#
|
6290
|
-
# <note markdown="1"> Encryption request headers, like `x-amz-server-side-encryption`,
|
6291
|
-
#
|
6292
|
-
#
|
6293
|
-
#
|
6294
|
-
#
|
6295
|
-
# error.
|
6314
|
+
# <note markdown="1"> * Encryption request headers, like `x-amz-server-side-encryption`,
|
6315
|
+
# should not be sent for GET requests if your object uses server-side
|
6316
|
+
# encryption with CMKs stored in AWS KMS (SSE-KMS) or server-side
|
6317
|
+
# encryption with Amazon S3–managed encryption keys (SSE-S3). If your
|
6318
|
+
# object does use these types of keys, you’ll get an HTTP 400
|
6319
|
+
# BadRequest error.
|
6320
|
+
#
|
6321
|
+
# * The last modified property in this case is the creation date of the
|
6322
|
+
# object.
|
6296
6323
|
#
|
6297
6324
|
# </note>
|
6298
6325
|
#
|
@@ -7677,7 +7704,9 @@ module Aws::S3
|
|
7677
7704
|
# use the request parameters as selection criteria to return a subset of
|
7678
7705
|
# the objects in a bucket. A `200 OK` response can contain valid or
|
7679
7706
|
# invalid XML. Make sure to design your application to parse the
|
7680
|
-
# contents of the response and handle it appropriately.
|
7707
|
+
# contents of the response and handle it appropriately. Objects are
|
7708
|
+
# returned sorted in an ascending order of the respective key names in
|
7709
|
+
# the list.
|
7681
7710
|
#
|
7682
7711
|
# To use this operation, you must have READ access to the bucket.
|
7683
7712
|
#
|
@@ -8796,6 +8825,8 @@ module Aws::S3
|
|
8796
8825
|
end
|
8797
8826
|
|
8798
8827
|
# Puts a S3 Intelligent-Tiering configuration to the specified bucket.
|
8828
|
+
# You can have up to 1,000 S3 Intelligent-Tiering configurations per
|
8829
|
+
# bucket.
|
8799
8830
|
#
|
8800
8831
|
# The S3 Intelligent-Tiering storage class is designed to optimize
|
8801
8832
|
# storage costs by automatically moving data to the most cost-effective
|
@@ -8824,6 +8855,35 @@ module Aws::S3
|
|
8824
8855
|
#
|
8825
8856
|
# * [ListBucketIntelligentTieringConfigurations][4]
|
8826
8857
|
#
|
8858
|
+
# <note markdown="1"> You only need S3 Intelligent-Tiering enabled on a bucket if you want
|
8859
|
+
# to automatically move objects stored in the S3 Intelligent-Tiering
|
8860
|
+
# storage class to the Archive Access or Deep Archive Access tier.
|
8861
|
+
#
|
8862
|
+
# </note>
|
8863
|
+
#
|
8864
|
+
# **Special Errors**
|
8865
|
+
#
|
8866
|
+
# * **HTTP 400 Bad Request Error**
|
8867
|
+
#
|
8868
|
+
# * *Code:* InvalidArgument
|
8869
|
+
#
|
8870
|
+
# * *Cause:* Invalid Argument
|
8871
|
+
#
|
8872
|
+
# * **HTTP 400 Bad Request Error**
|
8873
|
+
#
|
8874
|
+
# * *Code:* TooManyConfigurations
|
8875
|
+
#
|
8876
|
+
# * *Cause:* You are attempting to create a new configuration but have
|
8877
|
+
# already reached the 1,000-configuration limit.
|
8878
|
+
#
|
8879
|
+
# * **HTTP 403 Forbidden Error**
|
8880
|
+
#
|
8881
|
+
# * *Code:* AccessDenied
|
8882
|
+
#
|
8883
|
+
# * *Cause:* You are not the owner of the specified bucket, or you do
|
8884
|
+
# not have the `s3:PutIntelligentTieringConfiguration` bucket
|
8885
|
+
# permission to set the configuration on the bucket.
|
8886
|
+
#
|
8827
8887
|
#
|
8828
8888
|
#
|
8829
8889
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access
|
@@ -10187,10 +10247,9 @@ module Aws::S3
|
|
10187
10247
|
# The bucket name.
|
10188
10248
|
#
|
10189
10249
|
# @option params [String] :content_md5
|
10190
|
-
#
|
10191
|
-
#
|
10192
|
-
#
|
10193
|
-
# 1864][1].
|
10250
|
+
# The base64-encoded 128-bit MD5 digest of the data. You must use this
|
10251
|
+
# header as a message integrity check to verify that the request body
|
10252
|
+
# was not corrupted in transit. For more information, see [RFC 1864][1].
|
10194
10253
|
#
|
10195
10254
|
# For requests made using the AWS Command Line Interface (CLI) or AWS
|
10196
10255
|
# SDKs, this field is calculated automatically.
|
@@ -11013,79 +11072,62 @@ module Aws::S3
|
|
11013
11072
|
# * {Types::PutObjectOutput#request_charged #request_charged} => String
|
11014
11073
|
#
|
11015
11074
|
#
|
11016
|
-
# @example Example: To upload
|
11017
|
-
#
|
11018
|
-
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
11019
|
-
# # syntax. S3 returns VersionId of the newly created object.
|
11020
|
-
#
|
11021
|
-
# resp = client.put_object({
|
11022
|
-
# body: "HappyFace.jpg",
|
11023
|
-
# bucket: "examplebucket",
|
11024
|
-
# key: "HappyFace.jpg",
|
11025
|
-
# })
|
11026
|
-
#
|
11027
|
-
# resp.to_h outputs the following:
|
11028
|
-
# {
|
11029
|
-
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
11030
|
-
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
11031
|
-
# }
|
11032
|
-
#
|
11033
|
-
# @example Example: To upload an object and specify canned ACL.
|
11075
|
+
# @example Example: To upload object and specify user-defined metadata
|
11034
11076
|
#
|
11035
|
-
# # The following example
|
11036
|
-
# #
|
11077
|
+
# # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
|
11078
|
+
# # enabled, S3 returns version ID in response.
|
11037
11079
|
#
|
11038
11080
|
# resp = client.put_object({
|
11039
|
-
# acl: "authenticated-read",
|
11040
11081
|
# body: "filetoupload",
|
11041
11082
|
# bucket: "examplebucket",
|
11042
11083
|
# key: "exampleobject",
|
11084
|
+
# metadata: {
|
11085
|
+
# "metadata1" => "value1",
|
11086
|
+
# "metadata2" => "value2",
|
11087
|
+
# },
|
11043
11088
|
# })
|
11044
11089
|
#
|
11045
11090
|
# resp.to_h outputs the following:
|
11046
11091
|
# {
|
11047
11092
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
11048
|
-
# version_id: "
|
11093
|
+
# version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
|
11049
11094
|
# }
|
11050
11095
|
#
|
11051
|
-
# @example Example: To upload an object
|
11096
|
+
# @example Example: To upload an object and specify server-side encryption and object tags
|
11052
11097
|
#
|
11053
|
-
# # The following example uploads
|
11054
|
-
# #
|
11098
|
+
# # The following example uploads and object. The request specifies the optional server-side encryption option. The request
|
11099
|
+
# # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
|
11055
11100
|
#
|
11056
11101
|
# resp = client.put_object({
|
11057
|
-
# body: "
|
11102
|
+
# body: "filetoupload",
|
11058
11103
|
# bucket: "examplebucket",
|
11059
|
-
# key: "
|
11104
|
+
# key: "exampleobject",
|
11060
11105
|
# server_side_encryption: "AES256",
|
11061
|
-
#
|
11106
|
+
# tagging: "key1=value1&key2=value2",
|
11062
11107
|
# })
|
11063
11108
|
#
|
11064
11109
|
# resp.to_h outputs the following:
|
11065
11110
|
# {
|
11066
11111
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
11067
11112
|
# server_side_encryption: "AES256",
|
11068
|
-
# version_id: "
|
11113
|
+
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
11069
11114
|
# }
|
11070
11115
|
#
|
11071
|
-
# @example Example: To upload an object
|
11116
|
+
# @example Example: To upload an object
|
11072
11117
|
#
|
11073
|
-
# # The following example uploads
|
11074
|
-
# #
|
11118
|
+
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
11119
|
+
# # syntax. S3 returns VersionId of the newly created object.
|
11075
11120
|
#
|
11076
11121
|
# resp = client.put_object({
|
11077
|
-
# body: "
|
11122
|
+
# body: "HappyFace.jpg",
|
11078
11123
|
# bucket: "examplebucket",
|
11079
|
-
# key: "
|
11080
|
-
# server_side_encryption: "AES256",
|
11081
|
-
# tagging: "key1=value1&key2=value2",
|
11124
|
+
# key: "HappyFace.jpg",
|
11082
11125
|
# })
|
11083
11126
|
#
|
11084
11127
|
# resp.to_h outputs the following:
|
11085
11128
|
# {
|
11086
11129
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
11087
|
-
#
|
11088
|
-
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
11130
|
+
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
11089
11131
|
# }
|
11090
11132
|
#
|
11091
11133
|
# @example Example: To create an object.
|
@@ -11104,25 +11146,22 @@ module Aws::S3
|
|
11104
11146
|
# version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
|
11105
11147
|
# }
|
11106
11148
|
#
|
11107
|
-
# @example Example: To upload object and specify
|
11149
|
+
# @example Example: To upload an object and specify canned ACL.
|
11108
11150
|
#
|
11109
|
-
# # The following example
|
11110
|
-
# # enabled, S3 returns version ID in response.
|
11151
|
+
# # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
|
11152
|
+
# # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
|
11111
11153
|
#
|
11112
11154
|
# resp = client.put_object({
|
11155
|
+
# acl: "authenticated-read",
|
11113
11156
|
# body: "filetoupload",
|
11114
11157
|
# bucket: "examplebucket",
|
11115
11158
|
# key: "exampleobject",
|
11116
|
-
# metadata: {
|
11117
|
-
# "metadata1" => "value1",
|
11118
|
-
# "metadata2" => "value2",
|
11119
|
-
# },
|
11120
11159
|
# })
|
11121
11160
|
#
|
11122
11161
|
# resp.to_h outputs the following:
|
11123
11162
|
# {
|
11124
11163
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
11125
|
-
# version_id: "
|
11164
|
+
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
11126
11165
|
# }
|
11127
11166
|
#
|
11128
11167
|
# @example Example: To upload an object and specify optional tags
|
@@ -11143,6 +11182,26 @@ module Aws::S3
|
|
11143
11182
|
# version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
|
11144
11183
|
# }
|
11145
11184
|
#
|
11185
|
+
# @example Example: To upload an object (specify optional headers)
|
11186
|
+
#
|
11187
|
+
# # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
|
11188
|
+
# # storage class and use server-side encryption.
|
11189
|
+
#
|
11190
|
+
# resp = client.put_object({
|
11191
|
+
# body: "HappyFace.jpg",
|
11192
|
+
# bucket: "examplebucket",
|
11193
|
+
# key: "HappyFace.jpg",
|
11194
|
+
# server_side_encryption: "AES256",
|
11195
|
+
# storage_class: "STANDARD_IA",
|
11196
|
+
# })
|
11197
|
+
#
|
11198
|
+
# resp.to_h outputs the following:
|
11199
|
+
# {
|
11200
|
+
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
11201
|
+
# server_side_encryption: "AES256",
|
11202
|
+
# version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
|
11203
|
+
# }
|
11204
|
+
#
|
11146
11205
|
# @example Streaming a file from disk
|
11147
11206
|
# # upload file from disk in a single request, may not exceed 5GB
|
11148
11207
|
# File.open('/source/file/path', 'rb') do |file|
|
@@ -11873,13 +11932,14 @@ module Aws::S3
|
|
11873
11932
|
#
|
11874
11933
|
# * [GetObjectTagging][1]
|
11875
11934
|
#
|
11876
|
-
#
|
11935
|
+
# * [DeleteObjectTagging][4]
|
11877
11936
|
#
|
11878
11937
|
#
|
11879
11938
|
#
|
11880
11939
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
|
11881
11940
|
# [2]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html
|
11882
11941
|
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html
|
11942
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html
|
11883
11943
|
#
|
11884
11944
|
# @option params [required, String] :bucket
|
11885
11945
|
# The bucket name containing the object.
|
@@ -11926,6 +11986,17 @@ module Aws::S3
|
|
11926
11986
|
# a different account, the request will fail with an HTTP `403 (Access
|
11927
11987
|
# Denied)` error.
|
11928
11988
|
#
|
11989
|
+
# @option params [String] :request_payer
|
11990
|
+
# Confirms that the requester knows that they will be charged for the
|
11991
|
+
# request. Bucket owners need not specify this parameter in their
|
11992
|
+
# requests. For information about downloading objects from requester
|
11993
|
+
# pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
|
11994
|
+
# in the *Amazon S3 Developer Guide*.
|
11995
|
+
#
|
11996
|
+
#
|
11997
|
+
#
|
11998
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
11999
|
+
#
|
11929
12000
|
# @return [Types::PutObjectTaggingOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
11930
12001
|
#
|
11931
12002
|
# * {Types::PutObjectTaggingOutput#version_id #version_id} => String
|
@@ -11973,6 +12044,7 @@ module Aws::S3
|
|
11973
12044
|
# ],
|
11974
12045
|
# },
|
11975
12046
|
# expected_bucket_owner: "AccountId",
|
12047
|
+
# request_payer: "requester", # accepts requester
|
11976
12048
|
# })
|
11977
12049
|
#
|
11978
12050
|
# @example Response structure
|
@@ -13566,7 +13638,7 @@ module Aws::S3
|
|
13566
13638
|
params: params,
|
13567
13639
|
config: config)
|
13568
13640
|
context[:gem_name] = 'aws-sdk-s3'
|
13569
|
-
context[:gem_version] = '1.
|
13641
|
+
context[:gem_version] = '1.89.0'
|
13570
13642
|
Seahorse::Client::Request.new(handlers, context)
|
13571
13643
|
end
|
13572
13644
|
|