aws-sdk-s3 1.162.0 → 1.166.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 +20 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/bucket.rb +123 -43
- data/lib/aws-sdk-s3/client.rb +1091 -394
- data/lib/aws-sdk-s3/client_api.rb +9 -0
- data/lib/aws-sdk-s3/customizations/object.rb +6 -0
- data/lib/aws-sdk-s3/customizations/object_summary.rb +5 -0
- data/lib/aws-sdk-s3/customizations/object_version.rb +13 -0
- data/lib/aws-sdk-s3/customizations.rb +24 -38
- data/lib/aws-sdk-s3/errors.rb +3 -0
- data/lib/aws-sdk-s3/multipart_upload.rb +3 -0
- data/lib/aws-sdk-s3/object.rb +339 -129
- data/lib/aws-sdk-s3/object_summary.rb +327 -109
- data/lib/aws-sdk-s3/object_version.rb +17 -8
- data/lib/aws-sdk-s3/plugins/endpoints.rb +13 -7
- data/lib/aws-sdk-s3/types.rb +647 -306
- data/lib/aws-sdk-s3.rb +35 -31
- data/sig/client.rbs +10 -1
- data/sig/resource.rbs +1 -0
- data/sig/types.rbs +10 -2
- metadata +5 -4
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -57,8 +57,6 @@ require 'aws-sdk-s3/plugins/streaming_retry.rb'
|
|
57
57
|
require 'aws-sdk-s3/plugins/url_encoded_keys.rb'
|
58
58
|
require 'aws-sdk-core/plugins/event_stream_configuration.rb'
|
59
59
|
|
60
|
-
Aws::Plugins::GlobalConfiguration.add_identifier(:s3)
|
61
|
-
|
62
60
|
module Aws::S3
|
63
61
|
# An API client for S3. To construct a client, you need to configure a `:region` and `:credentials`.
|
64
62
|
#
|
@@ -172,13 +170,15 @@ module Aws::S3
|
|
172
170
|
# locations will be searched for credentials:
|
173
171
|
#
|
174
172
|
# * `Aws.config[:credentials]`
|
175
|
-
# * The `:access_key_id`, `:secret_access_key`,
|
176
|
-
#
|
173
|
+
# * The `:access_key_id`, `:secret_access_key`, `:session_token`, and
|
174
|
+
# `:account_id` options.
|
175
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'],
|
176
|
+
# ENV['AWS_SESSION_TOKEN'], and ENV['AWS_ACCOUNT_ID']
|
177
177
|
# * `~/.aws/credentials`
|
178
178
|
# * `~/.aws/config`
|
179
179
|
# * EC2/ECS IMDS instance profile - When used by default, the timeouts
|
180
180
|
# are very aggressive. Construct and pass an instance of
|
181
|
-
# `Aws::
|
181
|
+
# `Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to
|
182
182
|
# enable retries and extended timeouts. Instance profile credential
|
183
183
|
# fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
|
184
184
|
# to true.
|
@@ -207,6 +207,8 @@ module Aws::S3
|
|
207
207
|
#
|
208
208
|
# @option options [String] :access_key_id
|
209
209
|
#
|
210
|
+
# @option options [String] :account_id
|
211
|
+
#
|
210
212
|
# @option options [Boolean] :active_endpoint_cache (false)
|
211
213
|
# When set to `true`, a thread polling for endpoints will be running in
|
212
214
|
# the background every 60 secs (default). Defaults to `false`.
|
@@ -476,7 +478,9 @@ module Aws::S3
|
|
476
478
|
# sending the request.
|
477
479
|
#
|
478
480
|
# @option options [Aws::S3::EndpointProvider] :endpoint_provider
|
479
|
-
# The endpoint provider used to resolve endpoints. Any object that responds to
|
481
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to
|
482
|
+
# `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
|
483
|
+
# `Aws::S3::EndpointParameters`.
|
480
484
|
#
|
481
485
|
# @option options [Float] :http_continue_timeout (1)
|
482
486
|
# The number of seconds to wait for a 100-continue response before sending the
|
@@ -800,9 +804,15 @@ module Aws::S3
|
|
800
804
|
# [Multipart Upload and Permissions][6] in the *Amazon S3 User
|
801
805
|
# Guide*.
|
802
806
|
#
|
807
|
+
# If you provide an [additional checksum value][7] in your
|
808
|
+
# `MultipartUpload` requests and the object is encrypted with Key
|
809
|
+
# Management Service, you must have permission to use the
|
810
|
+
# `kms:Decrypt` action for the `CompleteMultipartUpload` request to
|
811
|
+
# succeed.
|
812
|
+
#
|
803
813
|
# * **Directory bucket permissions** - To grant access to this API
|
804
814
|
# operation on a directory bucket, we recommend that you use the [
|
805
|
-
# `CreateSession` ][
|
815
|
+
# `CreateSession` ][8] API operation for session-based
|
806
816
|
# authorization. Specifically, you grant the
|
807
817
|
# `s3express:CreateSession` permission to the directory bucket in a
|
808
818
|
# bucket policy or an IAM identity-based policy. Then, you make the
|
@@ -813,13 +823,11 @@ module Aws::S3
|
|
813
823
|
# token for use. Amazon Web Services CLI or SDKs create session and
|
814
824
|
# refresh the session token automatically to avoid service
|
815
825
|
# interruptions when a session expires. For more information about
|
816
|
-
# authorization, see [ `CreateSession` ][
|
826
|
+
# authorization, see [ `CreateSession` ][8].
|
817
827
|
#
|
818
|
-
#
|
819
|
-
# `
|
820
|
-
#
|
821
|
-
# `kms:Decrypt` action for the `CompleteMultipartUpload` request to
|
822
|
-
# succeed.
|
828
|
+
# If the object is encrypted with SSE-KMS, you must also have the
|
829
|
+
# `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
|
830
|
+
# identity-based policies and KMS key policies for the KMS key.
|
823
831
|
#
|
824
832
|
# Special errors
|
825
833
|
# : * Error Code: `EntityTooSmall`
|
@@ -878,8 +886,8 @@ module Aws::S3
|
|
878
886
|
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html
|
879
887
|
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
880
888
|
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
|
881
|
-
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
882
|
-
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
889
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
|
890
|
+
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
883
891
|
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
|
884
892
|
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
|
885
893
|
# [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
|
@@ -1265,6 +1273,10 @@ module Aws::S3
|
|
1265
1273
|
# destination. The `s3express:SessionMode` condition key can't be
|
1266
1274
|
# set to `ReadOnly` on the copy destination bucket.
|
1267
1275
|
#
|
1276
|
+
# If the object is encrypted with SSE-KMS, you must also have the
|
1277
|
+
# `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
|
1278
|
+
# identity-based policies and KMS key policies for the KMS key.
|
1279
|
+
#
|
1268
1280
|
# For example policies, see [Example bucket policies for S3 Express
|
1269
1281
|
# One Zone][6] and [Amazon Web Services Identity and Access
|
1270
1282
|
# Management (IAM) identity-based policies for S3 Express One
|
@@ -1711,9 +1723,8 @@ module Aws::S3
|
|
1711
1723
|
#
|
1712
1724
|
# @option params [String] :server_side_encryption
|
1713
1725
|
# The server-side encryption algorithm used when storing this object in
|
1714
|
-
# Amazon S3
|
1715
|
-
#
|
1716
|
-
# and will receive a `400 Bad Request` response.
|
1726
|
+
# Amazon S3. Unrecognized or unsupported values won’t write a
|
1727
|
+
# destination object and will receive a `400 Bad Request` response.
|
1717
1728
|
#
|
1718
1729
|
# Amazon S3 automatically encrypts all new objects that are copied to an
|
1719
1730
|
# S3 bucket. When copying an object, if you don't specify encryption
|
@@ -1721,35 +1732,72 @@ module Aws::S3
|
|
1721
1732
|
# object is set to the default encryption configuration of the
|
1722
1733
|
# destination bucket. By default, all buckets have a base level of
|
1723
1734
|
# encryption configuration that uses server-side encryption with Amazon
|
1724
|
-
# S3 managed keys (SSE-S3). If the destination bucket has a
|
1725
|
-
# encryption configuration
|
1726
|
-
#
|
1727
|
-
# encryption with Amazon Web Services KMS keys (DSSE-KMS), or
|
1728
|
-
# server-side encryption with customer-provided encryption keys (SSE-C),
|
1729
|
-
# Amazon S3 uses the corresponding KMS key, or a customer-provided key
|
1730
|
-
# to encrypt the target object copy.
|
1731
|
-
#
|
1732
|
-
# When you perform a `CopyObject` operation, if you want to use a
|
1733
|
-
# different type of encryption setting for the target object, you can
|
1734
|
-
# specify appropriate encryption-related headers to encrypt the target
|
1735
|
-
# object with an Amazon S3 managed key, a KMS key, or a
|
1736
|
-
# customer-provided key. If the encryption setting in your request is
|
1737
|
-
# different from the default encryption configuration of the destination
|
1738
|
-
# bucket, the encryption setting in your request takes precedence.
|
1735
|
+
# S3 managed keys (SSE-S3). If the destination bucket has a different
|
1736
|
+
# default encryption configuration, Amazon S3 uses the corresponding
|
1737
|
+
# encryption key to encrypt the target object copy.
|
1739
1738
|
#
|
1740
1739
|
# With server-side encryption, Amazon S3 encrypts your data as it writes
|
1741
1740
|
# your data to disks in its data centers and decrypts the data when you
|
1742
1741
|
# access it. For more information about server-side encryption, see
|
1743
1742
|
# [Using Server-Side Encryption][1] in the *Amazon S3 User Guide*.
|
1744
1743
|
#
|
1745
|
-
# <
|
1746
|
-
#
|
1747
|
-
#
|
1748
|
-
#
|
1744
|
+
# <b>General purpose buckets </b>
|
1745
|
+
#
|
1746
|
+
# * For general purpose buckets, there are the following supported
|
1747
|
+
# options for server-side encryption: server-side encryption with Key
|
1748
|
+
# Management Service (KMS) keys (SSE-KMS), dual-layer server-side
|
1749
|
+
# encryption with Amazon Web Services KMS keys (DSSE-KMS), and
|
1750
|
+
# server-side encryption with customer-provided encryption keys
|
1751
|
+
# (SSE-C). Amazon S3 uses the corresponding KMS key, or a
|
1752
|
+
# customer-provided key to encrypt the target object copy.
|
1753
|
+
#
|
1754
|
+
# * When you perform a `CopyObject` operation, if you want to use a
|
1755
|
+
# different type of encryption setting for the target object, you can
|
1756
|
+
# specify appropriate encryption-related headers to encrypt the target
|
1757
|
+
# object with an Amazon S3 managed key, a KMS key, or a
|
1758
|
+
# customer-provided key. If the encryption setting in your request is
|
1759
|
+
# different from the default encryption configuration of the
|
1760
|
+
# destination bucket, the encryption setting in your request takes
|
1761
|
+
# precedence.
|
1762
|
+
#
|
1763
|
+
# <b>Directory buckets </b>
|
1764
|
+
#
|
1765
|
+
# * For directory buckets, there are only two supported options for
|
1766
|
+
# server-side encryption: server-side encryption with Amazon S3
|
1767
|
+
# managed keys (SSE-S3) (`AES256`) and server-side encryption with KMS
|
1768
|
+
# keys (SSE-KMS) (`aws:kms`). We recommend that the bucket's default
|
1769
|
+
# encryption uses the desired encryption configuration and you don't
|
1770
|
+
# override the bucket default encryption in your `CreateSession`
|
1771
|
+
# requests or `PUT` object requests. Then, new objects are
|
1772
|
+
# automatically encrypted with the desired encryption settings. For
|
1773
|
+
# more information, see [Protecting data with server-side
|
1774
|
+
# encryption][2] in the *Amazon S3 User Guide*. For more information
|
1775
|
+
# about the encryption overriding behaviors in directory buckets, see
|
1776
|
+
# [Specifying server-side encryption with KMS for new object
|
1777
|
+
# uploads][3].
|
1778
|
+
#
|
1779
|
+
# * To encrypt new object copies to a directory bucket with SSE-KMS, we
|
1780
|
+
# recommend you specify SSE-KMS as the directory bucket's default
|
1781
|
+
# encryption configuration with a KMS key (specifically, a [customer
|
1782
|
+
# managed key][4]). [Amazon Web Services managed key][5] (`aws/s3`)
|
1783
|
+
# isn't supported. Your SSE-KMS configuration can only support 1
|
1784
|
+
# [customer managed key][4] per directory bucket for the lifetime of
|
1785
|
+
# the bucket. After you specify a customer managed key for SSE-KMS,
|
1786
|
+
# you can't override the customer managed key for the bucket's
|
1787
|
+
# SSE-KMS configuration. Then, when you perform a `CopyObject`
|
1788
|
+
# operation and want to specify server-side encryption settings for
|
1789
|
+
# new object copies with SSE-KMS in the encryption-related request
|
1790
|
+
# headers, you must ensure the encryption key is the same customer
|
1791
|
+
# managed key that you specified for the directory bucket's default
|
1792
|
+
# encryption configuration.
|
1749
1793
|
#
|
1750
1794
|
#
|
1751
1795
|
#
|
1752
1796
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html
|
1797
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
1798
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
1799
|
+
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
1800
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
1753
1801
|
#
|
1754
1802
|
# @option params [String] :storage_class
|
1755
1803
|
# If the `x-amz-storage-class` header is not used, the copied object
|
@@ -1846,33 +1894,51 @@ module Aws::S3
|
|
1846
1894
|
# </note>
|
1847
1895
|
#
|
1848
1896
|
# @option params [String] :ssekms_key_id
|
1849
|
-
# Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for
|
1850
|
-
# encryption. All GET and PUT requests for an object protected by
|
1851
|
-
# will fail if they're not made via SSL or using SigV4. For
|
1852
|
-
# about configuring any of the officially supported Amazon
|
1853
|
-
# SDKs and Amazon Web Services CLI, see [Specifying the
|
1854
|
-
# Version in Request Authentication][1] in the *Amazon S3 User
|
1855
|
-
#
|
1856
|
-
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
1857
|
-
# directory bucket.
|
1897
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
1898
|
+
# object encryption. All GET and PUT requests for an object protected by
|
1899
|
+
# KMS will fail if they're not made via SSL or using SigV4. For
|
1900
|
+
# information about configuring any of the officially supported Amazon
|
1901
|
+
# Web Services SDKs and Amazon Web Services CLI, see [Specifying the
|
1902
|
+
# Signature Version in Request Authentication][1] in the *Amazon S3 User
|
1903
|
+
# Guide*.
|
1858
1904
|
#
|
1859
|
-
#
|
1905
|
+
# **Directory buckets** - If you specify `x-amz-server-side-encryption`
|
1906
|
+
# with `aws:kms`, you must specify the `
|
1907
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
|
1908
|
+
# ID or Key ARN) of the KMS symmetric encryption customer managed key to
|
1909
|
+
# use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
|
1910
|
+
# key ID or key ARN. The key alias format of the KMS key isn't
|
1911
|
+
# supported. Your SSE-KMS configuration can only support 1 [customer
|
1912
|
+
# managed key][2] per directory bucket for the lifetime of the bucket.
|
1913
|
+
# [Amazon Web Services managed key][3] (`aws/s3`) isn't supported.
|
1860
1914
|
#
|
1861
1915
|
#
|
1862
1916
|
#
|
1863
1917
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
|
1918
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
1919
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
1864
1920
|
#
|
1865
1921
|
# @option params [String] :ssekms_encryption_context
|
1866
|
-
# Specifies the Amazon Web Services KMS Encryption Context
|
1867
|
-
#
|
1868
|
-
#
|
1869
|
-
#
|
1870
|
-
#
|
1922
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
1923
|
+
# additional encryption context to use for the destination object
|
1924
|
+
# encryption. The value of this header is a base64-encoded UTF-8 string
|
1925
|
+
# holding JSON with the encryption context key-value pairs.
|
1926
|
+
#
|
1927
|
+
# **General purpose buckets** - This value must be explicitly added to
|
1928
|
+
# specify encryption context for `CopyObject` requests if you want an
|
1929
|
+
# additional encryption context for your destination object. The
|
1930
|
+
# additional encryption context of the source object won't be copied to
|
1931
|
+
# the destination object. For more information, see [Encryption
|
1932
|
+
# context][1] in the *Amazon S3 User Guide*.
|
1933
|
+
#
|
1934
|
+
# **Directory buckets** - You can optionally provide an explicit
|
1935
|
+
# encryption context value. The value must match the default encryption
|
1936
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
1937
|
+
# encryption context value is not supported.
|
1871
1938
|
#
|
1872
|
-
# <note markdown="1"> This functionality is not supported when the destination bucket is a
|
1873
|
-
# directory bucket.
|
1874
1939
|
#
|
1875
|
-
#
|
1940
|
+
#
|
1941
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
1876
1942
|
#
|
1877
1943
|
# @option params [Boolean] :bucket_key_enabled
|
1878
1944
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
@@ -1887,14 +1953,19 @@ module Aws::S3
|
|
1887
1953
|
# For more information, see [Amazon S3 Bucket Keys][1] in the *Amazon S3
|
1888
1954
|
# User Guide*.
|
1889
1955
|
#
|
1890
|
-
# <note markdown="1">
|
1891
|
-
#
|
1956
|
+
# <note markdown="1"> **Directory buckets** - S3 Bucket Keys aren't supported, when you
|
1957
|
+
# copy SSE-KMS encrypted objects from general purpose buckets to
|
1958
|
+
# directory buckets, from directory buckets to general purpose buckets,
|
1959
|
+
# or between directory buckets, through [CopyObject][2]. In this case,
|
1960
|
+
# Amazon S3 makes a call to KMS every time a copy request is made for a
|
1961
|
+
# KMS-encrypted object.
|
1892
1962
|
#
|
1893
1963
|
# </note>
|
1894
1964
|
#
|
1895
1965
|
#
|
1896
1966
|
#
|
1897
1967
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
|
1968
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
1898
1969
|
#
|
1899
1970
|
# @option params [String] :copy_source_sse_customer_algorithm
|
1900
1971
|
# Specifies the algorithm to use when decrypting the source object (for
|
@@ -2636,9 +2707,53 @@ module Aws::S3
|
|
2636
2707
|
# using server-side encryption with customer-provided encryption
|
2637
2708
|
# keys (SSE-C)][11] in the *Amazon S3 User Guide*.
|
2638
2709
|
#
|
2639
|
-
# * **Directory buckets** -For directory buckets, only
|
2640
|
-
#
|
2641
|
-
#
|
2710
|
+
# * **Directory buckets** - For directory buckets, there are only two
|
2711
|
+
# supported options for server-side encryption: server-side
|
2712
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
2713
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
2714
|
+
# recommend that the bucket's default encryption uses the desired
|
2715
|
+
# encryption configuration and you don't override the bucket
|
2716
|
+
# default encryption in your `CreateSession` requests or `PUT`
|
2717
|
+
# object requests. Then, new objects are automatically encrypted
|
2718
|
+
# with the desired encryption settings. For more information, see
|
2719
|
+
# [Protecting data with server-side encryption][12] in the *Amazon
|
2720
|
+
# S3 User Guide*. For more information about the encryption
|
2721
|
+
# overriding behaviors in directory buckets, see [Specifying
|
2722
|
+
# server-side encryption with KMS for new object uploads][13].
|
2723
|
+
#
|
2724
|
+
# In the Zonal endpoint API calls (except [CopyObject][14] and
|
2725
|
+
# [UploadPartCopy][9]) using the REST API, the encryption request
|
2726
|
+
# headers must match the encryption settings that are specified in
|
2727
|
+
# the `CreateSession` request. You can't override the values of the
|
2728
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
2729
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
2730
|
+
# `x-amz-server-side-encryption-context`, and
|
2731
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
2732
|
+
# specified in the `CreateSession` request. You don't need to
|
2733
|
+
# explicitly specify these encryption settings values in Zonal
|
2734
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
2735
|
+
# values from the `CreateSession` request to protect new objects in
|
2736
|
+
# the directory bucket.
|
2737
|
+
#
|
2738
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
2739
|
+
# `CreateSession`, the session token refreshes automatically to
|
2740
|
+
# avoid service interruptions when a session expires. The CLI or the
|
2741
|
+
# Amazon Web Services SDKs use the bucket's default encryption
|
2742
|
+
# configuration for the `CreateSession` request. It's not supported
|
2743
|
+
# to override the encryption settings values in the `CreateSession`
|
2744
|
+
# request. So in the Zonal endpoint API calls (except
|
2745
|
+
# [CopyObject][14] and [UploadPartCopy][9]), the encryption request
|
2746
|
+
# headers must match the default encryption configuration of the
|
2747
|
+
# directory bucket.
|
2748
|
+
#
|
2749
|
+
# </note>
|
2750
|
+
#
|
2751
|
+
# <note markdown="1"> For directory buckets, when you perform a `CreateMultipartUpload`
|
2752
|
+
# operation and an `UploadPartCopy` operation, the request headers
|
2753
|
+
# you provide in the `CreateMultipartUpload` request must match the
|
2754
|
+
# default encryption configuration of the destination bucket.
|
2755
|
+
#
|
2756
|
+
# </note>
|
2642
2757
|
#
|
2643
2758
|
# HTTP Host header syntax
|
2644
2759
|
#
|
@@ -2649,13 +2764,13 @@ module Aws::S3
|
|
2649
2764
|
#
|
2650
2765
|
# * [UploadPart][1]
|
2651
2766
|
#
|
2652
|
-
# * [CompleteMultipartUpload][
|
2767
|
+
# * [CompleteMultipartUpload][15]
|
2653
2768
|
#
|
2654
|
-
# * [AbortMultipartUpload][
|
2769
|
+
# * [AbortMultipartUpload][16]
|
2655
2770
|
#
|
2656
|
-
# * [ListParts][
|
2771
|
+
# * [ListParts][17]
|
2657
2772
|
#
|
2658
|
-
# * [ListMultipartUploads][
|
2773
|
+
# * [ListMultipartUploads][18]
|
2659
2774
|
#
|
2660
2775
|
#
|
2661
2776
|
#
|
@@ -2670,10 +2785,13 @@ module Aws::S3
|
|
2670
2785
|
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
2671
2786
|
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
|
2672
2787
|
# [11]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html
|
2673
|
-
# [12]: https://docs.aws.amazon.com/AmazonS3/latest/
|
2674
|
-
# [13]: https://docs.aws.amazon.com/AmazonS3/latest/
|
2675
|
-
# [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
2676
|
-
# [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
2788
|
+
# [12]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
2789
|
+
# [13]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
2790
|
+
# [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
2791
|
+
# [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
|
2792
|
+
# [16]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
|
2793
|
+
# [17]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
|
2794
|
+
# [18]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
|
2677
2795
|
#
|
2678
2796
|
# @option params [String] :acl
|
2679
2797
|
# The canned ACL to apply to the object. Amazon S3 supports a set of
|
@@ -3036,10 +3154,52 @@ module Aws::S3
|
|
3036
3154
|
# The server-side encryption algorithm used when you store this object
|
3037
3155
|
# in Amazon S3 (for example, `AES256`, `aws:kms`).
|
3038
3156
|
#
|
3039
|
-
# <
|
3040
|
-
#
|
3157
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
3158
|
+
# two supported options for server-side encryption: server-side
|
3159
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
3160
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
3161
|
+
# recommend that the bucket's default encryption uses the desired
|
3162
|
+
# encryption configuration and you don't override the bucket default
|
3163
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
3164
|
+
# requests. Then, new objects are automatically encrypted with the
|
3165
|
+
# desired encryption settings. For more information, see [Protecting
|
3166
|
+
# data with server-side encryption][1] in the *Amazon S3 User Guide*.
|
3167
|
+
# For more information about the encryption overriding behaviors in
|
3168
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
3169
|
+
# for new object uploads][2].
|
3170
|
+
#
|
3171
|
+
# In the Zonal endpoint API calls (except [CopyObject][3] and
|
3172
|
+
# [UploadPartCopy][4]) using the REST API, the encryption request
|
3173
|
+
# headers must match the encryption settings that are specified in the
|
3174
|
+
# `CreateSession` request. You can't override the values of the
|
3175
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
3176
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
3177
|
+
# `x-amz-server-side-encryption-context`, and
|
3178
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
3179
|
+
# specified in the `CreateSession` request. You don't need to
|
3180
|
+
# explicitly specify these encryption settings values in Zonal
|
3181
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
3182
|
+
# values from the `CreateSession` request to protect new objects in
|
3183
|
+
# the directory bucket.
|
3184
|
+
#
|
3185
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
3186
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
3187
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
3188
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
3189
|
+
# for the `CreateSession` request. It's not supported to override the
|
3190
|
+
# encryption settings values in the `CreateSession` request. So in the
|
3191
|
+
# Zonal endpoint API calls (except [CopyObject][3] and
|
3192
|
+
# [UploadPartCopy][4]), the encryption request headers must match the
|
3193
|
+
# default encryption configuration of the directory bucket.
|
3194
|
+
#
|
3195
|
+
# </note>
|
3196
|
+
#
|
3041
3197
|
#
|
3042
|
-
#
|
3198
|
+
#
|
3199
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
3200
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
3201
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
3202
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
3043
3203
|
#
|
3044
3204
|
# @option params [String] :storage_class
|
3045
3205
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
@@ -3098,34 +3258,71 @@ module Aws::S3
|
|
3098
3258
|
# </note>
|
3099
3259
|
#
|
3100
3260
|
# @option params [String] :ssekms_key_id
|
3101
|
-
# Specifies the ID (Key ID, Key ARN, or Key Alias)
|
3102
|
-
# encryption
|
3103
|
-
#
|
3104
|
-
#
|
3105
|
-
#
|
3106
|
-
#
|
3261
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
3262
|
+
# object encryption. If the KMS key doesn't exist in the same account
|
3263
|
+
# that's issuing the command, you must use the full Key ARN not the Key
|
3264
|
+
# ID.
|
3265
|
+
#
|
3266
|
+
# **General purpose buckets** - If you specify
|
3267
|
+
# `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
|
3268
|
+
# header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
|
3269
|
+
# to use. If you specify `x-amz-server-side-encryption:aws:kms` or
|
3270
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
|
3271
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
3272
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
3273
|
+
#
|
3274
|
+
# **Directory buckets** - If you specify `x-amz-server-side-encryption`
|
3275
|
+
# with `aws:kms`, you must specify the `
|
3276
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
|
3277
|
+
# ID or Key ARN) of the KMS symmetric encryption customer managed key to
|
3278
|
+
# use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
|
3279
|
+
# key ID or key ARN. The key alias format of the KMS key isn't
|
3280
|
+
# supported. Your SSE-KMS configuration can only support 1 [customer
|
3281
|
+
# managed key][1] per directory bucket for the lifetime of the bucket.
|
3282
|
+
# [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
|
3283
|
+
#
|
3284
|
+
#
|
3285
|
+
#
|
3286
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
3287
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
3107
3288
|
#
|
3108
3289
|
# @option params [String] :ssekms_encryption_context
|
3109
3290
|
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
3110
|
-
# object encryption. The value of this header is a
|
3111
|
-
#
|
3112
|
-
#
|
3113
|
-
# <note markdown="1"> This functionality is not supported for directory buckets.
|
3291
|
+
# object encryption. The value of this header is a Base64-encoded string
|
3292
|
+
# of a UTF-8 encoded JSON, which contains the encryption context as
|
3293
|
+
# key-value pairs.
|
3114
3294
|
#
|
3115
|
-
#
|
3295
|
+
# **Directory buckets** - You can optionally provide an explicit
|
3296
|
+
# encryption context value. The value must match the default encryption
|
3297
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
3298
|
+
# encryption context value is not supported.
|
3116
3299
|
#
|
3117
3300
|
# @option params [Boolean] :bucket_key_enabled
|
3118
3301
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
3119
3302
|
# encryption with server-side encryption using Key Management Service
|
3120
|
-
# (KMS) keys (SSE-KMS).
|
3121
|
-
# to use an S3 Bucket Key for object encryption with SSE-KMS.
|
3303
|
+
# (KMS) keys (SSE-KMS).
|
3122
3304
|
#
|
3123
|
-
#
|
3305
|
+
# **General purpose buckets** - Setting this header to `true` causes
|
3306
|
+
# Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
|
3307
|
+
# Also, specifying this header with a PUT action doesn't affect
|
3124
3308
|
# bucket-level settings for S3 Bucket Key.
|
3125
3309
|
#
|
3126
|
-
#
|
3310
|
+
# **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
|
3311
|
+
# and `PUT` operations in a directory bucket and can’t be disabled. S3
|
3312
|
+
# Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
|
3313
|
+
# from general purpose buckets to directory buckets, from directory
|
3314
|
+
# buckets to general purpose buckets, or between directory buckets,
|
3315
|
+
# through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
|
3316
|
+
# Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
|
3317
|
+
# makes a call to KMS every time a copy request is made for a
|
3318
|
+
# KMS-encrypted object.
|
3319
|
+
#
|
3127
3320
|
#
|
3128
|
-
#
|
3321
|
+
#
|
3322
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
3323
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
3324
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
3325
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
3129
3326
|
#
|
3130
3327
|
# @option params [String] :request_payer
|
3131
3328
|
# Confirms that the requester knows that they will be charged for the
|
@@ -3286,9 +3483,10 @@ module Aws::S3
|
|
3286
3483
|
|
3287
3484
|
# Creates a session that establishes temporary security credentials to
|
3288
3485
|
# support fast authentication and authorization for the Zonal endpoint
|
3289
|
-
#
|
3290
|
-
#
|
3291
|
-
# [S3 Express One Zone APIs][1] in the *Amazon S3
|
3486
|
+
# API operations on directory buckets. For more information about Zonal
|
3487
|
+
# endpoint API operations that include the Availability Zone in the
|
3488
|
+
# request endpoint, see [S3 Express One Zone APIs][1] in the *Amazon S3
|
3489
|
+
# User Guide*.
|
3292
3490
|
#
|
3293
3491
|
# To make Zonal endpoint API requests on a directory bucket, use the
|
3294
3492
|
# `CreateSession` API operation. Specifically, you grant
|
@@ -3297,13 +3495,13 @@ module Aws::S3
|
|
3297
3495
|
# the `CreateSession` API request on the bucket, which returns temporary
|
3298
3496
|
# security credentials that include the access key ID, secret access
|
3299
3497
|
# key, session token, and expiration. These credentials have associated
|
3300
|
-
# permissions to access the Zonal endpoint
|
3301
|
-
# created, you don’t need to use other policies to grant
|
3302
|
-
# each Zonal endpoint API individually. Instead, in your
|
3303
|
-
# API requests, you sign your requests by applying the
|
3304
|
-
# security credentials of the session to the request headers
|
3305
|
-
# following the SigV4 protocol for authentication. You also apply
|
3306
|
-
# session token to the `x-amz-s3session-token` request header for
|
3498
|
+
# permissions to access the Zonal endpoint API operations. After the
|
3499
|
+
# session is created, you don’t need to use other policies to grant
|
3500
|
+
# permissions to each Zonal endpoint API individually. Instead, in your
|
3501
|
+
# Zonal endpoint API requests, you sign your requests by applying the
|
3502
|
+
# temporary security credentials of the session to the request headers
|
3503
|
+
# and following the SigV4 protocol for authentication. You also apply
|
3504
|
+
# the session token to the `x-amz-s3session-token` request header for
|
3307
3505
|
# authorization. Temporary security credentials are scoped to the bucket
|
3308
3506
|
# and expire after 5 minutes. After the expiration time, any calls that
|
3309
3507
|
# you make with those credentials will fail. You must use IAM
|
@@ -3326,16 +3524,16 @@ module Aws::S3
|
|
3326
3524
|
# [Regional and Zonal endpoints][3] in the *Amazon S3 User Guide*.
|
3327
3525
|
#
|
3328
3526
|
# * <b> <code>CopyObject</code> API operation</b> - Unlike other Zonal
|
3329
|
-
# endpoint
|
3330
|
-
# temporary security credentials returned from the `CreateSession`
|
3331
|
-
# operation for authentication and authorization. For information
|
3527
|
+
# endpoint API operations, the `CopyObject` API operation doesn't use
|
3528
|
+
# the temporary security credentials returned from the `CreateSession`
|
3529
|
+
# API operation for authentication and authorization. For information
|
3332
3530
|
# about authentication and authorization of the `CopyObject` API
|
3333
3531
|
# operation on directory buckets, see [CopyObject][4].
|
3334
3532
|
#
|
3335
3533
|
# * <b> <code>HeadBucket</code> API operation</b> - Unlike other Zonal
|
3336
|
-
# endpoint
|
3337
|
-
# temporary security credentials returned from the `CreateSession`
|
3338
|
-
# operation for authentication and authorization. For information
|
3534
|
+
# endpoint API operations, the `HeadBucket` API operation doesn't use
|
3535
|
+
# the temporary security credentials returned from the `CreateSession`
|
3536
|
+
# API operation for authentication and authorization. For information
|
3339
3537
|
# about authentication and authorization of the `HeadBucket` API
|
3340
3538
|
# operation on directory buckets, see [HeadBucket][5].
|
3341
3539
|
#
|
@@ -3354,9 +3552,71 @@ module Aws::S3
|
|
3354
3552
|
# Identity and Access Management (IAM) identity-based policies for S3
|
3355
3553
|
# Express One Zone][8] in the *Amazon S3 User Guide*.
|
3356
3554
|
#
|
3357
|
-
# To grant cross-account access to Zonal endpoint
|
3358
|
-
# policy should also grant both accounts the
|
3359
|
-
# permission.
|
3555
|
+
# To grant cross-account access to Zonal endpoint API operations, the
|
3556
|
+
# bucket policy should also grant both accounts the
|
3557
|
+
# `s3express:CreateSession` permission.
|
3558
|
+
#
|
3559
|
+
# If you want to encrypt objects with SSE-KMS, you must also have the
|
3560
|
+
# `kms:GenerateDataKey` and the `kms:Decrypt` permissions in IAM
|
3561
|
+
# identity-based policies and KMS key policies for the target KMS key.
|
3562
|
+
#
|
3563
|
+
# Encryption
|
3564
|
+
#
|
3565
|
+
# : For directory buckets, there are only two supported options for
|
3566
|
+
# server-side encryption: server-side encryption with Amazon S3
|
3567
|
+
# managed keys (SSE-S3) (`AES256`) and server-side encryption with KMS
|
3568
|
+
# keys (SSE-KMS) (`aws:kms`). We recommend that the bucket's default
|
3569
|
+
# encryption uses the desired encryption configuration and you don't
|
3570
|
+
# override the bucket default encryption in your `CreateSession`
|
3571
|
+
# requests or `PUT` object requests. Then, new objects are
|
3572
|
+
# automatically encrypted with the desired encryption settings. For
|
3573
|
+
# more information, see [Protecting data with server-side
|
3574
|
+
# encryption][9] in the *Amazon S3 User Guide*. For more information
|
3575
|
+
# about the encryption overriding behaviors in directory buckets, see
|
3576
|
+
# [Specifying server-side encryption with KMS for new object
|
3577
|
+
# uploads][10].
|
3578
|
+
#
|
3579
|
+
# For [Zonal endpoint (object-level) API operations][11] except
|
3580
|
+
# [CopyObject][4] and [UploadPartCopy][12], you authenticate and
|
3581
|
+
# authorize requests through [CreateSession][13] for low latency. To
|
3582
|
+
# encrypt new objects in a directory bucket with SSE-KMS, you must
|
3583
|
+
# specify SSE-KMS as the directory bucket's default encryption
|
3584
|
+
# configuration with a KMS key (specifically, a [customer managed
|
3585
|
+
# key][14]). Then, when a session is created for Zonal endpoint API
|
3586
|
+
# operations, new objects are automatically encrypted and decrypted
|
3587
|
+
# with SSE-KMS and S3 Bucket Keys during the session.
|
3588
|
+
#
|
3589
|
+
# <note markdown="1"> Only 1 [customer managed key][14] is supported per directory bucket
|
3590
|
+
# for the lifetime of the bucket. [Amazon Web Services managed
|
3591
|
+
# key][15] (`aws/s3`) isn't supported. After you specify SSE-KMS as
|
3592
|
+
# your bucket's default encryption configuration with a customer
|
3593
|
+
# managed key, you can't change the customer managed key for the
|
3594
|
+
# bucket's SSE-KMS configuration.
|
3595
|
+
#
|
3596
|
+
# </note>
|
3597
|
+
#
|
3598
|
+
# In the Zonal endpoint API calls (except [CopyObject][4] and
|
3599
|
+
# [UploadPartCopy][12]) using the REST API, you can't override the
|
3600
|
+
# values of the encryption settings (`x-amz-server-side-encryption`,
|
3601
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
3602
|
+
# `x-amz-server-side-encryption-context`, and
|
3603
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) from the
|
3604
|
+
# `CreateSession` request. You don't need to explicitly specify these
|
3605
|
+
# encryption settings values in Zonal endpoint API calls, and Amazon
|
3606
|
+
# S3 will use the encryption settings values from the `CreateSession`
|
3607
|
+
# request to protect new objects in the directory bucket.
|
3608
|
+
#
|
3609
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
3610
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
3611
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
3612
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
3613
|
+
# for the `CreateSession` request. It's not supported to override the
|
3614
|
+
# encryption settings values in the `CreateSession` request. Also, in
|
3615
|
+
# the Zonal endpoint API calls (except [CopyObject][4] and
|
3616
|
+
# [UploadPartCopy][12]), it's not supported to override the values of
|
3617
|
+
# the encryption settings from the `CreateSession` request.
|
3618
|
+
#
|
3619
|
+
# </note>
|
3360
3620
|
#
|
3361
3621
|
# HTTP Host header syntax
|
3362
3622
|
#
|
@@ -3373,21 +3633,110 @@ module Aws::S3
|
|
3373
3633
|
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html#API_CreateSession_RequestParameters
|
3374
3634
|
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
|
3375
3635
|
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
|
3636
|
+
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
3637
|
+
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
3638
|
+
# [11]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-differences.html#s3-express-differences-api-operations
|
3639
|
+
# [12]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
3640
|
+
# [13]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
3641
|
+
# [14]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
3642
|
+
# [15]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
3376
3643
|
#
|
3377
3644
|
# @option params [String] :session_mode
|
3378
3645
|
# Specifies the mode of the session that will be created, either
|
3379
3646
|
# `ReadWrite` or `ReadOnly`. By default, a `ReadWrite` session is
|
3380
3647
|
# created. A `ReadWrite` session is capable of executing all the Zonal
|
3381
|
-
# endpoint
|
3382
|
-
# constrained to execute the following Zonal endpoint
|
3383
|
-
# `HeadObject`, `ListObjectsV2`, `GetObjectAttributes`,
|
3384
|
-
# `ListMultipartUploads`.
|
3648
|
+
# endpoint API operations on a directory bucket. A `ReadOnly` session is
|
3649
|
+
# constrained to execute the following Zonal endpoint API operations:
|
3650
|
+
# `GetObject`, `HeadObject`, `ListObjectsV2`, `GetObjectAttributes`,
|
3651
|
+
# `ListParts`, and `ListMultipartUploads`.
|
3385
3652
|
#
|
3386
3653
|
# @option params [required, String] :bucket
|
3387
3654
|
# The name of the bucket that you create a session for.
|
3388
3655
|
#
|
3656
|
+
# @option params [String] :server_side_encryption
|
3657
|
+
# The server-side encryption algorithm to use when you store objects in
|
3658
|
+
# the directory bucket.
|
3659
|
+
#
|
3660
|
+
# For directory buckets, there are only two supported options for
|
3661
|
+
# server-side encryption: server-side encryption with Amazon S3 managed
|
3662
|
+
# keys (SSE-S3) (`AES256`) and server-side encryption with KMS keys
|
3663
|
+
# (SSE-KMS) (`aws:kms`). By default, Amazon S3 encrypts data with
|
3664
|
+
# SSE-S3. For more information, see [Protecting data with server-side
|
3665
|
+
# encryption][1] in the *Amazon S3 User Guide*.
|
3666
|
+
#
|
3667
|
+
#
|
3668
|
+
#
|
3669
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
3670
|
+
#
|
3671
|
+
# @option params [String] :ssekms_key_id
|
3672
|
+
# If you specify `x-amz-server-side-encryption` with `aws:kms`, you must
|
3673
|
+
# specify the ` x-amz-server-side-encryption-aws-kms-key-id` header with
|
3674
|
+
# the ID (Key ID or Key ARN) of the KMS symmetric encryption customer
|
3675
|
+
# managed key to use. Otherwise, you get an HTTP `400 Bad Request`
|
3676
|
+
# error. Only use the key ID or key ARN. The key alias format of the KMS
|
3677
|
+
# key isn't supported. Also, if the KMS key doesn't exist in the same
|
3678
|
+
# account that't issuing the command, you must use the full Key ARN not
|
3679
|
+
# the Key ID.
|
3680
|
+
#
|
3681
|
+
# Your SSE-KMS configuration can only support 1 [customer managed
|
3682
|
+
# key][1] per directory bucket for the lifetime of the bucket. [Amazon
|
3683
|
+
# Web Services managed key][2] (`aws/s3`) isn't supported.
|
3684
|
+
#
|
3685
|
+
#
|
3686
|
+
#
|
3687
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
3688
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
3689
|
+
#
|
3690
|
+
# @option params [String] :ssekms_encryption_context
|
3691
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
3692
|
+
# additional encryption context to use for object encryption. The value
|
3693
|
+
# of this header is a Base64-encoded string of a UTF-8 encoded JSON,
|
3694
|
+
# which contains the encryption context as key-value pairs. This value
|
3695
|
+
# is stored as object metadata and automatically gets passed on to
|
3696
|
+
# Amazon Web Services KMS for future `GetObject` operations on this
|
3697
|
+
# object.
|
3698
|
+
#
|
3699
|
+
# **General purpose buckets** - This value must be explicitly added
|
3700
|
+
# during `CopyObject` operations if you want an additional encryption
|
3701
|
+
# context for your object. For more information, see [Encryption
|
3702
|
+
# context][1] in the *Amazon S3 User Guide*.
|
3703
|
+
#
|
3704
|
+
# **Directory buckets** - You can optionally provide an explicit
|
3705
|
+
# encryption context value. The value must match the default encryption
|
3706
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
3707
|
+
# encryption context value is not supported.
|
3708
|
+
#
|
3709
|
+
#
|
3710
|
+
#
|
3711
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
3712
|
+
#
|
3713
|
+
# @option params [Boolean] :bucket_key_enabled
|
3714
|
+
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
3715
|
+
# encryption with server-side encryption using KMS keys (SSE-KMS).
|
3716
|
+
#
|
3717
|
+
# S3 Bucket Keys are always enabled for `GET` and `PUT` operations in a
|
3718
|
+
# directory bucket and can’t be disabled. S3 Bucket Keys aren't
|
3719
|
+
# supported, when you copy SSE-KMS encrypted objects from general
|
3720
|
+
# purpose buckets to directory buckets, from directory buckets to
|
3721
|
+
# general purpose buckets, or between directory buckets, through
|
3722
|
+
# [CopyObject][1], [UploadPartCopy][2], [the Copy operation in Batch
|
3723
|
+
# Operations][3], or [the import jobs][4]. In this case, Amazon S3 makes
|
3724
|
+
# a call to KMS every time a copy request is made for a KMS-encrypted
|
3725
|
+
# object.
|
3726
|
+
#
|
3727
|
+
#
|
3728
|
+
#
|
3729
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
3730
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
3731
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
3732
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
3733
|
+
#
|
3389
3734
|
# @return [Types::CreateSessionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
3390
3735
|
#
|
3736
|
+
# * {Types::CreateSessionOutput#server_side_encryption #server_side_encryption} => String
|
3737
|
+
# * {Types::CreateSessionOutput#ssekms_key_id #ssekms_key_id} => String
|
3738
|
+
# * {Types::CreateSessionOutput#ssekms_encryption_context #ssekms_encryption_context} => String
|
3739
|
+
# * {Types::CreateSessionOutput#bucket_key_enabled #bucket_key_enabled} => Boolean
|
3391
3740
|
# * {Types::CreateSessionOutput#credentials #credentials} => Types::SessionCredentials
|
3392
3741
|
#
|
3393
3742
|
# @example Request syntax with placeholder values
|
@@ -3395,10 +3744,18 @@ module Aws::S3
|
|
3395
3744
|
# resp = client.create_session({
|
3396
3745
|
# session_mode: "ReadOnly", # accepts ReadOnly, ReadWrite
|
3397
3746
|
# bucket: "BucketName", # required
|
3747
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:kms, aws:kms:dsse
|
3748
|
+
# ssekms_key_id: "SSEKMSKeyId",
|
3749
|
+
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
3750
|
+
# bucket_key_enabled: false,
|
3398
3751
|
# })
|
3399
3752
|
#
|
3400
3753
|
# @example Response structure
|
3401
3754
|
#
|
3755
|
+
# resp.server_side_encryption #=> String, one of "AES256", "aws:kms", "aws:kms:dsse"
|
3756
|
+
# resp.ssekms_key_id #=> String
|
3757
|
+
# resp.ssekms_encryption_context #=> String
|
3758
|
+
# resp.bucket_key_enabled #=> Boolean
|
3402
3759
|
# resp.credentials.access_key_id #=> String
|
3403
3760
|
# resp.credentials.secret_access_key #=> String
|
3404
3761
|
# resp.credentials.session_token #=> String
|
@@ -3644,47 +4001,92 @@ module Aws::S3
|
|
3644
4001
|
req.send_request(options)
|
3645
4002
|
end
|
3646
4003
|
|
3647
|
-
#
|
4004
|
+
# This implementation of the DELETE action resets the default encryption
|
4005
|
+
# for the bucket as server-side encryption with Amazon S3 managed keys
|
4006
|
+
# (SSE-S3).
|
4007
|
+
#
|
4008
|
+
# <note markdown="1"> * **General purpose buckets** - For information about the bucket
|
4009
|
+
# default encryption feature, see [Amazon S3 Bucket Default
|
4010
|
+
# Encryption][1] in the *Amazon S3 User Guide*.
|
4011
|
+
#
|
4012
|
+
# * **Directory buckets** - For directory buckets, there are only two
|
4013
|
+
# supported options for server-side encryption: SSE-S3 and SSE-KMS.
|
4014
|
+
# For information about the default encryption configuration in
|
4015
|
+
# directory buckets, see [Setting default server-side encryption
|
4016
|
+
# behavior for directory buckets][2].
|
3648
4017
|
#
|
3649
4018
|
# </note>
|
3650
4019
|
#
|
3651
|
-
#
|
3652
|
-
#
|
3653
|
-
#
|
3654
|
-
#
|
3655
|
-
#
|
4020
|
+
# Permissions
|
4021
|
+
# : * **General purpose bucket permissions** - The
|
4022
|
+
# `s3:PutEncryptionConfiguration` permission is required in a
|
4023
|
+
# policy. The bucket owner has this permission by default. The
|
4024
|
+
# bucket owner can grant this permission to others. For more
|
4025
|
+
# information about permissions, see [Permissions Related to Bucket
|
4026
|
+
# Operations][3] and [Managing Access Permissions to Your Amazon S3
|
4027
|
+
# Resources][4].
|
3656
4028
|
#
|
3657
|
-
#
|
3658
|
-
#
|
3659
|
-
# permission
|
3660
|
-
#
|
3661
|
-
#
|
3662
|
-
#
|
3663
|
-
#
|
4029
|
+
# * **Directory bucket permissions** - To grant access to this API
|
4030
|
+
# operation, you must have the
|
4031
|
+
# `s3express:PutEncryptionConfiguration` permission in an IAM
|
4032
|
+
# identity-based policy instead of a bucket policy. Cross-account
|
4033
|
+
# access to this API operation isn't supported. This operation can
|
4034
|
+
# only be performed by the Amazon Web Services account that owns the
|
4035
|
+
# resource. For more information about directory bucket policies and
|
4036
|
+
# permissions, see [Amazon Web Services Identity and Access
|
4037
|
+
# Management (IAM) for S3 Express One Zone][5] in the *Amazon S3
|
4038
|
+
# User Guide*.
|
4039
|
+
#
|
4040
|
+
# HTTP Host header syntax
|
4041
|
+
#
|
4042
|
+
# : <b>Directory buckets </b> - The HTTP Host header syntax is
|
4043
|
+
# `s3express-control.region.amazonaws.com`.
|
3664
4044
|
#
|
3665
4045
|
# The following operations are related to `DeleteBucketEncryption`:
|
3666
4046
|
#
|
3667
|
-
# * [PutBucketEncryption][
|
4047
|
+
# * [PutBucketEncryption][6]
|
3668
4048
|
#
|
3669
|
-
# * [GetBucketEncryption][
|
4049
|
+
# * [GetBucketEncryption][7]
|
3670
4050
|
#
|
3671
4051
|
#
|
3672
4052
|
#
|
3673
4053
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
|
3674
|
-
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/
|
3675
|
-
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-
|
3676
|
-
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/
|
3677
|
-
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/
|
4054
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-bucket-encryption.html
|
4055
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
|
4056
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
4057
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
|
4058
|
+
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html
|
4059
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html
|
3678
4060
|
#
|
3679
4061
|
# @option params [required, String] :bucket
|
3680
4062
|
# The name of the bucket containing the server-side encryption
|
3681
4063
|
# configuration to delete.
|
3682
4064
|
#
|
4065
|
+
# <b>Directory buckets </b> - When you use this operation with a
|
4066
|
+
# directory bucket, you must use path-style requests in the format
|
4067
|
+
# `https://s3express-control.region_code.amazonaws.com/bucket-name `.
|
4068
|
+
# Virtual-hosted-style requests aren't supported. Directory bucket
|
4069
|
+
# names must be unique in the chosen Availability Zone. Bucket names
|
4070
|
+
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
4071
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
4072
|
+
# bucket naming restrictions, see [Directory bucket naming rules][1] in
|
4073
|
+
# the *Amazon S3 User Guide*
|
4074
|
+
#
|
4075
|
+
#
|
4076
|
+
#
|
4077
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
4078
|
+
#
|
3683
4079
|
# @option params [String] :expected_bucket_owner
|
3684
4080
|
# The account ID of the expected bucket owner. If the account ID that
|
3685
4081
|
# you provide does not match the actual owner of the bucket, the request
|
3686
4082
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
3687
4083
|
#
|
4084
|
+
# <note markdown="1"> For directory buckets, this header is not supported in this API
|
4085
|
+
# operation. If you specify this header, the request fails with the HTTP
|
4086
|
+
# status code `501 Not Implemented`.
|
4087
|
+
#
|
4088
|
+
# </note>
|
4089
|
+
#
|
3688
4090
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
3689
4091
|
#
|
3690
4092
|
# @example Request syntax with placeholder values
|
@@ -4678,35 +5080,35 @@ module Aws::S3
|
|
4678
5080
|
# * {Types::DeleteObjectTaggingOutput#version_id #version_id} => String
|
4679
5081
|
#
|
4680
5082
|
#
|
4681
|
-
# @example Example: To remove tag set from an object
|
5083
|
+
# @example Example: To remove tag set from an object
|
4682
5084
|
#
|
4683
|
-
# # The following example removes tag set associated with the specified object
|
4684
|
-
# #
|
5085
|
+
# # The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the
|
5086
|
+
# # operation removes tag set from the latest object version.
|
4685
5087
|
#
|
4686
5088
|
# resp = client.delete_object_tagging({
|
4687
5089
|
# bucket: "examplebucket",
|
4688
5090
|
# key: "HappyFace.jpg",
|
4689
|
-
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
4690
5091
|
# })
|
4691
5092
|
#
|
4692
5093
|
# resp.to_h outputs the following:
|
4693
5094
|
# {
|
4694
|
-
# version_id: "
|
5095
|
+
# version_id: "null",
|
4695
5096
|
# }
|
4696
5097
|
#
|
4697
|
-
# @example Example: To remove tag set from an object
|
5098
|
+
# @example Example: To remove tag set from an object version
|
4698
5099
|
#
|
4699
|
-
# # The following example removes tag set associated with the specified object.
|
4700
|
-
# #
|
5100
|
+
# # The following example removes tag set associated with the specified object version. The request specifies both the
|
5101
|
+
# # object key and object version.
|
4701
5102
|
#
|
4702
5103
|
# resp = client.delete_object_tagging({
|
4703
5104
|
# bucket: "examplebucket",
|
4704
5105
|
# key: "HappyFace.jpg",
|
5106
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
4705
5107
|
# })
|
4706
5108
|
#
|
4707
5109
|
# resp.to_h outputs the following:
|
4708
5110
|
# {
|
4709
|
-
# version_id: "
|
5111
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
4710
5112
|
# }
|
4711
5113
|
#
|
4712
5114
|
# @example Request syntax with placeholder values
|
@@ -4989,20 +5391,22 @@ module Aws::S3
|
|
4989
5391
|
# * {Types::DeleteObjectsOutput#errors #errors} => Array<Types::Error>
|
4990
5392
|
#
|
4991
5393
|
#
|
4992
|
-
# @example Example: To delete multiple
|
5394
|
+
# @example Example: To delete multiple object versions from a versioned bucket
|
4993
5395
|
#
|
4994
|
-
# # The following example deletes objects from a bucket. The
|
4995
|
-
# #
|
5396
|
+
# # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
|
5397
|
+
# # versions and returns the key and versions of deleted objects in the response.
|
4996
5398
|
#
|
4997
5399
|
# resp = client.delete_objects({
|
4998
5400
|
# bucket: "examplebucket",
|
4999
5401
|
# delete: {
|
5000
5402
|
# objects: [
|
5001
5403
|
# {
|
5002
|
-
# key: "
|
5404
|
+
# key: "HappyFace.jpg",
|
5405
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
5003
5406
|
# },
|
5004
5407
|
# {
|
5005
|
-
# key: "
|
5408
|
+
# key: "HappyFace.jpg",
|
5409
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
5006
5410
|
# },
|
5007
5411
|
# ],
|
5008
5412
|
# quiet: false,
|
@@ -5013,34 +5417,30 @@ module Aws::S3
|
|
5013
5417
|
# {
|
5014
5418
|
# deleted: [
|
5015
5419
|
# {
|
5016
|
-
#
|
5017
|
-
#
|
5018
|
-
# key: "objectkey1",
|
5420
|
+
# key: "HappyFace.jpg",
|
5421
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
5019
5422
|
# },
|
5020
5423
|
# {
|
5021
|
-
#
|
5022
|
-
#
|
5023
|
-
# key: "objectkey2",
|
5424
|
+
# key: "HappyFace.jpg",
|
5425
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
5024
5426
|
# },
|
5025
5427
|
# ],
|
5026
5428
|
# }
|
5027
5429
|
#
|
5028
|
-
# @example Example: To delete multiple
|
5430
|
+
# @example Example: To delete multiple objects from a versioned bucket
|
5029
5431
|
#
|
5030
|
-
# # The following example deletes objects from a bucket. The
|
5031
|
-
# #
|
5432
|
+
# # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
|
5433
|
+
# # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
|
5032
5434
|
#
|
5033
5435
|
# resp = client.delete_objects({
|
5034
5436
|
# bucket: "examplebucket",
|
5035
5437
|
# delete: {
|
5036
5438
|
# objects: [
|
5037
5439
|
# {
|
5038
|
-
# key: "
|
5039
|
-
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
5440
|
+
# key: "objectkey1",
|
5040
5441
|
# },
|
5041
5442
|
# {
|
5042
|
-
# key: "
|
5043
|
-
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
5443
|
+
# key: "objectkey2",
|
5044
5444
|
# },
|
5045
5445
|
# ],
|
5046
5446
|
# quiet: false,
|
@@ -5051,12 +5451,14 @@ module Aws::S3
|
|
5051
5451
|
# {
|
5052
5452
|
# deleted: [
|
5053
5453
|
# {
|
5054
|
-
#
|
5055
|
-
#
|
5454
|
+
# delete_marker: true,
|
5455
|
+
# delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
|
5456
|
+
# key: "objectkey1",
|
5056
5457
|
# },
|
5057
5458
|
# {
|
5058
|
-
#
|
5059
|
-
#
|
5459
|
+
# delete_marker: true,
|
5460
|
+
# delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
|
5461
|
+
# key: "objectkey2",
|
5060
5462
|
# },
|
5061
5463
|
# ],
|
5062
5464
|
# }
|
@@ -5559,46 +5961,92 @@ module Aws::S3
|
|
5559
5961
|
req.send_request(options)
|
5560
5962
|
end
|
5561
5963
|
|
5562
|
-
#
|
5964
|
+
# Returns the default encryption configuration for an Amazon S3 bucket.
|
5965
|
+
# By default, all buckets have a default encryption configuration that
|
5966
|
+
# uses server-side encryption with Amazon S3 managed keys (SSE-S3).
|
5967
|
+
#
|
5968
|
+
# <note markdown="1"> * **General purpose buckets** - For information about the bucket
|
5969
|
+
# default encryption feature, see [Amazon S3 Bucket Default
|
5970
|
+
# Encryption][1] in the *Amazon S3 User Guide*.
|
5971
|
+
#
|
5972
|
+
# * **Directory buckets** - For directory buckets, there are only two
|
5973
|
+
# supported options for server-side encryption: SSE-S3 and SSE-KMS.
|
5974
|
+
# For information about the default encryption configuration in
|
5975
|
+
# directory buckets, see [Setting default server-side encryption
|
5976
|
+
# behavior for directory buckets][2].
|
5563
5977
|
#
|
5564
5978
|
# </note>
|
5565
5979
|
#
|
5566
|
-
#
|
5567
|
-
#
|
5568
|
-
#
|
5569
|
-
#
|
5570
|
-
#
|
5980
|
+
# Permissions
|
5981
|
+
# : * **General purpose bucket permissions** - The
|
5982
|
+
# `s3:GetEncryptionConfiguration` permission is required in a
|
5983
|
+
# policy. The bucket owner has this permission by default. The
|
5984
|
+
# bucket owner can grant this permission to others. For more
|
5985
|
+
# information about permissions, see [Permissions Related to Bucket
|
5986
|
+
# Operations][3] and [Managing Access Permissions to Your Amazon S3
|
5987
|
+
# Resources][4].
|
5571
5988
|
#
|
5572
|
-
#
|
5573
|
-
#
|
5574
|
-
# permission
|
5575
|
-
#
|
5576
|
-
#
|
5577
|
-
#
|
5989
|
+
# * **Directory bucket permissions** - To grant access to this API
|
5990
|
+
# operation, you must have the
|
5991
|
+
# `s3express:GetEncryptionConfiguration` permission in an IAM
|
5992
|
+
# identity-based policy instead of a bucket policy. Cross-account
|
5993
|
+
# access to this API operation isn't supported. This operation can
|
5994
|
+
# only be performed by the Amazon Web Services account that owns the
|
5995
|
+
# resource. For more information about directory bucket policies and
|
5996
|
+
# permissions, see [Amazon Web Services Identity and Access
|
5997
|
+
# Management (IAM) for S3 Express One Zone][5] in the *Amazon S3
|
5998
|
+
# User Guide*.
|
5999
|
+
#
|
6000
|
+
# HTTP Host header syntax
|
6001
|
+
#
|
6002
|
+
# : <b>Directory buckets </b> - The HTTP Host header syntax is
|
6003
|
+
# `s3express-control.region.amazonaws.com`.
|
5578
6004
|
#
|
5579
6005
|
# The following operations are related to `GetBucketEncryption`:
|
5580
6006
|
#
|
5581
|
-
# * [PutBucketEncryption][
|
6007
|
+
# * [PutBucketEncryption][6]
|
5582
6008
|
#
|
5583
|
-
# * [DeleteBucketEncryption][
|
6009
|
+
# * [DeleteBucketEncryption][7]
|
5584
6010
|
#
|
5585
6011
|
#
|
5586
6012
|
#
|
5587
6013
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
|
5588
|
-
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/
|
5589
|
-
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-
|
5590
|
-
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/
|
5591
|
-
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/
|
6014
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-bucket-encryption.html
|
6015
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
|
6016
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
6017
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
|
6018
|
+
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html
|
6019
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html
|
6020
|
+
#
|
6021
|
+
# @option params [required, String] :bucket
|
6022
|
+
# The name of the bucket from which the server-side encryption
|
6023
|
+
# configuration is retrieved.
|
6024
|
+
#
|
6025
|
+
# <b>Directory buckets </b> - When you use this operation with a
|
6026
|
+
# directory bucket, you must use path-style requests in the format
|
6027
|
+
# `https://s3express-control.region_code.amazonaws.com/bucket-name `.
|
6028
|
+
# Virtual-hosted-style requests aren't supported. Directory bucket
|
6029
|
+
# names must be unique in the chosen Availability Zone. Bucket names
|
6030
|
+
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
6031
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
6032
|
+
# bucket naming restrictions, see [Directory bucket naming rules][1] in
|
6033
|
+
# the *Amazon S3 User Guide*
|
6034
|
+
#
|
5592
6035
|
#
|
5593
|
-
#
|
5594
|
-
#
|
5595
|
-
# configuration is retrieved.
|
6036
|
+
#
|
6037
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
5596
6038
|
#
|
5597
6039
|
# @option params [String] :expected_bucket_owner
|
5598
6040
|
# The account ID of the expected bucket owner. If the account ID that
|
5599
6041
|
# you provide does not match the actual owner of the bucket, the request
|
5600
6042
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
5601
6043
|
#
|
6044
|
+
# <note markdown="1"> For directory buckets, this header is not supported in this API
|
6045
|
+
# operation. If you specify this header, the request fails with the HTTP
|
6046
|
+
# status code `501 Not Implemented`.
|
6047
|
+
#
|
6048
|
+
# </note>
|
6049
|
+
#
|
5602
6050
|
# @return [Types::GetBucketEncryptionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
5603
6051
|
#
|
5604
6052
|
# * {Types::GetBucketEncryptionOutput#server_side_encryption_configuration #server_side_encryption_configuration} => Types::ServerSideEncryptionConfiguration
|
@@ -7338,6 +7786,10 @@ module Aws::S3
|
|
7338
7786
|
# interruptions when a session expires. For more information about
|
7339
7787
|
# authorization, see [ `CreateSession` ][4].
|
7340
7788
|
#
|
7789
|
+
# If the object is encrypted using SSE-KMS, you must also have the
|
7790
|
+
# `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
|
7791
|
+
# identity-based policies and KMS key policies for the KMS key.
|
7792
|
+
#
|
7341
7793
|
# Storage classes
|
7342
7794
|
#
|
7343
7795
|
# : If the object you are retrieving is stored in the S3 Glacier
|
@@ -7366,6 +7818,11 @@ module Aws::S3
|
|
7366
7818
|
# `GetObject` requests for the object that uses these types of keys,
|
7367
7819
|
# you’ll get an HTTP `400 Bad Request` error.
|
7368
7820
|
#
|
7821
|
+
# **Directory buckets** - For directory buckets, there are only two
|
7822
|
+
# supported options for server-side encryption: SSE-S3 and SSE-KMS.
|
7823
|
+
# SSE-C isn't supported. For more information, see [Protecting data
|
7824
|
+
# with server-side encryption][7] in the *Amazon S3 User Guide*.
|
7825
|
+
#
|
7369
7826
|
# Overriding response header values through the request
|
7370
7827
|
#
|
7371
7828
|
# : There are times when you want to override certain response header
|
@@ -7413,9 +7870,9 @@ module Aws::S3
|
|
7413
7870
|
#
|
7414
7871
|
# The following operations are related to `GetObject`:
|
7415
7872
|
#
|
7416
|
-
# * [ListBuckets][
|
7873
|
+
# * [ListBuckets][8]
|
7417
7874
|
#
|
7418
|
-
# * [GetObjectAcl][
|
7875
|
+
# * [GetObjectAcl][9]
|
7419
7876
|
#
|
7420
7877
|
#
|
7421
7878
|
#
|
@@ -7425,8 +7882,9 @@ module Aws::S3
|
|
7425
7882
|
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
7426
7883
|
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
|
7427
7884
|
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html
|
7428
|
-
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/
|
7429
|
-
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
7885
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
7886
|
+
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html
|
7887
|
+
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
|
7430
7888
|
#
|
7431
7889
|
# @option params [String, IO] :response_target
|
7432
7890
|
# Where to write response data, file path, or IO object.
|
@@ -7723,10 +8181,10 @@ module Aws::S3
|
|
7723
8181
|
# @option params [String] :checksum_mode
|
7724
8182
|
# To retrieve the checksum, this mode must be enabled.
|
7725
8183
|
#
|
7726
|
-
# In addition, if you enable checksum mode
|
7727
|
-
# with a [checksum][1] and encrypted with an
|
7728
|
-
# (KMS) key, you must have permission to use the
|
7729
|
-
# retrieve the checksum.
|
8184
|
+
# **General purpose buckets** - In addition, if you enable checksum mode
|
8185
|
+
# and the object is uploaded with a [checksum][1] and encrypted with an
|
8186
|
+
# Key Management Service (KMS) key, you must have permission to use the
|
8187
|
+
# `kms:Decrypt` action to retrieve the checksum.
|
7730
8188
|
#
|
7731
8189
|
#
|
7732
8190
|
#
|
@@ -8128,7 +8586,7 @@ module Aws::S3
|
|
8128
8586
|
# Permissions
|
8129
8587
|
# : * **General purpose bucket permissions** - To use
|
8130
8588
|
# `GetObjectAttributes`, you must have READ access to the object.
|
8131
|
-
# The permissions that you need to use this operation
|
8589
|
+
# The permissions that you need to use this operation depend on
|
8132
8590
|
# whether the bucket is versioned. If the bucket is versioned, you
|
8133
8591
|
# need both the `s3:GetObjectVersion` and
|
8134
8592
|
# `s3:GetObjectVersionAttributes` permissions for this operation. If
|
@@ -8162,6 +8620,10 @@ module Aws::S3
|
|
8162
8620
|
# interruptions when a session expires. For more information about
|
8163
8621
|
# authorization, see [ `CreateSession` ][3].
|
8164
8622
|
#
|
8623
|
+
# If the object is encrypted with SSE-KMS, you must also have the
|
8624
|
+
# `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
|
8625
|
+
# identity-based policies and KMS key policies for the KMS key.
|
8626
|
+
#
|
8165
8627
|
# Encryption
|
8166
8628
|
# : <note markdown="1"> Encryption request headers, like `x-amz-server-side-encryption`,
|
8167
8629
|
# should not be sent for `HEAD` requests if your object uses
|
@@ -8195,9 +8657,19 @@ module Aws::S3
|
|
8195
8657
|
# Customer-Provided Encryption Keys)][4] in the *Amazon S3 User
|
8196
8658
|
# Guide*.
|
8197
8659
|
#
|
8198
|
-
# <note markdown="1"> **Directory bucket permissions** - For directory buckets,
|
8199
|
-
#
|
8200
|
-
# (`AES256`)
|
8660
|
+
# <note markdown="1"> **Directory bucket permissions** - For directory buckets, there are
|
8661
|
+
# only two supported options for server-side encryption: server-side
|
8662
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
8663
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
8664
|
+
# recommend that the bucket's default encryption uses the desired
|
8665
|
+
# encryption configuration and you don't override the bucket default
|
8666
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
8667
|
+
# requests. Then, new objects are automatically encrypted with the
|
8668
|
+
# desired encryption settings. For more information, see [Protecting
|
8669
|
+
# data with server-side encryption][5] in the *Amazon S3 User Guide*.
|
8670
|
+
# For more information about the encryption overriding behaviors in
|
8671
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
8672
|
+
# for new object uploads][6].
|
8201
8673
|
#
|
8202
8674
|
# </note>
|
8203
8675
|
#
|
@@ -8221,7 +8693,7 @@ module Aws::S3
|
|
8221
8693
|
# * `If-Unmodified-Since` condition evaluates to `false`.
|
8222
8694
|
#
|
8223
8695
|
# For more information about conditional requests, see [RFC
|
8224
|
-
# 7232][
|
8696
|
+
# 7232][7].
|
8225
8697
|
#
|
8226
8698
|
# * If both of the `If-None-Match` and `If-Modified-Since` headers are
|
8227
8699
|
# present in the request as follows, then Amazon S3 returns the HTTP
|
@@ -8232,7 +8704,7 @@ module Aws::S3
|
|
8232
8704
|
# * `If-Modified-Since` condition evaluates to `true`.
|
8233
8705
|
#
|
8234
8706
|
# For more information about conditional requests, see [RFC
|
8235
|
-
# 7232][
|
8707
|
+
# 7232][7].
|
8236
8708
|
#
|
8237
8709
|
# HTTP Host header syntax
|
8238
8710
|
#
|
@@ -8241,21 +8713,21 @@ module Aws::S3
|
|
8241
8713
|
#
|
8242
8714
|
# The following actions are related to `GetObjectAttributes`:
|
8243
8715
|
#
|
8244
|
-
# * [GetObject][
|
8716
|
+
# * [GetObject][8]
|
8245
8717
|
#
|
8246
|
-
# * [GetObjectAcl][
|
8718
|
+
# * [GetObjectAcl][9]
|
8247
8719
|
#
|
8248
|
-
# * [GetObjectLegalHold][
|
8720
|
+
# * [GetObjectLegalHold][10]
|
8249
8721
|
#
|
8250
|
-
# * [GetObjectLockConfiguration][
|
8722
|
+
# * [GetObjectLockConfiguration][11]
|
8251
8723
|
#
|
8252
|
-
# * [GetObjectRetention][
|
8724
|
+
# * [GetObjectRetention][12]
|
8253
8725
|
#
|
8254
|
-
# * [GetObjectTagging][
|
8726
|
+
# * [GetObjectTagging][13]
|
8255
8727
|
#
|
8256
|
-
# * [HeadObject][
|
8728
|
+
# * [HeadObject][14]
|
8257
8729
|
#
|
8258
|
-
# * [ListParts][
|
8730
|
+
# * [ListParts][15]
|
8259
8731
|
#
|
8260
8732
|
#
|
8261
8733
|
#
|
@@ -8263,15 +8735,17 @@ module Aws::S3
|
|
8263
8735
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html
|
8264
8736
|
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
8265
8737
|
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
8266
|
-
# [5]: https://
|
8267
|
-
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/
|
8268
|
-
# [7]: https://
|
8269
|
-
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
8270
|
-
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
8271
|
-
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
8272
|
-
# [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
8273
|
-
# [12]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
8274
|
-
# [13]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
8738
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
8739
|
+
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
8740
|
+
# [7]: https://tools.ietf.org/html/rfc7232
|
8741
|
+
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
|
8742
|
+
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
|
8743
|
+
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html
|
8744
|
+
# [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html
|
8745
|
+
# [12]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html
|
8746
|
+
# [13]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
|
8747
|
+
# [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html
|
8748
|
+
# [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
|
8275
8749
|
#
|
8276
8750
|
# @option params [required, String] :bucket
|
8277
8751
|
# The name of the bucket that contains the object.
|
@@ -8815,49 +9289,49 @@ module Aws::S3
|
|
8815
9289
|
# * {Types::GetObjectTaggingOutput#tag_set #tag_set} => Array<Types::Tag>
|
8816
9290
|
#
|
8817
9291
|
#
|
8818
|
-
# @example Example: To retrieve tag set of
|
9292
|
+
# @example Example: To retrieve tag set of a specific object version
|
8819
9293
|
#
|
8820
|
-
# # The following example retrieves tag set of an object.
|
9294
|
+
# # The following example retrieves tag set of an object. The request specifies object version.
|
8821
9295
|
#
|
8822
9296
|
# resp = client.get_object_tagging({
|
8823
9297
|
# bucket: "examplebucket",
|
8824
|
-
# key: "
|
9298
|
+
# key: "exampleobject",
|
9299
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
8825
9300
|
# })
|
8826
9301
|
#
|
8827
9302
|
# resp.to_h outputs the following:
|
8828
9303
|
# {
|
8829
9304
|
# tag_set: [
|
8830
9305
|
# {
|
8831
|
-
# key: "
|
8832
|
-
# value: "
|
8833
|
-
# },
|
8834
|
-
# {
|
8835
|
-
# key: "Key3",
|
8836
|
-
# value: "Value3",
|
9306
|
+
# key: "Key1",
|
9307
|
+
# value: "Value1",
|
8837
9308
|
# },
|
8838
9309
|
# ],
|
8839
|
-
# version_id: "
|
9310
|
+
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
8840
9311
|
# }
|
8841
9312
|
#
|
8842
|
-
# @example Example: To retrieve tag set of
|
9313
|
+
# @example Example: To retrieve tag set of an object
|
8843
9314
|
#
|
8844
|
-
# # The following example retrieves tag set of an object.
|
9315
|
+
# # The following example retrieves tag set of an object.
|
8845
9316
|
#
|
8846
9317
|
# resp = client.get_object_tagging({
|
8847
9318
|
# bucket: "examplebucket",
|
8848
|
-
# key: "
|
8849
|
-
# version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
|
9319
|
+
# key: "HappyFace.jpg",
|
8850
9320
|
# })
|
8851
9321
|
#
|
8852
9322
|
# resp.to_h outputs the following:
|
8853
9323
|
# {
|
8854
9324
|
# tag_set: [
|
8855
9325
|
# {
|
8856
|
-
# key: "
|
8857
|
-
# value: "
|
9326
|
+
# key: "Key4",
|
9327
|
+
# value: "Value4",
|
9328
|
+
# },
|
9329
|
+
# {
|
9330
|
+
# key: "Key3",
|
9331
|
+
# value: "Value3",
|
8858
9332
|
# },
|
8859
9333
|
# ],
|
8860
|
-
# version_id: "
|
9334
|
+
# version_id: "null",
|
8861
9335
|
# }
|
8862
9336
|
#
|
8863
9337
|
# @example Request syntax with placeholder values
|
@@ -9290,6 +9764,13 @@ module Aws::S3
|
|
9290
9764
|
# interruptions when a session expires. For more information about
|
9291
9765
|
# authorization, see [ `CreateSession` ][3].
|
9292
9766
|
#
|
9767
|
+
# If you enable `x-amz-checksum-mode` in the request and the object
|
9768
|
+
# is encrypted with Amazon Web Services Key Management Service
|
9769
|
+
# (Amazon Web Services KMS), you must also have the
|
9770
|
+
# `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
|
9771
|
+
# identity-based policies and KMS key policies for the KMS key to
|
9772
|
+
# retrieve the checksum of the object.
|
9773
|
+
#
|
9293
9774
|
# Encryption
|
9294
9775
|
# : <note markdown="1"> Encryption request headers, like `x-amz-server-side-encryption`,
|
9295
9776
|
# should not be sent for `HEAD` requests if your object uses
|
@@ -9323,9 +9804,10 @@ module Aws::S3
|
|
9323
9804
|
# Customer-Provided Encryption Keys)][4] in the *Amazon S3 User
|
9324
9805
|
# Guide*.
|
9325
9806
|
#
|
9326
|
-
# <note markdown="1">
|
9327
|
-
# server-side encryption
|
9328
|
-
#
|
9807
|
+
# <note markdown="1"> <b>Directory bucket </b> - For directory buckets, there are only two
|
9808
|
+
# supported options for server-side encryption: SSE-S3 and SSE-KMS.
|
9809
|
+
# SSE-C isn't supported. For more information, see [Protecting data
|
9810
|
+
# with server-side encryption][5] in the *Amazon S3 User Guide*.
|
9329
9811
|
#
|
9330
9812
|
# </note>
|
9331
9813
|
#
|
@@ -9359,15 +9841,15 @@ module Aws::S3
|
|
9359
9841
|
# requests in the format
|
9360
9842
|
# `https://bucket_name.s3express-az_id.region.amazonaws.com/key-name
|
9361
9843
|
# `. Path-style requests are not supported. For more information, see
|
9362
|
-
# [Regional and Zonal endpoints][
|
9844
|
+
# [Regional and Zonal endpoints][6] in the *Amazon S3 User Guide*.
|
9363
9845
|
#
|
9364
9846
|
# </note>
|
9365
9847
|
#
|
9366
9848
|
# The following actions are related to `HeadObject`:
|
9367
9849
|
#
|
9368
|
-
# * [GetObject][
|
9850
|
+
# * [GetObject][7]
|
9369
9851
|
#
|
9370
|
-
# * [GetObjectAttributes][
|
9852
|
+
# * [GetObjectAttributes][8]
|
9371
9853
|
#
|
9372
9854
|
#
|
9373
9855
|
#
|
@@ -9375,9 +9857,10 @@ module Aws::S3
|
|
9375
9857
|
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html
|
9376
9858
|
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
|
9377
9859
|
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
9378
|
-
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-
|
9379
|
-
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/
|
9380
|
-
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
9860
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
9861
|
+
# [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
9862
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
|
9863
|
+
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html
|
9381
9864
|
#
|
9382
9865
|
# @option params [required, String] :bucket
|
9383
9866
|
# The name of the bucket that contains the object.
|
@@ -9593,10 +10076,16 @@ module Aws::S3
|
|
9593
10076
|
# @option params [String] :checksum_mode
|
9594
10077
|
# To retrieve the checksum, this parameter must be enabled.
|
9595
10078
|
#
|
9596
|
-
#
|
9597
|
-
# with a [checksum][1] and encrypted with an Key
|
9598
|
-
# (KMS) key, you must have permission to use the
|
9599
|
-
# retrieve the checksum.
|
10079
|
+
# **General purpose buckets** - If you enable checksum mode and the
|
10080
|
+
# object is uploaded with a [checksum][1] and encrypted with an Key
|
10081
|
+
# Management Service (KMS) key, you must have permission to use the
|
10082
|
+
# `kms:Decrypt` action to retrieve the checksum.
|
10083
|
+
#
|
10084
|
+
# **Directory buckets** - If you enable `ChecksumMode` and the object is
|
10085
|
+
# encrypted with Amazon Web Services Key Management Service (Amazon Web
|
10086
|
+
# Services KMS), you must also have the `kms:GenerateDataKey` and
|
10087
|
+
# `kms:Decrypt` permissions in IAM identity-based policies and KMS key
|
10088
|
+
# policies for the KMS key to retrieve the checksum of the object.
|
9600
10089
|
#
|
9601
10090
|
#
|
9602
10091
|
#
|
@@ -12592,24 +13081,73 @@ module Aws::S3
|
|
12592
13081
|
req.send_request(options)
|
12593
13082
|
end
|
12594
13083
|
|
12595
|
-
#
|
13084
|
+
# This operation configures default encryption and Amazon S3 Bucket Keys
|
13085
|
+
# for an existing bucket.
|
12596
13086
|
#
|
12597
|
-
#
|
13087
|
+
# <note markdown="1"> <b>Directory buckets </b> - For directory buckets, you must make
|
13088
|
+
# requests for this API operation to the Regional endpoint. These
|
13089
|
+
# endpoints support path-style requests in the format
|
13090
|
+
# `https://s3express-control.region_code.amazonaws.com/bucket-name `.
|
13091
|
+
# Virtual-hosted-style requests aren't supported. For more information,
|
13092
|
+
# see [Regional and Zonal endpoints][1] in the *Amazon S3 User Guide*.
|
12598
13093
|
#
|
12599
|
-
#
|
12600
|
-
# encryption and Amazon S3 Bucket Keys for an existing bucket.
|
13094
|
+
# </note>
|
12601
13095
|
#
|
12602
13096
|
# By default, all buckets have a default encryption configuration that
|
12603
|
-
# uses server-side encryption with Amazon S3 managed keys (SSE-S3).
|
12604
|
-
#
|
12605
|
-
#
|
12606
|
-
#
|
12607
|
-
#
|
12608
|
-
#
|
12609
|
-
#
|
12610
|
-
#
|
12611
|
-
#
|
12612
|
-
#
|
13097
|
+
# uses server-side encryption with Amazon S3 managed keys (SSE-S3).
|
13098
|
+
#
|
13099
|
+
# <note markdown="1"> * **General purpose buckets**
|
13100
|
+
#
|
13101
|
+
# * You can optionally configure default encryption for a bucket by
|
13102
|
+
# using server-side encryption with Key Management Service (KMS)
|
13103
|
+
# keys (SSE-KMS) or dual-layer server-side encryption with Amazon
|
13104
|
+
# Web Services KMS keys (DSSE-KMS). If you specify default
|
13105
|
+
# encryption by using SSE-KMS, you can also configure [Amazon S3
|
13106
|
+
# Bucket Keys][2]. For information about the bucket default
|
13107
|
+
# encryption feature, see [Amazon S3 Bucket Default Encryption][3]
|
13108
|
+
# in the *Amazon S3 User Guide*.
|
13109
|
+
#
|
13110
|
+
# * If you use PutBucketEncryption to set your [default bucket
|
13111
|
+
# encryption][3] to SSE-KMS, you should verify that your KMS key ID
|
13112
|
+
# is correct. Amazon S3 doesn't validate the KMS key ID provided in
|
13113
|
+
# PutBucketEncryption requests.
|
13114
|
+
#
|
13115
|
+
# * <b>Directory buckets </b> - You can optionally configure default
|
13116
|
+
# encryption for a bucket by using server-side encryption with Key
|
13117
|
+
# Management Service (KMS) keys (SSE-KMS).
|
13118
|
+
#
|
13119
|
+
# * We recommend that the bucket's default encryption uses the
|
13120
|
+
# desired encryption configuration and you don't override the
|
13121
|
+
# bucket default encryption in your `CreateSession` requests or
|
13122
|
+
# `PUT` object requests. Then, new objects are automatically
|
13123
|
+
# encrypted with the desired encryption settings. For more
|
13124
|
+
# information about the encryption overriding behaviors in directory
|
13125
|
+
# buckets, see [Specifying server-side encryption with KMS for new
|
13126
|
+
# object uploads][4].
|
13127
|
+
#
|
13128
|
+
# * Your SSE-KMS configuration can only support 1 [customer managed
|
13129
|
+
# key][5] per directory bucket for the lifetime of the bucket.
|
13130
|
+
# [Amazon Web Services managed key][6] (`aws/s3`) isn't supported.
|
13131
|
+
#
|
13132
|
+
# * S3 Bucket Keys are always enabled for `GET` and `PUT` operations
|
13133
|
+
# in a directory bucket and can’t be disabled. S3 Bucket Keys
|
13134
|
+
# aren't supported, when you copy SSE-KMS encrypted objects from
|
13135
|
+
# general purpose buckets to directory buckets, from directory
|
13136
|
+
# buckets to general purpose buckets, or between directory buckets,
|
13137
|
+
# through [CopyObject][7], [UploadPartCopy][8], [the Copy operation
|
13138
|
+
# in Batch Operations][9], or [the import jobs][10]. In this case,
|
13139
|
+
# Amazon S3 makes a call to KMS every time a copy request is made
|
13140
|
+
# for a KMS-encrypted object.
|
13141
|
+
#
|
13142
|
+
# * When you specify an [KMS customer managed key][5] for encryption
|
13143
|
+
# in your directory bucket, only use the key ID or key ARN. The key
|
13144
|
+
# alias format of the KMS key isn't supported.
|
13145
|
+
#
|
13146
|
+
# * For directory buckets, if you use PutBucketEncryption to set your
|
13147
|
+
# [default bucket encryption][3] to SSE-KMS, Amazon S3 validates the
|
13148
|
+
# KMS key ID provided in PutBucketEncryption requests.
|
13149
|
+
#
|
13150
|
+
# </note>
|
12613
13151
|
#
|
12614
13152
|
# If you're specifying a customer managed KMS key, we recommend using a
|
12615
13153
|
# fully qualified KMS key ARN. If you use a KMS key alias instead, then
|
@@ -12619,45 +13157,80 @@ module Aws::S3
|
|
12619
13157
|
#
|
12620
13158
|
# Also, this action requires Amazon Web Services Signature Version 4.
|
12621
13159
|
# For more information, see [ Authenticating Requests (Amazon Web
|
12622
|
-
# Services Signature Version 4)][
|
13160
|
+
# Services Signature Version 4)][11].
|
12623
13161
|
#
|
12624
|
-
#
|
12625
|
-
#
|
12626
|
-
# permission
|
12627
|
-
#
|
12628
|
-
#
|
12629
|
-
#
|
12630
|
-
#
|
13162
|
+
# Permissions
|
13163
|
+
# : * **General purpose bucket permissions** - The
|
13164
|
+
# `s3:PutEncryptionConfiguration` permission is required in a
|
13165
|
+
# policy. The bucket owner has this permission by default. The
|
13166
|
+
# bucket owner can grant this permission to others. For more
|
13167
|
+
# information about permissions, see [Permissions Related to Bucket
|
13168
|
+
# Operations][12] and [Managing Access Permissions to Your Amazon S3
|
13169
|
+
# Resources][13] in the *Amazon S3 User Guide*.
|
13170
|
+
#
|
13171
|
+
# * **Directory bucket permissions** - To grant access to this API
|
13172
|
+
# operation, you must have the
|
13173
|
+
# `s3express:PutEncryptionConfiguration` permission in an IAM
|
13174
|
+
# identity-based policy instead of a bucket policy. Cross-account
|
13175
|
+
# access to this API operation isn't supported. This operation can
|
13176
|
+
# only be performed by the Amazon Web Services account that owns the
|
13177
|
+
# resource. For more information about directory bucket policies and
|
13178
|
+
# permissions, see [Amazon Web Services Identity and Access
|
13179
|
+
# Management (IAM) for S3 Express One Zone][14] in the *Amazon S3
|
13180
|
+
# User Guide*.
|
13181
|
+
#
|
13182
|
+
# To set a directory bucket default encryption with SSE-KMS, you
|
13183
|
+
# must also have the `kms:GenerateDataKey` and the `kms:Decrypt`
|
13184
|
+
# permissions in IAM identity-based policies and KMS key policies
|
13185
|
+
# for the target KMS key.
|
13186
|
+
#
|
13187
|
+
# HTTP Host header syntax
|
13188
|
+
#
|
13189
|
+
# : <b>Directory buckets </b> - The HTTP Host header syntax is
|
13190
|
+
# `s3express-control.region.amazonaws.com`.
|
12631
13191
|
#
|
12632
13192
|
# The following operations are related to `PutBucketEncryption`:
|
12633
13193
|
#
|
12634
|
-
# * [GetBucketEncryption][
|
13194
|
+
# * [GetBucketEncryption][15]
|
12635
13195
|
#
|
12636
|
-
# * [DeleteBucketEncryption][
|
13196
|
+
# * [DeleteBucketEncryption][16]
|
12637
13197
|
#
|
12638
13198
|
#
|
12639
13199
|
#
|
12640
|
-
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/
|
12641
|
-
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-
|
12642
|
-
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/
|
12643
|
-
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/
|
12644
|
-
# [5]: https://docs.aws.amazon.com/
|
12645
|
-
# [6]: https://docs.aws.amazon.com/
|
12646
|
-
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
13200
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
|
13201
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
|
13202
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
|
13203
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
13204
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
13205
|
+
# [6]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
13206
|
+
# [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
13207
|
+
# [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
13208
|
+
# [9]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
13209
|
+
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
13210
|
+
# [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
|
13211
|
+
# [12]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
|
13212
|
+
# [13]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
|
13213
|
+
# [14]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
|
13214
|
+
# [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html
|
13215
|
+
# [16]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html
|
12647
13216
|
#
|
12648
13217
|
# @option params [required, String] :bucket
|
12649
13218
|
# Specifies default encryption for a bucket using server-side encryption
|
12650
|
-
# with different key options.
|
12651
|
-
#
|
12652
|
-
#
|
12653
|
-
#
|
12654
|
-
#
|
12655
|
-
#
|
12656
|
-
#
|
13219
|
+
# with different key options.
|
13220
|
+
#
|
13221
|
+
# <b>Directory buckets </b> - When you use this operation with a
|
13222
|
+
# directory bucket, you must use path-style requests in the format
|
13223
|
+
# `https://s3express-control.region_code.amazonaws.com/bucket-name `.
|
13224
|
+
# Virtual-hosted-style requests aren't supported. Directory bucket
|
13225
|
+
# names must be unique in the chosen Availability Zone. Bucket names
|
13226
|
+
# must also follow the format ` bucket_base_name--az_id--x-s3` (for
|
13227
|
+
# example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
|
13228
|
+
# bucket naming restrictions, see [Directory bucket naming rules][1] in
|
13229
|
+
# the *Amazon S3 User Guide*
|
12657
13230
|
#
|
12658
13231
|
#
|
12659
13232
|
#
|
12660
|
-
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/
|
13233
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
|
12661
13234
|
#
|
12662
13235
|
# @option params [String] :content_md5
|
12663
13236
|
# The base64-encoded 128-bit MD5 digest of the server-side encryption
|
@@ -12667,6 +13240,10 @@ module Aws::S3
|
|
12667
13240
|
# (CLI) or Amazon Web Services SDKs, this field is calculated
|
12668
13241
|
# automatically.
|
12669
13242
|
#
|
13243
|
+
# <note markdown="1"> This functionality is not supported for directory buckets.
|
13244
|
+
#
|
13245
|
+
# </note>
|
13246
|
+
#
|
12670
13247
|
# @option params [String] :checksum_algorithm
|
12671
13248
|
# Indicates the algorithm used to create the checksum for the object
|
12672
13249
|
# when you use the SDK. This header will not provide any additional
|
@@ -12679,6 +13256,11 @@ module Aws::S3
|
|
12679
13256
|
# If you provide an individual checksum, Amazon S3 ignores any provided
|
12680
13257
|
# `ChecksumAlgorithm` parameter.
|
12681
13258
|
#
|
13259
|
+
# <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
|
13260
|
+
# is the default checksum algorithm that's used for performance.
|
13261
|
+
#
|
13262
|
+
# </note>
|
13263
|
+
#
|
12682
13264
|
#
|
12683
13265
|
#
|
12684
13266
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
|
@@ -12691,6 +13273,12 @@ module Aws::S3
|
|
12691
13273
|
# you provide does not match the actual owner of the bucket, the request
|
12692
13274
|
# fails with the HTTP status code `403 Forbidden` (access denied).
|
12693
13275
|
#
|
13276
|
+
# <note markdown="1"> For directory buckets, this header is not supported in this API
|
13277
|
+
# operation. If you specify this header, the request fails with the HTTP
|
13278
|
+
# status code `501 Not Implemented`.
|
13279
|
+
#
|
13280
|
+
# </note>
|
13281
|
+
#
|
12694
13282
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
12695
13283
|
#
|
12696
13284
|
# @example Request syntax with placeholder values
|
@@ -15088,6 +15676,10 @@ module Aws::S3
|
|
15088
15676
|
# interruptions when a session expires. For more information about
|
15089
15677
|
# authorization, see [ `CreateSession` ][5].
|
15090
15678
|
#
|
15679
|
+
# If the object is encrypted with SSE-KMS, you must also have the
|
15680
|
+
# `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
|
15681
|
+
# identity-based policies and KMS key policies for the KMS key.
|
15682
|
+
#
|
15091
15683
|
# Data integrity with Content-MD5
|
15092
15684
|
# : * **General purpose bucket** - To ensure that data is not corrupted
|
15093
15685
|
# traversing the network, use the `Content-MD5` header. When you use
|
@@ -15437,25 +16029,65 @@ module Aws::S3
|
|
15437
16029
|
# object in Amazon S3 (for example, `AES256`, `aws:kms`,
|
15438
16030
|
# `aws:kms:dsse`).
|
15439
16031
|
#
|
15440
|
-
# <b>General purpose buckets </b> - You have four mutually exclusive
|
15441
|
-
#
|
15442
|
-
#
|
15443
|
-
#
|
15444
|
-
#
|
15445
|
-
#
|
15446
|
-
#
|
15447
|
-
#
|
15448
|
-
#
|
15449
|
-
#
|
15450
|
-
#
|
16032
|
+
# * <b>General purpose buckets </b> - You have four mutually exclusive
|
16033
|
+
# options to protect data using server-side encryption in Amazon S3,
|
16034
|
+
# depending on how you choose to manage the encryption keys.
|
16035
|
+
# Specifically, the encryption key options are Amazon S3 managed keys
|
16036
|
+
# (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
|
16037
|
+
# customer-provided keys (SSE-C). Amazon S3 encrypts data with
|
16038
|
+
# server-side encryption by using Amazon S3 managed keys (SSE-S3) by
|
16039
|
+
# default. You can optionally tell Amazon S3 to encrypt data at rest
|
16040
|
+
# by using server-side encryption with other key options. For more
|
16041
|
+
# information, see [Using Server-Side Encryption][1] in the *Amazon S3
|
16042
|
+
# User Guide*.
|
15451
16043
|
#
|
15452
|
-
# <b>Directory buckets </b> - For directory buckets, only
|
15453
|
-
#
|
15454
|
-
#
|
16044
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
16045
|
+
# two supported options for server-side encryption: server-side
|
16046
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
16047
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
|
16048
|
+
# recommend that the bucket's default encryption uses the desired
|
16049
|
+
# encryption configuration and you don't override the bucket default
|
16050
|
+
# encryption in your `CreateSession` requests or `PUT` object
|
16051
|
+
# requests. Then, new objects are automatically encrypted with the
|
16052
|
+
# desired encryption settings. For more information, see [Protecting
|
16053
|
+
# data with server-side encryption][2] in the *Amazon S3 User Guide*.
|
16054
|
+
# For more information about the encryption overriding behaviors in
|
16055
|
+
# directory buckets, see [Specifying server-side encryption with KMS
|
16056
|
+
# for new object uploads][3].
|
16057
|
+
#
|
16058
|
+
# In the Zonal endpoint API calls (except [CopyObject][4] and
|
16059
|
+
# [UploadPartCopy][5]) using the REST API, the encryption request
|
16060
|
+
# headers must match the encryption settings that are specified in the
|
16061
|
+
# `CreateSession` request. You can't override the values of the
|
16062
|
+
# encryption settings (`x-amz-server-side-encryption`,
|
16063
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`,
|
16064
|
+
# `x-amz-server-side-encryption-context`, and
|
16065
|
+
# `x-amz-server-side-encryption-bucket-key-enabled`) that are
|
16066
|
+
# specified in the `CreateSession` request. You don't need to
|
16067
|
+
# explicitly specify these encryption settings values in Zonal
|
16068
|
+
# endpoint API calls, and Amazon S3 will use the encryption settings
|
16069
|
+
# values from the `CreateSession` request to protect new objects in
|
16070
|
+
# the directory bucket.
|
16071
|
+
#
|
16072
|
+
# <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
|
16073
|
+
# `CreateSession`, the session token refreshes automatically to avoid
|
16074
|
+
# service interruptions when a session expires. The CLI or the Amazon
|
16075
|
+
# Web Services SDKs use the bucket's default encryption configuration
|
16076
|
+
# for the `CreateSession` request. It's not supported to override the
|
16077
|
+
# encryption settings values in the `CreateSession` request. So in the
|
16078
|
+
# Zonal endpoint API calls (except [CopyObject][4] and
|
16079
|
+
# [UploadPartCopy][5]), the encryption request headers must match the
|
16080
|
+
# default encryption configuration of the directory bucket.
|
16081
|
+
#
|
16082
|
+
# </note>
|
15455
16083
|
#
|
15456
16084
|
#
|
15457
16085
|
#
|
15458
16086
|
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
|
16087
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
16088
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
|
16089
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
16090
|
+
# [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
15459
16091
|
#
|
15460
16092
|
# @option params [String] :storage_class
|
15461
16093
|
# By default, Amazon S3 uses the STANDARD Storage Class to store newly
|
@@ -15535,46 +16167,83 @@ module Aws::S3
|
|
15535
16167
|
# </note>
|
15536
16168
|
#
|
15537
16169
|
# @option params [String] :ssekms_key_id
|
15538
|
-
#
|
15539
|
-
#
|
15540
|
-
#
|
15541
|
-
#
|
15542
|
-
#
|
15543
|
-
#
|
15544
|
-
# x-amz-server-side-encryption
|
15545
|
-
#
|
15546
|
-
#
|
15547
|
-
#
|
16170
|
+
# Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
|
16171
|
+
# object encryption. If the KMS key doesn't exist in the same account
|
16172
|
+
# that's issuing the command, you must use the full Key ARN not the Key
|
16173
|
+
# ID.
|
16174
|
+
#
|
16175
|
+
# **General purpose buckets** - If you specify
|
16176
|
+
# `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
|
16177
|
+
# header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
|
16178
|
+
# to use. If you specify `x-amz-server-side-encryption:aws:kms` or
|
16179
|
+
# `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
|
16180
|
+
# `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
16181
|
+
# Amazon Web Services managed key (`aws/s3`) to protect the data.
|
16182
|
+
#
|
16183
|
+
# **Directory buckets** - If you specify `x-amz-server-side-encryption`
|
16184
|
+
# with `aws:kms`, you must specify the `
|
16185
|
+
# x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
|
16186
|
+
# ID or Key ARN) of the KMS symmetric encryption customer managed key to
|
16187
|
+
# use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
|
16188
|
+
# key ID or key ARN. The key alias format of the KMS key isn't
|
16189
|
+
# supported. Your SSE-KMS configuration can only support 1 [customer
|
16190
|
+
# managed key][1] per directory bucket for the lifetime of the bucket.
|
16191
|
+
# [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
|
16192
|
+
#
|
16193
|
+
#
|
16194
|
+
#
|
16195
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
16196
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
15548
16197
|
#
|
15549
|
-
#
|
16198
|
+
# @option params [String] :ssekms_encryption_context
|
16199
|
+
# Specifies the Amazon Web Services KMS Encryption Context as an
|
16200
|
+
# additional encryption context to use for object encryption. The value
|
16201
|
+
# of this header is a Base64-encoded string of a UTF-8 encoded JSON,
|
16202
|
+
# which contains the encryption context as key-value pairs. This value
|
16203
|
+
# is stored as object metadata and automatically gets passed on to
|
16204
|
+
# Amazon Web Services KMS for future `GetObject` operations on this
|
16205
|
+
# object.
|
15550
16206
|
#
|
15551
|
-
#
|
16207
|
+
# **General purpose buckets** - This value must be explicitly added
|
16208
|
+
# during `CopyObject` operations if you want an additional encryption
|
16209
|
+
# context for your object. For more information, see [Encryption
|
16210
|
+
# context][1] in the *Amazon S3 User Guide*.
|
15552
16211
|
#
|
15553
|
-
#
|
15554
|
-
#
|
15555
|
-
#
|
15556
|
-
#
|
15557
|
-
# value is stored as object metadata and automatically gets passed on to
|
15558
|
-
# Amazon Web Services KMS for future `GetObject` or `CopyObject`
|
15559
|
-
# operations on this object. This value must be explicitly added during
|
15560
|
-
# `CopyObject` operations.
|
16212
|
+
# **Directory buckets** - You can optionally provide an explicit
|
16213
|
+
# encryption context value. The value must match the default encryption
|
16214
|
+
# context - the bucket Amazon Resource Name (ARN). An additional
|
16215
|
+
# encryption context value is not supported.
|
15561
16216
|
#
|
15562
|
-
# <note markdown="1"> This functionality is not supported for directory buckets.
|
15563
16217
|
#
|
15564
|
-
#
|
16218
|
+
#
|
16219
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
|
15565
16220
|
#
|
15566
16221
|
# @option params [Boolean] :bucket_key_enabled
|
15567
16222
|
# Specifies whether Amazon S3 should use an S3 Bucket Key for object
|
15568
16223
|
# encryption with server-side encryption using Key Management Service
|
15569
|
-
# (KMS) keys (SSE-KMS).
|
15570
|
-
#
|
16224
|
+
# (KMS) keys (SSE-KMS).
|
16225
|
+
#
|
16226
|
+
# **General purpose buckets** - Setting this header to `true` causes
|
16227
|
+
# Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
|
16228
|
+
# Also, specifying this header with a PUT action doesn't affect
|
16229
|
+
# bucket-level settings for S3 Bucket Key.
|
15571
16230
|
#
|
15572
|
-
#
|
15573
|
-
#
|
16231
|
+
# **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
|
16232
|
+
# and `PUT` operations in a directory bucket and can’t be disabled. S3
|
16233
|
+
# Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
|
16234
|
+
# from general purpose buckets to directory buckets, from directory
|
16235
|
+
# buckets to general purpose buckets, or between directory buckets,
|
16236
|
+
# through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
|
16237
|
+
# Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
|
16238
|
+
# makes a call to KMS every time a copy request is made for a
|
16239
|
+
# KMS-encrypted object.
|
15574
16240
|
#
|
15575
|
-
# <note markdown="1"> This functionality is not supported for directory buckets.
|
15576
16241
|
#
|
15577
|
-
#
|
16242
|
+
#
|
16243
|
+
# [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
16244
|
+
# [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
16245
|
+
# [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
|
16246
|
+
# [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
|
15578
16247
|
#
|
15579
16248
|
# @option params [String] :request_payer
|
15580
16249
|
# Confirms that the requester knows that they will be charged for the
|
@@ -15652,24 +16321,22 @@ module Aws::S3
|
|
15652
16321
|
# * {Types::PutObjectOutput#request_charged #request_charged} => String
|
15653
16322
|
#
|
15654
16323
|
#
|
15655
|
-
# @example Example: To upload an object
|
16324
|
+
# @example Example: To upload an object and specify optional tags
|
15656
16325
|
#
|
15657
|
-
# # The following example uploads an object. The request specifies optional
|
15658
|
-
# #
|
16326
|
+
# # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
|
16327
|
+
# # S3 returns version ID of the newly created object.
|
15659
16328
|
#
|
15660
16329
|
# resp = client.put_object({
|
15661
|
-
# body: "HappyFace.jpg",
|
16330
|
+
# body: "c:\\HappyFace.jpg",
|
15662
16331
|
# bucket: "examplebucket",
|
15663
16332
|
# key: "HappyFace.jpg",
|
15664
|
-
#
|
15665
|
-
# storage_class: "STANDARD_IA",
|
16333
|
+
# tagging: "key1=value1&key2=value2",
|
15666
16334
|
# })
|
15667
16335
|
#
|
15668
16336
|
# resp.to_h outputs the following:
|
15669
16337
|
# {
|
15670
16338
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15671
|
-
#
|
15672
|
-
# version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
|
16339
|
+
# version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
|
15673
16340
|
# }
|
15674
16341
|
#
|
15675
16342
|
# @example Example: To create an object.
|
@@ -15688,98 +16355,100 @@ module Aws::S3
|
|
15688
16355
|
# version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
|
15689
16356
|
# }
|
15690
16357
|
#
|
15691
|
-
# @example Example: To upload
|
16358
|
+
# @example Example: To upload object and specify user-defined metadata
|
15692
16359
|
#
|
15693
|
-
# # The following example
|
15694
|
-
# #
|
16360
|
+
# # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
|
16361
|
+
# # enabled, S3 returns version ID in response.
|
15695
16362
|
#
|
15696
16363
|
# resp = client.put_object({
|
15697
|
-
# body: "
|
16364
|
+
# body: "filetoupload",
|
15698
16365
|
# bucket: "examplebucket",
|
15699
|
-
# key: "
|
16366
|
+
# key: "exampleobject",
|
16367
|
+
# metadata: {
|
16368
|
+
# "metadata1" => "value1",
|
16369
|
+
# "metadata2" => "value2",
|
16370
|
+
# },
|
15700
16371
|
# })
|
15701
16372
|
#
|
15702
16373
|
# resp.to_h outputs the following:
|
15703
16374
|
# {
|
15704
16375
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15705
|
-
# version_id: "
|
16376
|
+
# version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
|
15706
16377
|
# }
|
15707
16378
|
#
|
15708
|
-
# @example Example: To upload an object
|
16379
|
+
# @example Example: To upload an object
|
15709
16380
|
#
|
15710
|
-
# # The following example uploads an object
|
15711
|
-
# # S3 returns
|
16381
|
+
# # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
|
16382
|
+
# # syntax. S3 returns VersionId of the newly created object.
|
15712
16383
|
#
|
15713
16384
|
# resp = client.put_object({
|
15714
|
-
# body: "
|
16385
|
+
# body: "HappyFace.jpg",
|
15715
16386
|
# bucket: "examplebucket",
|
15716
16387
|
# key: "HappyFace.jpg",
|
15717
|
-
# tagging: "key1=value1&key2=value2",
|
15718
16388
|
# })
|
15719
16389
|
#
|
15720
16390
|
# resp.to_h outputs the following:
|
15721
16391
|
# {
|
15722
16392
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15723
|
-
# version_id: "
|
16393
|
+
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
15724
16394
|
# }
|
15725
16395
|
#
|
15726
|
-
# @example Example: To upload an object and specify
|
16396
|
+
# @example Example: To upload an object and specify server-side encryption and object tags
|
15727
16397
|
#
|
15728
|
-
# # The following example uploads
|
15729
|
-
# #
|
16398
|
+
# # The following example uploads an object. The request specifies the optional server-side encryption option. The request
|
16399
|
+
# # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
|
15730
16400
|
#
|
15731
16401
|
# resp = client.put_object({
|
15732
|
-
# acl: "authenticated-read",
|
15733
16402
|
# body: "filetoupload",
|
15734
16403
|
# bucket: "examplebucket",
|
15735
16404
|
# key: "exampleobject",
|
16405
|
+
# server_side_encryption: "AES256",
|
16406
|
+
# tagging: "key1=value1&key2=value2",
|
15736
16407
|
# })
|
15737
16408
|
#
|
15738
16409
|
# resp.to_h outputs the following:
|
15739
16410
|
# {
|
15740
16411
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15741
|
-
#
|
16412
|
+
# server_side_encryption: "AES256",
|
16413
|
+
# version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
|
15742
16414
|
# }
|
15743
16415
|
#
|
15744
|
-
# @example Example: To upload object and specify
|
16416
|
+
# @example Example: To upload an object and specify canned ACL.
|
15745
16417
|
#
|
15746
|
-
# # The following example
|
15747
|
-
# # enabled, S3 returns version ID in response.
|
16418
|
+
# # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
|
16419
|
+
# # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
|
15748
16420
|
#
|
15749
16421
|
# resp = client.put_object({
|
16422
|
+
# acl: "authenticated-read",
|
15750
16423
|
# body: "filetoupload",
|
15751
16424
|
# bucket: "examplebucket",
|
15752
16425
|
# key: "exampleobject",
|
15753
|
-
# metadata: {
|
15754
|
-
# "metadata1" => "value1",
|
15755
|
-
# "metadata2" => "value2",
|
15756
|
-
# },
|
15757
16426
|
# })
|
15758
16427
|
#
|
15759
16428
|
# resp.to_h outputs the following:
|
15760
16429
|
# {
|
15761
16430
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15762
|
-
# version_id: "
|
16431
|
+
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
15763
16432
|
# }
|
15764
16433
|
#
|
15765
|
-
# @example Example: To upload an object
|
16434
|
+
# @example Example: To upload an object (specify optional headers)
|
15766
16435
|
#
|
15767
|
-
# # The following example uploads an object. The request specifies
|
15768
|
-
# #
|
16436
|
+
# # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
|
16437
|
+
# # storage class and use server-side encryption.
|
15769
16438
|
#
|
15770
16439
|
# resp = client.put_object({
|
15771
|
-
# body: "
|
16440
|
+
# body: "HappyFace.jpg",
|
15772
16441
|
# bucket: "examplebucket",
|
15773
|
-
# key: "
|
16442
|
+
# key: "HappyFace.jpg",
|
15774
16443
|
# server_side_encryption: "AES256",
|
15775
|
-
#
|
16444
|
+
# storage_class: "STANDARD_IA",
|
15776
16445
|
# })
|
15777
16446
|
#
|
15778
16447
|
# resp.to_h outputs the following:
|
15779
16448
|
# {
|
15780
16449
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
15781
16450
|
# server_side_encryption: "AES256",
|
15782
|
-
# version_id: "
|
16451
|
+
# version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
|
15783
16452
|
# }
|
15784
16453
|
#
|
15785
16454
|
# @example Streaming a file from disk
|
@@ -17792,6 +18461,10 @@ module Aws::S3
|
|
17792
18461
|
# interruptions when a session expires. For more information about
|
17793
18462
|
# authorization, see [ `CreateSession` ][9].
|
17794
18463
|
#
|
18464
|
+
# If the object is encrypted with SSE-KMS, you must also have the
|
18465
|
+
# `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
|
18466
|
+
# identity-based policies and KMS key policies for the KMS key.
|
18467
|
+
#
|
17795
18468
|
# Data integrity
|
17796
18469
|
#
|
17797
18470
|
# : **General purpose bucket** - To ensure that data is not corrupted
|
@@ -17843,12 +18516,13 @@ module Aws::S3
|
|
17843
18516
|
#
|
17844
18517
|
# * x-amz-server-side-encryption-customer-key-MD5
|
17845
18518
|
#
|
17846
|
-
#
|
17847
|
-
#
|
17848
|
-
# supported.
|
18519
|
+
# For more information, see [Using Server-Side Encryption][11] in
|
18520
|
+
# the *Amazon S3 User Guide*.
|
17849
18521
|
#
|
17850
|
-
#
|
17851
|
-
#
|
18522
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
18523
|
+
# two supported options for server-side encryption: server-side
|
18524
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
18525
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`).
|
17852
18526
|
#
|
17853
18527
|
# Special errors
|
17854
18528
|
# : * Error Code: `NoSuchUpload`
|
@@ -18261,6 +18935,10 @@ module Aws::S3
|
|
18261
18935
|
# destination. The `s3express:SessionMode` condition key cannot be
|
18262
18936
|
# set to `ReadOnly` on the copy destination.
|
18263
18937
|
#
|
18938
|
+
# If the object is encrypted with SSE-KMS, you must also have the
|
18939
|
+
# `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
|
18940
|
+
# identity-based policies and KMS key policies for the KMS key.
|
18941
|
+
#
|
18264
18942
|
# For example policies, see [Example bucket policies for S3 Express
|
18265
18943
|
# One Zone][10] and [Amazon Web Services Identity and Access
|
18266
18944
|
# Management (IAM) identity-based policies for S3 Express One
|
@@ -18272,9 +18950,26 @@ module Aws::S3
|
|
18272
18950
|
# the `UploadPartCopy` operation, see [CopyObject][12] and
|
18273
18951
|
# [UploadPart][2].
|
18274
18952
|
#
|
18275
|
-
# * <b>Directory buckets </b> - For directory buckets, only
|
18276
|
-
# server-side encryption
|
18277
|
-
# (`AES256`)
|
18953
|
+
# * <b>Directory buckets </b> - For directory buckets, there are only
|
18954
|
+
# two supported options for server-side encryption: server-side
|
18955
|
+
# encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
|
18956
|
+
# server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). For
|
18957
|
+
# more information, see [Protecting data with server-side
|
18958
|
+
# encryption][13] in the *Amazon S3 User Guide*.
|
18959
|
+
#
|
18960
|
+
# <note markdown="1"> For directory buckets, when you perform a `CreateMultipartUpload`
|
18961
|
+
# operation and an `UploadPartCopy` operation, the request headers
|
18962
|
+
# you provide in the `CreateMultipartUpload` request must match the
|
18963
|
+
# default encryption configuration of the destination bucket.
|
18964
|
+
#
|
18965
|
+
# </note>
|
18966
|
+
#
|
18967
|
+
# S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted
|
18968
|
+
# objects from general purpose buckets to directory buckets, from
|
18969
|
+
# directory buckets to general purpose buckets, or between directory
|
18970
|
+
# buckets, through [UploadPartCopy][14]. In this case, Amazon S3
|
18971
|
+
# makes a call to KMS every time a copy request is made for a
|
18972
|
+
# KMS-encrypted object.
|
18278
18973
|
#
|
18279
18974
|
# Special errors
|
18280
18975
|
# : * Error Code: `NoSuchUpload`
|
@@ -18299,17 +18994,17 @@ module Aws::S3
|
|
18299
18994
|
#
|
18300
18995
|
# The following operations are related to `UploadPartCopy`:
|
18301
18996
|
#
|
18302
|
-
# * [CreateMultipartUpload][
|
18997
|
+
# * [CreateMultipartUpload][15]
|
18303
18998
|
#
|
18304
18999
|
# * [UploadPart][2]
|
18305
19000
|
#
|
18306
|
-
# * [CompleteMultipartUpload][
|
19001
|
+
# * [CompleteMultipartUpload][16]
|
18307
19002
|
#
|
18308
|
-
# * [AbortMultipartUpload][
|
19003
|
+
# * [AbortMultipartUpload][17]
|
18309
19004
|
#
|
18310
|
-
# * [ListParts][
|
19005
|
+
# * [ListParts][18]
|
18311
19006
|
#
|
18312
|
-
# * [ListMultipartUploads][
|
19007
|
+
# * [ListMultipartUploads][19]
|
18313
19008
|
#
|
18314
19009
|
#
|
18315
19010
|
#
|
@@ -18325,11 +19020,13 @@ module Aws::S3
|
|
18325
19020
|
# [10]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
|
18326
19021
|
# [11]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
|
18327
19022
|
# [12]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
|
18328
|
-
# [13]: https://docs.aws.amazon.com/AmazonS3/latest/
|
18329
|
-
# [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
18330
|
-
# [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
18331
|
-
# [16]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
18332
|
-
# [17]: https://docs.aws.amazon.com/AmazonS3/latest/API/
|
19023
|
+
# [13]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
|
19024
|
+
# [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
|
19025
|
+
# [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
|
19026
|
+
# [16]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
|
19027
|
+
# [17]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
|
19028
|
+
# [18]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
|
19029
|
+
# [19]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
|
18333
19030
|
#
|
18334
19031
|
# @option params [required, String] :bucket
|
18335
19032
|
# The bucket name.
|
@@ -18615,45 +19312,45 @@ module Aws::S3
|
|
18615
19312
|
# * {Types::UploadPartCopyOutput#request_charged #request_charged} => String
|
18616
19313
|
#
|
18617
19314
|
#
|
18618
|
-
# @example Example: To upload a part by copying
|
19315
|
+
# @example Example: To upload a part by copying byte range from an existing object as data source
|
18619
19316
|
#
|
18620
|
-
# # The following example uploads a part of a multipart upload by copying
|
19317
|
+
# # The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as
|
19318
|
+
# # data source.
|
18621
19319
|
#
|
18622
19320
|
# resp = client.upload_part_copy({
|
18623
19321
|
# bucket: "examplebucket",
|
18624
19322
|
# copy_source: "/bucketname/sourceobjectkey",
|
19323
|
+
# copy_source_range: "bytes=1-100000",
|
18625
19324
|
# key: "examplelargeobject",
|
18626
|
-
# part_number:
|
19325
|
+
# part_number: 2,
|
18627
19326
|
# upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
|
18628
19327
|
# })
|
18629
19328
|
#
|
18630
19329
|
# resp.to_h outputs the following:
|
18631
19330
|
# {
|
18632
19331
|
# copy_part_result: {
|
18633
|
-
# etag: "\"
|
18634
|
-
# last_modified: Time.parse("2016-12-29T21:
|
19332
|
+
# etag: "\"65d16d19e65a7508a51f043180edcc36\"",
|
19333
|
+
# last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
|
18635
19334
|
# },
|
18636
19335
|
# }
|
18637
19336
|
#
|
18638
|
-
# @example Example: To upload a part by copying
|
19337
|
+
# @example Example: To upload a part by copying data from an existing object as data source
|
18639
19338
|
#
|
18640
|
-
# # The following example uploads a part of a multipart upload by copying
|
18641
|
-
# # data source.
|
19339
|
+
# # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
|
18642
19340
|
#
|
18643
19341
|
# resp = client.upload_part_copy({
|
18644
19342
|
# bucket: "examplebucket",
|
18645
19343
|
# copy_source: "/bucketname/sourceobjectkey",
|
18646
|
-
# copy_source_range: "bytes=1-100000",
|
18647
19344
|
# key: "examplelargeobject",
|
18648
|
-
# part_number:
|
19345
|
+
# part_number: 1,
|
18649
19346
|
# upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
|
18650
19347
|
# })
|
18651
19348
|
#
|
18652
19349
|
# resp.to_h outputs the following:
|
18653
19350
|
# {
|
18654
19351
|
# copy_part_result: {
|
18655
|
-
# etag: "\"
|
18656
|
-
# last_modified: Time.parse("2016-12-29T21:
|
19352
|
+
# etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
|
19353
|
+
# last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
|
18657
19354
|
# },
|
18658
19355
|
# }
|
18659
19356
|
#
|
@@ -19115,7 +19812,7 @@ module Aws::S3
|
|
19115
19812
|
tracer: tracer
|
19116
19813
|
)
|
19117
19814
|
context[:gem_name] = 'aws-sdk-s3'
|
19118
|
-
context[:gem_version] = '1.
|
19815
|
+
context[:gem_version] = '1.166.0'
|
19119
19816
|
Seahorse::Client::Request.new(handlers, context)
|
19120
19817
|
end
|
19121
19818
|
|