aws-sdk-s3 1.74.0 → 1.79.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/lib/aws-sdk-s3.rb +2 -2
- data/lib/aws-sdk-s3/bucket.rb +2 -2
- data/lib/aws-sdk-s3/client.rb +148 -120
- data/lib/aws-sdk-s3/customizations/object.rb +12 -1
- data/lib/aws-sdk-s3/encryption.rb +2 -0
- data/lib/aws-sdk-s3/encryption/client.rb +11 -0
- data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +64 -29
- data/lib/aws-sdk-s3/encryption/default_cipher_provider.rb +41 -5
- data/lib/aws-sdk-s3/encryption/encrypt_handler.rb +5 -5
- data/lib/aws-sdk-s3/encryption/io_decrypter.rb +7 -6
- data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +32 -3
- data/lib/aws-sdk-s3/encryption/utils.rb +23 -0
- data/lib/aws-sdk-s3/encryptionV2/client.rb +201 -23
- data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +40 -12
- data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +77 -10
- data/lib/aws-sdk-s3/encryptionV2/default_key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +7 -4
- data/lib/aws-sdk-s3/encryptionV2/errors.rb +24 -0
- data/lib/aws-sdk-s3/encryptionV2/io_auth_decrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/io_decrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/io_encrypter.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/key_provider.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +90 -20
- data/lib/aws-sdk-s3/encryptionV2/materials.rb +2 -0
- data/lib/aws-sdk-s3/encryptionV2/utils.rb +2 -15
- data/lib/aws-sdk-s3/encryption_v2.rb +4 -1
- data/lib/aws-sdk-s3/file_uploader.rb +11 -0
- data/lib/aws-sdk-s3/multipart_file_uploader.rb +37 -2
- data/lib/aws-sdk-s3/multipart_upload_part.rb +1 -1
- data/lib/aws-sdk-s3/object.rb +1 -1
- data/lib/aws-sdk-s3/object_summary.rb +19 -3
- data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -1
- data/lib/aws-sdk-s3/plugins/dualstack.rb +3 -1
- data/lib/aws-sdk-s3/plugins/sse_cpk.rb +1 -1
- data/lib/aws-sdk-s3/presigner.rb +2 -2
- data/lib/aws-sdk-s3/resource.rb +1 -1
- data/lib/aws-sdk-s3/types.rb +25 -8
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0232fc4ef28ae41e69f589f2b398846918304fd784f15720f1470ba539706b73
|
4
|
+
data.tar.gz: 5addd423494cc626b5be39d9329823a0bb27c6e62aeaf2bc3d19ec4064b7c40e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20555cada51bdc0763fc5fe4bfb14b0d23632a17d473ee0eb953abdd974c5e972b227bf19dbff3ee37dd34fb94fc8e6b526b6bea1b40a94409cafcc78916d603
|
7
|
+
data.tar.gz: babae742c98d7c24784341bf204b38439dfd01b1cd14260783f18bc361065e7c7c994d59bb00120dc4fb5bdaf034936af9a8caa2b9efca6c2b1202a0d0cebaf3
|
data/lib/aws-sdk-s3.rb
CHANGED
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -222,7 +222,7 @@ module Aws::S3
|
|
222
222
|
# bucket.create({
|
223
223
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read
|
224
224
|
# create_bucket_configuration: {
|
225
|
-
# location_constraint: "
|
225
|
+
# location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
|
226
226
|
# },
|
227
227
|
# grant_full_control: "GrantFullControl",
|
228
228
|
# grant_read: "GrantRead",
|
@@ -357,7 +357,7 @@ module Aws::S3
|
|
357
357
|
#
|
358
358
|
#
|
359
359
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
360
|
-
# @option options [String,
|
360
|
+
# @option options [String, StringIO, File] :body
|
361
361
|
# Object data.
|
362
362
|
# @option options [String] :cache_control
|
363
363
|
# Can be used to specify caching behavior along the request/reply chain.
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -119,13 +119,28 @@ module Aws::S3
|
|
119
119
|
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
120
120
|
# credentials.
|
121
121
|
#
|
122
|
+
# * `Aws::SharedCredentials` - Used for loading static credentials from a
|
123
|
+
# shared file, such as `~/.aws/config`.
|
124
|
+
#
|
125
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
126
|
+
#
|
127
|
+
# * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
|
128
|
+
# assume a role after providing credentials via the web.
|
129
|
+
#
|
130
|
+
# * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
|
131
|
+
# access token generated from `aws login`.
|
132
|
+
#
|
133
|
+
# * `Aws::ProcessCredentials` - Used for loading credentials from a
|
134
|
+
# process that outputs to stdout.
|
135
|
+
#
|
122
136
|
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
123
137
|
# from an EC2 IMDS on an EC2 instance.
|
124
138
|
#
|
125
|
-
# * `Aws::
|
126
|
-
#
|
139
|
+
# * `Aws::ECSCredentials` - Used for loading credentials from
|
140
|
+
# instances running in ECS.
|
127
141
|
#
|
128
|
-
# * `Aws::
|
142
|
+
# * `Aws::CognitoIdentityCredentials` - Used for loading credentials
|
143
|
+
# from the Cognito Identity service.
|
129
144
|
#
|
130
145
|
# When `:credentials` are not configured directly, the following
|
131
146
|
# locations will be searched for credentials:
|
@@ -135,10 +150,10 @@ module Aws::S3
|
|
135
150
|
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
136
151
|
# * `~/.aws/credentials`
|
137
152
|
# * `~/.aws/config`
|
138
|
-
# * EC2 IMDS instance profile - When used by default, the timeouts
|
139
|
-
# very aggressive. Construct and pass an instance of
|
140
|
-
# `Aws::InstanceProfileCredentails`
|
141
|
-
# timeouts.
|
153
|
+
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
154
|
+
# are very aggressive. Construct and pass an instance of
|
155
|
+
# `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
|
156
|
+
# enable retries and extended timeouts.
|
142
157
|
#
|
143
158
|
# @option options [required, String] :region
|
144
159
|
# The AWS region to connect to. The configured `:region` is
|
@@ -529,7 +544,7 @@ module Aws::S3
|
|
529
544
|
# For information about permissions required to use the multipart upload
|
530
545
|
# API, see [Multipart Upload API and Permissions][3].
|
531
546
|
#
|
532
|
-
# `
|
547
|
+
# `CompleteMultipartUpload` has the following special errors:
|
533
548
|
#
|
534
549
|
# * Error code: `EntityTooSmall`
|
535
550
|
#
|
@@ -1290,7 +1305,7 @@ module Aws::S3
|
|
1290
1305
|
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read
|
1291
1306
|
# bucket: "BucketName", # required
|
1292
1307
|
# create_bucket_configuration: {
|
1293
|
-
# location_constraint: "
|
1308
|
+
# location_constraint: "af-south-1", # accepts af-south-1, ap-east-1, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-southeast-1, ap-southeast-2, ca-central-1, cn-north-1, cn-northwest-1, EU, eu-central-1, eu-north-1, eu-south-1, eu-west-1, eu-west-2, eu-west-3, me-south-1, sa-east-1, us-east-2, us-gov-east-1, us-gov-west-1, us-west-1, us-west-2
|
1294
1309
|
# },
|
1295
1310
|
# grant_full_control: "GrantFullControl",
|
1296
1311
|
# grant_read: "GrantRead",
|
@@ -2384,6 +2399,15 @@ module Aws::S3
|
|
2384
2399
|
# * {Types::DeleteObjectOutput#request_charged #request_charged} => String
|
2385
2400
|
#
|
2386
2401
|
#
|
2402
|
+
# @example Example: To delete an object (from a non-versioned bucket)
|
2403
|
+
#
|
2404
|
+
# # The following example deletes an object from a non-versioned bucket.
|
2405
|
+
#
|
2406
|
+
# resp = client.delete_object({
|
2407
|
+
# bucket: "ExampleBucket",
|
2408
|
+
# key: "HappyFace.jpg",
|
2409
|
+
# })
|
2410
|
+
#
|
2387
2411
|
# @example Example: To delete an object
|
2388
2412
|
#
|
2389
2413
|
# # The following example deletes an object from an S3 bucket.
|
@@ -2397,15 +2421,6 @@ module Aws::S3
|
|
2397
2421
|
# {
|
2398
2422
|
# }
|
2399
2423
|
#
|
2400
|
-
# @example Example: To delete an object (from a non-versioned bucket)
|
2401
|
-
#
|
2402
|
-
# # The following example deletes an object from a non-versioned bucket.
|
2403
|
-
#
|
2404
|
-
# resp = client.delete_object({
|
2405
|
-
# bucket: "ExampleBucket",
|
2406
|
-
# key: "HappyFace.jpg",
|
2407
|
-
# })
|
2408
|
-
#
|
2409
2424
|
# @example Request syntax with placeholder values
|
2410
2425
|
#
|
2411
2426
|
# resp = client.delete_object({
|
@@ -2469,7 +2484,7 @@ module Aws::S3
|
|
2469
2484
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html
|
2470
2485
|
#
|
2471
2486
|
# @option params [required, String] :key
|
2472
|
-
# Name of the
|
2487
|
+
# Name of the object key.
|
2473
2488
|
#
|
2474
2489
|
# @option params [String] :version_id
|
2475
2490
|
# The versionId of the object that the tag-set will be removed from.
|
@@ -2479,35 +2494,35 @@ module Aws::S3
|
|
2479
2494
|
# * {Types::DeleteObjectTaggingOutput#version_id #version_id} => String
|
2480
2495
|
#
|
2481
2496
|
#
|
2482
|
-
# @example Example: To remove tag set from an object
|
2497
|
+
# @example Example: To remove tag set from an object
|
2483
2498
|
#
|
2484
|
-
# # The following example removes tag set associated with the specified object
|
2485
|
-
# #
|
2499
|
+
# # The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the
|
2500
|
+
# # operation removes tag set from the latest object version.
|
2486
2501
|
#
|
2487
2502
|
# resp = client.delete_object_tagging({
|
2488
2503
|
# bucket: "examplebucket",
|
2489
2504
|
# key: "HappyFace.jpg",
|
2490
|
-
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
2491
2505
|
# })
|
2492
2506
|
#
|
2493
2507
|
# resp.to_h outputs the following:
|
2494
2508
|
# {
|
2495
|
-
# version_id: "
|
2509
|
+
# version_id: "null",
|
2496
2510
|
# }
|
2497
2511
|
#
|
2498
|
-
# @example Example: To remove tag set from an object
|
2512
|
+
# @example Example: To remove tag set from an object version
|
2499
2513
|
#
|
2500
|
-
# # The following example removes tag set associated with the specified object.
|
2501
|
-
# #
|
2514
|
+
# # The following example removes tag set associated with the specified object version. The request specifies both the
|
2515
|
+
# # object key and object version.
|
2502
2516
|
#
|
2503
2517
|
# resp = client.delete_object_tagging({
|
2504
2518
|
# bucket: "examplebucket",
|
2505
2519
|
# key: "HappyFace.jpg",
|
2520
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
2506
2521
|
# })
|
2507
2522
|
#
|
2508
2523
|
# resp.to_h outputs the following:
|
2509
2524
|
# {
|
2510
|
-
# version_id: "
|
2525
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
2511
2526
|
# }
|
2512
2527
|
#
|
2513
2528
|
# @example Request syntax with placeholder values
|
@@ -2626,22 +2641,20 @@ module Aws::S3
|
|
2626
2641
|
# * {Types::DeleteObjectsOutput#errors #errors} => Array<Types::Error>
|
2627
2642
|
#
|
2628
2643
|
#
|
2629
|
-
# @example Example: To delete multiple
|
2644
|
+
# @example Example: To delete multiple objects from a versioned bucket
|
2630
2645
|
#
|
2631
|
-
# # The following example deletes objects from a bucket. The
|
2632
|
-
# #
|
2646
|
+
# # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
|
2647
|
+
# # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
|
2633
2648
|
#
|
2634
2649
|
# resp = client.delete_objects({
|
2635
2650
|
# bucket: "examplebucket",
|
2636
2651
|
# delete: {
|
2637
2652
|
# objects: [
|
2638
2653
|
# {
|
2639
|
-
# key: "
|
2640
|
-
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
2654
|
+
# key: "objectkey1",
|
2641
2655
|
# },
|
2642
2656
|
# {
|
2643
|
-
# key: "
|
2644
|
-
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
2657
|
+
# key: "objectkey2",
|
2645
2658
|
# },
|
2646
2659
|
# ],
|
2647
2660
|
# quiet: false,
|
@@ -2652,30 +2665,34 @@ module Aws::S3
|
|
2652
2665
|
# {
|
2653
2666
|
# deleted: [
|
2654
2667
|
# {
|
2655
|
-
#
|
2656
|
-
#
|
2668
|
+
# delete_marker: true,
|
2669
|
+
# delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
|
2670
|
+
# key: "objectkey1",
|
2657
2671
|
# },
|
2658
2672
|
# {
|
2659
|
-
#
|
2660
|
-
#
|
2673
|
+
# delete_marker: true,
|
2674
|
+
# delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
|
2675
|
+
# key: "objectkey2",
|
2661
2676
|
# },
|
2662
2677
|
# ],
|
2663
2678
|
# }
|
2664
2679
|
#
|
2665
|
-
# @example Example: To delete multiple
|
2680
|
+
# @example Example: To delete multiple object versions from a versioned bucket
|
2666
2681
|
#
|
2667
|
-
# # The following example deletes objects from a bucket. The
|
2668
|
-
# #
|
2682
|
+
# # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
|
2683
|
+
# # versions and returns the key and versions of deleted objects in the response.
|
2669
2684
|
#
|
2670
2685
|
# resp = client.delete_objects({
|
2671
2686
|
# bucket: "examplebucket",
|
2672
2687
|
# delete: {
|
2673
2688
|
# objects: [
|
2674
2689
|
# {
|
2675
|
-
# key: "
|
2690
|
+
# key: "HappyFace.jpg",
|
2691
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
2676
2692
|
# },
|
2677
2693
|
# {
|
2678
|
-
# key: "
|
2694
|
+
# key: "HappyFace.jpg",
|
2695
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
2679
2696
|
# },
|
2680
2697
|
# ],
|
2681
2698
|
# quiet: false,
|
@@ -2686,14 +2703,12 @@ module Aws::S3
|
|
2686
2703
|
# {
|
2687
2704
|
# deleted: [
|
2688
2705
|
# {
|
2689
|
-
#
|
2690
|
-
#
|
2691
|
-
# key: "objectkey1",
|
2706
|
+
# key: "HappyFace.jpg",
|
2707
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
2692
2708
|
# },
|
2693
2709
|
# {
|
2694
|
-
#
|
2695
|
-
#
|
2696
|
-
# key: "objectkey2",
|
2710
|
+
# key: "HappyFace.jpg",
|
2711
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
2697
2712
|
# },
|
2698
2713
|
# ],
|
2699
2714
|
# }
|
@@ -3433,7 +3448,7 @@ module Aws::S3
|
|
3433
3448
|
#
|
3434
3449
|
# @example Response structure
|
3435
3450
|
#
|
3436
|
-
# resp.location_constraint #=> String, one of "
|
3451
|
+
# resp.location_constraint #=> String, one of "af-south-1", "ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "cn-north-1", "cn-northwest-1", "EU", "eu-central-1", "eu-north-1", "eu-south-1", "eu-west-1", "eu-west-2", "eu-west-3", "me-south-1", "sa-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-1", "us-west-1", "us-west-2"
|
3437
3452
|
#
|
3438
3453
|
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation AWS API Documentation
|
3439
3454
|
#
|
@@ -4522,49 +4537,49 @@ module Aws::S3
|
|
4522
4537
|
# * {Types::GetObjectOutput#object_lock_legal_hold_status #object_lock_legal_hold_status} => String
|
4523
4538
|
#
|
4524
4539
|
#
|
4525
|
-
# @example Example: To retrieve
|
4540
|
+
# @example Example: To retrieve an object
|
4526
4541
|
#
|
4527
|
-
# # The following example retrieves an object for an S3 bucket.
|
4528
|
-
# # specific byte range.
|
4542
|
+
# # The following example retrieves an object for an S3 bucket.
|
4529
4543
|
#
|
4530
4544
|
# resp = client.get_object({
|
4531
4545
|
# bucket: "examplebucket",
|
4532
|
-
# key: "
|
4533
|
-
# range: "bytes=0-9",
|
4546
|
+
# key: "HappyFace.jpg",
|
4534
4547
|
# })
|
4535
4548
|
#
|
4536
4549
|
# resp.to_h outputs the following:
|
4537
4550
|
# {
|
4538
4551
|
# accept_ranges: "bytes",
|
4539
|
-
# content_length:
|
4540
|
-
#
|
4541
|
-
#
|
4542
|
-
#
|
4543
|
-
# last_modified: Time.parse("Thu, 09 Oct 2014 22:57:28 GMT"),
|
4552
|
+
# content_length: 3191,
|
4553
|
+
# content_type: "image/jpeg",
|
4554
|
+
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
4555
|
+
# last_modified: Time.parse("Thu, 15 Dec 2016 01:19:41 GMT"),
|
4544
4556
|
# metadata: {
|
4545
4557
|
# },
|
4558
|
+
# tag_count: 2,
|
4546
4559
|
# version_id: "null",
|
4547
4560
|
# }
|
4548
4561
|
#
|
4549
|
-
# @example Example: To retrieve an object
|
4562
|
+
# @example Example: To retrieve a byte range of an object
|
4550
4563
|
#
|
4551
|
-
# # The following example retrieves an object for an S3 bucket.
|
4564
|
+
# # The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a
|
4565
|
+
# # specific byte range.
|
4552
4566
|
#
|
4553
4567
|
# resp = client.get_object({
|
4554
4568
|
# bucket: "examplebucket",
|
4555
|
-
# key: "
|
4569
|
+
# key: "SampleFile.txt",
|
4570
|
+
# range: "bytes=0-9",
|
4556
4571
|
# })
|
4557
4572
|
#
|
4558
4573
|
# resp.to_h outputs the following:
|
4559
4574
|
# {
|
4560
4575
|
# accept_ranges: "bytes",
|
4561
|
-
# content_length:
|
4562
|
-
#
|
4563
|
-
#
|
4564
|
-
#
|
4576
|
+
# content_length: 10,
|
4577
|
+
# content_range: "bytes 0-9/43",
|
4578
|
+
# content_type: "text/plain",
|
4579
|
+
# etag: "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
|
4580
|
+
# last_modified: Time.parse("Thu, 09 Oct 2014 22:57:28 GMT"),
|
4565
4581
|
# metadata: {
|
4566
4582
|
# },
|
4567
|
-
# tag_count: 2,
|
4568
4583
|
# version_id: "null",
|
4569
4584
|
# }
|
4570
4585
|
#
|
@@ -4589,8 +4604,10 @@ module Aws::S3
|
|
4589
4604
|
#
|
4590
4605
|
# @example Streaming data to a block
|
4591
4606
|
# # WARNING: yielding data to a block disables retries of networking errors
|
4607
|
+
# # However truncation of the body will be retried automatically using a range request
|
4592
4608
|
# File.open('/path/to/file', 'wb') do |file|
|
4593
|
-
# s3.get_object(bucket: 'bucket-name', key: 'object-key') do |chunk|
|
4609
|
+
# s3.get_object(bucket: 'bucket-name', key: 'object-key') do |chunk, headers|
|
4610
|
+
# # headers['content-length']
|
4594
4611
|
# file.write(chunk)
|
4595
4612
|
# end
|
4596
4613
|
# end
|
@@ -5032,49 +5049,49 @@ module Aws::S3
|
|
5032
5049
|
# * {Types::GetObjectTaggingOutput#tag_set #tag_set} => Array<Types::Tag>
|
5033
5050
|
#
|
5034
5051
|
#
|
5035
|
-
# @example Example: To retrieve tag set of
|
5052
|
+
# @example Example: To retrieve tag set of a specific object version
|
5036
5053
|
#
|
5037
|
-
# # The following example retrieves tag set of an object.
|
5054
|
+
# # The following example retrieves tag set of an object. The request specifies object version.
|
5038
5055
|
#
|
5039
5056
|
# resp = client.get_object_tagging({
|
5040
5057
|
# bucket: "examplebucket",
|
5041
|
-
# key: "
|
5058
|
+
# key: "exampleobject",
|
5059
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
5042
5060
|
# })
|
5043
5061
|
#
|
5044
5062
|
# resp.to_h outputs the following:
|
5045
5063
|
# {
|
5046
5064
|
# tag_set: [
|
5047
5065
|
# {
|
5048
|
-
# key: "
|
5049
|
-
# value: "
|
5050
|
-
# },
|
5051
|
-
# {
|
5052
|
-
# key: "Key3",
|
5053
|
-
# value: "Value3",
|
5066
|
+
# key: "Key1",
|
5067
|
+
# value: "Value1",
|
5054
5068
|
# },
|
5055
5069
|
# ],
|
5056
|
-
# version_id: "
|
5070
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
5057
5071
|
# }
|
5058
5072
|
#
|
5059
|
-
# @example Example: To retrieve tag set of
|
5073
|
+
# @example Example: To retrieve tag set of an object
|
5060
5074
|
#
|
5061
|
-
# # The following example retrieves tag set of an object.
|
5075
|
+
# # The following example retrieves tag set of an object.
|
5062
5076
|
#
|
5063
5077
|
# resp = client.get_object_tagging({
|
5064
5078
|
# bucket: "examplebucket",
|
5065
|
-
# key: "
|
5066
|
-
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
5079
|
+
# key: "HappyFace.jpg",
|
5067
5080
|
# })
|
5068
5081
|
#
|
5069
5082
|
# resp.to_h outputs the following:
|
5070
5083
|
# {
|
5071
5084
|
# tag_set: [
|
5072
5085
|
# {
|
5073
|
-
# key: "
|
5074
|
-
# value: "
|
5086
|
+
# key: "Key4",
|
5087
|
+
# value: "Value4",
|
5088
|
+
# },
|
5089
|
+
# {
|
5090
|
+
# key: "Key3",
|
5091
|
+
# value: "Value3",
|
5075
5092
|
# },
|
5076
5093
|
# ],
|
5077
|
-
# version_id: "
|
5094
|
+
# version_id: "null",
|
5078
5095
|
# }
|
5079
5096
|
#
|
5080
5097
|
# @example Request syntax with placeholder values
|
@@ -8470,6 +8487,17 @@ module Aws::S3
|
|
8470
8487
|
# configuration, you must also add the following elements:
|
8471
8488
|
# `DeleteMarkerReplication`, `Status`, and `Priority`.
|
8472
8489
|
#
|
8490
|
+
# <note markdown="1"> The latest version of the replication configuration XML is V2. XML V2
|
8491
|
+
# replication configurations are those that contain the `Filter` element
|
8492
|
+
# for rules, and rules that specify S3 Replication Time Control (S3
|
8493
|
+
# RTC). In XML V2 replication configurations, Amazon S3 doesn't
|
8494
|
+
# replicate delete markers. Therefore, you must set the
|
8495
|
+
# `DeleteMarkerReplication` element to `Disabled`. For backward
|
8496
|
+
# compatibility, Amazon S3 continues to support the XML V1 replication
|
8497
|
+
# configuration.
|
8498
|
+
#
|
8499
|
+
# </note>
|
8500
|
+
#
|
8473
8501
|
# For information about enabling versioning on a bucket, see [Using
|
8474
8502
|
# Versioning][3].
|
8475
8503
|
#
|
@@ -9162,7 +9190,7 @@ module Aws::S3
|
|
9162
9190
|
#
|
9163
9191
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL
|
9164
9192
|
#
|
9165
|
-
# @option params [String,
|
9193
|
+
# @option params [String, StringIO, File] :body
|
9166
9194
|
# Object data.
|
9167
9195
|
#
|
9168
9196
|
# @option params [required, String] :bucket
|
@@ -9380,24 +9408,39 @@ module Aws::S3
|
|
9380
9408
|
# * {Types::PutObjectOutput#request_charged #request_charged} => String
|
9381
9409
|
#
|
9382
9410
|
#
|
9383
|
-
# @example Example: To upload an object and specify
|
9411
|
+
# @example Example: To upload an object and specify canned ACL.
|
9384
9412
|
#
|
9385
|
-
# # The following example uploads and object. The request specifies
|
9386
|
-
# #
|
9413
|
+
# # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
|
9414
|
+
# # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
|
9387
9415
|
#
|
9388
9416
|
# resp = client.put_object({
|
9417
|
+
# acl: "authenticated-read",
|
9389
9418
|
# body: "filetoupload",
|
9390
9419
|
# bucket: "examplebucket",
|
9391
9420
|
# key: "exampleobject",
|
9392
|
-
# server_side_encryption: "AES256",
|
9393
|
-
# tagging: "key1=value1&key2=value2",
|
9394
9421
|
# })
|
9395
9422
|
#
|
9396
9423
|
# resp.to_h outputs the following:
|
9397
9424
|
# {
|
9398
9425
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
9399
|
-
#
|
9400
|
-
#
|
9426
|
+
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
9427
|
+
# }
|
9428
|
+
#
|
9429
|
+
# @example Example: To upload an object
|
9430
|
+
#
|
9431
|
+
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
9432
|
+
# # syntax. S3 returns VersionId of the newly created object.
|
9433
|
+
#
|
9434
|
+
# resp = client.put_object({
|
9435
|
+
# body: "HappyFace.jpg",
|
9436
|
+
# bucket: "examplebucket",
|
9437
|
+
# key: "HappyFace.jpg",
|
9438
|
+
# })
|
9439
|
+
#
|
9440
|
+
# resp.to_h outputs the following:
|
9441
|
+
# {
|
9442
|
+
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
9443
|
+
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
9401
9444
|
# }
|
9402
9445
|
#
|
9403
9446
|
# @example Example: To create an object.
|
@@ -9475,39 +9518,24 @@ module Aws::S3
|
|
9475
9518
|
# version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
|
9476
9519
|
# }
|
9477
9520
|
#
|
9478
|
-
# @example Example: To upload an object and specify
|
9521
|
+
# @example Example: To upload an object and specify server-side encryption and object tags
|
9479
9522
|
#
|
9480
|
-
# # The following example uploads and object. The request specifies optional
|
9481
|
-
# #
|
9523
|
+
# # The following example uploads and object. The request specifies the optional server-side encryption option. The request
|
9524
|
+
# # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
|
9482
9525
|
#
|
9483
9526
|
# resp = client.put_object({
|
9484
|
-
# acl: "authenticated-read",
|
9485
9527
|
# body: "filetoupload",
|
9486
9528
|
# bucket: "examplebucket",
|
9487
9529
|
# key: "exampleobject",
|
9530
|
+
# server_side_encryption: "AES256",
|
9531
|
+
# tagging: "key1=value1&key2=value2",
|
9488
9532
|
# })
|
9489
9533
|
#
|
9490
9534
|
# resp.to_h outputs the following:
|
9491
9535
|
# {
|
9492
9536
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
9493
|
-
#
|
9494
|
-
#
|
9495
|
-
#
|
9496
|
-
# @example Example: To upload an object
|
9497
|
-
#
|
9498
|
-
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
9499
|
-
# # syntax. S3 returns VersionId of the newly created object.
|
9500
|
-
#
|
9501
|
-
# resp = client.put_object({
|
9502
|
-
# body: "HappyFace.jpg",
|
9503
|
-
# bucket: "examplebucket",
|
9504
|
-
# key: "HappyFace.jpg",
|
9505
|
-
# })
|
9506
|
-
#
|
9507
|
-
# resp.to_h outputs the following:
|
9508
|
-
# {
|
9509
|
-
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
9510
|
-
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
9537
|
+
# server_side_encryption: "AES256",
|
9538
|
+
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
9511
9539
|
# }
|
9512
9540
|
#
|
9513
9541
|
# @example Streaming a file from disk
|
@@ -10187,7 +10215,7 @@ module Aws::S3
|
|
10187
10215
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-access-points.html
|
10188
10216
|
#
|
10189
10217
|
# @option params [required, String] :key
|
10190
|
-
# Name of the
|
10218
|
+
# Name of the object key.
|
10191
10219
|
#
|
10192
10220
|
# @option params [String] :version_id
|
10193
10221
|
# The versionId of the object that the tag-set will be added to.
|
@@ -11238,7 +11266,7 @@ module Aws::S3
|
|
11238
11266
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
|
11239
11267
|
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
|
11240
11268
|
#
|
11241
|
-
# @option params [String,
|
11269
|
+
# @option params [String, StringIO, File] :body
|
11242
11270
|
# Object data.
|
11243
11271
|
#
|
11244
11272
|
# @option params [required, String] :bucket
|
@@ -11672,7 +11700,7 @@ module Aws::S3
|
|
11672
11700
|
params: params,
|
11673
11701
|
config: config)
|
11674
11702
|
context[:gem_name] = 'aws-sdk-s3'
|
11675
|
-
context[:gem_version] = '1.
|
11703
|
+
context[:gem_version] = '1.79.0'
|
11676
11704
|
Seahorse::Client::Request.new(handlers, context)
|
11677
11705
|
end
|
11678
11706
|
|