aws-sdk-s3 1.143.0 → 1.156.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +100 -1
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
- data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +241 -0
- data/lib/aws-sdk-s3/bucket.rb +13 -10
- data/lib/aws-sdk-s3/bucket_acl.rb +3 -3
- data/lib/aws-sdk-s3/bucket_cors.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle.rb +4 -4
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +4 -4
- data/lib/aws-sdk-s3/bucket_logging.rb +3 -3
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
- data/lib/aws-sdk-s3/bucket_policy.rb +4 -4
- data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
- data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
- data/lib/aws-sdk-s3/bucket_tagging.rb +4 -4
- data/lib/aws-sdk-s3/bucket_versioning.rb +5 -5
- data/lib/aws-sdk-s3/bucket_website.rb +4 -4
- data/lib/aws-sdk-s3/client.rb +370 -314
- data/lib/aws-sdk-s3/client_api.rb +15 -6
- data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
- data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
- data/lib/aws-sdk-s3/customizations/object.rb +5 -5
- data/lib/aws-sdk-s3/customizations.rb +4 -1
- data/lib/aws-sdk-s3/encryption/client.rb +2 -2
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/client.rb +2 -2
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +2 -2
- data/lib/aws-sdk-s3/endpoint_parameters.rb +8 -0
- data/lib/aws-sdk-s3/endpoint_provider.rb +7 -6
- data/lib/aws-sdk-s3/endpoints.rb +100 -1
- data/lib/aws-sdk-s3/express_credentials_provider.rb +27 -4
- data/lib/aws-sdk-s3/file_downloader.rb +1 -1
- data/lib/aws-sdk-s3/file_uploader.rb +1 -1
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +4 -3
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +6 -4
- data/lib/aws-sdk-s3/multipart_upload.rb +4 -4
- data/lib/aws-sdk-s3/multipart_upload_part.rb +3 -3
- data/lib/aws-sdk-s3/object.rb +30 -12
- data/lib/aws-sdk-s3/object_acl.rb +3 -3
- data/lib/aws-sdk-s3/object_copier.rb +1 -1
- data/lib/aws-sdk-s3/object_multipart_copier.rb +10 -8
- data/lib/aws-sdk-s3/object_summary.rb +10 -10
- data/lib/aws-sdk-s3/object_version.rb +23 -5
- data/lib/aws-sdk-s3/plugins/access_grants.rb +114 -0
- data/lib/aws-sdk-s3/plugins/express_session_auth.rb +8 -2
- data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
- data/lib/aws-sdk-s3/presigner.rb +2 -0
- data/lib/aws-sdk-s3/resource.rb +3 -3
- data/lib/aws-sdk-s3/types.rb +101 -51
- data/lib/aws-sdk-s3.rb +1 -1
- data/sig/client.rbs +21 -0
- data/sig/customizations/bucket.rbs +19 -0
- data/sig/customizations/object.rbs +38 -0
- data/sig/customizations/object_summary.rbs +35 -0
- data/sig/object.rbs +6 -0
- data/sig/object_version.rbs +6 -0
- data/sig/resource.rbs +3 -0
- data/sig/types.rbs +6 -0
- data/sig/waiters.rbs +12 -0
- metadata +12 -7
- data/lib/aws-sdk-s3/express_credentials_cache.rb +0 -30
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -22,6 +22,7 @@ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
|
|
22
22
|
require 'aws-sdk-core/plugins/response_paging.rb'
|
23
23
|
require 'aws-sdk-core/plugins/stub_responses.rb'
|
24
24
|
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
25
|
+
require 'aws-sdk-core/plugins/invocation_id.rb'
|
25
26
|
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
26
27
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
27
28
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
@@ -34,6 +35,7 @@ require 'aws-sdk-core/plugins/recursion_detection.rb'
|
|
34
35
|
require 'aws-sdk-core/plugins/sign.rb'
|
35
36
|
require 'aws-sdk-core/plugins/protocols/rest_xml.rb'
|
36
37
|
require 'aws-sdk-s3/plugins/accelerate.rb'
|
38
|
+
require 'aws-sdk-s3/plugins/access_grants.rb'
|
37
39
|
require 'aws-sdk-s3/plugins/arn.rb'
|
38
40
|
require 'aws-sdk-s3/plugins/bucket_dns.rb'
|
39
41
|
require 'aws-sdk-s3/plugins/bucket_name_restrictions.rb'
|
@@ -92,6 +94,7 @@ module Aws::S3
|
|
92
94
|
add_plugin(Aws::Plugins::ResponsePaging)
|
93
95
|
add_plugin(Aws::Plugins::StubResponses)
|
94
96
|
add_plugin(Aws::Plugins::IdempotencyToken)
|
97
|
+
add_plugin(Aws::Plugins::InvocationId)
|
95
98
|
add_plugin(Aws::Plugins::JsonvalueConverter)
|
96
99
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
97
100
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
@@ -104,6 +107,7 @@ module Aws::S3
|
|
104
107
|
add_plugin(Aws::Plugins::Sign)
|
105
108
|
add_plugin(Aws::Plugins::Protocols::RestXml)
|
106
109
|
add_plugin(Aws::S3::Plugins::Accelerate)
|
110
|
+
add_plugin(Aws::S3::Plugins::AccessGrants)
|
107
111
|
add_plugin(Aws::S3::Plugins::ARN)
|
108
112
|
add_plugin(Aws::S3::Plugins::BucketDns)
|
109
113
|
add_plugin(Aws::S3::Plugins::BucketNameRestrictions)
|
@@ -127,6 +131,11 @@ module Aws::S3
|
|
127
131
|
|
128
132
|
# @overload initialize(options)
|
129
133
|
# @param [Hash] options
|
134
|
+
#
|
135
|
+
# @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
|
136
|
+
# A list of plugins to apply to the client. Each plugin is either a
|
137
|
+
# class name or an instance of a plugin class.
|
138
|
+
#
|
130
139
|
# @option options [required, Aws::CredentialProvider] :credentials
|
131
140
|
# Your AWS credentials. This can be an instance of any one of the
|
132
141
|
# following classes:
|
@@ -184,6 +193,16 @@ module Aws::S3
|
|
184
193
|
# * `~/.aws/credentials`
|
185
194
|
# * `~/.aws/config`
|
186
195
|
#
|
196
|
+
# @option options [Boolean] :access_grants (false)
|
197
|
+
# When `true`, the S3 client will use the S3 Access Grants feature to
|
198
|
+
# authenticate requests. Bucket credentials will be fetched from S3
|
199
|
+
# Control using the `get_data_access` API.
|
200
|
+
#
|
201
|
+
# @option options [Aws::S3::AccessGrantsCredentialsProvider] :access_grants_credentials_provider
|
202
|
+
# When `access_grants` is `true`, this option can be used to provide
|
203
|
+
# additional options to the credentials provider, including a privilege
|
204
|
+
# setting, caching, and fallback behavior.
|
205
|
+
#
|
187
206
|
# @option options [String] :access_key_id
|
188
207
|
#
|
189
208
|
# @option options [Boolean] :active_endpoint_cache (false)
|
@@ -246,10 +265,16 @@ module Aws::S3
|
|
246
265
|
# @option options [Boolean] :disable_s3_express_session_auth
|
247
266
|
# Parameter to indicate whether S3Express session auth should be disabled
|
248
267
|
#
|
249
|
-
# @option options [String] :endpoint
|
250
|
-
#
|
251
|
-
#
|
252
|
-
#
|
268
|
+
# @option options [String, URI::HTTPS, URI::HTTP] :endpoint
|
269
|
+
# Normally you should not configure the `:endpoint` option
|
270
|
+
# directly. This is normally constructed from the `:region`
|
271
|
+
# option. Configuring `:endpoint` is normally reserved for
|
272
|
+
# connecting to test or custom endpoints. The endpoint should
|
273
|
+
# be a URI formatted like:
|
274
|
+
#
|
275
|
+
# 'http://example.com'
|
276
|
+
# 'https://example.com'
|
277
|
+
# 'http://example.com:123'
|
253
278
|
#
|
254
279
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
255
280
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -365,7 +390,6 @@ module Aws::S3
|
|
365
390
|
# throttling. This is a provisional mode that may change behavior
|
366
391
|
# in the future.
|
367
392
|
#
|
368
|
-
#
|
369
393
|
# @option options [Boolean] :s3_disable_multiregion_access_points (false)
|
370
394
|
# When set to `false` this will option will raise errors when multi-region
|
371
395
|
# access point ARNs are used. Multi-region access points can potentially
|
@@ -382,13 +406,23 @@ module Aws::S3
|
|
382
406
|
#
|
383
407
|
# @option options [String] :sdk_ua_app_id
|
384
408
|
# A unique and opaque application ID that is appended to the
|
385
|
-
# User-Agent header as app
|
386
|
-
# maximum length of 50.
|
409
|
+
# User-Agent header as app/sdk_ua_app_id. It should have a
|
410
|
+
# maximum length of 50. This variable is sourced from environment
|
411
|
+
# variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.
|
387
412
|
#
|
388
413
|
# @option options [String] :secret_access_key
|
389
414
|
#
|
390
415
|
# @option options [String] :session_token
|
391
416
|
#
|
417
|
+
# @option options [Array] :sigv4a_signing_region_set
|
418
|
+
# A list of regions that should be signed with SigV4a signing. When
|
419
|
+
# not passed, a default `:sigv4a_signing_region_set` is searched for
|
420
|
+
# in the following locations:
|
421
|
+
#
|
422
|
+
# * `Aws.config[:sigv4a_signing_region_set]`
|
423
|
+
# * `ENV['AWS_SIGV4A_SIGNING_REGION_SET']`
|
424
|
+
# * `~/.aws/config`
|
425
|
+
#
|
392
426
|
# @option options [Boolean] :stub_responses (false)
|
393
427
|
# Causes the client to return stubbed responses. By default
|
394
428
|
# fake responses are generated and returned. You can specify
|
@@ -432,50 +466,65 @@ module Aws::S3
|
|
432
466
|
# @option options [Aws::S3::EndpointProvider] :endpoint_provider
|
433
467
|
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::S3::EndpointParameters`
|
434
468
|
#
|
435
|
-
# @option options [
|
436
|
-
#
|
437
|
-
#
|
438
|
-
#
|
439
|
-
#
|
440
|
-
#
|
441
|
-
#
|
442
|
-
#
|
443
|
-
#
|
444
|
-
#
|
445
|
-
#
|
446
|
-
# @option options [Float] :
|
447
|
-
#
|
448
|
-
#
|
449
|
-
#
|
450
|
-
#
|
451
|
-
#
|
452
|
-
#
|
453
|
-
#
|
454
|
-
#
|
455
|
-
#
|
456
|
-
#
|
457
|
-
#
|
458
|
-
#
|
459
|
-
#
|
460
|
-
#
|
461
|
-
#
|
462
|
-
#
|
469
|
+
# @option options [Float] :http_continue_timeout (1)
|
470
|
+
# The number of seconds to wait for a 100-continue response before sending the
|
471
|
+
# request body. This option has no effect unless the request has "Expect"
|
472
|
+
# header set to "100-continue". Defaults to `nil` which disables this
|
473
|
+
# behaviour. This value can safely be set per request on the session.
|
474
|
+
#
|
475
|
+
# @option options [Float] :http_idle_timeout (5)
|
476
|
+
# The number of seconds a connection is allowed to sit idle before it
|
477
|
+
# is considered stale. Stale connections are closed and removed from the
|
478
|
+
# pool before making a request.
|
479
|
+
#
|
480
|
+
# @option options [Float] :http_open_timeout (15)
|
481
|
+
# The default number of seconds to wait for response data.
|
482
|
+
# This value can safely be set per-request on the session.
|
483
|
+
#
|
484
|
+
# @option options [URI::HTTP,String] :http_proxy
|
485
|
+
# A proxy to send requests through. Formatted like 'http://proxy.com:123'.
|
486
|
+
#
|
487
|
+
# @option options [Float] :http_read_timeout (60)
|
488
|
+
# The default number of seconds to wait for response data.
|
489
|
+
# This value can safely be set per-request on the session.
|
490
|
+
#
|
491
|
+
# @option options [Boolean] :http_wire_trace (false)
|
492
|
+
# When `true`, HTTP debug output will be sent to the `:logger`.
|
493
|
+
#
|
494
|
+
# @option options [Proc] :on_chunk_received
|
495
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
496
|
+
# of the response body is received. It provides three arguments: the chunk,
|
497
|
+
# the number of bytes received, and the total number of
|
498
|
+
# bytes in the response (or nil if the server did not send a `content-length`).
|
499
|
+
#
|
500
|
+
# @option options [Proc] :on_chunk_sent
|
501
|
+
# When a Proc object is provided, it will be used as callback when each chunk
|
502
|
+
# of the request body is sent. It provides three arguments: the chunk,
|
503
|
+
# the number of bytes read from the body, and the total number of
|
504
|
+
# bytes in the body.
|
505
|
+
#
|
506
|
+
# @option options [Boolean] :raise_response_errors (true)
|
507
|
+
# When `true`, response errors are raised.
|
508
|
+
#
|
509
|
+
# @option options [String] :ssl_ca_bundle
|
510
|
+
# Full path to the SSL certificate authority bundle file that should be used when
|
511
|
+
# verifying peer certificates. If you do not pass `:ssl_ca_bundle` or
|
512
|
+
# `:ssl_ca_directory` the the system default will be used if available.
|
513
|
+
#
|
514
|
+
# @option options [String] :ssl_ca_directory
|
515
|
+
# Full path of the directory that contains the unbundled SSL certificate
|
516
|
+
# authority files for verifying peer certificates. If you do
|
517
|
+
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the system
|
518
|
+
# default will be used if available.
|
463
519
|
#
|
464
|
-
# @option options [
|
465
|
-
#
|
466
|
-
# connection.
|
520
|
+
# @option options [String] :ssl_ca_store
|
521
|
+
# Sets the X509::Store to verify peer certificate.
|
467
522
|
#
|
468
|
-
# @option options [
|
469
|
-
#
|
470
|
-
# verifying peer certificates. If you do not pass
|
471
|
-
# `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
|
472
|
-
# will be used if available.
|
523
|
+
# @option options [Float] :ssl_timeout
|
524
|
+
# Sets the SSL timeout in seconds
|
473
525
|
#
|
474
|
-
# @option options [
|
475
|
-
#
|
476
|
-
# authority files for verifying peer certificates. If you do
|
477
|
-
# not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
|
478
|
-
# system default will be used if available.
|
526
|
+
# @option options [Boolean] :ssl_verify_peer (true)
|
527
|
+
# When `true`, SSL peer certificates are verified when establishing a connection.
|
479
528
|
#
|
480
529
|
def initialize(*args)
|
481
530
|
super
|
@@ -561,7 +610,7 @@ module Aws::S3
|
|
561
610
|
# are not supported. Directory bucket names must be unique in the chosen
|
562
611
|
# Availability Zone. Bucket names must follow the format `
|
563
612
|
# bucket_base_name--az-id--x-s3` (for example, `
|
564
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
613
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
565
614
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
566
615
|
# *Amazon S3 User Guide*.
|
567
616
|
#
|
@@ -699,8 +748,8 @@ module Aws::S3
|
|
699
748
|
# error).
|
700
749
|
#
|
701
750
|
# Note that if `CompleteMultipartUpload` fails, applications should be
|
702
|
-
# prepared to retry
|
703
|
-
# [Amazon S3 Error Best Practices][3].
|
751
|
+
# prepared to retry any failed requests (including 500 error responses).
|
752
|
+
# For more information, see [Amazon S3 Error Best Practices][3].
|
704
753
|
#
|
705
754
|
# You can't use `Content-Type: application/x-www-form-urlencoded` for
|
706
755
|
# the CompleteMultipartUpload requests. Also, if you don't provide a
|
@@ -812,7 +861,7 @@ module Aws::S3
|
|
812
861
|
# are not supported. Directory bucket names must be unique in the chosen
|
813
862
|
# Availability Zone. Bucket names must follow the format `
|
814
863
|
# bucket_base_name--az-id--x-s3` (for example, `
|
815
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
864
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
816
865
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
817
866
|
# *Amazon S3 User Guide*.
|
818
867
|
#
|
@@ -1094,11 +1143,14 @@ module Aws::S3
|
|
1094
1143
|
#
|
1095
1144
|
# Both the Region that you want to copy the object from and the Region
|
1096
1145
|
# that you want to copy the object to must be enabled for your account.
|
1146
|
+
# For more information about how to enable a Region for your account,
|
1147
|
+
# see [Enable or disable a Region for standalone accounts][3] in the
|
1148
|
+
# *Amazon Web Services Account Management Guide*.
|
1097
1149
|
#
|
1098
1150
|
# Amazon S3 transfer acceleration does not support cross-Region copies.
|
1099
1151
|
# If you request a cross-Region copy using a transfer acceleration
|
1100
1152
|
# endpoint, you get a `400 Bad Request` error. For more information, see
|
1101
|
-
# [Transfer Acceleration][
|
1153
|
+
# [Transfer Acceleration][4].
|
1102
1154
|
#
|
1103
1155
|
# Authentication and authorization
|
1104
1156
|
#
|
@@ -1106,7 +1158,7 @@ module Aws::S3
|
|
1106
1158
|
# IAM credentials (access key ID and secret access key for the IAM
|
1107
1159
|
# identities). All headers with the `x-amz-` prefix, including
|
1108
1160
|
# `x-amz-copy-source`, must be signed. For more information, see [REST
|
1109
|
-
# Authentication][
|
1161
|
+
# Authentication][5].
|
1110
1162
|
#
|
1111
1163
|
# **Directory buckets** - You must use the IAM credentials to
|
1112
1164
|
# authenticate and authorize your access to the `CopyObject` API
|
@@ -1130,7 +1182,7 @@ module Aws::S3
|
|
1130
1182
|
# source object that is being copied.
|
1131
1183
|
#
|
1132
1184
|
# * If the destination bucket is a general purpose bucket, you must
|
1133
|
-
# have <b> <code>s3:
|
1185
|
+
# have <b> <code>s3:PutObject</code> </b> permission to write the
|
1134
1186
|
# object copy to the destination bucket.
|
1135
1187
|
#
|
1136
1188
|
# * **Directory bucket permissions** - You must have permissions in a
|
@@ -1152,17 +1204,16 @@ module Aws::S3
|
|
1152
1204
|
# set to `ReadOnly` on the copy destination bucket.
|
1153
1205
|
#
|
1154
1206
|
# For example policies, see [Example bucket policies for S3 Express
|
1155
|
-
# One Zone][
|
1207
|
+
# One Zone][6] and [Amazon Web Services Identity and Access
|
1156
1208
|
# Management (IAM) identity-based policies for S3 Express One
|
1157
|
-
# Zone][
|
1209
|
+
# Zone][7] in the *Amazon S3 User Guide*.
|
1158
1210
|
#
|
1159
1211
|
# Response and special errors
|
1160
1212
|
#
|
1161
1213
|
# : When the request is an HTTP 1.1 request, the response is chunk
|
1162
1214
|
# encoded. When the request is not an HTTP 1.1 request, the response
|
1163
1215
|
# would not contain the `Content-Length`. You always need to read the
|
1164
|
-
# entire response body to check if the copy succeeds.
|
1165
|
-
# connection alive while we copy the data.
|
1216
|
+
# entire response body to check if the copy succeeds.
|
1166
1217
|
#
|
1167
1218
|
# * If the copy is successful, you receive a response with information
|
1168
1219
|
# about the copied object.
|
@@ -1178,14 +1229,13 @@ module Aws::S3
|
|
1178
1229
|
# response is embedded in the `200 OK` response. For example, in a
|
1179
1230
|
# cross-region copy, you may encounter throttling and receive a
|
1180
1231
|
# `200 OK` response. For more information, see [Resolve the Error
|
1181
|
-
# 200 response when copying objects to Amazon
|
1182
|
-
#
|
1183
|
-
#
|
1184
|
-
#
|
1185
|
-
#
|
1186
|
-
#
|
1187
|
-
#
|
1188
|
-
# is successfully received and processed.
|
1232
|
+
# 200 response when copying objects to Amazon S3][8]. The `200 OK`
|
1233
|
+
# status code means the copy was accepted, but it doesn't mean
|
1234
|
+
# the copy is complete. Another example is when you disconnect
|
1235
|
+
# from Amazon S3 before the copy is complete, Amazon S3 might
|
1236
|
+
# cancel the copy and you may receive a `200 OK` response. You
|
1237
|
+
# must stay connected to Amazon S3 until the entire response is
|
1238
|
+
# successfully received and processed.
|
1189
1239
|
#
|
1190
1240
|
# If you call this API operation directly, make sure to design
|
1191
1241
|
# your application to parse the content of the response and handle
|
@@ -1201,8 +1251,9 @@ module Aws::S3
|
|
1201
1251
|
# : The copy request charge is based on the storage class and Region
|
1202
1252
|
# that you specify for the destination object. The request can also
|
1203
1253
|
# result in a data retrieval charge for the source if the source
|
1204
|
-
# storage class bills for data retrieval.
|
1205
|
-
#
|
1254
|
+
# storage class bills for data retrieval. If the copy source is in a
|
1255
|
+
# different region, the data transfer is billed to the copy source
|
1256
|
+
# account. For pricing information, see [Amazon S3 pricing][9].
|
1206
1257
|
#
|
1207
1258
|
# HTTP Host header syntax
|
1208
1259
|
#
|
@@ -1211,21 +1262,23 @@ module Aws::S3
|
|
1211
1262
|
#
|
1212
1263
|
# The following operations are related to `CopyObject`:
|
1213
1264
|
#
|
1214
|
-
# * [PutObject][
|
1265
|
+
# * [PutObject][10]
|
1215
1266
|
#
|
1216
|
-
# * [GetObject][
|
1267
|
+
# * [GetObject][11]
|
1217
1268
|
#
|
1218
1269
|
#
|
1219
1270
|
#
|
1220
1271
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html
|
1221
1272
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
1222
|
-
# [3]: https://docs.aws.amazon.com/
|
1223
|
-
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/
|
1224
|
-
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/
|
1225
|
-
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-
|
1226
|
-
# [7]:
|
1227
|
-
# [8]: https://
|
1228
|
-
# [9]:
|
1273
|
+
# [3]: https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-regions.html#manage-acct-regions-enable-standalone
|
1274
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html
|
1275
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
1276
|
+
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
|
1277
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
|
1278
|
+
# [8]: https://repost.aws/knowledge-center/s3-resolve-200-internalerror
|
1279
|
+
# [9]: http://aws.amazon.com/s3/pricing/
|
1280
|
+
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
|
1281
|
+
# [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
|
1229
1282
|
#
|
1230
1283
|
# @option params [String] :acl
|
1231
1284
|
# The canned access control list (ACL) to apply to the object.
|
@@ -1269,7 +1322,7 @@ module Aws::S3
|
|
1269
1322
|
# are not supported. Directory bucket names must be unique in the chosen
|
1270
1323
|
# Availability Zone. Bucket names must follow the format `
|
1271
1324
|
# bucket_base_name--az-id--x-s3` (for example, `
|
1272
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
1325
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
1273
1326
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
1274
1327
|
# *Amazon S3 User Guide*.
|
1275
1328
|
#
|
@@ -2092,22 +2145,31 @@ module Aws::S3
|
|
2092
2145
|
# includes the `x-amz-object-ownership` header, then the
|
2093
2146
|
# `s3:PutBucketOwnershipControls` permission is required.
|
2094
2147
|
#
|
2095
|
-
#
|
2096
|
-
#
|
2097
|
-
#
|
2098
|
-
#
|
2099
|
-
#
|
2100
|
-
#
|
2101
|
-
#
|
2148
|
+
# To set an ACL on a bucket as part of a `CreateBucket` request,
|
2149
|
+
# you must explicitly set S3 Object Ownership for the bucket to a
|
2150
|
+
# different value than the default, `BucketOwnerEnforced`.
|
2151
|
+
# Additionally, if your desired bucket ACL grants public access,
|
2152
|
+
# you must first create the bucket (without the bucket ACL) and
|
2153
|
+
# then explicitly disable Block Public Access on the bucket before
|
2154
|
+
# using `PutBucketAcl` to set the ACL. If you try to create a
|
2155
|
+
# bucket with a public ACL, the request will fail.
|
2156
|
+
#
|
2157
|
+
# For the majority of modern use cases in S3, we recommend that
|
2158
|
+
# you keep all Block Public Access settings enabled and keep ACLs
|
2159
|
+
# disabled. If you would like to share data with users outside of
|
2160
|
+
# your account, you can use bucket policies as needed. For more
|
2161
|
+
# information, see [Controlling ownership of objects and disabling
|
2162
|
+
# ACLs for your bucket ][5] and [Blocking public access to your
|
2163
|
+
# Amazon S3 storage ][6] in the *Amazon S3 User Guide*.
|
2102
2164
|
#
|
2103
2165
|
# * **S3 Block Public Access** - If your specific use case requires
|
2104
2166
|
# granting public access to your S3 resources, you can disable
|
2105
2167
|
# Block Public Access. Specifically, you can create a new bucket
|
2106
2168
|
# with Block Public Access enabled, then separately call the [
|
2107
|
-
# `DeletePublicAccessBlock` ][
|
2169
|
+
# `DeletePublicAccessBlock` ][7] API. To use this operation, you
|
2108
2170
|
# must have the `s3:PutBucketPublicAccessBlock` permission. For
|
2109
2171
|
# more information about S3 Block Public Access, see [Blocking
|
2110
|
-
# public access to your Amazon S3 storage ][
|
2172
|
+
# public access to your Amazon S3 storage ][6] in the *Amazon S3
|
2111
2173
|
# User Guide*.
|
2112
2174
|
#
|
2113
2175
|
# * **Directory bucket permissions** - You must have the
|
@@ -2149,9 +2211,9 @@ module Aws::S3
|
|
2149
2211
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html
|
2150
2212
|
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
|
2151
2213
|
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
2152
|
-
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-ownership
|
2153
|
-
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/
|
2154
|
-
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/
|
2214
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html
|
2215
|
+
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html
|
2216
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html
|
2155
2217
|
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
|
2156
2218
|
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-overview.html
|
2157
2219
|
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-one-zone.html#s3-express-features
|
@@ -2178,7 +2240,7 @@ module Aws::S3
|
|
2178
2240
|
# Virtual-hosted-style requests aren't supported. Directory bucket
|
2179
2241
|
# names must be unique in the chosen Availability Zone. Bucket names
|
2180
2242
|
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
2181
|
-
# example, ` DOC-EXAMPLE-BUCKET--usw2-
|
2243
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
2182
2244
|
# bucket naming restrictions, see [Directory bucket naming rules][2] in
|
2183
2245
|
# the *Amazon S3 User Guide*
|
2184
2246
|
#
|
@@ -2277,33 +2339,33 @@ module Aws::S3
|
|
2277
2339
|
# * {Types::CreateBucketOutput#location #location} => String
|
2278
2340
|
#
|
2279
2341
|
#
|
2280
|
-
# @example Example: To create a bucket
|
2342
|
+
# @example Example: To create a bucket in a specific region
|
2281
2343
|
#
|
2282
|
-
# # The following example creates a bucket.
|
2344
|
+
# # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
|
2283
2345
|
#
|
2284
2346
|
# resp = client.create_bucket({
|
2285
2347
|
# bucket: "examplebucket",
|
2348
|
+
# create_bucket_configuration: {
|
2349
|
+
# location_constraint: "eu-west-1",
|
2350
|
+
# },
|
2286
2351
|
# })
|
2287
2352
|
#
|
2288
2353
|
# resp.to_h outputs the following:
|
2289
2354
|
# {
|
2290
|
-
# location: "/
|
2355
|
+
# location: "http://examplebucket.<Region>.s3.amazonaws.com/",
|
2291
2356
|
# }
|
2292
2357
|
#
|
2293
|
-
# @example Example: To create a bucket
|
2358
|
+
# @example Example: To create a bucket
|
2294
2359
|
#
|
2295
|
-
# # The following example creates a bucket.
|
2360
|
+
# # The following example creates a bucket.
|
2296
2361
|
#
|
2297
2362
|
# resp = client.create_bucket({
|
2298
2363
|
# bucket: "examplebucket",
|
2299
|
-
# create_bucket_configuration: {
|
2300
|
-
# location_constraint: "eu-west-1",
|
2301
|
-
# },
|
2302
2364
|
# })
|
2303
2365
|
#
|
2304
2366
|
# resp.to_h outputs the following:
|
2305
2367
|
# {
|
2306
|
-
# location: "
|
2368
|
+
# location: "/examplebucket",
|
2307
2369
|
# }
|
2308
2370
|
#
|
2309
2371
|
# @example Request syntax with placeholder values
|
@@ -2588,7 +2650,7 @@ module Aws::S3
|
|
2588
2650
|
# are not supported. Directory bucket names must be unique in the chosen
|
2589
2651
|
# Availability Zone. Bucket names must follow the format `
|
2590
2652
|
# bucket_base_name--az-id--x-s3` (for example, `
|
2591
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
2653
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
2592
2654
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
2593
2655
|
# *Amazon S3 User Guide*.
|
2594
2656
|
#
|
@@ -3350,7 +3412,7 @@ module Aws::S3
|
|
3350
3412
|
# Virtual-hosted-style requests aren't supported. Directory bucket
|
3351
3413
|
# names must be unique in the chosen Availability Zone. Bucket names
|
3352
3414
|
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
3353
|
-
# example, ` DOC-EXAMPLE-BUCKET--usw2-
|
3415
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
3354
3416
|
# bucket naming restrictions, see [Directory bucket naming rules][1] in
|
3355
3417
|
# the *Amazon S3 User Guide*
|
3356
3418
|
#
|
@@ -3979,7 +4041,7 @@ module Aws::S3
|
|
3979
4041
|
# Virtual-hosted-style requests aren't supported. Directory bucket
|
3980
4042
|
# names must be unique in the chosen Availability Zone. Bucket names
|
3981
4043
|
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
3982
|
-
# example, ` DOC-EXAMPLE-BUCKET--usw2-
|
4044
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
3983
4045
|
# bucket naming restrictions, see [Directory bucket naming rules][1] in
|
3984
4046
|
# the *Amazon S3 User Guide*
|
3985
4047
|
#
|
@@ -4222,15 +4284,26 @@ module Aws::S3
|
|
4222
4284
|
# Removes an object from a bucket. The behavior depends on the bucket's
|
4223
4285
|
# versioning state:
|
4224
4286
|
#
|
4225
|
-
# * If versioning is enabled, the operation
|
4226
|
-
# there is one) of an object and inserts a delete marker, which
|
4227
|
-
# becomes the latest version of the object. If there isn't a null
|
4228
|
-
# version, Amazon S3 does not remove any objects but will still
|
4229
|
-
# respond that the command was successful.
|
4230
|
-
#
|
4231
|
-
# * If versioning is suspended or not enabled, the operation permanently
|
4287
|
+
# * If bucket versioning is not enabled, the operation permanently
|
4232
4288
|
# deletes the object.
|
4233
4289
|
#
|
4290
|
+
# * If bucket versioning is enabled, the operation inserts a delete
|
4291
|
+
# marker, which becomes the current version of the object. To
|
4292
|
+
# permanently delete an object in a versioned bucket, you must include
|
4293
|
+
# the object’s `versionId` in the request. For more information about
|
4294
|
+
# versioning-enabled buckets, see [Deleting object versions from a
|
4295
|
+
# versioning-enabled bucket][1].
|
4296
|
+
#
|
4297
|
+
# * If bucket versioning is suspended, the operation removes the object
|
4298
|
+
# that has a null `versionId`, if there is one, and inserts a delete
|
4299
|
+
# marker that becomes the current version of the object. If there
|
4300
|
+
# isn't an object with a null `versionId`, and all versions of the
|
4301
|
+
# object have a `versionId`, Amazon S3 does not remove the object and
|
4302
|
+
# only inserts a delete marker. To permanently delete an object that
|
4303
|
+
# has a `versionId`, you must include the object’s `versionId` in the
|
4304
|
+
# request. For more information about versioning-suspended buckets,
|
4305
|
+
# see [Deleting objects from versioning-suspended buckets][2].
|
4306
|
+
#
|
4234
4307
|
# <note markdown="1"> * **Directory buckets** - S3 Versioning isn't enabled and supported
|
4235
4308
|
# for directory buckets. For this API operation, only the `null` value
|
4236
4309
|
# of the version ID is supported by directory buckets. You can only
|
@@ -4241,7 +4314,7 @@ module Aws::S3
|
|
4241
4314
|
# endpoints support virtual-hosted-style requests in the format
|
4242
4315
|
# `https://bucket_name.s3express-az_id.region.amazonaws.com/key-name
|
4243
4316
|
# `. Path-style requests are not supported. For more information, see
|
4244
|
-
# [Regional and Zonal endpoints][
|
4317
|
+
# [Regional and Zonal endpoints][3] in the *Amazon S3 User Guide*.
|
4245
4318
|
#
|
4246
4319
|
# </note>
|
4247
4320
|
#
|
@@ -4254,8 +4327,8 @@ module Aws::S3
|
|
4254
4327
|
# versioning configuration is MFA Delete enabled, you must include the
|
4255
4328
|
# `x-amz-mfa` request header in the DELETE `versionId` request. Requests
|
4256
4329
|
# that include `x-amz-mfa` must use HTTPS. For more information about
|
4257
|
-
# MFA Delete, see [Using MFA Delete][
|
4258
|
-
# To see sample requests that use versioning, see [Sample Request][
|
4330
|
+
# MFA Delete, see [Using MFA Delete][4] in the *Amazon S3 User Guide*.
|
4331
|
+
# To see sample requests that use versioning, see [Sample Request][5].
|
4259
4332
|
#
|
4260
4333
|
# <note markdown="1"> **Directory buckets** - MFA delete is not supported by directory
|
4261
4334
|
# buckets.
|
@@ -4263,7 +4336,7 @@ module Aws::S3
|
|
4263
4336
|
# </note>
|
4264
4337
|
#
|
4265
4338
|
# You can delete objects by explicitly calling DELETE Object or calling
|
4266
|
-
# ([PutBucketLifecycle][
|
4339
|
+
# ([PutBucketLifecycle][6]) to enable Amazon S3 to remove them for you.
|
4267
4340
|
# If you want to block users or accounts from removing or deleting
|
4268
4341
|
# objects from your bucket, you must deny them the `s3:DeleteObject`,
|
4269
4342
|
# `s3:DeleteObjectVersion`, and `s3:PutLifeCycleConfiguration` actions.
|
@@ -4282,12 +4355,12 @@ module Aws::S3
|
|
4282
4355
|
# a bucket, you must always have the `s3:DeleteObject` permission.
|
4283
4356
|
#
|
4284
4357
|
# * <b> <code>s3:DeleteObjectVersion</code> </b> - To delete a
|
4285
|
-
# specific version of an object from a
|
4358
|
+
# specific version of an object from a versioning-enabled bucket,
|
4286
4359
|
# you must have the `s3:DeleteObjectVersion` permission.
|
4287
4360
|
#
|
4288
4361
|
# * **Directory bucket permissions** - To grant access to this API
|
4289
4362
|
# operation on a directory bucket, we recommend that you use the [
|
4290
|
-
# `CreateSession` ][
|
4363
|
+
# `CreateSession` ][7] API operation for session-based
|
4291
4364
|
# authorization. Specifically, you grant the
|
4292
4365
|
# `s3express:CreateSession` permission to the directory bucket in a
|
4293
4366
|
# bucket policy or an IAM identity-based policy. Then, you make the
|
@@ -4298,7 +4371,7 @@ module Aws::S3
|
|
4298
4371
|
# token for use. Amazon Web Services CLI or SDKs create session and
|
4299
4372
|
# refresh the session token automatically to avoid service
|
4300
4373
|
# interruptions when a session expires. For more information about
|
4301
|
-
# authorization, see [ `CreateSession` ][
|
4374
|
+
# authorization, see [ `CreateSession` ][7].
|
4302
4375
|
#
|
4303
4376
|
# HTTP Host header syntax
|
4304
4377
|
#
|
@@ -4307,18 +4380,20 @@ module Aws::S3
|
|
4307
4380
|
#
|
4308
4381
|
# The following action is related to `DeleteObject`:
|
4309
4382
|
#
|
4310
|
-
# * [PutObject][
|
4383
|
+
# * [PutObject][8]
|
4311
4384
|
#
|
4312
4385
|
# ^
|
4313
4386
|
#
|
4314
4387
|
#
|
4315
4388
|
#
|
4316
|
-
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/
|
4317
|
-
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/
|
4318
|
-
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/
|
4319
|
-
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/
|
4320
|
-
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
4321
|
-
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
4389
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectVersions.html
|
4390
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjectsfromVersioningSuspendedBuckets.html
|
4391
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
4392
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html
|
4393
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete
|
4394
|
+
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html
|
4395
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
4396
|
+
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html
|
4322
4397
|
#
|
4323
4398
|
# @option params [required, String] :bucket
|
4324
4399
|
# The bucket name of the bucket containing the object.
|
@@ -4329,7 +4404,7 @@ module Aws::S3
|
|
4329
4404
|
# are not supported. Directory bucket names must be unique in the chosen
|
4330
4405
|
# Availability Zone. Bucket names must follow the format `
|
4331
4406
|
# bucket_base_name--az-id--x-s3` (for example, `
|
4332
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
4407
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
4333
4408
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
4334
4409
|
# *Amazon S3 User Guide*.
|
4335
4410
|
#
|
@@ -4423,15 +4498,6 @@ module Aws::S3
|
|
4423
4498
|
# * {Types::DeleteObjectOutput#request_charged #request_charged} => String
|
4424
4499
|
#
|
4425
4500
|
#
|
4426
|
-
# @example Example: To delete an object (from a non-versioned bucket)
|
4427
|
-
#
|
4428
|
-
# # The following example deletes an object from a non-versioned bucket.
|
4429
|
-
#
|
4430
|
-
# resp = client.delete_object({
|
4431
|
-
# bucket: "ExampleBucket",
|
4432
|
-
# key: "HappyFace.jpg",
|
4433
|
-
# })
|
4434
|
-
#
|
4435
4501
|
# @example Example: To delete an object
|
4436
4502
|
#
|
4437
4503
|
# # The following example deletes an object from an S3 bucket.
|
@@ -4445,6 +4511,15 @@ module Aws::S3
|
|
4445
4511
|
# {
|
4446
4512
|
# }
|
4447
4513
|
#
|
4514
|
+
# @example Example: To delete an object (from a non-versioned bucket)
|
4515
|
+
#
|
4516
|
+
# # The following example deletes an object from a non-versioned bucket.
|
4517
|
+
#
|
4518
|
+
# resp = client.delete_object({
|
4519
|
+
# bucket: "ExampleBucket",
|
4520
|
+
# key: "HappyFace.jpg",
|
4521
|
+
# })
|
4522
|
+
#
|
4448
4523
|
# @example Request syntax with placeholder values
|
4449
4524
|
#
|
4450
4525
|
# resp = client.delete_object({
|
@@ -4653,7 +4728,7 @@ module Aws::S3
|
|
4653
4728
|
# permission.
|
4654
4729
|
#
|
4655
4730
|
# * <b> <code>s3:DeleteObjectVersion</code> </b> - To delete a
|
4656
|
-
# specific version of an object from a
|
4731
|
+
# specific version of an object from a versioning-enabled bucket,
|
4657
4732
|
# you must specify the `s3:DeleteObjectVersion` permission.
|
4658
4733
|
#
|
4659
4734
|
# * **Directory bucket permissions** - To grant access to this API
|
@@ -4720,7 +4795,7 @@ module Aws::S3
|
|
4720
4795
|
# are not supported. Directory bucket names must be unique in the chosen
|
4721
4796
|
# Availability Zone. Bucket names must follow the format `
|
4722
4797
|
# bucket_base_name--az-id--x-s3` (for example, `
|
4723
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
4798
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
4724
4799
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
4725
4800
|
# *Amazon S3 User Guide*.
|
4726
4801
|
#
|
@@ -4854,22 +4929,20 @@ module Aws::S3
|
|
4854
4929
|
# * {Types::DeleteObjectsOutput#errors #errors} => Array<Types::Error>
|
4855
4930
|
#
|
4856
4931
|
#
|
4857
|
-
# @example Example: To delete multiple
|
4932
|
+
# @example Example: To delete multiple objects from a versioned bucket
|
4858
4933
|
#
|
4859
|
-
# # The following example deletes objects from a bucket. The
|
4860
|
-
# #
|
4934
|
+
# # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
|
4935
|
+
# # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
|
4861
4936
|
#
|
4862
4937
|
# resp = client.delete_objects({
|
4863
4938
|
# bucket: "examplebucket",
|
4864
4939
|
# delete: {
|
4865
4940
|
# objects: [
|
4866
4941
|
# {
|
4867
|
-
# key: "
|
4868
|
-
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4942
|
+
# key: "objectkey1",
|
4869
4943
|
# },
|
4870
4944
|
# {
|
4871
|
-
# key: "
|
4872
|
-
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4945
|
+
# key: "objectkey2",
|
4873
4946
|
# },
|
4874
4947
|
# ],
|
4875
4948
|
# quiet: false,
|
@@ -4880,30 +4953,34 @@ module Aws::S3
|
|
4880
4953
|
# {
|
4881
4954
|
# deleted: [
|
4882
4955
|
# {
|
4883
|
-
#
|
4884
|
-
#
|
4956
|
+
# delete_marker: true,
|
4957
|
+
# delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
|
4958
|
+
# key: "objectkey1",
|
4885
4959
|
# },
|
4886
4960
|
# {
|
4887
|
-
#
|
4888
|
-
#
|
4961
|
+
# delete_marker: true,
|
4962
|
+
# delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
|
4963
|
+
# key: "objectkey2",
|
4889
4964
|
# },
|
4890
4965
|
# ],
|
4891
4966
|
# }
|
4892
4967
|
#
|
4893
|
-
# @example Example: To delete multiple
|
4968
|
+
# @example Example: To delete multiple object versions from a versioned bucket
|
4894
4969
|
#
|
4895
|
-
# # The following example deletes objects from a bucket. The
|
4896
|
-
# #
|
4970
|
+
# # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
|
4971
|
+
# # versions and returns the key and versions of deleted objects in the response.
|
4897
4972
|
#
|
4898
4973
|
# resp = client.delete_objects({
|
4899
4974
|
# bucket: "examplebucket",
|
4900
4975
|
# delete: {
|
4901
4976
|
# objects: [
|
4902
4977
|
# {
|
4903
|
-
# key: "
|
4978
|
+
# key: "HappyFace.jpg",
|
4979
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4904
4980
|
# },
|
4905
4981
|
# {
|
4906
|
-
# key: "
|
4982
|
+
# key: "HappyFace.jpg",
|
4983
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4907
4984
|
# },
|
4908
4985
|
# ],
|
4909
4986
|
# quiet: false,
|
@@ -4914,14 +4991,12 @@ module Aws::S3
|
|
4914
4991
|
# {
|
4915
4992
|
# deleted: [
|
4916
4993
|
# {
|
4917
|
-
#
|
4918
|
-
#
|
4919
|
-
# key: "objectkey1",
|
4994
|
+
# key: "HappyFace.jpg",
|
4995
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4920
4996
|
# },
|
4921
4997
|
# {
|
4922
|
-
#
|
4923
|
-
#
|
4924
|
-
# key: "objectkey2",
|
4998
|
+
# key: "HappyFace.jpg",
|
4999
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4925
5000
|
# },
|
4926
5001
|
# ],
|
4927
5002
|
# }
|
@@ -5781,13 +5856,16 @@ module Aws::S3
|
|
5781
5856
|
# </note>
|
5782
5857
|
#
|
5783
5858
|
# <note markdown="1"> Bucket lifecycle configuration now supports specifying a lifecycle
|
5784
|
-
# rule using an object key name prefix, one or more object tags,
|
5785
|
-
# combination of
|
5786
|
-
# API. The
|
5787
|
-
#
|
5788
|
-
#
|
5789
|
-
#
|
5790
|
-
#
|
5859
|
+
# rule using an object key name prefix, one or more object tags, object
|
5860
|
+
# size, or any combination of these. Accordingly, this section describes
|
5861
|
+
# the latest API. The previous version of the API supported filtering
|
5862
|
+
# based only on an object key name prefix, which is supported for
|
5863
|
+
# backward compatibility. For the related API description, see
|
5864
|
+
# [GetBucketLifecycle][1]. Accordingly, this section describes the
|
5865
|
+
# latest API. The response describes the new filter element that you can
|
5866
|
+
# use to specify a filter to select a subset of objects to which the
|
5867
|
+
# rule applies. If you are using a previous version of the lifecycle
|
5868
|
+
# configuration, it still works. For the earlier action,
|
5791
5869
|
#
|
5792
5870
|
# </note>
|
5793
5871
|
#
|
@@ -6547,7 +6625,7 @@ module Aws::S3
|
|
6547
6625
|
# Virtual-hosted-style requests aren't supported. Directory bucket
|
6548
6626
|
# names must be unique in the chosen Availability Zone. Bucket names
|
6549
6627
|
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
6550
|
-
# example, ` DOC-EXAMPLE-BUCKET--usw2-
|
6628
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
6551
6629
|
# bucket naming restrictions, see [Directory bucket naming rules][1] in
|
6552
6630
|
# the *Amazon S3 User Guide*
|
6553
6631
|
#
|
@@ -7302,7 +7380,7 @@ module Aws::S3
|
|
7302
7380
|
# are not supported. Directory bucket names must be unique in the chosen
|
7303
7381
|
# Availability Zone. Bucket names must follow the format `
|
7304
7382
|
# bucket_base_name--az-id--x-s3` (for example, `
|
7305
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
7383
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
7306
7384
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
7307
7385
|
# *Amazon S3 User Guide*.
|
7308
7386
|
#
|
@@ -8135,7 +8213,7 @@ module Aws::S3
|
|
8135
8213
|
# are not supported. Directory bucket names must be unique in the chosen
|
8136
8214
|
# Availability Zone. Bucket names must follow the format `
|
8137
8215
|
# bucket_base_name--az-id--x-s3` (for example, `
|
8138
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
8216
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
8139
8217
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
8140
8218
|
# *Amazon S3 User Guide*.
|
8141
8219
|
#
|
@@ -8668,49 +8746,49 @@ module Aws::S3
|
|
8668
8746
|
# * {Types::GetObjectTaggingOutput#tag_set #tag_set} => Array<Types::Tag>
|
8669
8747
|
#
|
8670
8748
|
#
|
8671
|
-
# @example Example: To retrieve tag set of
|
8749
|
+
# @example Example: To retrieve tag set of a specific object version
|
8672
8750
|
#
|
8673
|
-
# # The following example retrieves tag set of an object.
|
8751
|
+
# # The following example retrieves tag set of an object. The request specifies object version.
|
8674
8752
|
#
|
8675
8753
|
# resp = client.get_object_tagging({
|
8676
8754
|
# bucket: "examplebucket",
|
8677
|
-
# key: "
|
8755
|
+
# key: "exampleobject",
|
8756
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
8678
8757
|
# })
|
8679
8758
|
#
|
8680
8759
|
# resp.to_h outputs the following:
|
8681
8760
|
# {
|
8682
8761
|
# tag_set: [
|
8683
8762
|
# {
|
8684
|
-
# key: "
|
8685
|
-
# value: "
|
8686
|
-
# },
|
8687
|
-
# {
|
8688
|
-
# key: "Key3",
|
8689
|
-
# value: "Value3",
|
8763
|
+
# key: "Key1",
|
8764
|
+
# value: "Value1",
|
8690
8765
|
# },
|
8691
8766
|
# ],
|
8692
|
-
# version_id: "
|
8767
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
8693
8768
|
# }
|
8694
8769
|
#
|
8695
|
-
# @example Example: To retrieve tag set of
|
8770
|
+
# @example Example: To retrieve tag set of an object
|
8696
8771
|
#
|
8697
|
-
# # The following example retrieves tag set of an object.
|
8772
|
+
# # The following example retrieves tag set of an object.
|
8698
8773
|
#
|
8699
8774
|
# resp = client.get_object_tagging({
|
8700
8775
|
# bucket: "examplebucket",
|
8701
|
-
# key: "
|
8702
|
-
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
8776
|
+
# key: "HappyFace.jpg",
|
8703
8777
|
# })
|
8704
8778
|
#
|
8705
8779
|
# resp.to_h outputs the following:
|
8706
8780
|
# {
|
8707
8781
|
# tag_set: [
|
8708
8782
|
# {
|
8709
|
-
# key: "
|
8710
|
-
# value: "
|
8783
|
+
# key: "Key4",
|
8784
|
+
# value: "Value4",
|
8785
|
+
# },
|
8786
|
+
# {
|
8787
|
+
# key: "Key3",
|
8788
|
+
# value: "Value3",
|
8711
8789
|
# },
|
8712
8790
|
# ],
|
8713
|
-
# version_id: "
|
8791
|
+
# version_id: "null",
|
8714
8792
|
# }
|
8715
8793
|
#
|
8716
8794
|
# @example Request syntax with placeholder values
|
@@ -8922,7 +9000,7 @@ module Aws::S3
|
|
8922
9000
|
# If the bucket does not exist or you do not have permission to access
|
8923
9001
|
# it, the `HEAD` request returns a generic `400 Bad Request`, `403
|
8924
9002
|
# Forbidden` or `404 Not Found` code. A message body is not included, so
|
8925
|
-
# you cannot determine the exception beyond these
|
9003
|
+
# you cannot determine the exception beyond these HTTP response codes.
|
8926
9004
|
#
|
8927
9005
|
# <note markdown="1"> <b>Directory buckets </b> - You must make requests for this API
|
8928
9006
|
# operation to the Zonal endpoint. These endpoints support
|
@@ -8995,7 +9073,7 @@ module Aws::S3
|
|
8995
9073
|
# are not supported. Directory bucket names must be unique in the chosen
|
8996
9074
|
# Availability Zone. Bucket names must follow the format `
|
8997
9075
|
# bucket_base_name--az-id--x-s3` (for example, `
|
8998
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
9076
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
8999
9077
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
9000
9078
|
# *Amazon S3 User Guide*.
|
9001
9079
|
#
|
@@ -9236,7 +9314,7 @@ module Aws::S3
|
|
9236
9314
|
# are not supported. Directory bucket names must be unique in the chosen
|
9237
9315
|
# Availability Zone. Bucket names must follow the format `
|
9238
9316
|
# bucket_base_name--az-id--x-s3` (for example, `
|
9239
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
9317
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
9240
9318
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
9241
9319
|
# *Amazon S3 User Guide*.
|
9242
9320
|
#
|
@@ -9356,6 +9434,24 @@ module Aws::S3
|
|
9356
9434
|
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
9357
9435
|
# Satisfiable` error.
|
9358
9436
|
#
|
9437
|
+
# @option params [String] :response_cache_control
|
9438
|
+
# Sets the `Cache-Control` header of the response.
|
9439
|
+
#
|
9440
|
+
# @option params [String] :response_content_disposition
|
9441
|
+
# Sets the `Content-Disposition` header of the response.
|
9442
|
+
#
|
9443
|
+
# @option params [String] :response_content_encoding
|
9444
|
+
# Sets the `Content-Encoding` header of the response.
|
9445
|
+
#
|
9446
|
+
# @option params [String] :response_content_language
|
9447
|
+
# Sets the `Content-Language` header of the response.
|
9448
|
+
#
|
9449
|
+
# @option params [String] :response_content_type
|
9450
|
+
# Sets the `Content-Type` header of the response.
|
9451
|
+
#
|
9452
|
+
# @option params [Time,DateTime,Date,Integer,String] :response_expires
|
9453
|
+
# Sets the `Expires` header of the response.
|
9454
|
+
#
|
9359
9455
|
# @option params [String] :version_id
|
9360
9456
|
# Version ID used to reference a specific version of the object.
|
9361
9457
|
#
|
@@ -9498,6 +9594,12 @@ module Aws::S3
|
|
9498
9594
|
# if_unmodified_since: Time.now,
|
9499
9595
|
# key: "ObjectKey", # required
|
9500
9596
|
# range: "Range",
|
9597
|
+
# response_cache_control: "ResponseCacheControl",
|
9598
|
+
# response_content_disposition: "ResponseContentDisposition",
|
9599
|
+
# response_content_encoding: "ResponseContentEncoding",
|
9600
|
+
# response_content_language: "ResponseContentLanguage",
|
9601
|
+
# response_content_type: "ResponseContentType",
|
9602
|
+
# response_expires: Time.now,
|
9501
9603
|
# version_id: "ObjectVersionId",
|
9502
9604
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
9503
9605
|
# sse_customer_key: "SSECustomerKey",
|
@@ -10225,7 +10327,7 @@ module Aws::S3
|
|
10225
10327
|
# are not supported. Directory bucket names must be unique in the chosen
|
10226
10328
|
# Availability Zone. Bucket names must follow the format `
|
10227
10329
|
# bucket_base_name--az-id--x-s3` (for example, `
|
10228
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
10330
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
10229
10331
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
10230
10332
|
# *Amazon S3 User Guide*.
|
10231
10333
|
#
|
@@ -10650,9 +10752,7 @@ module Aws::S3
|
|
10650
10752
|
#
|
10651
10753
|
# @example Example: To list object versions
|
10652
10754
|
#
|
10653
|
-
# # The following example
|
10654
|
-
# # returned to two. If there are are more than two object version, S3 returns NextToken in the response. You can specify
|
10655
|
-
# # this token value in your next request to fetch next set of object versions.
|
10755
|
+
# # The following example returns versions of an object with specific key name prefix.
|
10656
10756
|
#
|
10657
10757
|
# resp = client.list_object_versions({
|
10658
10758
|
# bucket: "examplebucket",
|
@@ -10795,7 +10895,7 @@ module Aws::S3
|
|
10795
10895
|
# are not supported. Directory bucket names must be unique in the chosen
|
10796
10896
|
# Availability Zone. Bucket names must follow the format `
|
10797
10897
|
# bucket_base_name--az-id--x-s3` (for example, `
|
10798
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
10898
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
10799
10899
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
10800
10900
|
# *Amazon S3 User Guide*.
|
10801
10901
|
#
|
@@ -11060,7 +11160,7 @@ module Aws::S3
|
|
11060
11160
|
# are not supported. Directory bucket names must be unique in the chosen
|
11061
11161
|
# Availability Zone. Bucket names must follow the format `
|
11062
11162
|
# bucket_base_name--az-id--x-s3` (for example, `
|
11063
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
11163
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
11064
11164
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
11065
11165
|
# *Amazon S3 User Guide*.
|
11066
11166
|
#
|
@@ -11116,6 +11216,9 @@ module Aws::S3
|
|
11116
11216
|
#
|
11117
11217
|
# @option params [String] :encoding_type
|
11118
11218
|
# Encoding type used by Amazon S3 to encode object keys in the response.
|
11219
|
+
# If using `url`, non-ASCII characters used in an object's key name
|
11220
|
+
# will be URL encoded. For example, the object `test_file(3).png` will
|
11221
|
+
# appear as `test_file%283%29.png`.
|
11119
11222
|
#
|
11120
11223
|
# @option params [Integer] :max_keys
|
11121
11224
|
# Sets the maximum number of keys returned in the response. By default,
|
@@ -11382,7 +11485,7 @@ module Aws::S3
|
|
11382
11485
|
# are not supported. Directory bucket names must be unique in the chosen
|
11383
11486
|
# Availability Zone. Bucket names must follow the format `
|
11384
11487
|
# bucket_base_name--az-id--x-s3` (for example, `
|
11385
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
11488
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
11386
11489
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
11387
11490
|
# *Amazon S3 User Guide*.
|
11388
11491
|
#
|
@@ -12879,11 +12982,11 @@ module Aws::S3
|
|
12879
12982
|
# configuration, see [Managing your storage lifecycle][1].
|
12880
12983
|
#
|
12881
12984
|
# <note markdown="1"> Bucket lifecycle configuration now supports specifying a lifecycle
|
12882
|
-
# rule using an object key name prefix, one or more object tags,
|
12883
|
-
# combination of
|
12884
|
-
# API. The previous version of the API supported filtering
|
12885
|
-
# an object key name prefix, which is supported for
|
12886
|
-
# compatibility. For the related API description, see
|
12985
|
+
# rule using an object key name prefix, one or more object tags, object
|
12986
|
+
# size, or any combination of these. Accordingly, this section describes
|
12987
|
+
# the latest API. The previous version of the API supported filtering
|
12988
|
+
# based only on an object key name prefix, which is supported for
|
12989
|
+
# backward compatibility. For the related API description, see
|
12887
12990
|
# [PutBucketLifecycle][2].
|
12888
12991
|
#
|
12889
12992
|
# </note>
|
@@ -12898,7 +13001,7 @@ module Aws::S3
|
|
12898
13001
|
#
|
12899
13002
|
# * A filter identifying a subset of objects to which the rule
|
12900
13003
|
# applies. The filter can be based on a key name prefix, object
|
12901
|
-
# tags, or
|
13004
|
+
# tags, object size, or any combination of these.
|
12902
13005
|
#
|
12903
13006
|
# * A status indicating whether the rule is in effect.
|
12904
13007
|
#
|
@@ -13801,7 +13904,7 @@ module Aws::S3
|
|
13801
13904
|
# Virtual-hosted-style requests aren't supported. Directory bucket
|
13802
13905
|
# names must be unique in the chosen Availability Zone. Bucket names
|
13803
13906
|
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
13804
|
-
# example, ` DOC-EXAMPLE-BUCKET--usw2-
|
13907
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
13805
13908
|
# bucket naming restrictions, see [Directory bucket naming rules][1] in
|
13806
13909
|
# the *Amazon S3 User Guide*
|
13807
13910
|
#
|
@@ -14880,7 +14983,7 @@ module Aws::S3
|
|
14880
14983
|
# are not supported. Directory bucket names must be unique in the chosen
|
14881
14984
|
# Availability Zone. Bucket names must follow the format `
|
14882
14985
|
# bucket_base_name--az-id--x-s3` (for example, `
|
14883
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
14986
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
14884
14987
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
14885
14988
|
# *Amazon S3 User Guide*.
|
14886
14989
|
#
|
@@ -15342,40 +15445,41 @@ module Aws::S3
|
|
15342
15445
|
# * {Types::PutObjectOutput#request_charged #request_charged} => String
|
15343
15446
|
#
|
15344
15447
|
#
|
15345
|
-
# @example Example: To upload an object
|
15448
|
+
# @example Example: To upload an object
|
15346
15449
|
#
|
15347
|
-
# # The following example uploads an object. The
|
15348
|
-
# #
|
15450
|
+
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
15451
|
+
# # syntax. S3 returns VersionId of the newly created object.
|
15349
15452
|
#
|
15350
15453
|
# resp = client.put_object({
|
15351
|
-
# body: "
|
15454
|
+
# body: "HappyFace.jpg",
|
15352
15455
|
# bucket: "examplebucket",
|
15353
|
-
# key: "
|
15354
|
-
# server_side_encryption: "AES256",
|
15355
|
-
# tagging: "key1=value1&key2=value2",
|
15456
|
+
# key: "HappyFace.jpg",
|
15356
15457
|
# })
|
15357
15458
|
#
|
15358
15459
|
# resp.to_h outputs the following:
|
15359
15460
|
# {
|
15360
15461
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15361
|
-
#
|
15362
|
-
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
15462
|
+
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
15363
15463
|
# }
|
15364
15464
|
#
|
15365
|
-
# @example Example: To
|
15465
|
+
# @example Example: To upload an object and specify server-side encryption and object tags
|
15366
15466
|
#
|
15367
|
-
# # The following example
|
15467
|
+
# # The following example uploads an object. The request specifies the optional server-side encryption option. The request
|
15468
|
+
# # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
|
15368
15469
|
#
|
15369
15470
|
# resp = client.put_object({
|
15370
15471
|
# body: "filetoupload",
|
15371
15472
|
# bucket: "examplebucket",
|
15372
|
-
# key: "
|
15473
|
+
# key: "exampleobject",
|
15474
|
+
# server_side_encryption: "AES256",
|
15475
|
+
# tagging: "key1=value1&key2=value2",
|
15373
15476
|
# })
|
15374
15477
|
#
|
15375
15478
|
# resp.to_h outputs the following:
|
15376
15479
|
# {
|
15377
15480
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15378
|
-
#
|
15481
|
+
# server_side_encryption: "AES256",
|
15482
|
+
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
15379
15483
|
# }
|
15380
15484
|
#
|
15381
15485
|
# @example Example: To upload an object (specify optional headers)
|
@@ -15398,43 +15502,43 @@ module Aws::S3
|
|
15398
15502
|
# version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
|
15399
15503
|
# }
|
15400
15504
|
#
|
15401
|
-
# @example Example: To upload
|
15505
|
+
# @example Example: To upload object and specify user-defined metadata
|
15402
15506
|
#
|
15403
|
-
# # The following example
|
15404
|
-
# # S3 returns version ID
|
15507
|
+
# # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
|
15508
|
+
# # enabled, S3 returns version ID in response.
|
15405
15509
|
#
|
15406
15510
|
# resp = client.put_object({
|
15407
|
-
# body: "
|
15511
|
+
# body: "filetoupload",
|
15408
15512
|
# bucket: "examplebucket",
|
15409
|
-
# key: "
|
15410
|
-
#
|
15513
|
+
# key: "exampleobject",
|
15514
|
+
# metadata: {
|
15515
|
+
# "metadata1" => "value1",
|
15516
|
+
# "metadata2" => "value2",
|
15517
|
+
# },
|
15411
15518
|
# })
|
15412
15519
|
#
|
15413
15520
|
# resp.to_h outputs the following:
|
15414
15521
|
# {
|
15415
15522
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15416
|
-
# version_id: "
|
15523
|
+
# version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
|
15417
15524
|
# }
|
15418
15525
|
#
|
15419
|
-
# @example Example: To upload object and specify
|
15526
|
+
# @example Example: To upload an object and specify optional tags
|
15420
15527
|
#
|
15421
|
-
# # The following example
|
15422
|
-
# #
|
15528
|
+
# # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
|
15529
|
+
# # S3 returns version ID of the newly created object.
|
15423
15530
|
#
|
15424
15531
|
# resp = client.put_object({
|
15425
|
-
# body: "
|
15532
|
+
# body: "c:\\HappyFace.jpg",
|
15426
15533
|
# bucket: "examplebucket",
|
15427
|
-
# key: "
|
15428
|
-
#
|
15429
|
-
# "metadata1" => "value1",
|
15430
|
-
# "metadata2" => "value2",
|
15431
|
-
# },
|
15534
|
+
# key: "HappyFace.jpg",
|
15535
|
+
# tagging: "key1=value1&key2=value2",
|
15432
15536
|
# })
|
15433
15537
|
#
|
15434
15538
|
# resp.to_h outputs the following:
|
15435
15539
|
# {
|
15436
15540
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15437
|
-
# version_id: "
|
15541
|
+
# version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
|
15438
15542
|
# }
|
15439
15543
|
#
|
15440
15544
|
# @example Example: To upload an object and specify canned ACL.
|
@@ -15455,21 +15559,20 @@ module Aws::S3
|
|
15455
15559
|
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
15456
15560
|
# }
|
15457
15561
|
#
|
15458
|
-
# @example Example: To
|
15562
|
+
# @example Example: To create an object.
|
15459
15563
|
#
|
15460
|
-
# # The following example
|
15461
|
-
# # syntax. S3 returns VersionId of the newly created object.
|
15564
|
+
# # The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
|
15462
15565
|
#
|
15463
15566
|
# resp = client.put_object({
|
15464
|
-
# body: "
|
15567
|
+
# body: "filetoupload",
|
15465
15568
|
# bucket: "examplebucket",
|
15466
|
-
# key: "
|
15569
|
+
# key: "objectkey",
|
15467
15570
|
# })
|
15468
15571
|
#
|
15469
15572
|
# resp.to_h outputs the following:
|
15470
15573
|
# {
|
15471
15574
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15472
|
-
# version_id: "
|
15575
|
+
# version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
|
15473
15576
|
# }
|
15474
15577
|
#
|
15475
15578
|
# @example Streaming a file from disk
|
@@ -16602,10 +16705,10 @@ module Aws::S3
|
|
16602
16705
|
#
|
16603
16706
|
# This action performs the following types of requests:
|
16604
16707
|
#
|
16605
|
-
# * `select` - Perform a select query on an archived object
|
16606
|
-
#
|
16607
16708
|
# * `restore an archive` - Restore an archived object
|
16608
16709
|
#
|
16710
|
+
# ^
|
16711
|
+
#
|
16609
16712
|
# For more information about the `S3` structure in the request body, see
|
16610
16713
|
# the following:
|
16611
16714
|
#
|
@@ -16616,51 +16719,6 @@ module Aws::S3
|
|
16616
16719
|
# * [Protecting Data Using Server-Side Encryption][3] in the *Amazon S3
|
16617
16720
|
# User Guide*
|
16618
16721
|
#
|
16619
|
-
# Define the SQL expression for the `SELECT` type of restoration for
|
16620
|
-
# your query in the request body's `SelectParameters` structure. You
|
16621
|
-
# can use expressions like the following examples.
|
16622
|
-
#
|
16623
|
-
# * The following expression returns all records from the specified
|
16624
|
-
# object.
|
16625
|
-
#
|
16626
|
-
# `SELECT * FROM Object`
|
16627
|
-
#
|
16628
|
-
# * Assuming that you are not using any headers for data stored in the
|
16629
|
-
# object, you can specify columns with positional headers.
|
16630
|
-
#
|
16631
|
-
# `SELECT s._1, s._2 FROM Object s WHERE s._3 > 100`
|
16632
|
-
#
|
16633
|
-
# * If you have headers and you set the `fileHeaderInfo` in the `CSV`
|
16634
|
-
# structure in the request body to `USE`, you can specify headers in
|
16635
|
-
# the query. (If you set the `fileHeaderInfo` field to `IGNORE`, the
|
16636
|
-
# first row is skipped for the query.) You cannot mix ordinal
|
16637
|
-
# positions with header column names.
|
16638
|
-
#
|
16639
|
-
# `SELECT s.Id, s.FirstName, s.SSN FROM S3Object s`
|
16640
|
-
#
|
16641
|
-
# When making a select request, you can also do the following:
|
16642
|
-
#
|
16643
|
-
# * To expedite your queries, specify the `Expedited` tier. For more
|
16644
|
-
# information about tiers, see "Restoring Archives," later in this
|
16645
|
-
# topic.
|
16646
|
-
#
|
16647
|
-
# * Specify details about the data serialization format of both the
|
16648
|
-
# input object that is being queried and the serialization of the
|
16649
|
-
# CSV-encoded query results.
|
16650
|
-
#
|
16651
|
-
# The following are additional important facts about the select feature:
|
16652
|
-
#
|
16653
|
-
# * The output results are new Amazon S3 objects. Unlike archive
|
16654
|
-
# retrievals, they are stored until explicitly deleted-manually or
|
16655
|
-
# through a lifecycle configuration.
|
16656
|
-
#
|
16657
|
-
# * You can issue more than one select request on the same Amazon S3
|
16658
|
-
# object. Amazon S3 doesn't duplicate requests, so avoid issuing
|
16659
|
-
# duplicate requests.
|
16660
|
-
#
|
16661
|
-
# * Amazon S3 accepts a select request even if the object has already
|
16662
|
-
# been restored. A select request doesn’t return error response `409`.
|
16663
|
-
#
|
16664
16722
|
# Permissions
|
16665
16723
|
#
|
16666
16724
|
# : To use this operation, you must have permissions to perform the
|
@@ -16778,8 +16836,7 @@ module Aws::S3
|
|
16778
16836
|
#
|
16779
16837
|
# * *Code: RestoreAlreadyInProgress*
|
16780
16838
|
#
|
16781
|
-
# * *Cause: Object restore is already in progress
|
16782
|
-
# not apply to SELECT type requests.)*
|
16839
|
+
# * *Cause: Object restore is already in progress.*
|
16783
16840
|
#
|
16784
16841
|
# * *HTTP Status Code: 409 Conflict*
|
16785
16842
|
#
|
@@ -17221,22 +17278,22 @@ module Aws::S3
|
|
17221
17278
|
#
|
17222
17279
|
# @example EventStream Operation Example
|
17223
17280
|
#
|
17224
|
-
# You can process event once it arrives immediately, or wait until
|
17225
|
-
# full response complete and iterate through eventstream enumerator.
|
17281
|
+
# You can process the event once it arrives immediately, or wait until the
|
17282
|
+
# full response is complete and iterate through the eventstream enumerator.
|
17226
17283
|
#
|
17227
17284
|
# To interact with event immediately, you need to register #select_object_content
|
17228
|
-
# with callbacks
|
17229
|
-
#
|
17285
|
+
# with callbacks. Callbacks can be registered for specific events or for all
|
17286
|
+
# events, including error events.
|
17230
17287
|
#
|
17231
|
-
# Callbacks can be passed
|
17232
|
-
# statement attached to #select_object_content call directly. Hybrid
|
17233
|
-
# is also supported.
|
17288
|
+
# Callbacks can be passed into the `:event_stream_handler` option or within a
|
17289
|
+
# block statement attached to the #select_object_content call directly. Hybrid
|
17290
|
+
# pattern of both is also supported.
|
17234
17291
|
#
|
17235
|
-
# `:event_stream_handler` option takes in either Proc object or
|
17292
|
+
# `:event_stream_handler` option takes in either a Proc object or
|
17236
17293
|
# Aws::S3::EventStreams::SelectObjectContentEventStream object.
|
17237
17294
|
#
|
17238
|
-
# Usage pattern a):
|
17239
|
-
# Example for registering callbacks for all event types and error event
|
17295
|
+
# Usage pattern a): Callbacks with a block attached to #select_object_content
|
17296
|
+
# Example for registering callbacks for all event types and an error event
|
17240
17297
|
#
|
17241
17298
|
# client.select_object_content( # params input# ) do |stream|
|
17242
17299
|
# stream.on_error_event do |event|
|
@@ -17256,9 +17313,9 @@ module Aws::S3
|
|
17256
17313
|
#
|
17257
17314
|
# end
|
17258
17315
|
#
|
17259
|
-
# Usage pattern b):
|
17316
|
+
# Usage pattern b): Pass in `:event_stream_handler` for #select_object_content
|
17260
17317
|
#
|
17261
|
-
# 1)
|
17318
|
+
# 1) Create a Aws::S3::EventStreams::SelectObjectContentEventStream object
|
17262
17319
|
# Example for registering callbacks with specific events
|
17263
17320
|
#
|
17264
17321
|
# handler = Aws::S3::EventStreams::SelectObjectContentEventStream.new
|
@@ -17280,7 +17337,7 @@ module Aws::S3
|
|
17280
17337
|
#
|
17281
17338
|
# client.select_object_content( # params input #, event_stream_handler: handler)
|
17282
17339
|
#
|
17283
|
-
# 2)
|
17340
|
+
# 2) Use a Ruby Proc object
|
17284
17341
|
# Example for registering callbacks with specific events
|
17285
17342
|
#
|
17286
17343
|
# handler = Proc.new do |stream|
|
@@ -17303,7 +17360,7 @@ module Aws::S3
|
|
17303
17360
|
#
|
17304
17361
|
# client.select_object_content( # params input #, event_stream_handler: handler)
|
17305
17362
|
#
|
17306
|
-
# Usage pattern c):
|
17363
|
+
# Usage pattern c): Hybrid pattern of a) and b)
|
17307
17364
|
#
|
17308
17365
|
# handler = Aws::S3::EventStreams::SelectObjectContentEventStream.new
|
17309
17366
|
# handler.on_records_event do |event|
|
@@ -17333,8 +17390,7 @@ module Aws::S3
|
|
17333
17390
|
# end
|
17334
17391
|
# end
|
17335
17392
|
#
|
17336
|
-
#
|
17337
|
-
# iterate through events after response complete.
|
17393
|
+
# You can also iterate through events after the response complete.
|
17338
17394
|
#
|
17339
17395
|
# Events are available at resp.payload # => Enumerator
|
17340
17396
|
# For parameter input example, please refer to following request syntax
|
@@ -17619,7 +17675,7 @@ module Aws::S3
|
|
17619
17675
|
# are not supported. Directory bucket names must be unique in the chosen
|
17620
17676
|
# Availability Zone. Bucket names must follow the format `
|
17621
17677
|
# bucket_base_name--az-id--x-s3` (for example, `
|
17622
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
17678
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
17623
17679
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
17624
17680
|
# *Amazon S3 User Guide*.
|
17625
17681
|
#
|
@@ -17935,11 +17991,11 @@ module Aws::S3
|
|
17935
17991
|
# the source object that is being copied.
|
17936
17992
|
#
|
17937
17993
|
# * If the destination bucket is a general purpose bucket, you must
|
17938
|
-
# have the <b> <code>s3:
|
17994
|
+
# have the <b> <code>s3:PutObject</code> </b> permission to write
|
17939
17995
|
# the object copy to the destination bucket.
|
17940
17996
|
#
|
17941
17997
|
# For information about permissions required to use the multipart
|
17942
|
-
# upload API, see [Multipart
|
17998
|
+
# upload API, see [Multipart upload API and permissions][7] in the
|
17943
17999
|
# *Amazon S3 User Guide*.
|
17944
18000
|
#
|
17945
18001
|
# * **Directory bucket permissions** - You must have permissions in a
|
@@ -17949,9 +18005,9 @@ module Aws::S3
|
|
17949
18005
|
# * If the source object that you want to copy is in a directory
|
17950
18006
|
# bucket, you must have the <b>
|
17951
18007
|
# <code>s3express:CreateSession</code> </b> permission in the
|
17952
|
-
# `Action` element of a policy to read the object
|
17953
|
-
#
|
17954
|
-
#
|
18008
|
+
# `Action` element of a policy to read the object. By default, the
|
18009
|
+
# session is in the `ReadWrite` mode. If you want to restrict the
|
18010
|
+
# access, you can explicitly set the `s3express:SessionMode`
|
17955
18011
|
# condition key to `ReadOnly` on the copy source bucket.
|
17956
18012
|
#
|
17957
18013
|
# * If the copy destination is a directory bucket, you must have the
|
@@ -18018,7 +18074,7 @@ module Aws::S3
|
|
18018
18074
|
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html
|
18019
18075
|
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
18020
18076
|
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
18021
|
-
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/
|
18077
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions
|
18022
18078
|
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
|
18023
18079
|
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
|
18024
18080
|
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
@@ -18037,7 +18093,7 @@ module Aws::S3
|
|
18037
18093
|
# are not supported. Directory bucket names must be unique in the chosen
|
18038
18094
|
# Availability Zone. Bucket names must follow the format `
|
18039
18095
|
# bucket_base_name--az-id--x-s3` (for example, `
|
18040
|
-
# DOC-EXAMPLE-BUCKET--usw2-
|
18096
|
+
# DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about bucket
|
18041
18097
|
# naming restrictions, see [Directory bucket naming rules][1] in the
|
18042
18098
|
# *Amazon S3 User Guide*.
|
18043
18099
|
#
|
@@ -18807,7 +18863,7 @@ module Aws::S3
|
|
18807
18863
|
params: params,
|
18808
18864
|
config: config)
|
18809
18865
|
context[:gem_name] = 'aws-sdk-s3'
|
18810
|
-
context[:gem_version] = '1.
|
18866
|
+
context[:gem_version] = '1.156.0'
|
18811
18867
|
Seahorse::Client::Request.new(handlers, context)
|
18812
18868
|
end
|
18813
18869
|
|