aws-sdk-s3 1.147.0 → 1.156.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +68 -2
- 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 +12 -12
- 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 +214 -143
- data/lib/aws-sdk-s3/client_api.rb +11 -2
- 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 +1 -0
- 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_stream_uploader.rb +1 -1
- 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 +1 -0
- data/lib/aws-sdk-s3/resource.rb +2 -2
- data/lib/aws-sdk-s3/types.rb +48 -17
- 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
|
@@ -1164,8 +1213,7 @@ module Aws::S3
|
|
1164
1213
|
# : When the request is an HTTP 1.1 request, the response is chunk
|
1165
1214
|
# encoded. When the request is not an HTTP 1.1 request, the response
|
1166
1215
|
# would not contain the `Content-Length`. You always need to read the
|
1167
|
-
# entire response body to check if the copy succeeds.
|
1168
|
-
# connection alive while we copy the data.
|
1216
|
+
# entire response body to check if the copy succeeds.
|
1169
1217
|
#
|
1170
1218
|
# * If the copy is successful, you receive a response with information
|
1171
1219
|
# about the copied object.
|
@@ -2291,33 +2339,33 @@ module Aws::S3
|
|
2291
2339
|
# * {Types::CreateBucketOutput#location #location} => String
|
2292
2340
|
#
|
2293
2341
|
#
|
2294
|
-
# @example Example: To create a bucket
|
2342
|
+
# @example Example: To create a bucket in a specific region
|
2295
2343
|
#
|
2296
|
-
# # The following example creates a bucket.
|
2344
|
+
# # The following example creates a bucket. The request specifies an AWS region where to create the bucket.
|
2297
2345
|
#
|
2298
2346
|
# resp = client.create_bucket({
|
2299
2347
|
# bucket: "examplebucket",
|
2348
|
+
# create_bucket_configuration: {
|
2349
|
+
# location_constraint: "eu-west-1",
|
2350
|
+
# },
|
2300
2351
|
# })
|
2301
2352
|
#
|
2302
2353
|
# resp.to_h outputs the following:
|
2303
2354
|
# {
|
2304
|
-
# location: "/
|
2355
|
+
# location: "http://examplebucket.<Region>.s3.amazonaws.com/",
|
2305
2356
|
# }
|
2306
2357
|
#
|
2307
|
-
# @example Example: To create a bucket
|
2358
|
+
# @example Example: To create a bucket
|
2308
2359
|
#
|
2309
|
-
# # The following example creates a bucket.
|
2360
|
+
# # The following example creates a bucket.
|
2310
2361
|
#
|
2311
2362
|
# resp = client.create_bucket({
|
2312
2363
|
# bucket: "examplebucket",
|
2313
|
-
# create_bucket_configuration: {
|
2314
|
-
# location_constraint: "eu-west-1",
|
2315
|
-
# },
|
2316
2364
|
# })
|
2317
2365
|
#
|
2318
2366
|
# resp.to_h outputs the following:
|
2319
2367
|
# {
|
2320
|
-
# location: "
|
2368
|
+
# location: "/examplebucket",
|
2321
2369
|
# }
|
2322
2370
|
#
|
2323
2371
|
# @example Request syntax with placeholder values
|
@@ -4680,7 +4728,7 @@ module Aws::S3
|
|
4680
4728
|
# permission.
|
4681
4729
|
#
|
4682
4730
|
# * <b> <code>s3:DeleteObjectVersion</code> </b> - To delete a
|
4683
|
-
# specific version of an object from a
|
4731
|
+
# specific version of an object from a versioning-enabled bucket,
|
4684
4732
|
# you must specify the `s3:DeleteObjectVersion` permission.
|
4685
4733
|
#
|
4686
4734
|
# * **Directory bucket permissions** - To grant access to this API
|
@@ -4881,22 +4929,20 @@ module Aws::S3
|
|
4881
4929
|
# * {Types::DeleteObjectsOutput#errors #errors} => Array<Types::Error>
|
4882
4930
|
#
|
4883
4931
|
#
|
4884
|
-
# @example Example: To delete multiple
|
4932
|
+
# @example Example: To delete multiple objects from a versioned bucket
|
4885
4933
|
#
|
4886
|
-
# # The following example deletes objects from a bucket. The
|
4887
|
-
# #
|
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.
|
4888
4936
|
#
|
4889
4937
|
# resp = client.delete_objects({
|
4890
4938
|
# bucket: "examplebucket",
|
4891
4939
|
# delete: {
|
4892
4940
|
# objects: [
|
4893
4941
|
# {
|
4894
|
-
# key: "
|
4895
|
-
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4942
|
+
# key: "objectkey1",
|
4896
4943
|
# },
|
4897
4944
|
# {
|
4898
|
-
# key: "
|
4899
|
-
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4945
|
+
# key: "objectkey2",
|
4900
4946
|
# },
|
4901
4947
|
# ],
|
4902
4948
|
# quiet: false,
|
@@ -4907,30 +4953,34 @@ module Aws::S3
|
|
4907
4953
|
# {
|
4908
4954
|
# deleted: [
|
4909
4955
|
# {
|
4910
|
-
#
|
4911
|
-
#
|
4956
|
+
# delete_marker: true,
|
4957
|
+
# delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
|
4958
|
+
# key: "objectkey1",
|
4912
4959
|
# },
|
4913
4960
|
# {
|
4914
|
-
#
|
4915
|
-
#
|
4961
|
+
# delete_marker: true,
|
4962
|
+
# delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
|
4963
|
+
# key: "objectkey2",
|
4916
4964
|
# },
|
4917
4965
|
# ],
|
4918
4966
|
# }
|
4919
4967
|
#
|
4920
|
-
# @example Example: To delete multiple
|
4968
|
+
# @example Example: To delete multiple object versions from a versioned bucket
|
4921
4969
|
#
|
4922
|
-
# # The following example deletes objects from a bucket. The
|
4923
|
-
# #
|
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.
|
4924
4972
|
#
|
4925
4973
|
# resp = client.delete_objects({
|
4926
4974
|
# bucket: "examplebucket",
|
4927
4975
|
# delete: {
|
4928
4976
|
# objects: [
|
4929
4977
|
# {
|
4930
|
-
# key: "
|
4978
|
+
# key: "HappyFace.jpg",
|
4979
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4931
4980
|
# },
|
4932
4981
|
# {
|
4933
|
-
# key: "
|
4982
|
+
# key: "HappyFace.jpg",
|
4983
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4934
4984
|
# },
|
4935
4985
|
# ],
|
4936
4986
|
# quiet: false,
|
@@ -4941,14 +4991,12 @@ module Aws::S3
|
|
4941
4991
|
# {
|
4942
4992
|
# deleted: [
|
4943
4993
|
# {
|
4944
|
-
#
|
4945
|
-
#
|
4946
|
-
# key: "objectkey1",
|
4994
|
+
# key: "HappyFace.jpg",
|
4995
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
4947
4996
|
# },
|
4948
4997
|
# {
|
4949
|
-
#
|
4950
|
-
#
|
4951
|
-
# key: "objectkey2",
|
4998
|
+
# key: "HappyFace.jpg",
|
4999
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
4952
5000
|
# },
|
4953
5001
|
# ],
|
4954
5002
|
# }
|
@@ -9386,6 +9434,24 @@ module Aws::S3
|
|
9386
9434
|
# the Range is not satisfiable, S3 returns a `416 - Requested Range Not
|
9387
9435
|
# Satisfiable` error.
|
9388
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
|
+
#
|
9389
9455
|
# @option params [String] :version_id
|
9390
9456
|
# Version ID used to reference a specific version of the object.
|
9391
9457
|
#
|
@@ -9528,6 +9594,12 @@ module Aws::S3
|
|
9528
9594
|
# if_unmodified_since: Time.now,
|
9529
9595
|
# key: "ObjectKey", # required
|
9530
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,
|
9531
9603
|
# version_id: "ObjectVersionId",
|
9532
9604
|
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
9533
9605
|
# sse_customer_key: "SSECustomerKey",
|
@@ -11145,8 +11217,8 @@ module Aws::S3
|
|
11145
11217
|
# @option params [String] :encoding_type
|
11146
11218
|
# Encoding type used by Amazon S3 to encode object keys in the response.
|
11147
11219
|
# If using `url`, non-ASCII characters used in an object's key name
|
11148
|
-
# will be URL encoded. For example, the object
|
11149
|
-
# appear as
|
11220
|
+
# will be URL encoded. For example, the object `test_file(3).png` will
|
11221
|
+
# appear as `test_file%283%29.png`.
|
11150
11222
|
#
|
11151
11223
|
# @option params [Integer] :max_keys
|
11152
11224
|
# Sets the maximum number of keys returned in the response. By default,
|
@@ -15390,6 +15462,26 @@ module Aws::S3
|
|
15390
15462
|
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
15391
15463
|
# }
|
15392
15464
|
#
|
15465
|
+
# @example Example: To upload an object and specify server-side encryption and object tags
|
15466
|
+
#
|
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.
|
15469
|
+
#
|
15470
|
+
# resp = client.put_object({
|
15471
|
+
# body: "filetoupload",
|
15472
|
+
# bucket: "examplebucket",
|
15473
|
+
# key: "exampleobject",
|
15474
|
+
# server_side_encryption: "AES256",
|
15475
|
+
# tagging: "key1=value1&key2=value2",
|
15476
|
+
# })
|
15477
|
+
#
|
15478
|
+
# resp.to_h outputs the following:
|
15479
|
+
# {
|
15480
|
+
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15481
|
+
# server_side_encryption: "AES256",
|
15482
|
+
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
15483
|
+
# }
|
15484
|
+
#
|
15393
15485
|
# @example Example: To upload an object (specify optional headers)
|
15394
15486
|
#
|
15395
15487
|
# # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
|
@@ -15431,76 +15523,56 @@ module Aws::S3
|
|
15431
15523
|
# version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
|
15432
15524
|
# }
|
15433
15525
|
#
|
15434
|
-
# @example Example: To upload an object and specify
|
15435
|
-
#
|
15436
|
-
# # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
|
15437
|
-
# # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
|
15438
|
-
#
|
15439
|
-
# resp = client.put_object({
|
15440
|
-
# acl: "authenticated-read",
|
15441
|
-
# body: "filetoupload",
|
15442
|
-
# bucket: "examplebucket",
|
15443
|
-
# key: "exampleobject",
|
15444
|
-
# })
|
15445
|
-
#
|
15446
|
-
# resp.to_h outputs the following:
|
15447
|
-
# {
|
15448
|
-
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15449
|
-
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
15450
|
-
# }
|
15451
|
-
#
|
15452
|
-
# @example Example: To create an object.
|
15526
|
+
# @example Example: To upload an object and specify optional tags
|
15453
15527
|
#
|
15454
|
-
# # The following example
|
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.
|
15455
15530
|
#
|
15456
15531
|
# resp = client.put_object({
|
15457
|
-
# body: "
|
15532
|
+
# body: "c:\\HappyFace.jpg",
|
15458
15533
|
# bucket: "examplebucket",
|
15459
|
-
# key: "
|
15534
|
+
# key: "HappyFace.jpg",
|
15535
|
+
# tagging: "key1=value1&key2=value2",
|
15460
15536
|
# })
|
15461
15537
|
#
|
15462
15538
|
# resp.to_h outputs the following:
|
15463
15539
|
# {
|
15464
15540
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15465
|
-
# version_id: "
|
15541
|
+
# version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
|
15466
15542
|
# }
|
15467
15543
|
#
|
15468
|
-
# @example Example: To upload an object and specify
|
15544
|
+
# @example Example: To upload an object and specify canned ACL.
|
15469
15545
|
#
|
15470
|
-
# # The following example uploads
|
15471
|
-
# #
|
15546
|
+
# # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
|
15547
|
+
# # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
|
15472
15548
|
#
|
15473
15549
|
# resp = client.put_object({
|
15550
|
+
# acl: "authenticated-read",
|
15474
15551
|
# body: "filetoupload",
|
15475
15552
|
# bucket: "examplebucket",
|
15476
15553
|
# key: "exampleobject",
|
15477
|
-
# server_side_encryption: "AES256",
|
15478
|
-
# tagging: "key1=value1&key2=value2",
|
15479
15554
|
# })
|
15480
15555
|
#
|
15481
15556
|
# resp.to_h outputs the following:
|
15482
15557
|
# {
|
15483
15558
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15484
|
-
#
|
15485
|
-
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
15559
|
+
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
15486
15560
|
# }
|
15487
15561
|
#
|
15488
|
-
# @example Example: To
|
15562
|
+
# @example Example: To create an object.
|
15489
15563
|
#
|
15490
|
-
# # The following example
|
15491
|
-
# # S3 returns version ID of the newly created object.
|
15564
|
+
# # The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.
|
15492
15565
|
#
|
15493
15566
|
# resp = client.put_object({
|
15494
|
-
# body: "
|
15567
|
+
# body: "filetoupload",
|
15495
15568
|
# bucket: "examplebucket",
|
15496
|
-
# key: "
|
15497
|
-
# tagging: "key1=value1&key2=value2",
|
15569
|
+
# key: "objectkey",
|
15498
15570
|
# })
|
15499
15571
|
#
|
15500
15572
|
# resp.to_h outputs the following:
|
15501
15573
|
# {
|
15502
15574
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15503
|
-
# version_id: "
|
15575
|
+
# version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
|
15504
15576
|
# }
|
15505
15577
|
#
|
15506
15578
|
# @example Streaming a file from disk
|
@@ -17206,22 +17278,22 @@ module Aws::S3
|
|
17206
17278
|
#
|
17207
17279
|
# @example EventStream Operation Example
|
17208
17280
|
#
|
17209
|
-
# You can process event once it arrives immediately, or wait until
|
17210
|
-
# 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.
|
17211
17283
|
#
|
17212
17284
|
# To interact with event immediately, you need to register #select_object_content
|
17213
|
-
# with callbacks
|
17214
|
-
#
|
17285
|
+
# with callbacks. Callbacks can be registered for specific events or for all
|
17286
|
+
# events, including error events.
|
17215
17287
|
#
|
17216
|
-
# Callbacks can be passed
|
17217
|
-
# statement attached to #select_object_content call directly. Hybrid
|
17218
|
-
# 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.
|
17219
17291
|
#
|
17220
|
-
# `:event_stream_handler` option takes in either Proc object or
|
17292
|
+
# `:event_stream_handler` option takes in either a Proc object or
|
17221
17293
|
# Aws::S3::EventStreams::SelectObjectContentEventStream object.
|
17222
17294
|
#
|
17223
|
-
# Usage pattern a):
|
17224
|
-
# 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
|
17225
17297
|
#
|
17226
17298
|
# client.select_object_content( # params input# ) do |stream|
|
17227
17299
|
# stream.on_error_event do |event|
|
@@ -17241,9 +17313,9 @@ module Aws::S3
|
|
17241
17313
|
#
|
17242
17314
|
# end
|
17243
17315
|
#
|
17244
|
-
# Usage pattern b):
|
17316
|
+
# Usage pattern b): Pass in `:event_stream_handler` for #select_object_content
|
17245
17317
|
#
|
17246
|
-
# 1)
|
17318
|
+
# 1) Create a Aws::S3::EventStreams::SelectObjectContentEventStream object
|
17247
17319
|
# Example for registering callbacks with specific events
|
17248
17320
|
#
|
17249
17321
|
# handler = Aws::S3::EventStreams::SelectObjectContentEventStream.new
|
@@ -17265,7 +17337,7 @@ module Aws::S3
|
|
17265
17337
|
#
|
17266
17338
|
# client.select_object_content( # params input #, event_stream_handler: handler)
|
17267
17339
|
#
|
17268
|
-
# 2)
|
17340
|
+
# 2) Use a Ruby Proc object
|
17269
17341
|
# Example for registering callbacks with specific events
|
17270
17342
|
#
|
17271
17343
|
# handler = Proc.new do |stream|
|
@@ -17288,7 +17360,7 @@ module Aws::S3
|
|
17288
17360
|
#
|
17289
17361
|
# client.select_object_content( # params input #, event_stream_handler: handler)
|
17290
17362
|
#
|
17291
|
-
# Usage pattern c):
|
17363
|
+
# Usage pattern c): Hybrid pattern of a) and b)
|
17292
17364
|
#
|
17293
17365
|
# handler = Aws::S3::EventStreams::SelectObjectContentEventStream.new
|
17294
17366
|
# handler.on_records_event do |event|
|
@@ -17318,8 +17390,7 @@ module Aws::S3
|
|
17318
17390
|
# end
|
17319
17391
|
# end
|
17320
17392
|
#
|
17321
|
-
#
|
17322
|
-
# iterate through events after response complete.
|
17393
|
+
# You can also iterate through events after the response complete.
|
17323
17394
|
#
|
17324
17395
|
# Events are available at resp.payload # => Enumerator
|
17325
17396
|
# For parameter input example, please refer to following request syntax
|
@@ -17924,7 +17995,7 @@ module Aws::S3
|
|
17924
17995
|
# the object copy to the destination bucket.
|
17925
17996
|
#
|
17926
17997
|
# For information about permissions required to use the multipart
|
17927
|
-
# upload API, see [Multipart
|
17998
|
+
# upload API, see [Multipart upload API and permissions][7] in the
|
17928
17999
|
# *Amazon S3 User Guide*.
|
17929
18000
|
#
|
17930
18001
|
# * **Directory bucket permissions** - You must have permissions in a
|
@@ -17934,9 +18005,9 @@ module Aws::S3
|
|
17934
18005
|
# * If the source object that you want to copy is in a directory
|
17935
18006
|
# bucket, you must have the <b>
|
17936
18007
|
# <code>s3express:CreateSession</code> </b> permission in the
|
17937
|
-
# `Action` element of a policy to read the object
|
17938
|
-
#
|
17939
|
-
#
|
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`
|
17940
18011
|
# condition key to `ReadOnly` on the copy source bucket.
|
17941
18012
|
#
|
17942
18013
|
# * If the copy destination is a directory bucket, you must have the
|
@@ -18003,7 +18074,7 @@ module Aws::S3
|
|
18003
18074
|
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html
|
18004
18075
|
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
18005
18076
|
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html
|
18006
|
-
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/
|
18077
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions
|
18007
18078
|
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
|
18008
18079
|
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
|
18009
18080
|
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
@@ -18792,7 +18863,7 @@ module Aws::S3
|
|
18792
18863
|
params: params,
|
18793
18864
|
config: config)
|
18794
18865
|
context[:gem_name] = 'aws-sdk-s3'
|
18795
|
-
context[:gem_version] = '1.
|
18866
|
+
context[:gem_version] = '1.156.0'
|
18796
18867
|
Seahorse::Client::Request.new(handlers, context)
|
18797
18868
|
end
|
18798
18869
|
|