aws-sdk-s3 1.162.0 → 1.167.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.
@@ -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`, and `:session_token` options.
176
- # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
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::InstanceProfileCredentails` or `Aws::ECSCredentials` to
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 `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::S3::EndpointParameters`
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` ][7] API operation for session-based
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` ][7].
826
+ # authorization, see [ `CreateSession` ][8].
817
827
  #
818
- # * If you provide an [additional checksum value][8] in your
819
- # `MultipartUpload` requests and the object is encrypted with Key
820
- # Management Service, you must have permission to use the
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/API_CreateSession.html
882
- # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Checksum.html
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
@@ -941,9 +949,9 @@ module Aws::S3
941
949
  # @option params [String] :checksum_crc32
942
950
  # This header can be used as a data integrity check to verify that the
943
951
  # data received is the same data that was originally sent. This header
944
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
945
- # more information, see [Checking object integrity][1] in the *Amazon S3
946
- # User Guide*.
952
+ # specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
953
+ # For more information, see [Checking object integrity][1] in the
954
+ # *Amazon S3 User Guide*.
947
955
  #
948
956
  #
949
957
  #
@@ -952,7 +960,7 @@ module Aws::S3
952
960
  # @option params [String] :checksum_crc32c
953
961
  # This header can be used as a data integrity check to verify that the
954
962
  # data received is the same data that was originally sent. This header
955
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
963
+ # specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
956
964
  # For more information, see [Checking object integrity][1] in the
957
965
  # *Amazon S3 User Guide*.
958
966
  #
@@ -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 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
1715
- # Unrecognized or unsupported values won’t write a destination object
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 default
1725
- # encryption configuration that uses server-side encryption with Key
1726
- # Management Service (KMS) keys (SSE-KMS), dual-layer server-side
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
- # <note markdown="1"> For directory buckets, only server-side encryption with Amazon S3
1746
- # managed keys (SSE-S3) (`AES256`) is supported.
1747
- #
1748
- # </note>
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 object
1850
- # encryption. All GET and PUT requests for an object protected by KMS
1851
- # will fail if they're not made via SSL or using SigV4. For information
1852
- # about configuring any of the officially supported Amazon Web Services
1853
- # SDKs and Amazon Web Services CLI, see [Specifying the Signature
1854
- # Version in Request Authentication][1] in the *Amazon S3 User Guide*.
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
- # </note>
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 to use for
1867
- # object encryption. The value of this header is a base64-encoded UTF-8
1868
- # string holding JSON with the encryption context key-value pairs. This
1869
- # value must be explicitly added to specify encryption context for
1870
- # `CopyObject` requests.
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
- # </note>
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"> This functionality is not supported when the destination bucket is a
1891
- # directory bucket.
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 server-side
2640
- # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) is
2641
- # supported.
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][12]
2767
+ # * [CompleteMultipartUpload][15]
2653
2768
  #
2654
- # * [AbortMultipartUpload][13]
2769
+ # * [AbortMultipartUpload][16]
2655
2770
  #
2656
- # * [ListParts][14]
2771
+ # * [ListParts][17]
2657
2772
  #
2658
- # * [ListMultipartUploads][15]
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/API/API_CompleteMultipartUpload.html
2674
- # [13]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
2675
- # [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
2676
- # [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
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
- # <note markdown="1"> For directory buckets, only server-side encryption with Amazon S3
3040
- # managed keys (SSE-S3) (`AES256`) is supported.
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.
3041
3194
  #
3042
- # </note>
3195
+ # </note>
3196
+ #
3197
+ #
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) of the symmetric
3102
- # encryption customer managed key to use for object encryption.
3103
- #
3104
- # <note markdown="1"> This functionality is not supported for directory buckets.
3105
- #
3106
- # </note>
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 base64-encoded UTF-8
3111
- # string holding JSON with the encryption context key-value pairs.
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.
3112
3294
  #
3113
- # <note markdown="1"> This functionality is not supported for directory buckets.
3114
- #
3115
- # </note>
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). Setting this header to `true` causes Amazon S3
3121
- # to use an S3 Bucket Key for object encryption with SSE-KMS.
3303
+ # (KMS) keys (SSE-KMS).
3122
3304
  #
3123
- # Specifying this header with an object action doesn’t affect
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
- # <note markdown="1"> This functionality is not supported for directory buckets.
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.
3127
3319
  #
3128
- # </note>
3320
+ #
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
- # APIs on directory buckets. For more information about Zonal endpoint
3290
- # APIs that include the Availability Zone in the request endpoint, see
3291
- # [S3 Express One Zone APIs][1] in the *Amazon S3 User Guide*.
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 APIs. After the session is
3301
- # created, you don’t need to use other policies to grant permissions to
3302
- # each Zonal endpoint API individually. Instead, in your Zonal endpoint
3303
- # API requests, you sign your requests by applying the temporary
3304
- # security credentials of the session to the request headers and
3305
- # following the SigV4 protocol for authentication. You also apply the
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 APIs, the `CopyObject` API operation doesn't use the
3330
- # temporary security credentials returned from the `CreateSession` API
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 APIs, the `HeadBucket` API operation doesn't use the
3337
- # temporary security credentials returned from the `CreateSession` API
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 APIs, the bucket
3358
- # policy should also grant both accounts the `s3express:CreateSession`
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 APIs on a directory bucket. A `ReadOnly` session is
3382
- # constrained to execute the following Zonal endpoint APIs: `GetObject`,
3383
- # `HeadObject`, `ListObjectsV2`, `GetObjectAttributes`, `ListParts`, and
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
- # <note markdown="1"> This operation is not supported by directory buckets.
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
- # This implementation of the DELETE action resets the default encryption
3652
- # for the bucket as server-side encryption with Amazon S3 managed keys
3653
- # (SSE-S3). For information about the bucket default encryption feature,
3654
- # see [Amazon S3 Bucket Default Encryption][1] in the *Amazon S3 User
3655
- # Guide*.
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
- # To use this operation, you must have permissions to perform the
3658
- # `s3:PutEncryptionConfiguration` action. The bucket owner has this
3659
- # permission by default. The bucket owner can grant this permission to
3660
- # others. For more information about permissions, see [Permissions
3661
- # Related to Bucket Subresource Operations][2] and [Managing Access
3662
- # Permissions to your Amazon S3 Resources][3] in the *Amazon S3 User
3663
- # Guide*.
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][4]
4047
+ # * [PutBucketEncryption][6]
3668
4048
  #
3669
- # * [GetBucketEncryption][5]
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/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
3675
- # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
3676
- # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html
3677
- # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html
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
@@ -4558,15 +4960,6 @@ module Aws::S3
4558
4960
  # * {Types::DeleteObjectOutput#request_charged #request_charged} => String
4559
4961
  #
4560
4962
  #
4561
- # @example Example: To delete an object (from a non-versioned bucket)
4562
- #
4563
- # # The following example deletes an object from a non-versioned bucket.
4564
- #
4565
- # resp = client.delete_object({
4566
- # bucket: "ExampleBucket",
4567
- # key: "HappyFace.jpg",
4568
- # })
4569
- #
4570
4963
  # @example Example: To delete an object
4571
4964
  #
4572
4965
  # # The following example deletes an object from an S3 bucket.
@@ -4580,6 +4973,15 @@ module Aws::S3
4580
4973
  # {
4581
4974
  # }
4582
4975
  #
4976
+ # @example Example: To delete an object (from a non-versioned bucket)
4977
+ #
4978
+ # # The following example deletes an object from a non-versioned bucket.
4979
+ #
4980
+ # resp = client.delete_object({
4981
+ # bucket: "ExampleBucket",
4982
+ # key: "HappyFace.jpg",
4983
+ # })
4984
+ #
4583
4985
  # @example Request syntax with placeholder values
4584
4986
  #
4585
4987
  # resp = client.delete_object({
@@ -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 version
5083
+ # @example Example: To remove tag set from an object
4682
5084
  #
4683
- # # The following example removes tag set associated with the specified object version. The request specifies both the
4684
- # # object key and object version.
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: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
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. If the bucket is versioning enabled, the
4700
- # # operation removes tag set from the latest object version.
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: "null",
5111
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
4710
5112
  # }
4711
5113
  #
4712
5114
  # @example Request syntax with placeholder values
@@ -4958,13 +5360,13 @@ module Aws::S3
4958
5360
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
4959
5361
  # the supported algorithm from the following list:
4960
5362
  #
4961
- # * CRC32
5363
+ # * `CRC32`
4962
5364
  #
4963
- # * CRC32C
5365
+ # * `CRC32C`
4964
5366
  #
4965
- # * SHA1
5367
+ # * `SHA1`
4966
5368
  #
4967
- # * SHA256
5369
+ # * `SHA256`
4968
5370
  #
4969
5371
  # For more information, see [Checking object integrity][1] in the
4970
5372
  # *Amazon S3 User Guide*.
@@ -5559,46 +5961,92 @@ module Aws::S3
5559
5961
  req.send_request(options)
5560
5962
  end
5561
5963
 
5562
- # <note markdown="1"> This operation is not supported by directory buckets.
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
- # Returns the default encryption configuration for an Amazon S3 bucket.
5567
- # By default, all buckets have a default encryption configuration that
5568
- # uses server-side encryption with Amazon S3 managed keys (SSE-S3). For
5569
- # information about the bucket default encryption feature, see [Amazon
5570
- # S3 Bucket Default Encryption][1] in the *Amazon S3 User Guide*.
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
- # To use this operation, you must have permission to perform the
5573
- # `s3:GetEncryptionConfiguration` action. The bucket owner has this
5574
- # permission by default. The bucket owner can grant this permission to
5575
- # others. For more information about permissions, see [Permissions
5576
- # Related to Bucket Subresource Operations][2] and [Managing Access
5577
- # Permissions to Your Amazon S3 Resources][3].
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][4]
6007
+ # * [PutBucketEncryption][6]
5582
6008
  #
5583
- # * [DeleteBucketEncryption][5]
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/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
5589
- # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
5590
- # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html
5591
- # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html
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
5592
6020
  #
5593
6021
  # @option params [required, String] :bucket
5594
6022
  # The name of the bucket from which the server-side encryption
5595
6023
  # configuration is retrieved.
5596
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
+ #
6035
+ #
6036
+ #
6037
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
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
@@ -5979,6 +6427,7 @@ module Aws::S3
5979
6427
  # @return [Types::GetBucketLifecycleConfigurationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5980
6428
  #
5981
6429
  # * {Types::GetBucketLifecycleConfigurationOutput#rules #rules} => Array&lt;Types::LifecycleRule&gt;
6430
+ # * {Types::GetBucketLifecycleConfigurationOutput#transition_default_minimum_object_size #transition_default_minimum_object_size} => String
5982
6431
  #
5983
6432
  #
5984
6433
  # @example Example: To get lifecycle configuration on a bucket
@@ -6044,6 +6493,7 @@ module Aws::S3
6044
6493
  # resp.rules[0].noncurrent_version_expiration.noncurrent_days #=> Integer
6045
6494
  # resp.rules[0].noncurrent_version_expiration.newer_noncurrent_versions #=> Integer
6046
6495
  # resp.rules[0].abort_incomplete_multipart_upload.days_after_initiation #=> Integer
6496
+ # resp.transition_default_minimum_object_size #=> String, one of "varies_by_storage_class", "all_storage_classes_128K"
6047
6497
  #
6048
6498
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration AWS API Documentation
6049
6499
  #
@@ -7338,6 +7788,10 @@ module Aws::S3
7338
7788
  # interruptions when a session expires. For more information about
7339
7789
  # authorization, see [ `CreateSession` ][4].
7340
7790
  #
7791
+ # If the object is encrypted using SSE-KMS, you must also have the
7792
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
7793
+ # identity-based policies and KMS key policies for the KMS key.
7794
+ #
7341
7795
  # Storage classes
7342
7796
  #
7343
7797
  # : If the object you are retrieving is stored in the S3 Glacier
@@ -7366,6 +7820,11 @@ module Aws::S3
7366
7820
  # `GetObject` requests for the object that uses these types of keys,
7367
7821
  # you’ll get an HTTP `400 Bad Request` error.
7368
7822
  #
7823
+ # **Directory buckets** - For directory buckets, there are only two
7824
+ # supported options for server-side encryption: SSE-S3 and SSE-KMS.
7825
+ # SSE-C isn't supported. For more information, see [Protecting data
7826
+ # with server-side encryption][7] in the *Amazon S3 User Guide*.
7827
+ #
7369
7828
  # Overriding response header values through the request
7370
7829
  #
7371
7830
  # : There are times when you want to override certain response header
@@ -7413,9 +7872,9 @@ module Aws::S3
7413
7872
  #
7414
7873
  # The following operations are related to `GetObject`:
7415
7874
  #
7416
- # * [ListBuckets][7]
7875
+ # * [ListBuckets][8]
7417
7876
  #
7418
- # * [GetObjectAcl][8]
7877
+ # * [GetObjectAcl][9]
7419
7878
  #
7420
7879
  #
7421
7880
  #
@@ -7425,8 +7884,9 @@ module Aws::S3
7425
7884
  # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
7426
7885
  # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
7427
7886
  # [6]: https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html
7428
- # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html
7429
- # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
7887
+ # [7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
7888
+ # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html
7889
+ # [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
7430
7890
  #
7431
7891
  # @option params [String, IO] :response_target
7432
7892
  # Where to write response data, file path, or IO object.
@@ -7723,10 +8183,10 @@ module Aws::S3
7723
8183
  # @option params [String] :checksum_mode
7724
8184
  # To retrieve the checksum, this mode must be enabled.
7725
8185
  #
7726
- # In addition, if you enable checksum mode and the object is uploaded
7727
- # with a [checksum][1] and encrypted with an Key Management Service
7728
- # (KMS) key, you must have permission to use the `kms:Decrypt` action to
7729
- # retrieve the checksum.
8186
+ # **General purpose buckets** - In addition, if you enable checksum mode
8187
+ # and the object is uploaded with a [checksum][1] and encrypted with an
8188
+ # Key Management Service (KMS) key, you must have permission to use the
8189
+ # `kms:Decrypt` action to retrieve the checksum.
7730
8190
  #
7731
8191
  #
7732
8192
  #
@@ -7773,49 +8233,49 @@ module Aws::S3
7773
8233
  # * {Types::GetObjectOutput#object_lock_legal_hold_status #object_lock_legal_hold_status} => String
7774
8234
  #
7775
8235
  #
7776
- # @example Example: To retrieve an object
8236
+ # @example Example: To retrieve a byte range of an object
7777
8237
  #
7778
- # # The following example retrieves an object for an S3 bucket.
8238
+ # # The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a
8239
+ # # specific byte range.
7779
8240
  #
7780
8241
  # resp = client.get_object({
7781
8242
  # bucket: "examplebucket",
7782
- # key: "HappyFace.jpg",
8243
+ # key: "SampleFile.txt",
8244
+ # range: "bytes=0-9",
7783
8245
  # })
7784
8246
  #
7785
8247
  # resp.to_h outputs the following:
7786
8248
  # {
7787
8249
  # accept_ranges: "bytes",
7788
- # content_length: 3191,
7789
- # content_type: "image/jpeg",
7790
- # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
7791
- # last_modified: Time.parse("Thu, 15 Dec 2016 01:19:41 GMT"),
8250
+ # content_length: 10,
8251
+ # content_range: "bytes 0-9/43",
8252
+ # content_type: "text/plain",
8253
+ # etag: "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
8254
+ # last_modified: Time.parse("Thu, 09 Oct 2014 22:57:28 GMT"),
7792
8255
  # metadata: {
7793
8256
  # },
7794
- # tag_count: 2,
7795
8257
  # version_id: "null",
7796
8258
  # }
7797
8259
  #
7798
- # @example Example: To retrieve a byte range of an object
8260
+ # @example Example: To retrieve an object
7799
8261
  #
7800
- # # The following example retrieves an object for an S3 bucket. The request specifies the range header to retrieve a
7801
- # # specific byte range.
8262
+ # # The following example retrieves an object for an S3 bucket.
7802
8263
  #
7803
8264
  # resp = client.get_object({
7804
8265
  # bucket: "examplebucket",
7805
- # key: "SampleFile.txt",
7806
- # range: "bytes=0-9",
8266
+ # key: "HappyFace.jpg",
7807
8267
  # })
7808
8268
  #
7809
8269
  # resp.to_h outputs the following:
7810
8270
  # {
7811
8271
  # accept_ranges: "bytes",
7812
- # content_length: 10,
7813
- # content_range: "bytes 0-9/43",
7814
- # content_type: "text/plain",
7815
- # etag: "\"0d94420ffd0bc68cd3d152506b97a9cc\"",
7816
- # last_modified: Time.parse("Thu, 09 Oct 2014 22:57:28 GMT"),
8272
+ # content_length: 3191,
8273
+ # content_type: "image/jpeg",
8274
+ # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
8275
+ # last_modified: Time.parse("Thu, 15 Dec 2016 01:19:41 GMT"),
7817
8276
  # metadata: {
7818
8277
  # },
8278
+ # tag_count: 2,
7819
8279
  # version_id: "null",
7820
8280
  # }
7821
8281
  #
@@ -8128,7 +8588,7 @@ module Aws::S3
8128
8588
  # Permissions
8129
8589
  # : * **General purpose bucket permissions** - To use
8130
8590
  # `GetObjectAttributes`, you must have READ access to the object.
8131
- # The permissions that you need to use this operation with depend on
8591
+ # The permissions that you need to use this operation depend on
8132
8592
  # whether the bucket is versioned. If the bucket is versioned, you
8133
8593
  # need both the `s3:GetObjectVersion` and
8134
8594
  # `s3:GetObjectVersionAttributes` permissions for this operation. If
@@ -8162,6 +8622,10 @@ module Aws::S3
8162
8622
  # interruptions when a session expires. For more information about
8163
8623
  # authorization, see [ `CreateSession` ][3].
8164
8624
  #
8625
+ # If the object is encrypted with SSE-KMS, you must also have the
8626
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
8627
+ # identity-based policies and KMS key policies for the KMS key.
8628
+ #
8165
8629
  # Encryption
8166
8630
  # : <note markdown="1"> Encryption request headers, like `x-amz-server-side-encryption`,
8167
8631
  # should not be sent for `HEAD` requests if your object uses
@@ -8195,9 +8659,19 @@ module Aws::S3
8195
8659
  # Customer-Provided Encryption Keys)][4] in the *Amazon S3 User
8196
8660
  # Guide*.
8197
8661
  #
8198
- # <note markdown="1"> **Directory bucket permissions** - For directory buckets, only
8199
- # server-side encryption with Amazon S3 managed keys (SSE-S3)
8200
- # (`AES256`) is supported.
8662
+ # <note markdown="1"> **Directory bucket permissions** - For directory buckets, there are
8663
+ # only two supported options for server-side encryption: server-side
8664
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
8665
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
8666
+ # recommend that the bucket's default encryption uses the desired
8667
+ # encryption configuration and you don't override the bucket default
8668
+ # encryption in your `CreateSession` requests or `PUT` object
8669
+ # requests. Then, new objects are automatically encrypted with the
8670
+ # desired encryption settings. For more information, see [Protecting
8671
+ # data with server-side encryption][5] in the *Amazon S3 User Guide*.
8672
+ # For more information about the encryption overriding behaviors in
8673
+ # directory buckets, see [Specifying server-side encryption with KMS
8674
+ # for new object uploads][6].
8201
8675
  #
8202
8676
  # </note>
8203
8677
  #
@@ -8221,7 +8695,7 @@ module Aws::S3
8221
8695
  # * `If-Unmodified-Since` condition evaluates to `false`.
8222
8696
  #
8223
8697
  # For more information about conditional requests, see [RFC
8224
- # 7232][5].
8698
+ # 7232][7].
8225
8699
  #
8226
8700
  # * If both of the `If-None-Match` and `If-Modified-Since` headers are
8227
8701
  # present in the request as follows, then Amazon S3 returns the HTTP
@@ -8232,7 +8706,7 @@ module Aws::S3
8232
8706
  # * `If-Modified-Since` condition evaluates to `true`.
8233
8707
  #
8234
8708
  # For more information about conditional requests, see [RFC
8235
- # 7232][5].
8709
+ # 7232][7].
8236
8710
  #
8237
8711
  # HTTP Host header syntax
8238
8712
  #
@@ -8241,21 +8715,21 @@ module Aws::S3
8241
8715
  #
8242
8716
  # The following actions are related to `GetObjectAttributes`:
8243
8717
  #
8244
- # * [GetObject][6]
8718
+ # * [GetObject][8]
8245
8719
  #
8246
- # * [GetObjectAcl][7]
8720
+ # * [GetObjectAcl][9]
8247
8721
  #
8248
- # * [GetObjectLegalHold][8]
8722
+ # * [GetObjectLegalHold][10]
8249
8723
  #
8250
- # * [GetObjectLockConfiguration][9]
8724
+ # * [GetObjectLockConfiguration][11]
8251
8725
  #
8252
- # * [GetObjectRetention][10]
8726
+ # * [GetObjectRetention][12]
8253
8727
  #
8254
- # * [GetObjectTagging][11]
8728
+ # * [GetObjectTagging][13]
8255
8729
  #
8256
- # * [HeadObject][12]
8730
+ # * [HeadObject][14]
8257
8731
  #
8258
- # * [ListParts][13]
8732
+ # * [ListParts][15]
8259
8733
  #
8260
8734
  #
8261
8735
  #
@@ -8263,15 +8737,17 @@ module Aws::S3
8263
8737
  # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html
8264
8738
  # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
8265
8739
  # [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
8266
- # [5]: https://tools.ietf.org/html/rfc7232
8267
- # [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
8268
- # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
8269
- # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html
8270
- # [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html
8271
- # [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html
8272
- # [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
8273
- # [12]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html
8274
- # [13]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
8740
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
8741
+ # [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
8742
+ # [7]: https://tools.ietf.org/html/rfc7232
8743
+ # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
8744
+ # [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
8745
+ # [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html
8746
+ # [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html
8747
+ # [12]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html
8748
+ # [13]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
8749
+ # [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html
8750
+ # [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
8275
8751
  #
8276
8752
  # @option params [required, String] :bucket
8277
8753
  # The name of the bucket that contains the object.
@@ -9263,7 +9739,11 @@ module Aws::S3
9263
9739
  # have the `s3:GetObject` permission. You need the relevant read
9264
9740
  # object (or version) permission for this operation. For more
9265
9741
  # information, see [Actions, resources, and condition keys for
9266
- # Amazon S3][2] in the *Amazon S3 User Guide*.
9742
+ # Amazon S3][2] in the *Amazon S3 User Guide*. For more information
9743
+ # about the permissions to S3 API operations by S3 resource types,
9744
+ # see [Required permissions for Amazon S3 API
9745
+ # operations](/AmazonS3/latest/userguide/using-with-s3-policy-actions.html)
9746
+ # in the *Amazon S3 User Guide*.
9267
9747
  #
9268
9748
  # If the object you request doesn't exist, the error that Amazon S3
9269
9749
  # returns depends on whether you also have the `s3:ListBucket`
@@ -9290,6 +9770,13 @@ module Aws::S3
9290
9770
  # interruptions when a session expires. For more information about
9291
9771
  # authorization, see [ `CreateSession` ][3].
9292
9772
  #
9773
+ # If you enable `x-amz-checksum-mode` in the request and the object
9774
+ # is encrypted with Amazon Web Services Key Management Service
9775
+ # (Amazon Web Services KMS), you must also have the
9776
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
9777
+ # identity-based policies and KMS key policies for the KMS key to
9778
+ # retrieve the checksum of the object.
9779
+ #
9293
9780
  # Encryption
9294
9781
  # : <note markdown="1"> Encryption request headers, like `x-amz-server-side-encryption`,
9295
9782
  # should not be sent for `HEAD` requests if your object uses
@@ -9323,9 +9810,10 @@ module Aws::S3
9323
9810
  # Customer-Provided Encryption Keys)][4] in the *Amazon S3 User
9324
9811
  # Guide*.
9325
9812
  #
9326
- # <note markdown="1"> **Directory bucket permissions** - For directory buckets, only
9327
- # server-side encryption with Amazon S3 managed keys (SSE-S3)
9328
- # (`AES256`) is supported.
9813
+ # <note markdown="1"> <b>Directory bucket </b> - For directory buckets, there are only two
9814
+ # supported options for server-side encryption: SSE-S3 and SSE-KMS.
9815
+ # SSE-C isn't supported. For more information, see [Protecting data
9816
+ # with server-side encryption][5] in the *Amazon S3 User Guide*.
9329
9817
  #
9330
9818
  # </note>
9331
9819
  #
@@ -9359,15 +9847,15 @@ module Aws::S3
9359
9847
  # requests in the format
9360
9848
  # `https://bucket_name.s3express-az_id.region.amazonaws.com/key-name
9361
9849
  # `. Path-style requests are not supported. For more information, see
9362
- # [Regional and Zonal endpoints][5] in the *Amazon S3 User Guide*.
9850
+ # [Regional and Zonal endpoints][6] in the *Amazon S3 User Guide*.
9363
9851
  #
9364
9852
  # </note>
9365
9853
  #
9366
9854
  # The following actions are related to `HeadObject`:
9367
9855
  #
9368
- # * [GetObject][6]
9856
+ # * [GetObject][7]
9369
9857
  #
9370
- # * [GetObjectAttributes][7]
9858
+ # * [GetObjectAttributes][8]
9371
9859
  #
9372
9860
  #
9373
9861
  #
@@ -9375,9 +9863,10 @@ module Aws::S3
9375
9863
  # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html
9376
9864
  # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
9377
9865
  # [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
9378
- # [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
9379
- # [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
9380
- # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html
9866
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
9867
+ # [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
9868
+ # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
9869
+ # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html
9381
9870
  #
9382
9871
  # @option params [required, String] :bucket
9383
9872
  # The name of the bucket that contains the object.
@@ -9593,10 +10082,16 @@ module Aws::S3
9593
10082
  # @option params [String] :checksum_mode
9594
10083
  # To retrieve the checksum, this parameter must be enabled.
9595
10084
  #
9596
- # In addition, if you enable checksum mode and the object is uploaded
9597
- # with a [checksum][1] and encrypted with an Key Management Service
9598
- # (KMS) key, you must have permission to use the `kms:Decrypt` action to
9599
- # retrieve the checksum.
10085
+ # **General purpose buckets** - If you enable checksum mode and the
10086
+ # object is uploaded with a [checksum][1] and encrypted with an Key
10087
+ # Management Service (KMS) key, you must have permission to use the
10088
+ # `kms:Decrypt` action to retrieve the checksum.
10089
+ #
10090
+ # **Directory buckets** - If you enable `ChecksumMode` and the object is
10091
+ # encrypted with Amazon Web Services Key Management Service (Amazon Web
10092
+ # Services KMS), you must also have the `kms:GenerateDataKey` and
10093
+ # `kms:Decrypt` permissions in IAM identity-based policies and KMS key
10094
+ # policies for the KMS key to retrieve the checksum of the object.
9600
10095
  #
9601
10096
  #
9602
10097
  #
@@ -12592,24 +13087,73 @@ module Aws::S3
12592
13087
  req.send_request(options)
12593
13088
  end
12594
13089
 
12595
- # <note markdown="1"> This operation is not supported by directory buckets.
13090
+ # This operation configures default encryption and Amazon S3 Bucket Keys
13091
+ # for an existing bucket.
12596
13092
  #
12597
- # </note>
13093
+ # <note markdown="1"> <b>Directory buckets </b> - For directory buckets, you must make
13094
+ # requests for this API operation to the Regional endpoint. These
13095
+ # endpoints support path-style requests in the format
13096
+ # `https://s3express-control.region_code.amazonaws.com/bucket-name `.
13097
+ # Virtual-hosted-style requests aren't supported. For more information,
13098
+ # see [Regional and Zonal endpoints][1] in the *Amazon S3 User Guide*.
12598
13099
  #
12599
- # This action uses the `encryption` subresource to configure default
12600
- # encryption and Amazon S3 Bucket Keys for an existing bucket.
13100
+ # </note>
12601
13101
  #
12602
13102
  # By default, all buckets have a default encryption configuration that
12603
- # uses server-side encryption with Amazon S3 managed keys (SSE-S3). You
12604
- # can optionally configure default encryption for a bucket by using
12605
- # server-side encryption with Key Management Service (KMS) keys
12606
- # (SSE-KMS) or dual-layer server-side encryption with Amazon Web
12607
- # Services KMS keys (DSSE-KMS). If you specify default encryption by
12608
- # using SSE-KMS, you can also configure [Amazon S3 Bucket Keys][1]. If
12609
- # you use PutBucketEncryption to set your [default bucket encryption][2]
12610
- # to SSE-KMS, you should verify that your KMS key ID is correct. Amazon
12611
- # S3 does not validate the KMS key ID provided in PutBucketEncryption
12612
- # requests.
13103
+ # uses server-side encryption with Amazon S3 managed keys (SSE-S3).
13104
+ #
13105
+ # <note markdown="1"> * **General purpose buckets**
13106
+ #
13107
+ # * You can optionally configure default encryption for a bucket by
13108
+ # using server-side encryption with Key Management Service (KMS)
13109
+ # keys (SSE-KMS) or dual-layer server-side encryption with Amazon
13110
+ # Web Services KMS keys (DSSE-KMS). If you specify default
13111
+ # encryption by using SSE-KMS, you can also configure [Amazon S3
13112
+ # Bucket Keys][2]. For information about the bucket default
13113
+ # encryption feature, see [Amazon S3 Bucket Default Encryption][3]
13114
+ # in the *Amazon S3 User Guide*.
13115
+ #
13116
+ # * If you use PutBucketEncryption to set your [default bucket
13117
+ # encryption][3] to SSE-KMS, you should verify that your KMS key ID
13118
+ # is correct. Amazon S3 doesn't validate the KMS key ID provided in
13119
+ # PutBucketEncryption requests.
13120
+ #
13121
+ # * <b>Directory buckets </b> - You can optionally configure default
13122
+ # encryption for a bucket by using server-side encryption with Key
13123
+ # Management Service (KMS) keys (SSE-KMS).
13124
+ #
13125
+ # * We recommend that the bucket's default encryption uses the
13126
+ # desired encryption configuration and you don't override the
13127
+ # bucket default encryption in your `CreateSession` requests or
13128
+ # `PUT` object requests. Then, new objects are automatically
13129
+ # encrypted with the desired encryption settings. For more
13130
+ # information about the encryption overriding behaviors in directory
13131
+ # buckets, see [Specifying server-side encryption with KMS for new
13132
+ # object uploads][4].
13133
+ #
13134
+ # * Your SSE-KMS configuration can only support 1 [customer managed
13135
+ # key][5] per directory bucket for the lifetime of the bucket.
13136
+ # [Amazon Web Services managed key][6] (`aws/s3`) isn't supported.
13137
+ #
13138
+ # * S3 Bucket Keys are always enabled for `GET` and `PUT` operations
13139
+ # in a directory bucket and can’t be disabled. S3 Bucket Keys
13140
+ # aren't supported, when you copy SSE-KMS encrypted objects from
13141
+ # general purpose buckets to directory buckets, from directory
13142
+ # buckets to general purpose buckets, or between directory buckets,
13143
+ # through [CopyObject][7], [UploadPartCopy][8], [the Copy operation
13144
+ # in Batch Operations][9], or [the import jobs][10]. In this case,
13145
+ # Amazon S3 makes a call to KMS every time a copy request is made
13146
+ # for a KMS-encrypted object.
13147
+ #
13148
+ # * When you specify an [KMS customer managed key][5] for encryption
13149
+ # in your directory bucket, only use the key ID or key ARN. The key
13150
+ # alias format of the KMS key isn't supported.
13151
+ #
13152
+ # * For directory buckets, if you use PutBucketEncryption to set your
13153
+ # [default bucket encryption][3] to SSE-KMS, Amazon S3 validates the
13154
+ # KMS key ID provided in PutBucketEncryption requests.
13155
+ #
13156
+ # </note>
12613
13157
  #
12614
13158
  # If you're specifying a customer managed KMS key, we recommend using a
12615
13159
  # fully qualified KMS key ARN. If you use a KMS key alias instead, then
@@ -12619,45 +13163,80 @@ module Aws::S3
12619
13163
  #
12620
13164
  # Also, this action requires Amazon Web Services Signature Version 4.
12621
13165
  # For more information, see [ Authenticating Requests (Amazon Web
12622
- # Services Signature Version 4)][3].
13166
+ # Services Signature Version 4)][11].
12623
13167
  #
12624
- # To use this operation, you must have permission to perform the
12625
- # `s3:PutEncryptionConfiguration` action. The bucket owner has this
12626
- # permission by default. The bucket owner can grant this permission to
12627
- # others. For more information about permissions, see [Permissions
12628
- # Related to Bucket Subresource Operations][4] and [Managing Access
12629
- # Permissions to Your Amazon S3 Resources][5] in the *Amazon S3 User
12630
- # Guide*.
13168
+ # Permissions
13169
+ # : * **General purpose bucket permissions** - The
13170
+ # `s3:PutEncryptionConfiguration` permission is required in a
13171
+ # policy. The bucket owner has this permission by default. The
13172
+ # bucket owner can grant this permission to others. For more
13173
+ # information about permissions, see [Permissions Related to Bucket
13174
+ # Operations][12] and [Managing Access Permissions to Your Amazon S3
13175
+ # Resources][13] in the *Amazon S3 User Guide*.
13176
+ #
13177
+ # * **Directory bucket permissions** - To grant access to this API
13178
+ # operation, you must have the
13179
+ # `s3express:PutEncryptionConfiguration` permission in an IAM
13180
+ # identity-based policy instead of a bucket policy. Cross-account
13181
+ # access to this API operation isn't supported. This operation can
13182
+ # only be performed by the Amazon Web Services account that owns the
13183
+ # resource. For more information about directory bucket policies and
13184
+ # permissions, see [Amazon Web Services Identity and Access
13185
+ # Management (IAM) for S3 Express One Zone][14] in the *Amazon S3
13186
+ # User Guide*.
13187
+ #
13188
+ # To set a directory bucket default encryption with SSE-KMS, you
13189
+ # must also have the `kms:GenerateDataKey` and the `kms:Decrypt`
13190
+ # permissions in IAM identity-based policies and KMS key policies
13191
+ # for the target KMS key.
13192
+ #
13193
+ # HTTP Host header syntax
13194
+ #
13195
+ # : <b>Directory buckets </b> - The HTTP Host header syntax is
13196
+ # `s3express-control.region.amazonaws.com`.
12631
13197
  #
12632
13198
  # The following operations are related to `PutBucketEncryption`:
12633
13199
  #
12634
- # * [GetBucketEncryption][6]
13200
+ # * [GetBucketEncryption][15]
12635
13201
  #
12636
- # * [DeleteBucketEncryption][7]
13202
+ # * [DeleteBucketEncryption][16]
12637
13203
  #
12638
13204
  #
12639
13205
  #
12640
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
12641
- # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
12642
- # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
12643
- # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
12644
- # [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
12645
- # [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html
12646
- # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html
13206
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
13207
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
13208
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
13209
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
13210
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
13211
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
13212
+ # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
13213
+ # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
13214
+ # [9]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
13215
+ # [10]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
13216
+ # [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
13217
+ # [12]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
13218
+ # [13]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
13219
+ # [14]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
13220
+ # [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html
13221
+ # [16]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html
12647
13222
  #
12648
13223
  # @option params [required, String] :bucket
12649
13224
  # Specifies default encryption for a bucket using server-side encryption
12650
- # with different key options. By default, all buckets have a default
12651
- # encryption configuration that uses server-side encryption with Amazon
12652
- # S3 managed keys (SSE-S3). You can optionally configure default
12653
- # encryption for a bucket by using server-side encryption with an Amazon
12654
- # Web Services KMS key (SSE-KMS) or a customer-provided key (SSE-C). For
12655
- # information about the bucket default encryption feature, see [Amazon
12656
- # S3 Bucket Default Encryption][1] in the *Amazon S3 User Guide*.
13225
+ # with different key options.
13226
+ #
13227
+ # <b>Directory buckets </b> - When you use this operation with a
13228
+ # directory bucket, you must use path-style requests in the format
13229
+ # `https://s3express-control.region_code.amazonaws.com/bucket-name `.
13230
+ # Virtual-hosted-style requests aren't supported. Directory bucket
13231
+ # names must be unique in the chosen Availability Zone. Bucket names
13232
+ # must also follow the format ` bucket_base_name--az_id--x-s3` (for
13233
+ # example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
13234
+ # bucket naming restrictions, see [Directory bucket naming rules][1] in
13235
+ # the *Amazon S3 User Guide*
12657
13236
  #
12658
13237
  #
12659
13238
  #
12660
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
13239
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
12661
13240
  #
12662
13241
  # @option params [String] :content_md5
12663
13242
  # The base64-encoded 128-bit MD5 digest of the server-side encryption
@@ -12667,6 +13246,10 @@ module Aws::S3
12667
13246
  # (CLI) or Amazon Web Services SDKs, this field is calculated
12668
13247
  # automatically.
12669
13248
  #
13249
+ # <note markdown="1"> This functionality is not supported for directory buckets.
13250
+ #
13251
+ # </note>
13252
+ #
12670
13253
  # @option params [String] :checksum_algorithm
12671
13254
  # Indicates the algorithm used to create the checksum for the object
12672
13255
  # when you use the SDK. This header will not provide any additional
@@ -12679,6 +13262,11 @@ module Aws::S3
12679
13262
  # If you provide an individual checksum, Amazon S3 ignores any provided
12680
13263
  # `ChecksumAlgorithm` parameter.
12681
13264
  #
13265
+ # <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
13266
+ # is the default checksum algorithm that's used for performance.
13267
+ #
13268
+ # </note>
13269
+ #
12682
13270
  #
12683
13271
  #
12684
13272
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -12691,6 +13279,12 @@ module Aws::S3
12691
13279
  # you provide does not match the actual owner of the bucket, the request
12692
13280
  # fails with the HTTP status code `403 Forbidden` (access denied).
12693
13281
  #
13282
+ # <note markdown="1"> For directory buckets, this header is not supported in this API
13283
+ # operation. If you specify this header, the request fails with the HTTP
13284
+ # status code `501 Not Implemented`.
13285
+ #
13286
+ # </note>
13287
+ #
12694
13288
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
12695
13289
  #
12696
13290
  # @example Request syntax with placeholder values
@@ -13161,23 +13755,22 @@ module Aws::S3
13161
13755
  # lifecycle configuration. For information about lifecycle
13162
13756
  # configuration, see [Managing your storage lifecycle][1].
13163
13757
  #
13164
- # <note markdown="1"> Bucket lifecycle configuration now supports specifying a lifecycle
13165
- # rule using an object key name prefix, one or more object tags, object
13166
- # size, or any combination of these. Accordingly, this section describes
13167
- # the latest API. The previous version of the API supported filtering
13168
- # based only on an object key name prefix, which is supported for
13169
- # backward compatibility. For the related API description, see
13170
- # [PutBucketLifecycle][2].
13171
- #
13172
- # </note>
13173
- #
13174
13758
  # Rules
13175
13759
  #
13176
13760
  # : You specify the lifecycle configuration in your request body. The
13177
13761
  # lifecycle configuration is specified as XML consisting of one or
13178
13762
  # more rules. An Amazon S3 Lifecycle configuration can have up to
13179
- # 1,000 rules. This limit is not adjustable. Each rule consists of the
13180
- # following:
13763
+ # 1,000 rules. This limit is not adjustable.
13764
+ #
13765
+ # Bucket lifecycle configuration supports specifying a lifecycle rule
13766
+ # using an object key name prefix, one or more object tags, object
13767
+ # size, or any combination of these. Accordingly, this section
13768
+ # describes the latest API. The previous version of the API supported
13769
+ # filtering based only on an object key name prefix, which is
13770
+ # supported for backward compatibility. For the related API
13771
+ # description, see [PutBucketLifecycle][2].
13772
+ #
13773
+ # A lifecycle rule consists of the following:
13181
13774
  #
13182
13775
  # * A filter identifying a subset of objects to which the rule
13183
13776
  # applies. The filter can be based on a key name prefix, object
@@ -13268,7 +13861,26 @@ module Aws::S3
13268
13861
  # you provide does not match the actual owner of the bucket, the request
13269
13862
  # fails with the HTTP status code `403 Forbidden` (access denied).
13270
13863
  #
13271
- # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
13864
+ # @option params [String] :transition_default_minimum_object_size
13865
+ # Indicates which default minimum object size behavior is applied to the
13866
+ # lifecycle configuration.
13867
+ #
13868
+ # * `all_storage_classes_128K` - Objects smaller than 128 KB will not
13869
+ # transition to any storage class by default.
13870
+ #
13871
+ # * `varies_by_storage_class` - Objects smaller than 128 KB will
13872
+ # transition to Glacier Flexible Retrieval or Glacier Deep Archive
13873
+ # storage classes. By default, all other storage classes will prevent
13874
+ # transitions smaller than 128 KB.
13875
+ #
13876
+ # To customize the minimum object size for any transition you can add a
13877
+ # filter that specifies a custom `ObjectSizeGreaterThan` or
13878
+ # `ObjectSizeLessThan` in the body of your transition rule. Custom
13879
+ # filters always take precedence over the default transition behavior.
13880
+ #
13881
+ # @return [Types::PutBucketLifecycleConfigurationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
13882
+ #
13883
+ # * {Types::PutBucketLifecycleConfigurationOutput#transition_default_minimum_object_size #transition_default_minimum_object_size} => String
13272
13884
  #
13273
13885
  #
13274
13886
  # @example Example: Put bucket lifecycle
@@ -13360,8 +13972,13 @@ module Aws::S3
13360
13972
  # ],
13361
13973
  # },
13362
13974
  # expected_bucket_owner: "AccountId",
13975
+ # transition_default_minimum_object_size: "varies_by_storage_class", # accepts varies_by_storage_class, all_storage_classes_128K
13363
13976
  # })
13364
13977
  #
13978
+ # @example Response structure
13979
+ #
13980
+ # resp.transition_default_minimum_object_size #=> String, one of "varies_by_storage_class", "all_storage_classes_128K"
13981
+ #
13365
13982
  # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration AWS API Documentation
13366
13983
  #
13367
13984
  # @overload put_bucket_lifecycle_configuration(params = {})
@@ -14114,13 +14731,13 @@ module Aws::S3
14114
14731
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
14115
14732
  # the supported algorithm from the following list:
14116
14733
  #
14117
- # * CRC32
14734
+ # * `CRC32`
14118
14735
  #
14119
- # * CRC32C
14736
+ # * `CRC32C`
14120
14737
  #
14121
- # * SHA1
14738
+ # * `SHA1`
14122
14739
  #
14123
- # * SHA256
14740
+ # * `SHA256`
14124
14741
  #
14125
14742
  # For more information, see [Checking object integrity][1] in the
14126
14743
  # *Amazon S3 User Guide*.
@@ -15088,6 +15705,10 @@ module Aws::S3
15088
15705
  # interruptions when a session expires. For more information about
15089
15706
  # authorization, see [ `CreateSession` ][5].
15090
15707
  #
15708
+ # If the object is encrypted with SSE-KMS, you must also have the
15709
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
15710
+ # identity-based policies and KMS key policies for the KMS key.
15711
+ #
15091
15712
  # Data integrity with Content-MD5
15092
15713
  # : * **General purpose bucket** - To ensure that data is not corrupted
15093
15714
  # traversing the network, use the `Content-MD5` header. When you use
@@ -15291,13 +15912,13 @@ module Aws::S3
15291
15912
  # For the `x-amz-checksum-algorithm ` header, replace ` algorithm ` with
15292
15913
  # the supported algorithm from the following list:
15293
15914
  #
15294
- # * CRC32
15915
+ # * `CRC32`
15295
15916
  #
15296
- # * CRC32C
15917
+ # * `CRC32C`
15297
15918
  #
15298
- # * SHA1
15919
+ # * `SHA1`
15299
15920
  #
15300
- # * SHA256
15921
+ # * `SHA256`
15301
15922
  #
15302
15923
  # For more information, see [Checking object integrity][1] in the
15303
15924
  # *Amazon S3 User Guide*.
@@ -15320,9 +15941,9 @@ module Aws::S3
15320
15941
  # @option params [String] :checksum_crc32
15321
15942
  # This header can be used as a data integrity check to verify that the
15322
15943
  # data received is the same data that was originally sent. This header
15323
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
15324
- # more information, see [Checking object integrity][1] in the *Amazon S3
15325
- # User Guide*.
15944
+ # specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
15945
+ # For more information, see [Checking object integrity][1] in the
15946
+ # *Amazon S3 User Guide*.
15326
15947
  #
15327
15948
  #
15328
15949
  #
@@ -15331,7 +15952,7 @@ module Aws::S3
15331
15952
  # @option params [String] :checksum_crc32c
15332
15953
  # This header can be used as a data integrity check to verify that the
15333
15954
  # data received is the same data that was originally sent. This header
15334
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
15955
+ # specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
15335
15956
  # For more information, see [Checking object integrity][1] in the
15336
15957
  # *Amazon S3 User Guide*.
15337
15958
  #
@@ -15437,25 +16058,65 @@ module Aws::S3
15437
16058
  # object in Amazon S3 (for example, `AES256`, `aws:kms`,
15438
16059
  # `aws:kms:dsse`).
15439
16060
  #
15440
- # <b>General purpose buckets </b> - You have four mutually exclusive
15441
- # options to protect data using server-side encryption in Amazon S3,
15442
- # depending on how you choose to manage the encryption keys.
15443
- # Specifically, the encryption key options are Amazon S3 managed keys
15444
- # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
15445
- # customer-provided keys (SSE-C). Amazon S3 encrypts data with
15446
- # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
15447
- # default. You can optionally tell Amazon S3 to encrypt data at rest by
15448
- # using server-side encryption with other key options. For more
15449
- # information, see [Using Server-Side Encryption][1] in the *Amazon S3
15450
- # User Guide*.
16061
+ # * <b>General purpose buckets </b> - You have four mutually exclusive
16062
+ # options to protect data using server-side encryption in Amazon S3,
16063
+ # depending on how you choose to manage the encryption keys.
16064
+ # Specifically, the encryption key options are Amazon S3 managed keys
16065
+ # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
16066
+ # customer-provided keys (SSE-C). Amazon S3 encrypts data with
16067
+ # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
16068
+ # default. You can optionally tell Amazon S3 to encrypt data at rest
16069
+ # by using server-side encryption with other key options. For more
16070
+ # information, see [Using Server-Side Encryption][1] in the *Amazon S3
16071
+ # User Guide*.
15451
16072
  #
15452
- # <b>Directory buckets </b> - For directory buckets, only the
15453
- # server-side encryption with Amazon S3 managed keys (SSE-S3) (`AES256`)
15454
- # value is supported.
16073
+ # * <b>Directory buckets </b> - For directory buckets, there are only
16074
+ # two supported options for server-side encryption: server-side
16075
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
16076
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
16077
+ # recommend that the bucket's default encryption uses the desired
16078
+ # encryption configuration and you don't override the bucket default
16079
+ # encryption in your `CreateSession` requests or `PUT` object
16080
+ # requests. Then, new objects are automatically encrypted with the
16081
+ # desired encryption settings. For more information, see [Protecting
16082
+ # data with server-side encryption][2] in the *Amazon S3 User Guide*.
16083
+ # For more information about the encryption overriding behaviors in
16084
+ # directory buckets, see [Specifying server-side encryption with KMS
16085
+ # for new object uploads][3].
16086
+ #
16087
+ # In the Zonal endpoint API calls (except [CopyObject][4] and
16088
+ # [UploadPartCopy][5]) using the REST API, the encryption request
16089
+ # headers must match the encryption settings that are specified in the
16090
+ # `CreateSession` request. You can't override the values of the
16091
+ # encryption settings (`x-amz-server-side-encryption`,
16092
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
16093
+ # `x-amz-server-side-encryption-context`, and
16094
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
16095
+ # specified in the `CreateSession` request. You don't need to
16096
+ # explicitly specify these encryption settings values in Zonal
16097
+ # endpoint API calls, and Amazon S3 will use the encryption settings
16098
+ # values from the `CreateSession` request to protect new objects in
16099
+ # the directory bucket.
16100
+ #
16101
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
16102
+ # `CreateSession`, the session token refreshes automatically to avoid
16103
+ # service interruptions when a session expires. The CLI or the Amazon
16104
+ # Web Services SDKs use the bucket's default encryption configuration
16105
+ # for the `CreateSession` request. It's not supported to override the
16106
+ # encryption settings values in the `CreateSession` request. So in the
16107
+ # Zonal endpoint API calls (except [CopyObject][4] and
16108
+ # [UploadPartCopy][5]), the encryption request headers must match the
16109
+ # default encryption configuration of the directory bucket.
16110
+ #
16111
+ # </note>
15455
16112
  #
15456
16113
  #
15457
16114
  #
15458
16115
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
16116
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
16117
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
16118
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
16119
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
15459
16120
  #
15460
16121
  # @option params [String] :storage_class
15461
16122
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
@@ -15535,46 +16196,83 @@ module Aws::S3
15535
16196
  # </note>
15536
16197
  #
15537
16198
  # @option params [String] :ssekms_key_id
15538
- # If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
15539
- # `aws:kms:dsse`, this header specifies the ID (Key ID, Key ARN, or Key
15540
- # Alias) of the Key Management Service (KMS) symmetric encryption
15541
- # customer managed key that was used for the object. If you specify
15542
- # `x-amz-server-side-encryption:aws:kms` or
15543
- # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
15544
- # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
15545
- # Amazon Web Services managed key (`aws/s3`) to protect the data. If the
15546
- # KMS key does not exist in the same account that's issuing the
15547
- # command, you must use the full ARN and not just the ID.
16199
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
16200
+ # object encryption. If the KMS key doesn't exist in the same account
16201
+ # that's issuing the command, you must use the full Key ARN not the Key
16202
+ # ID.
16203
+ #
16204
+ # **General purpose buckets** - If you specify
16205
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
16206
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
16207
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
16208
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
16209
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
16210
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
16211
+ #
16212
+ # **Directory buckets** - If you specify `x-amz-server-side-encryption`
16213
+ # with `aws:kms`, you must specify the `
16214
+ # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
16215
+ # ID or Key ARN) of the KMS symmetric encryption customer managed key to
16216
+ # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
16217
+ # key ID or key ARN. The key alias format of the KMS key isn't
16218
+ # supported. Your SSE-KMS configuration can only support 1 [customer
16219
+ # managed key][1] per directory bucket for the lifetime of the bucket.
16220
+ # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
16221
+ #
16222
+ #
16223
+ #
16224
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
16225
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
15548
16226
  #
15549
- # <note markdown="1"> This functionality is not supported for directory buckets.
16227
+ # @option params [String] :ssekms_encryption_context
16228
+ # Specifies the Amazon Web Services KMS Encryption Context as an
16229
+ # additional encryption context to use for object encryption. The value
16230
+ # of this header is a Base64-encoded string of a UTF-8 encoded JSON,
16231
+ # which contains the encryption context as key-value pairs. This value
16232
+ # is stored as object metadata and automatically gets passed on to
16233
+ # Amazon Web Services KMS for future `GetObject` operations on this
16234
+ # object.
15550
16235
  #
15551
- # </note>
16236
+ # **General purpose buckets** - This value must be explicitly added
16237
+ # during `CopyObject` operations if you want an additional encryption
16238
+ # context for your object. For more information, see [Encryption
16239
+ # context][1] in the *Amazon S3 User Guide*.
15552
16240
  #
15553
- # @option params [String] :ssekms_encryption_context
15554
- # Specifies the Amazon Web Services KMS Encryption Context to use for
15555
- # object encryption. The value of this header is a base64-encoded UTF-8
15556
- # string holding JSON with the encryption context key-value pairs. This
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.
16241
+ # **Directory buckets** - You can optionally provide an explicit
16242
+ # encryption context value. The value must match the default encryption
16243
+ # context - the bucket Amazon Resource Name (ARN). An additional
16244
+ # encryption context value is not supported.
15561
16245
  #
15562
- # <note markdown="1"> This functionality is not supported for directory buckets.
15563
16246
  #
15564
- # </note>
16247
+ #
16248
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
15565
16249
  #
15566
16250
  # @option params [Boolean] :bucket_key_enabled
15567
16251
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
15568
16252
  # encryption with server-side encryption using Key Management Service
15569
- # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
15570
- # to use an S3 Bucket Key for object encryption with SSE-KMS.
16253
+ # (KMS) keys (SSE-KMS).
15571
16254
  #
15572
- # Specifying this header with a PUT action doesn’t affect bucket-level
15573
- # settings for S3 Bucket Key.
16255
+ # **General purpose buckets** - Setting this header to `true` causes
16256
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
16257
+ # Also, specifying this header with a PUT action doesn't affect
16258
+ # bucket-level settings for S3 Bucket Key.
16259
+ #
16260
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
16261
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
16262
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
16263
+ # from general purpose buckets to directory buckets, from directory
16264
+ # buckets to general purpose buckets, or between directory buckets,
16265
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
16266
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
16267
+ # makes a call to KMS every time a copy request is made for a
16268
+ # KMS-encrypted object.
15574
16269
  #
15575
- # <note markdown="1"> This functionality is not supported for directory buckets.
15576
16270
  #
15577
- # </note>
16271
+ #
16272
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
16273
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
16274
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
16275
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
15578
16276
  #
15579
16277
  # @option params [String] :request_payer
15580
16278
  # Confirms that the requester knows that they will be charged for the
@@ -15652,24 +16350,22 @@ module Aws::S3
15652
16350
  # * {Types::PutObjectOutput#request_charged #request_charged} => String
15653
16351
  #
15654
16352
  #
15655
- # @example Example: To upload an object (specify optional headers)
16353
+ # @example Example: To upload an object and specify canned ACL.
15656
16354
  #
15657
- # # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
15658
- # # storage class and use server-side encryption.
16355
+ # # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
16356
+ # # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
15659
16357
  #
15660
16358
  # resp = client.put_object({
15661
- # body: "HappyFace.jpg",
16359
+ # acl: "authenticated-read",
16360
+ # body: "filetoupload",
15662
16361
  # bucket: "examplebucket",
15663
- # key: "HappyFace.jpg",
15664
- # server_side_encryption: "AES256",
15665
- # storage_class: "STANDARD_IA",
16362
+ # key: "exampleobject",
15666
16363
  # })
15667
16364
  #
15668
16365
  # resp.to_h outputs the following:
15669
16366
  # {
15670
16367
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15671
- # server_side_encryption: "AES256",
15672
- # version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
16368
+ # version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
15673
16369
  # }
15674
16370
  #
15675
16371
  # @example Example: To create an object.
@@ -15723,63 +16419,65 @@ module Aws::S3
15723
16419
  # version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
15724
16420
  # }
15725
16421
  #
15726
- # @example Example: To upload an object and specify canned ACL.
16422
+ # @example Example: To upload an object and specify server-side encryption and object tags
15727
16423
  #
15728
- # # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
15729
- # # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
16424
+ # # The following example uploads an object. The request specifies the optional server-side encryption option. The request
16425
+ # # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
15730
16426
  #
15731
16427
  # resp = client.put_object({
15732
- # acl: "authenticated-read",
15733
16428
  # body: "filetoupload",
15734
16429
  # bucket: "examplebucket",
15735
16430
  # key: "exampleobject",
16431
+ # server_side_encryption: "AES256",
16432
+ # tagging: "key1=value1&key2=value2",
15736
16433
  # })
15737
16434
  #
15738
16435
  # resp.to_h outputs the following:
15739
16436
  # {
15740
16437
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15741
- # version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
16438
+ # server_side_encryption: "AES256",
16439
+ # version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
15742
16440
  # }
15743
16441
  #
15744
- # @example Example: To upload object and specify user-defined metadata
16442
+ # @example Example: To upload an object (specify optional headers)
15745
16443
  #
15746
- # # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
15747
- # # enabled, S3 returns version ID in response.
16444
+ # # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
16445
+ # # storage class and use server-side encryption.
15748
16446
  #
15749
16447
  # resp = client.put_object({
15750
- # body: "filetoupload",
16448
+ # body: "HappyFace.jpg",
15751
16449
  # bucket: "examplebucket",
15752
- # key: "exampleobject",
15753
- # metadata: {
15754
- # "metadata1" => "value1",
15755
- # "metadata2" => "value2",
15756
- # },
16450
+ # key: "HappyFace.jpg",
16451
+ # server_side_encryption: "AES256",
16452
+ # storage_class: "STANDARD_IA",
15757
16453
  # })
15758
16454
  #
15759
16455
  # resp.to_h outputs the following:
15760
16456
  # {
15761
16457
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15762
- # version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
16458
+ # server_side_encryption: "AES256",
16459
+ # version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
15763
16460
  # }
15764
16461
  #
15765
- # @example Example: To upload an object and specify server-side encryption and object tags
16462
+ # @example Example: To upload object and specify user-defined metadata
15766
16463
  #
15767
- # # The following example uploads an object. The request specifies the optional server-side encryption option. The request
15768
- # # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
16464
+ # # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
16465
+ # # enabled, S3 returns version ID in response.
15769
16466
  #
15770
16467
  # resp = client.put_object({
15771
16468
  # body: "filetoupload",
15772
16469
  # bucket: "examplebucket",
15773
16470
  # key: "exampleobject",
15774
- # server_side_encryption: "AES256",
15775
- # tagging: "key1=value1&key2=value2",
16471
+ # metadata: {
16472
+ # "metadata1" => "value1",
16473
+ # "metadata2" => "value2",
16474
+ # },
15776
16475
  # })
15777
16476
  #
15778
16477
  # resp.to_h outputs the following:
15779
16478
  # {
15780
16479
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15781
- # server_side_encryption: "AES256",
15782
- # version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
16480
+ # version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
15783
16481
  # }
15784
16482
  #
15785
16483
  # @example Streaming a file from disk
@@ -17792,6 +18490,10 @@ module Aws::S3
17792
18490
  # interruptions when a session expires. For more information about
17793
18491
  # authorization, see [ `CreateSession` ][9].
17794
18492
  #
18493
+ # If the object is encrypted with SSE-KMS, you must also have the
18494
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
18495
+ # identity-based policies and KMS key policies for the KMS key.
18496
+ #
17795
18497
  # Data integrity
17796
18498
  #
17797
18499
  # : **General purpose bucket** - To ensure that data is not corrupted
@@ -17843,12 +18545,13 @@ module Aws::S3
17843
18545
  #
17844
18546
  # * x-amz-server-side-encryption-customer-key-MD5
17845
18547
  #
17846
- # * **Directory bucket** - For directory buckets, only server-side
17847
- # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) is
17848
- # supported.
18548
+ # For more information, see [Using Server-Side Encryption][11] in
18549
+ # the *Amazon S3 User Guide*.
17849
18550
  #
17850
- # For more information, see [Using Server-Side Encryption][11] in the
17851
- # *Amazon S3 User Guide*.
18551
+ # * <b>Directory buckets </b> - For directory buckets, there are only
18552
+ # two supported options for server-side encryption: server-side
18553
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
18554
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`).
17852
18555
  #
17853
18556
  # Special errors
17854
18557
  # : * Error Code: `NoSuchUpload`
@@ -17978,9 +18681,9 @@ module Aws::S3
17978
18681
  # @option params [String] :checksum_crc32
17979
18682
  # This header can be used as a data integrity check to verify that the
17980
18683
  # data received is the same data that was originally sent. This header
17981
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object. For
17982
- # more information, see [Checking object integrity][1] in the *Amazon S3
17983
- # User Guide*.
18684
+ # specifies the base64-encoded, 32-bit CRC-32 checksum of the object.
18685
+ # For more information, see [Checking object integrity][1] in the
18686
+ # *Amazon S3 User Guide*.
17984
18687
  #
17985
18688
  #
17986
18689
  #
@@ -17989,7 +18692,7 @@ module Aws::S3
17989
18692
  # @option params [String] :checksum_crc32c
17990
18693
  # This header can be used as a data integrity check to verify that the
17991
18694
  # data received is the same data that was originally sent. This header
17992
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object.
18695
+ # specifies the base64-encoded, 32-bit CRC-32C checksum of the object.
17993
18696
  # For more information, see [Checking object integrity][1] in the
17994
18697
  # *Amazon S3 User Guide*.
17995
18698
  #
@@ -18261,6 +18964,10 @@ module Aws::S3
18261
18964
  # destination. The `s3express:SessionMode` condition key cannot be
18262
18965
  # set to `ReadOnly` on the copy destination.
18263
18966
  #
18967
+ # If the object is encrypted with SSE-KMS, you must also have the
18968
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
18969
+ # identity-based policies and KMS key policies for the KMS key.
18970
+ #
18264
18971
  # For example policies, see [Example bucket policies for S3 Express
18265
18972
  # One Zone][10] and [Amazon Web Services Identity and Access
18266
18973
  # Management (IAM) identity-based policies for S3 Express One
@@ -18272,9 +18979,26 @@ module Aws::S3
18272
18979
  # the `UploadPartCopy` operation, see [CopyObject][12] and
18273
18980
  # [UploadPart][2].
18274
18981
  #
18275
- # * <b>Directory buckets </b> - For directory buckets, only
18276
- # server-side encryption with Amazon S3 managed keys (SSE-S3)
18277
- # (`AES256`) is supported.
18982
+ # * <b>Directory buckets </b> - For directory buckets, there are only
18983
+ # two supported options for server-side encryption: server-side
18984
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
18985
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). For
18986
+ # more information, see [Protecting data with server-side
18987
+ # encryption][13] in the *Amazon S3 User Guide*.
18988
+ #
18989
+ # <note markdown="1"> For directory buckets, when you perform a `CreateMultipartUpload`
18990
+ # operation and an `UploadPartCopy` operation, the request headers
18991
+ # you provide in the `CreateMultipartUpload` request must match the
18992
+ # default encryption configuration of the destination bucket.
18993
+ #
18994
+ # </note>
18995
+ #
18996
+ # S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted
18997
+ # objects from general purpose buckets to directory buckets, from
18998
+ # directory buckets to general purpose buckets, or between directory
18999
+ # buckets, through [UploadPartCopy][14]. In this case, Amazon S3
19000
+ # makes a call to KMS every time a copy request is made for a
19001
+ # KMS-encrypted object.
18278
19002
  #
18279
19003
  # Special errors
18280
19004
  # : * Error Code: `NoSuchUpload`
@@ -18299,17 +19023,17 @@ module Aws::S3
18299
19023
  #
18300
19024
  # The following operations are related to `UploadPartCopy`:
18301
19025
  #
18302
- # * [CreateMultipartUpload][13]
19026
+ # * [CreateMultipartUpload][15]
18303
19027
  #
18304
19028
  # * [UploadPart][2]
18305
19029
  #
18306
- # * [CompleteMultipartUpload][14]
19030
+ # * [CompleteMultipartUpload][16]
18307
19031
  #
18308
- # * [AbortMultipartUpload][15]
19032
+ # * [AbortMultipartUpload][17]
18309
19033
  #
18310
- # * [ListParts][16]
19034
+ # * [ListParts][18]
18311
19035
  #
18312
- # * [ListMultipartUploads][17]
19036
+ # * [ListMultipartUploads][19]
18313
19037
  #
18314
19038
  #
18315
19039
  #
@@ -18325,11 +19049,13 @@ module Aws::S3
18325
19049
  # [10]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
18326
19050
  # [11]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
18327
19051
  # [12]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
18328
- # [13]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
18329
- # [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
18330
- # [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
18331
- # [16]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
18332
- # [17]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
19052
+ # [13]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
19053
+ # [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
19054
+ # [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
19055
+ # [16]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
19056
+ # [17]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
19057
+ # [18]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
19058
+ # [19]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
18333
19059
  #
18334
19060
  # @option params [required, String] :bucket
18335
19061
  # The bucket name.
@@ -18852,7 +19578,7 @@ module Aws::S3
18852
19578
  # @option params [String] :checksum_crc32
18853
19579
  # This header can be used as a data integrity check to verify that the
18854
19580
  # data received is the same data that was originally sent. This
18855
- # specifies the base64-encoded, 32-bit CRC32 checksum of the object
19581
+ # specifies the base64-encoded, 32-bit CRC-32 checksum of the object
18856
19582
  # returned by the Object Lambda function. This may not match the
18857
19583
  # checksum for the object stored in Amazon S3. Amazon S3 will perform
18858
19584
  # validation of the checksum values only when the original `GetObject`
@@ -18872,7 +19598,7 @@ module Aws::S3
18872
19598
  # @option params [String] :checksum_crc32c
18873
19599
  # This header can be used as a data integrity check to verify that the
18874
19600
  # data received is the same data that was originally sent. This
18875
- # specifies the base64-encoded, 32-bit CRC32C checksum of the object
19601
+ # specifies the base64-encoded, 32-bit CRC-32C checksum of the object
18876
19602
  # returned by the Object Lambda function. This may not match the
18877
19603
  # checksum for the object stored in Amazon S3. Amazon S3 will perform
18878
19604
  # validation of the checksum values only when the original `GetObject`
@@ -19115,7 +19841,7 @@ module Aws::S3
19115
19841
  tracer: tracer
19116
19842
  )
19117
19843
  context[:gem_name] = 'aws-sdk-s3'
19118
- context[:gem_version] = '1.162.0'
19844
+ context[:gem_version] = '1.167.0'
19119
19845
  Seahorse::Client::Request.new(handlers, context)
19120
19846
  end
19121
19847