aws-sdk-s3 1.160.0 → 1.166.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
@@ -532,6 +536,12 @@ module Aws::S3
532
536
  # @option options [String] :ssl_ca_store
533
537
  # Sets the X509::Store to verify peer certificate.
534
538
  #
539
+ # @option options [OpenSSL::X509::Certificate] :ssl_cert
540
+ # Sets a client certificate when creating http connections.
541
+ #
542
+ # @option options [OpenSSL::PKey] :ssl_key
543
+ # Sets a client key when creating http connections.
544
+ #
535
545
  # @option options [Float] :ssl_timeout
536
546
  # Sets the SSL timeout in seconds
537
547
  #
@@ -794,9 +804,15 @@ module Aws::S3
794
804
  # [Multipart Upload and Permissions][6] in the *Amazon S3 User
795
805
  # Guide*.
796
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
+ #
797
813
  # * **Directory bucket permissions** - To grant access to this API
798
814
  # operation on a directory bucket, we recommend that you use the [
799
- # `CreateSession` ][7] API operation for session-based
815
+ # `CreateSession` ][8] API operation for session-based
800
816
  # authorization. Specifically, you grant the
801
817
  # `s3express:CreateSession` permission to the directory bucket in a
802
818
  # bucket policy or an IAM identity-based policy. Then, you make the
@@ -807,13 +823,11 @@ module Aws::S3
807
823
  # token for use. Amazon Web Services CLI or SDKs create session and
808
824
  # refresh the session token automatically to avoid service
809
825
  # interruptions when a session expires. For more information about
810
- # authorization, see [ `CreateSession` ][7].
826
+ # authorization, see [ `CreateSession` ][8].
811
827
  #
812
- # * If you provide an [additional checksum value][8] in your
813
- # `MultipartUpload` requests and the object is encrypted with Key
814
- # Management Service, you must have permission to use the
815
- # `kms:Decrypt` action for the `CompleteMultipartUpload` request to
816
- # 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.
817
831
  #
818
832
  # Special errors
819
833
  # : * Error Code: `EntityTooSmall`
@@ -872,8 +886,8 @@ module Aws::S3
872
886
  # [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html
873
887
  # [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
874
888
  # [6]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html
875
- # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
876
- # [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
877
891
  # [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
878
892
  # [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
879
893
  # [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
@@ -1259,6 +1273,10 @@ module Aws::S3
1259
1273
  # destination. The `s3express:SessionMode` condition key can't be
1260
1274
  # set to `ReadOnly` on the copy destination bucket.
1261
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
+ #
1262
1280
  # For example policies, see [Example bucket policies for S3 Express
1263
1281
  # One Zone][6] and [Amazon Web Services Identity and Access
1264
1282
  # Management (IAM) identity-based policies for S3 Express One
@@ -1705,9 +1723,8 @@ module Aws::S3
1705
1723
  #
1706
1724
  # @option params [String] :server_side_encryption
1707
1725
  # The server-side encryption algorithm used when storing this object in
1708
- # Amazon S3 (for example, `AES256`, `aws:kms`, `aws:kms:dsse`).
1709
- # Unrecognized or unsupported values won’t write a destination object
1710
- # 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.
1711
1728
  #
1712
1729
  # Amazon S3 automatically encrypts all new objects that are copied to an
1713
1730
  # S3 bucket. When copying an object, if you don't specify encryption
@@ -1715,35 +1732,72 @@ module Aws::S3
1715
1732
  # object is set to the default encryption configuration of the
1716
1733
  # destination bucket. By default, all buckets have a base level of
1717
1734
  # encryption configuration that uses server-side encryption with Amazon
1718
- # S3 managed keys (SSE-S3). If the destination bucket has a default
1719
- # encryption configuration that uses server-side encryption with Key
1720
- # Management Service (KMS) keys (SSE-KMS), dual-layer server-side
1721
- # encryption with Amazon Web Services KMS keys (DSSE-KMS), or
1722
- # server-side encryption with customer-provided encryption keys (SSE-C),
1723
- # Amazon S3 uses the corresponding KMS key, or a customer-provided key
1724
- # to encrypt the target object copy.
1725
- #
1726
- # When you perform a `CopyObject` operation, if you want to use a
1727
- # different type of encryption setting for the target object, you can
1728
- # specify appropriate encryption-related headers to encrypt the target
1729
- # object with an Amazon S3 managed key, a KMS key, or a
1730
- # customer-provided key. If the encryption setting in your request is
1731
- # different from the default encryption configuration of the destination
1732
- # 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.
1733
1738
  #
1734
1739
  # With server-side encryption, Amazon S3 encrypts your data as it writes
1735
1740
  # your data to disks in its data centers and decrypts the data when you
1736
1741
  # access it. For more information about server-side encryption, see
1737
1742
  # [Using Server-Side Encryption][1] in the *Amazon S3 User Guide*.
1738
1743
  #
1739
- # <note markdown="1"> For directory buckets, only server-side encryption with Amazon S3
1740
- # managed keys (SSE-S3) (`AES256`) is supported.
1741
- #
1742
- # </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.
1743
1793
  #
1744
1794
  #
1745
1795
  #
1746
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
1747
1801
  #
1748
1802
  # @option params [String] :storage_class
1749
1803
  # If the `x-amz-storage-class` header is not used, the copied object
@@ -1840,33 +1894,51 @@ module Aws::S3
1840
1894
  # </note>
1841
1895
  #
1842
1896
  # @option params [String] :ssekms_key_id
1843
- # Specifies the KMS ID (Key ID, Key ARN, or Key Alias) to use for object
1844
- # encryption. All GET and PUT requests for an object protected by KMS
1845
- # will fail if they're not made via SSL or using SigV4. For information
1846
- # about configuring any of the officially supported Amazon Web Services
1847
- # SDKs and Amazon Web Services CLI, see [Specifying the Signature
1848
- # Version in Request Authentication][1] in the *Amazon S3 User Guide*.
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*.
1849
1904
  #
1850
- # <note markdown="1"> This functionality is not supported when the destination bucket is a
1851
- # directory bucket.
1852
- #
1853
- # </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.
1854
1914
  #
1855
1915
  #
1856
1916
  #
1857
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
1858
1920
  #
1859
1921
  # @option params [String] :ssekms_encryption_context
1860
- # Specifies the Amazon Web Services KMS Encryption Context to use for
1861
- # object encryption. The value of this header is a base64-encoded UTF-8
1862
- # string holding JSON with the encryption context key-value pairs. This
1863
- # value must be explicitly added to specify encryption context for
1864
- # `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.
1865
1926
  #
1866
- # <note markdown="1"> This functionality is not supported when the destination bucket is a
1867
- # directory bucket.
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*.
1868
1933
  #
1869
- # </note>
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.
1938
+ #
1939
+ #
1940
+ #
1941
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
1870
1942
  #
1871
1943
  # @option params [Boolean] :bucket_key_enabled
1872
1944
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
@@ -1881,14 +1953,19 @@ module Aws::S3
1881
1953
  # For more information, see [Amazon S3 Bucket Keys][1] in the *Amazon S3
1882
1954
  # User Guide*.
1883
1955
  #
1884
- # <note markdown="1"> This functionality is not supported when the destination bucket is a
1885
- # 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.
1886
1962
  #
1887
1963
  # </note>
1888
1964
  #
1889
1965
  #
1890
1966
  #
1891
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
1892
1969
  #
1893
1970
  # @option params [String] :copy_source_sse_customer_algorithm
1894
1971
  # Specifies the algorithm to use when decrypting the source object (for
@@ -2630,9 +2707,53 @@ module Aws::S3
2630
2707
  # using server-side encryption with customer-provided encryption
2631
2708
  # keys (SSE-C)][11] in the *Amazon S3 User Guide*.
2632
2709
  #
2633
- # * **Directory buckets** -For directory buckets, only server-side
2634
- # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) is
2635
- # 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>
2636
2757
  #
2637
2758
  # HTTP Host header syntax
2638
2759
  #
@@ -2643,13 +2764,13 @@ module Aws::S3
2643
2764
  #
2644
2765
  # * [UploadPart][1]
2645
2766
  #
2646
- # * [CompleteMultipartUpload][12]
2767
+ # * [CompleteMultipartUpload][15]
2647
2768
  #
2648
- # * [AbortMultipartUpload][13]
2769
+ # * [AbortMultipartUpload][16]
2649
2770
  #
2650
- # * [ListParts][14]
2771
+ # * [ListParts][17]
2651
2772
  #
2652
- # * [ListMultipartUploads][15]
2773
+ # * [ListMultipartUploads][18]
2653
2774
  #
2654
2775
  #
2655
2776
  #
@@ -2664,10 +2785,13 @@ module Aws::S3
2664
2785
  # [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
2665
2786
  # [10]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
2666
2787
  # [11]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html
2667
- # [12]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
2668
- # [13]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
2669
- # [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
2670
- # [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
2671
2795
  #
2672
2796
  # @option params [String] :acl
2673
2797
  # The canned ACL to apply to the object. Amazon S3 supports a set of
@@ -3030,10 +3154,52 @@ module Aws::S3
3030
3154
  # The server-side encryption algorithm used when you store this object
3031
3155
  # in Amazon S3 (for example, `AES256`, `aws:kms`).
3032
3156
  #
3033
- # <note markdown="1"> For directory buckets, only server-side encryption with Amazon S3
3034
- # 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.
3035
3194
  #
3036
- # </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
3037
3203
  #
3038
3204
  # @option params [String] :storage_class
3039
3205
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
@@ -3092,34 +3258,71 @@ module Aws::S3
3092
3258
  # </note>
3093
3259
  #
3094
3260
  # @option params [String] :ssekms_key_id
3095
- # Specifies the ID (Key ID, Key ARN, or Key Alias) of the symmetric
3096
- # encryption customer managed key to use for object encryption.
3097
- #
3098
- # <note markdown="1"> This functionality is not supported for directory buckets.
3099
- #
3100
- # </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
3101
3288
  #
3102
3289
  # @option params [String] :ssekms_encryption_context
3103
3290
  # Specifies the Amazon Web Services KMS Encryption Context to use for
3104
- # object encryption. The value of this header is a base64-encoded UTF-8
3105
- # string holding JSON with the encryption context key-value pairs.
3106
- #
3107
- # <note markdown="1"> This functionality is not supported for directory buckets.
3291
+ # object encryption. The value of this header is a Base64-encoded string
3292
+ # of a UTF-8 encoded JSON, which contains the encryption context as
3293
+ # key-value pairs.
3108
3294
  #
3109
- # </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.
3110
3299
  #
3111
3300
  # @option params [Boolean] :bucket_key_enabled
3112
3301
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
3113
3302
  # encryption with server-side encryption using Key Management Service
3114
- # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
3115
- # to use an S3 Bucket Key for object encryption with SSE-KMS.
3303
+ # (KMS) keys (SSE-KMS).
3116
3304
  #
3117
- # 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
3118
3308
  # bucket-level settings for S3 Bucket Key.
3119
3309
  #
3120
- # <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.
3319
+ #
3121
3320
  #
3122
- # </note>
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
3123
3326
  #
3124
3327
  # @option params [String] :request_payer
3125
3328
  # Confirms that the requester knows that they will be charged for the
@@ -3280,9 +3483,10 @@ module Aws::S3
3280
3483
 
3281
3484
  # Creates a session that establishes temporary security credentials to
3282
3485
  # support fast authentication and authorization for the Zonal endpoint
3283
- # APIs on directory buckets. For more information about Zonal endpoint
3284
- # APIs that include the Availability Zone in the request endpoint, see
3285
- # [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*.
3286
3490
  #
3287
3491
  # To make Zonal endpoint API requests on a directory bucket, use the
3288
3492
  # `CreateSession` API operation. Specifically, you grant
@@ -3291,13 +3495,13 @@ module Aws::S3
3291
3495
  # the `CreateSession` API request on the bucket, which returns temporary
3292
3496
  # security credentials that include the access key ID, secret access
3293
3497
  # key, session token, and expiration. These credentials have associated
3294
- # permissions to access the Zonal endpoint APIs. After the session is
3295
- # created, you don’t need to use other policies to grant permissions to
3296
- # each Zonal endpoint API individually. Instead, in your Zonal endpoint
3297
- # API requests, you sign your requests by applying the temporary
3298
- # security credentials of the session to the request headers and
3299
- # following the SigV4 protocol for authentication. You also apply the
3300
- # 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
3301
3505
  # authorization. Temporary security credentials are scoped to the bucket
3302
3506
  # and expire after 5 minutes. After the expiration time, any calls that
3303
3507
  # you make with those credentials will fail. You must use IAM
@@ -3320,16 +3524,16 @@ module Aws::S3
3320
3524
  # [Regional and Zonal endpoints][3] in the *Amazon S3 User Guide*.
3321
3525
  #
3322
3526
  # * <b> <code>CopyObject</code> API operation</b> - Unlike other Zonal
3323
- # endpoint APIs, the `CopyObject` API operation doesn't use the
3324
- # temporary security credentials returned from the `CreateSession` API
3325
- # 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
3326
3530
  # about authentication and authorization of the `CopyObject` API
3327
3531
  # operation on directory buckets, see [CopyObject][4].
3328
3532
  #
3329
3533
  # * <b> <code>HeadBucket</code> API operation</b> - Unlike other Zonal
3330
- # endpoint APIs, the `HeadBucket` API operation doesn't use the
3331
- # temporary security credentials returned from the `CreateSession` API
3332
- # 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
3333
3537
  # about authentication and authorization of the `HeadBucket` API
3334
3538
  # operation on directory buckets, see [HeadBucket][5].
3335
3539
  #
@@ -3348,9 +3552,71 @@ module Aws::S3
3348
3552
  # Identity and Access Management (IAM) identity-based policies for S3
3349
3553
  # Express One Zone][8] in the *Amazon S3 User Guide*.
3350
3554
  #
3351
- # To grant cross-account access to Zonal endpoint APIs, the bucket
3352
- # policy should also grant both accounts the `s3express:CreateSession`
3353
- # 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>
3354
3620
  #
3355
3621
  # HTTP Host header syntax
3356
3622
  #
@@ -3367,21 +3633,110 @@ module Aws::S3
3367
3633
  # [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html#API_CreateSession_RequestParameters
3368
3634
  # [7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
3369
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
3370
3643
  #
3371
3644
  # @option params [String] :session_mode
3372
3645
  # Specifies the mode of the session that will be created, either
3373
3646
  # `ReadWrite` or `ReadOnly`. By default, a `ReadWrite` session is
3374
3647
  # created. A `ReadWrite` session is capable of executing all the Zonal
3375
- # endpoint APIs on a directory bucket. A `ReadOnly` session is
3376
- # constrained to execute the following Zonal endpoint APIs: `GetObject`,
3377
- # `HeadObject`, `ListObjectsV2`, `GetObjectAttributes`, `ListParts`, and
3378
- # `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`.
3379
3652
  #
3380
3653
  # @option params [required, String] :bucket
3381
3654
  # The name of the bucket that you create a session for.
3382
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
+ #
3383
3734
  # @return [Types::CreateSessionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3384
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
3385
3740
  # * {Types::CreateSessionOutput#credentials #credentials} => Types::SessionCredentials
3386
3741
  #
3387
3742
  # @example Request syntax with placeholder values
@@ -3389,10 +3744,18 @@ module Aws::S3
3389
3744
  # resp = client.create_session({
3390
3745
  # session_mode: "ReadOnly", # accepts ReadOnly, ReadWrite
3391
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,
3392
3751
  # })
3393
3752
  #
3394
3753
  # @example Response structure
3395
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
3396
3759
  # resp.credentials.access_key_id #=> String
3397
3760
  # resp.credentials.secret_access_key #=> String
3398
3761
  # resp.credentials.session_token #=> String
@@ -3638,47 +4001,92 @@ module Aws::S3
3638
4001
  req.send_request(options)
3639
4002
  end
3640
4003
 
3641
- # <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].
3642
4017
  #
3643
4018
  # </note>
3644
4019
  #
3645
- # This implementation of the DELETE action resets the default encryption
3646
- # for the bucket as server-side encryption with Amazon S3 managed keys
3647
- # (SSE-S3). For information about the bucket default encryption feature,
3648
- # see [Amazon S3 Bucket Default Encryption][1] in the *Amazon S3 User
3649
- # 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].
3650
4028
  #
3651
- # To use this operation, you must have permissions to perform the
3652
- # `s3:PutEncryptionConfiguration` action. The bucket owner has this
3653
- # permission by default. The bucket owner can grant this permission to
3654
- # others. For more information about permissions, see [Permissions
3655
- # Related to Bucket Subresource Operations][2] and [Managing Access
3656
- # Permissions to your Amazon S3 Resources][3] in the *Amazon S3 User
3657
- # 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`.
3658
4044
  #
3659
4045
  # The following operations are related to `DeleteBucketEncryption`:
3660
4046
  #
3661
- # * [PutBucketEncryption][4]
4047
+ # * [PutBucketEncryption][6]
3662
4048
  #
3663
- # * [GetBucketEncryption][5]
4049
+ # * [GetBucketEncryption][7]
3664
4050
  #
3665
4051
  #
3666
4052
  #
3667
4053
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
3668
- # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
3669
- # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
3670
- # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html
3671
- # [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
3672
4060
  #
3673
4061
  # @option params [required, String] :bucket
3674
4062
  # The name of the bucket containing the server-side encryption
3675
4063
  # configuration to delete.
3676
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
+ #
3677
4079
  # @option params [String] :expected_bucket_owner
3678
4080
  # The account ID of the expected bucket owner. If the account ID that
3679
4081
  # you provide does not match the actual owner of the bucket, the request
3680
4082
  # fails with the HTTP status code `403 Forbidden` (access denied).
3681
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
+ #
3682
4090
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
3683
4091
  #
3684
4092
  # @example Request syntax with placeholder values
@@ -4672,35 +5080,35 @@ module Aws::S3
4672
5080
  # * {Types::DeleteObjectTaggingOutput#version_id #version_id} => String
4673
5081
  #
4674
5082
  #
4675
- # @example Example: To remove tag set from an object version
5083
+ # @example Example: To remove tag set from an object
4676
5084
  #
4677
- # # The following example removes tag set associated with the specified object version. The request specifies both the
4678
- # # 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.
4679
5087
  #
4680
5088
  # resp = client.delete_object_tagging({
4681
5089
  # bucket: "examplebucket",
4682
5090
  # key: "HappyFace.jpg",
4683
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
4684
5091
  # })
4685
5092
  #
4686
5093
  # resp.to_h outputs the following:
4687
5094
  # {
4688
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
5095
+ # version_id: "null",
4689
5096
  # }
4690
5097
  #
4691
- # @example Example: To remove tag set from an object
5098
+ # @example Example: To remove tag set from an object version
4692
5099
  #
4693
- # # The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the
4694
- # # 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.
4695
5102
  #
4696
5103
  # resp = client.delete_object_tagging({
4697
5104
  # bucket: "examplebucket",
4698
5105
  # key: "HappyFace.jpg",
5106
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
4699
5107
  # })
4700
5108
  #
4701
5109
  # resp.to_h outputs the following:
4702
5110
  # {
4703
- # version_id: "null",
5111
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
4704
5112
  # }
4705
5113
  #
4706
5114
  # @example Request syntax with placeholder values
@@ -4983,20 +5391,22 @@ module Aws::S3
4983
5391
  # * {Types::DeleteObjectsOutput#errors #errors} => Array&lt;Types::Error&gt;
4984
5392
  #
4985
5393
  #
4986
- # @example Example: To delete multiple objects from a versioned bucket
5394
+ # @example Example: To delete multiple object versions from a versioned bucket
4987
5395
  #
4988
- # # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
4989
- # # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
5396
+ # # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
5397
+ # # versions and returns the key and versions of deleted objects in the response.
4990
5398
  #
4991
5399
  # resp = client.delete_objects({
4992
5400
  # bucket: "examplebucket",
4993
5401
  # delete: {
4994
5402
  # objects: [
4995
5403
  # {
4996
- # key: "objectkey1",
5404
+ # key: "HappyFace.jpg",
5405
+ # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
4997
5406
  # },
4998
5407
  # {
4999
- # key: "objectkey2",
5408
+ # key: "HappyFace.jpg",
5409
+ # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
5000
5410
  # },
5001
5411
  # ],
5002
5412
  # quiet: false,
@@ -5007,34 +5417,30 @@ module Aws::S3
5007
5417
  # {
5008
5418
  # deleted: [
5009
5419
  # {
5010
- # delete_marker: true,
5011
- # delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
5012
- # key: "objectkey1",
5420
+ # key: "HappyFace.jpg",
5421
+ # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
5013
5422
  # },
5014
5423
  # {
5015
- # delete_marker: true,
5016
- # delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
5017
- # key: "objectkey2",
5424
+ # key: "HappyFace.jpg",
5425
+ # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
5018
5426
  # },
5019
5427
  # ],
5020
5428
  # }
5021
5429
  #
5022
- # @example Example: To delete multiple object versions from a versioned bucket
5430
+ # @example Example: To delete multiple objects from a versioned bucket
5023
5431
  #
5024
- # # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
5025
- # # versions and returns the key and versions of deleted objects in the response.
5432
+ # # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
5433
+ # # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
5026
5434
  #
5027
5435
  # resp = client.delete_objects({
5028
5436
  # bucket: "examplebucket",
5029
5437
  # delete: {
5030
5438
  # objects: [
5031
5439
  # {
5032
- # key: "HappyFace.jpg",
5033
- # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
5440
+ # key: "objectkey1",
5034
5441
  # },
5035
5442
  # {
5036
- # key: "HappyFace.jpg",
5037
- # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
5443
+ # key: "objectkey2",
5038
5444
  # },
5039
5445
  # ],
5040
5446
  # quiet: false,
@@ -5045,12 +5451,14 @@ module Aws::S3
5045
5451
  # {
5046
5452
  # deleted: [
5047
5453
  # {
5048
- # key: "HappyFace.jpg",
5049
- # version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
5454
+ # delete_marker: true,
5455
+ # delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
5456
+ # key: "objectkey1",
5050
5457
  # },
5051
5458
  # {
5052
- # key: "HappyFace.jpg",
5053
- # version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
5459
+ # delete_marker: true,
5460
+ # delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
5461
+ # key: "objectkey2",
5054
5462
  # },
5055
5463
  # ],
5056
5464
  # }
@@ -5553,46 +5961,92 @@ module Aws::S3
5553
5961
  req.send_request(options)
5554
5962
  end
5555
5963
 
5556
- # <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].
5557
5977
  #
5558
5978
  # </note>
5559
5979
  #
5560
- # Returns the default encryption configuration for an Amazon S3 bucket.
5561
- # By default, all buckets have a default encryption configuration that
5562
- # uses server-side encryption with Amazon S3 managed keys (SSE-S3). For
5563
- # information about the bucket default encryption feature, see [Amazon
5564
- # 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].
5565
5988
  #
5566
- # To use this operation, you must have permission to perform the
5567
- # `s3:GetEncryptionConfiguration` action. The bucket owner has this
5568
- # permission by default. The bucket owner can grant this permission to
5569
- # others. For more information about permissions, see [Permissions
5570
- # Related to Bucket Subresource Operations][2] and [Managing Access
5571
- # 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`.
5572
6004
  #
5573
6005
  # The following operations are related to `GetBucketEncryption`:
5574
6006
  #
5575
- # * [PutBucketEncryption][4]
6007
+ # * [PutBucketEncryption][6]
5576
6008
  #
5577
- # * [DeleteBucketEncryption][5]
6009
+ # * [DeleteBucketEncryption][7]
5578
6010
  #
5579
6011
  #
5580
6012
  #
5581
6013
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
5582
- # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
5583
- # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
5584
- # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html
5585
- # [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
6020
+ #
6021
+ # @option params [required, String] :bucket
6022
+ # The name of the bucket from which the server-side encryption
6023
+ # configuration is retrieved.
6024
+ #
6025
+ # <b>Directory buckets </b> - When you use this operation with a
6026
+ # directory bucket, you must use path-style requests in the format
6027
+ # `https://s3express-control.region_code.amazonaws.com/bucket-name `.
6028
+ # Virtual-hosted-style requests aren't supported. Directory bucket
6029
+ # names must be unique in the chosen Availability Zone. Bucket names
6030
+ # must also follow the format ` bucket_base_name--az_id--x-s3` (for
6031
+ # example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
6032
+ # bucket naming restrictions, see [Directory bucket naming rules][1] in
6033
+ # the *Amazon S3 User Guide*
6034
+ #
5586
6035
  #
5587
- # @option params [required, String] :bucket
5588
- # The name of the bucket from which the server-side encryption
5589
- # configuration is retrieved.
6036
+ #
6037
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
5590
6038
  #
5591
6039
  # @option params [String] :expected_bucket_owner
5592
6040
  # The account ID of the expected bucket owner. If the account ID that
5593
6041
  # you provide does not match the actual owner of the bucket, the request
5594
6042
  # fails with the HTTP status code `403 Forbidden` (access denied).
5595
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
+ #
5596
6050
  # @return [Types::GetBucketEncryptionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5597
6051
  #
5598
6052
  # * {Types::GetBucketEncryptionOutput#server_side_encryption_configuration #server_side_encryption_configuration} => Types::ServerSideEncryptionConfiguration
@@ -7332,6 +7786,10 @@ module Aws::S3
7332
7786
  # interruptions when a session expires. For more information about
7333
7787
  # authorization, see [ `CreateSession` ][4].
7334
7788
  #
7789
+ # If the object is encrypted using SSE-KMS, you must also have the
7790
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
7791
+ # identity-based policies and KMS key policies for the KMS key.
7792
+ #
7335
7793
  # Storage classes
7336
7794
  #
7337
7795
  # : If the object you are retrieving is stored in the S3 Glacier
@@ -7360,6 +7818,11 @@ module Aws::S3
7360
7818
  # `GetObject` requests for the object that uses these types of keys,
7361
7819
  # you’ll get an HTTP `400 Bad Request` error.
7362
7820
  #
7821
+ # **Directory buckets** - For directory buckets, there are only two
7822
+ # supported options for server-side encryption: SSE-S3 and SSE-KMS.
7823
+ # SSE-C isn't supported. For more information, see [Protecting data
7824
+ # with server-side encryption][7] in the *Amazon S3 User Guide*.
7825
+ #
7363
7826
  # Overriding response header values through the request
7364
7827
  #
7365
7828
  # : There are times when you want to override certain response header
@@ -7407,9 +7870,9 @@ module Aws::S3
7407
7870
  #
7408
7871
  # The following operations are related to `GetObject`:
7409
7872
  #
7410
- # * [ListBuckets][7]
7873
+ # * [ListBuckets][8]
7411
7874
  #
7412
- # * [GetObjectAcl][8]
7875
+ # * [GetObjectAcl][9]
7413
7876
  #
7414
7877
  #
7415
7878
  #
@@ -7419,8 +7882,9 @@ module Aws::S3
7419
7882
  # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
7420
7883
  # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html
7421
7884
  # [6]: https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html
7422
- # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html
7423
- # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
7885
+ # [7]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
7886
+ # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html
7887
+ # [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
7424
7888
  #
7425
7889
  # @option params [String, IO] :response_target
7426
7890
  # Where to write response data, file path, or IO object.
@@ -7717,10 +8181,10 @@ module Aws::S3
7717
8181
  # @option params [String] :checksum_mode
7718
8182
  # To retrieve the checksum, this mode must be enabled.
7719
8183
  #
7720
- # In addition, if you enable checksum mode and the object is uploaded
7721
- # with a [checksum][1] and encrypted with an Key Management Service
7722
- # (KMS) key, you must have permission to use the `kms:Decrypt` action to
7723
- # retrieve the checksum.
8184
+ # **General purpose buckets** - In addition, if you enable checksum mode
8185
+ # and the object is uploaded with a [checksum][1] and encrypted with an
8186
+ # Key Management Service (KMS) key, you must have permission to use the
8187
+ # `kms:Decrypt` action to retrieve the checksum.
7724
8188
  #
7725
8189
  #
7726
8190
  #
@@ -8122,7 +8586,7 @@ module Aws::S3
8122
8586
  # Permissions
8123
8587
  # : * **General purpose bucket permissions** - To use
8124
8588
  # `GetObjectAttributes`, you must have READ access to the object.
8125
- # The permissions that you need to use this operation with depend on
8589
+ # The permissions that you need to use this operation depend on
8126
8590
  # whether the bucket is versioned. If the bucket is versioned, you
8127
8591
  # need both the `s3:GetObjectVersion` and
8128
8592
  # `s3:GetObjectVersionAttributes` permissions for this operation. If
@@ -8156,6 +8620,10 @@ module Aws::S3
8156
8620
  # interruptions when a session expires. For more information about
8157
8621
  # authorization, see [ `CreateSession` ][3].
8158
8622
  #
8623
+ # If the object is encrypted with SSE-KMS, you must also have the
8624
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
8625
+ # identity-based policies and KMS key policies for the KMS key.
8626
+ #
8159
8627
  # Encryption
8160
8628
  # : <note markdown="1"> Encryption request headers, like `x-amz-server-side-encryption`,
8161
8629
  # should not be sent for `HEAD` requests if your object uses
@@ -8189,9 +8657,19 @@ module Aws::S3
8189
8657
  # Customer-Provided Encryption Keys)][4] in the *Amazon S3 User
8190
8658
  # Guide*.
8191
8659
  #
8192
- # <note markdown="1"> **Directory bucket permissions** - For directory buckets, only
8193
- # server-side encryption with Amazon S3 managed keys (SSE-S3)
8194
- # (`AES256`) is supported.
8660
+ # <note markdown="1"> **Directory bucket permissions** - For directory buckets, there are
8661
+ # only two supported options for server-side encryption: server-side
8662
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
8663
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
8664
+ # recommend that the bucket's default encryption uses the desired
8665
+ # encryption configuration and you don't override the bucket default
8666
+ # encryption in your `CreateSession` requests or `PUT` object
8667
+ # requests. Then, new objects are automatically encrypted with the
8668
+ # desired encryption settings. For more information, see [Protecting
8669
+ # data with server-side encryption][5] in the *Amazon S3 User Guide*.
8670
+ # For more information about the encryption overriding behaviors in
8671
+ # directory buckets, see [Specifying server-side encryption with KMS
8672
+ # for new object uploads][6].
8195
8673
  #
8196
8674
  # </note>
8197
8675
  #
@@ -8215,7 +8693,7 @@ module Aws::S3
8215
8693
  # * `If-Unmodified-Since` condition evaluates to `false`.
8216
8694
  #
8217
8695
  # For more information about conditional requests, see [RFC
8218
- # 7232][5].
8696
+ # 7232][7].
8219
8697
  #
8220
8698
  # * If both of the `If-None-Match` and `If-Modified-Since` headers are
8221
8699
  # present in the request as follows, then Amazon S3 returns the HTTP
@@ -8226,7 +8704,7 @@ module Aws::S3
8226
8704
  # * `If-Modified-Since` condition evaluates to `true`.
8227
8705
  #
8228
8706
  # For more information about conditional requests, see [RFC
8229
- # 7232][5].
8707
+ # 7232][7].
8230
8708
  #
8231
8709
  # HTTP Host header syntax
8232
8710
  #
@@ -8235,21 +8713,21 @@ module Aws::S3
8235
8713
  #
8236
8714
  # The following actions are related to `GetObjectAttributes`:
8237
8715
  #
8238
- # * [GetObject][6]
8716
+ # * [GetObject][8]
8239
8717
  #
8240
- # * [GetObjectAcl][7]
8718
+ # * [GetObjectAcl][9]
8241
8719
  #
8242
- # * [GetObjectLegalHold][8]
8720
+ # * [GetObjectLegalHold][10]
8243
8721
  #
8244
- # * [GetObjectLockConfiguration][9]
8722
+ # * [GetObjectLockConfiguration][11]
8245
8723
  #
8246
- # * [GetObjectRetention][10]
8724
+ # * [GetObjectRetention][12]
8247
8725
  #
8248
- # * [GetObjectTagging][11]
8726
+ # * [GetObjectTagging][13]
8249
8727
  #
8250
- # * [HeadObject][12]
8728
+ # * [HeadObject][14]
8251
8729
  #
8252
- # * [ListParts][13]
8730
+ # * [ListParts][15]
8253
8731
  #
8254
8732
  #
8255
8733
  #
@@ -8257,15 +8735,17 @@ module Aws::S3
8257
8735
  # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html
8258
8736
  # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
8259
8737
  # [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
8260
- # [5]: https://tools.ietf.org/html/rfc7232
8261
- # [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
8262
- # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
8263
- # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html
8264
- # [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html
8265
- # [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html
8266
- # [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
8267
- # [12]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html
8268
- # [13]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
8738
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
8739
+ # [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
8740
+ # [7]: https://tools.ietf.org/html/rfc7232
8741
+ # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
8742
+ # [9]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html
8743
+ # [10]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html
8744
+ # [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html
8745
+ # [12]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html
8746
+ # [13]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html
8747
+ # [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html
8748
+ # [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
8269
8749
  #
8270
8750
  # @option params [required, String] :bucket
8271
8751
  # The name of the bucket that contains the object.
@@ -8809,49 +9289,49 @@ module Aws::S3
8809
9289
  # * {Types::GetObjectTaggingOutput#tag_set #tag_set} => Array&lt;Types::Tag&gt;
8810
9290
  #
8811
9291
  #
8812
- # @example Example: To retrieve tag set of an object
9292
+ # @example Example: To retrieve tag set of a specific object version
8813
9293
  #
8814
- # # The following example retrieves tag set of an object.
9294
+ # # The following example retrieves tag set of an object. The request specifies object version.
8815
9295
  #
8816
9296
  # resp = client.get_object_tagging({
8817
9297
  # bucket: "examplebucket",
8818
- # key: "HappyFace.jpg",
9298
+ # key: "exampleobject",
9299
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
8819
9300
  # })
8820
9301
  #
8821
9302
  # resp.to_h outputs the following:
8822
9303
  # {
8823
9304
  # tag_set: [
8824
9305
  # {
8825
- # key: "Key4",
8826
- # value: "Value4",
8827
- # },
8828
- # {
8829
- # key: "Key3",
8830
- # value: "Value3",
9306
+ # key: "Key1",
9307
+ # value: "Value1",
8831
9308
  # },
8832
9309
  # ],
8833
- # version_id: "null",
9310
+ # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
8834
9311
  # }
8835
9312
  #
8836
- # @example Example: To retrieve tag set of a specific object version
9313
+ # @example Example: To retrieve tag set of an object
8837
9314
  #
8838
- # # The following example retrieves tag set of an object. The request specifies object version.
9315
+ # # The following example retrieves tag set of an object.
8839
9316
  #
8840
9317
  # resp = client.get_object_tagging({
8841
9318
  # bucket: "examplebucket",
8842
- # key: "exampleobject",
8843
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
9319
+ # key: "HappyFace.jpg",
8844
9320
  # })
8845
9321
  #
8846
9322
  # resp.to_h outputs the following:
8847
9323
  # {
8848
9324
  # tag_set: [
8849
9325
  # {
8850
- # key: "Key1",
8851
- # value: "Value1",
9326
+ # key: "Key4",
9327
+ # value: "Value4",
9328
+ # },
9329
+ # {
9330
+ # key: "Key3",
9331
+ # value: "Value3",
8852
9332
  # },
8853
9333
  # ],
8854
- # version_id: "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI",
9334
+ # version_id: "null",
8855
9335
  # }
8856
9336
  #
8857
9337
  # @example Request syntax with placeholder values
@@ -9284,6 +9764,13 @@ module Aws::S3
9284
9764
  # interruptions when a session expires. For more information about
9285
9765
  # authorization, see [ `CreateSession` ][3].
9286
9766
  #
9767
+ # If you enable `x-amz-checksum-mode` in the request and the object
9768
+ # is encrypted with Amazon Web Services Key Management Service
9769
+ # (Amazon Web Services KMS), you must also have the
9770
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
9771
+ # identity-based policies and KMS key policies for the KMS key to
9772
+ # retrieve the checksum of the object.
9773
+ #
9287
9774
  # Encryption
9288
9775
  # : <note markdown="1"> Encryption request headers, like `x-amz-server-side-encryption`,
9289
9776
  # should not be sent for `HEAD` requests if your object uses
@@ -9317,9 +9804,10 @@ module Aws::S3
9317
9804
  # Customer-Provided Encryption Keys)][4] in the *Amazon S3 User
9318
9805
  # Guide*.
9319
9806
  #
9320
- # <note markdown="1"> **Directory bucket permissions** - For directory buckets, only
9321
- # server-side encryption with Amazon S3 managed keys (SSE-S3)
9322
- # (`AES256`) is supported.
9807
+ # <note markdown="1"> <b>Directory bucket </b> - For directory buckets, there are only two
9808
+ # supported options for server-side encryption: SSE-S3 and SSE-KMS.
9809
+ # SSE-C isn't supported. For more information, see [Protecting data
9810
+ # with server-side encryption][5] in the *Amazon S3 User Guide*.
9323
9811
  #
9324
9812
  # </note>
9325
9813
  #
@@ -9353,15 +9841,15 @@ module Aws::S3
9353
9841
  # requests in the format
9354
9842
  # `https://bucket_name.s3express-az_id.region.amazonaws.com/key-name
9355
9843
  # `. Path-style requests are not supported. For more information, see
9356
- # [Regional and Zonal endpoints][5] in the *Amazon S3 User Guide*.
9844
+ # [Regional and Zonal endpoints][6] in the *Amazon S3 User Guide*.
9357
9845
  #
9358
9846
  # </note>
9359
9847
  #
9360
9848
  # The following actions are related to `HeadObject`:
9361
9849
  #
9362
- # * [GetObject][6]
9850
+ # * [GetObject][7]
9363
9851
  #
9364
- # * [GetObjectAttributes][7]
9852
+ # * [GetObjectAttributes][8]
9365
9853
  #
9366
9854
  #
9367
9855
  #
@@ -9369,9 +9857,10 @@ module Aws::S3
9369
9857
  # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html
9370
9858
  # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateSession.html
9371
9859
  # [4]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
9372
- # [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
9373
- # [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
9374
- # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html
9860
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
9861
+ # [6]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
9862
+ # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html
9863
+ # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAttributes.html
9375
9864
  #
9376
9865
  # @option params [required, String] :bucket
9377
9866
  # The name of the bucket that contains the object.
@@ -9587,10 +10076,16 @@ module Aws::S3
9587
10076
  # @option params [String] :checksum_mode
9588
10077
  # To retrieve the checksum, this parameter must be enabled.
9589
10078
  #
9590
- # In addition, if you enable checksum mode and the object is uploaded
9591
- # with a [checksum][1] and encrypted with an Key Management Service
9592
- # (KMS) key, you must have permission to use the `kms:Decrypt` action to
9593
- # retrieve the checksum.
10079
+ # **General purpose buckets** - If you enable checksum mode and the
10080
+ # object is uploaded with a [checksum][1] and encrypted with an Key
10081
+ # Management Service (KMS) key, you must have permission to use the
10082
+ # `kms:Decrypt` action to retrieve the checksum.
10083
+ #
10084
+ # **Directory buckets** - If you enable `ChecksumMode` and the object is
10085
+ # encrypted with Amazon Web Services Key Management Service (Amazon Web
10086
+ # Services KMS), you must also have the `kms:GenerateDataKey` and
10087
+ # `kms:Decrypt` permissions in IAM identity-based policies and KMS key
10088
+ # policies for the KMS key to retrieve the checksum of the object.
9594
10089
  #
9595
10090
  #
9596
10091
  #
@@ -12586,24 +13081,73 @@ module Aws::S3
12586
13081
  req.send_request(options)
12587
13082
  end
12588
13083
 
12589
- # <note markdown="1"> This operation is not supported by directory buckets.
13084
+ # This operation configures default encryption and Amazon S3 Bucket Keys
13085
+ # for an existing bucket.
12590
13086
  #
12591
- # </note>
13087
+ # <note markdown="1"> <b>Directory buckets </b> - For directory buckets, you must make
13088
+ # requests for this API operation to the Regional endpoint. These
13089
+ # endpoints support path-style requests in the format
13090
+ # `https://s3express-control.region_code.amazonaws.com/bucket-name `.
13091
+ # Virtual-hosted-style requests aren't supported. For more information,
13092
+ # see [Regional and Zonal endpoints][1] in the *Amazon S3 User Guide*.
12592
13093
  #
12593
- # This action uses the `encryption` subresource to configure default
12594
- # encryption and Amazon S3 Bucket Keys for an existing bucket.
13094
+ # </note>
12595
13095
  #
12596
13096
  # By default, all buckets have a default encryption configuration that
12597
- # uses server-side encryption with Amazon S3 managed keys (SSE-S3). You
12598
- # can optionally configure default encryption for a bucket by using
12599
- # server-side encryption with Key Management Service (KMS) keys
12600
- # (SSE-KMS) or dual-layer server-side encryption with Amazon Web
12601
- # Services KMS keys (DSSE-KMS). If you specify default encryption by
12602
- # using SSE-KMS, you can also configure [Amazon S3 Bucket Keys][1]. If
12603
- # you use PutBucketEncryption to set your [default bucket encryption][2]
12604
- # to SSE-KMS, you should verify that your KMS key ID is correct. Amazon
12605
- # S3 does not validate the KMS key ID provided in PutBucketEncryption
12606
- # requests.
13097
+ # uses server-side encryption with Amazon S3 managed keys (SSE-S3).
13098
+ #
13099
+ # <note markdown="1"> * **General purpose buckets**
13100
+ #
13101
+ # * You can optionally configure default encryption for a bucket by
13102
+ # using server-side encryption with Key Management Service (KMS)
13103
+ # keys (SSE-KMS) or dual-layer server-side encryption with Amazon
13104
+ # Web Services KMS keys (DSSE-KMS). If you specify default
13105
+ # encryption by using SSE-KMS, you can also configure [Amazon S3
13106
+ # Bucket Keys][2]. For information about the bucket default
13107
+ # encryption feature, see [Amazon S3 Bucket Default Encryption][3]
13108
+ # in the *Amazon S3 User Guide*.
13109
+ #
13110
+ # * If you use PutBucketEncryption to set your [default bucket
13111
+ # encryption][3] to SSE-KMS, you should verify that your KMS key ID
13112
+ # is correct. Amazon S3 doesn't validate the KMS key ID provided in
13113
+ # PutBucketEncryption requests.
13114
+ #
13115
+ # * <b>Directory buckets </b> - You can optionally configure default
13116
+ # encryption for a bucket by using server-side encryption with Key
13117
+ # Management Service (KMS) keys (SSE-KMS).
13118
+ #
13119
+ # * We recommend that the bucket's default encryption uses the
13120
+ # desired encryption configuration and you don't override the
13121
+ # bucket default encryption in your `CreateSession` requests or
13122
+ # `PUT` object requests. Then, new objects are automatically
13123
+ # encrypted with the desired encryption settings. For more
13124
+ # information about the encryption overriding behaviors in directory
13125
+ # buckets, see [Specifying server-side encryption with KMS for new
13126
+ # object uploads][4].
13127
+ #
13128
+ # * Your SSE-KMS configuration can only support 1 [customer managed
13129
+ # key][5] per directory bucket for the lifetime of the bucket.
13130
+ # [Amazon Web Services managed key][6] (`aws/s3`) isn't supported.
13131
+ #
13132
+ # * S3 Bucket Keys are always enabled for `GET` and `PUT` operations
13133
+ # in a directory bucket and can’t be disabled. S3 Bucket Keys
13134
+ # aren't supported, when you copy SSE-KMS encrypted objects from
13135
+ # general purpose buckets to directory buckets, from directory
13136
+ # buckets to general purpose buckets, or between directory buckets,
13137
+ # through [CopyObject][7], [UploadPartCopy][8], [the Copy operation
13138
+ # in Batch Operations][9], or [the import jobs][10]. In this case,
13139
+ # Amazon S3 makes a call to KMS every time a copy request is made
13140
+ # for a KMS-encrypted object.
13141
+ #
13142
+ # * When you specify an [KMS customer managed key][5] for encryption
13143
+ # in your directory bucket, only use the key ID or key ARN. The key
13144
+ # alias format of the KMS key isn't supported.
13145
+ #
13146
+ # * For directory buckets, if you use PutBucketEncryption to set your
13147
+ # [default bucket encryption][3] to SSE-KMS, Amazon S3 validates the
13148
+ # KMS key ID provided in PutBucketEncryption requests.
13149
+ #
13150
+ # </note>
12607
13151
  #
12608
13152
  # If you're specifying a customer managed KMS key, we recommend using a
12609
13153
  # fully qualified KMS key ARN. If you use a KMS key alias instead, then
@@ -12613,45 +13157,80 @@ module Aws::S3
12613
13157
  #
12614
13158
  # Also, this action requires Amazon Web Services Signature Version 4.
12615
13159
  # For more information, see [ Authenticating Requests (Amazon Web
12616
- # Services Signature Version 4)][3].
13160
+ # Services Signature Version 4)][11].
12617
13161
  #
12618
- # To use this operation, you must have permission to perform the
12619
- # `s3:PutEncryptionConfiguration` action. The bucket owner has this
12620
- # permission by default. The bucket owner can grant this permission to
12621
- # others. For more information about permissions, see [Permissions
12622
- # Related to Bucket Subresource Operations][4] and [Managing Access
12623
- # Permissions to Your Amazon S3 Resources][5] in the *Amazon S3 User
12624
- # Guide*.
13162
+ # Permissions
13163
+ # : * **General purpose bucket permissions** - The
13164
+ # `s3:PutEncryptionConfiguration` permission is required in a
13165
+ # policy. The bucket owner has this permission by default. The
13166
+ # bucket owner can grant this permission to others. For more
13167
+ # information about permissions, see [Permissions Related to Bucket
13168
+ # Operations][12] and [Managing Access Permissions to Your Amazon S3
13169
+ # Resources][13] in the *Amazon S3 User Guide*.
13170
+ #
13171
+ # * **Directory bucket permissions** - To grant access to this API
13172
+ # operation, you must have the
13173
+ # `s3express:PutEncryptionConfiguration` permission in an IAM
13174
+ # identity-based policy instead of a bucket policy. Cross-account
13175
+ # access to this API operation isn't supported. This operation can
13176
+ # only be performed by the Amazon Web Services account that owns the
13177
+ # resource. For more information about directory bucket policies and
13178
+ # permissions, see [Amazon Web Services Identity and Access
13179
+ # Management (IAM) for S3 Express One Zone][14] in the *Amazon S3
13180
+ # User Guide*.
13181
+ #
13182
+ # To set a directory bucket default encryption with SSE-KMS, you
13183
+ # must also have the `kms:GenerateDataKey` and the `kms:Decrypt`
13184
+ # permissions in IAM identity-based policies and KMS key policies
13185
+ # for the target KMS key.
13186
+ #
13187
+ # HTTP Host header syntax
13188
+ #
13189
+ # : <b>Directory buckets </b> - The HTTP Host header syntax is
13190
+ # `s3express-control.region.amazonaws.com`.
12625
13191
  #
12626
13192
  # The following operations are related to `PutBucketEncryption`:
12627
13193
  #
12628
- # * [GetBucketEncryption][6]
13194
+ # * [GetBucketEncryption][15]
12629
13195
  #
12630
- # * [DeleteBucketEncryption][7]
13196
+ # * [DeleteBucketEncryption][16]
12631
13197
  #
12632
13198
  #
12633
13199
  #
12634
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
12635
- # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
12636
- # [3]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
12637
- # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
12638
- # [5]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
12639
- # [6]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html
12640
- # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html
13200
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-Regions-and-Zones.html
13201
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html
13202
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
13203
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
13204
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
13205
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
13206
+ # [7]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
13207
+ # [8]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
13208
+ # [9]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
13209
+ # [10]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
13210
+ # [11]: https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
13211
+ # [12]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources
13212
+ # [13]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html
13213
+ # [14]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam.html
13214
+ # [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html
13215
+ # [16]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html
12641
13216
  #
12642
13217
  # @option params [required, String] :bucket
12643
13218
  # Specifies default encryption for a bucket using server-side encryption
12644
- # with different key options. By default, all buckets have a default
12645
- # encryption configuration that uses server-side encryption with Amazon
12646
- # S3 managed keys (SSE-S3). You can optionally configure default
12647
- # encryption for a bucket by using server-side encryption with an Amazon
12648
- # Web Services KMS key (SSE-KMS) or a customer-provided key (SSE-C). For
12649
- # information about the bucket default encryption feature, see [Amazon
12650
- # S3 Bucket Default Encryption][1] in the *Amazon S3 User Guide*.
13219
+ # with different key options.
13220
+ #
13221
+ # <b>Directory buckets </b> - When you use this operation with a
13222
+ # directory bucket, you must use path-style requests in the format
13223
+ # `https://s3express-control.region_code.amazonaws.com/bucket-name `.
13224
+ # Virtual-hosted-style requests aren't supported. Directory bucket
13225
+ # names must be unique in the chosen Availability Zone. Bucket names
13226
+ # must also follow the format ` bucket_base_name--az_id--x-s3` (for
13227
+ # example, ` DOC-EXAMPLE-BUCKET--usw2-az1--x-s3`). For information about
13228
+ # bucket naming restrictions, see [Directory bucket naming rules][1] in
13229
+ # the *Amazon S3 User Guide*
12651
13230
  #
12652
13231
  #
12653
13232
  #
12654
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html
13233
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-bucket-naming-rules.html
12655
13234
  #
12656
13235
  # @option params [String] :content_md5
12657
13236
  # The base64-encoded 128-bit MD5 digest of the server-side encryption
@@ -12661,6 +13240,10 @@ module Aws::S3
12661
13240
  # (CLI) or Amazon Web Services SDKs, this field is calculated
12662
13241
  # automatically.
12663
13242
  #
13243
+ # <note markdown="1"> This functionality is not supported for directory buckets.
13244
+ #
13245
+ # </note>
13246
+ #
12664
13247
  # @option params [String] :checksum_algorithm
12665
13248
  # Indicates the algorithm used to create the checksum for the object
12666
13249
  # when you use the SDK. This header will not provide any additional
@@ -12673,6 +13256,11 @@ module Aws::S3
12673
13256
  # If you provide an individual checksum, Amazon S3 ignores any provided
12674
13257
  # `ChecksumAlgorithm` parameter.
12675
13258
  #
13259
+ # <note markdown="1"> For directory buckets, when you use Amazon Web Services SDKs, `CRC32`
13260
+ # is the default checksum algorithm that's used for performance.
13261
+ #
13262
+ # </note>
13263
+ #
12676
13264
  #
12677
13265
  #
12678
13266
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html
@@ -12685,6 +13273,12 @@ module Aws::S3
12685
13273
  # you provide does not match the actual owner of the bucket, the request
12686
13274
  # fails with the HTTP status code `403 Forbidden` (access denied).
12687
13275
  #
13276
+ # <note markdown="1"> For directory buckets, this header is not supported in this API
13277
+ # operation. If you specify this header, the request fails with the HTTP
13278
+ # status code `501 Not Implemented`.
13279
+ #
13280
+ # </note>
13281
+ #
12688
13282
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
12689
13283
  #
12690
13284
  # @example Request syntax with placeholder values
@@ -15082,6 +15676,10 @@ module Aws::S3
15082
15676
  # interruptions when a session expires. For more information about
15083
15677
  # authorization, see [ `CreateSession` ][5].
15084
15678
  #
15679
+ # If the object is encrypted with SSE-KMS, you must also have the
15680
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
15681
+ # identity-based policies and KMS key policies for the KMS key.
15682
+ #
15085
15683
  # Data integrity with Content-MD5
15086
15684
  # : * **General purpose bucket** - To ensure that data is not corrupted
15087
15685
  # traversing the network, use the `Content-MD5` header. When you use
@@ -15431,25 +16029,65 @@ module Aws::S3
15431
16029
  # object in Amazon S3 (for example, `AES256`, `aws:kms`,
15432
16030
  # `aws:kms:dsse`).
15433
16031
  #
15434
- # <b>General purpose buckets </b> - You have four mutually exclusive
15435
- # options to protect data using server-side encryption in Amazon S3,
15436
- # depending on how you choose to manage the encryption keys.
15437
- # Specifically, the encryption key options are Amazon S3 managed keys
15438
- # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
15439
- # customer-provided keys (SSE-C). Amazon S3 encrypts data with
15440
- # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
15441
- # default. You can optionally tell Amazon S3 to encrypt data at rest by
15442
- # using server-side encryption with other key options. For more
15443
- # information, see [Using Server-Side Encryption][1] in the *Amazon S3
15444
- # User Guide*.
16032
+ # * <b>General purpose buckets </b> - You have four mutually exclusive
16033
+ # options to protect data using server-side encryption in Amazon S3,
16034
+ # depending on how you choose to manage the encryption keys.
16035
+ # Specifically, the encryption key options are Amazon S3 managed keys
16036
+ # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
16037
+ # customer-provided keys (SSE-C). Amazon S3 encrypts data with
16038
+ # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
16039
+ # default. You can optionally tell Amazon S3 to encrypt data at rest
16040
+ # by using server-side encryption with other key options. For more
16041
+ # information, see [Using Server-Side Encryption][1] in the *Amazon S3
16042
+ # User Guide*.
15445
16043
  #
15446
- # <b>Directory buckets </b> - For directory buckets, only the
15447
- # server-side encryption with Amazon S3 managed keys (SSE-S3) (`AES256`)
15448
- # value is supported.
16044
+ # * <b>Directory buckets </b> - For directory buckets, there are only
16045
+ # two supported options for server-side encryption: server-side
16046
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
16047
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
16048
+ # recommend that the bucket's default encryption uses the desired
16049
+ # encryption configuration and you don't override the bucket default
16050
+ # encryption in your `CreateSession` requests or `PUT` object
16051
+ # requests. Then, new objects are automatically encrypted with the
16052
+ # desired encryption settings. For more information, see [Protecting
16053
+ # data with server-side encryption][2] in the *Amazon S3 User Guide*.
16054
+ # For more information about the encryption overriding behaviors in
16055
+ # directory buckets, see [Specifying server-side encryption with KMS
16056
+ # for new object uploads][3].
16057
+ #
16058
+ # In the Zonal endpoint API calls (except [CopyObject][4] and
16059
+ # [UploadPartCopy][5]) using the REST API, the encryption request
16060
+ # headers must match the encryption settings that are specified in the
16061
+ # `CreateSession` request. You can't override the values of the
16062
+ # encryption settings (`x-amz-server-side-encryption`,
16063
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
16064
+ # `x-amz-server-side-encryption-context`, and
16065
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
16066
+ # specified in the `CreateSession` request. You don't need to
16067
+ # explicitly specify these encryption settings values in Zonal
16068
+ # endpoint API calls, and Amazon S3 will use the encryption settings
16069
+ # values from the `CreateSession` request to protect new objects in
16070
+ # the directory bucket.
16071
+ #
16072
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
16073
+ # `CreateSession`, the session token refreshes automatically to avoid
16074
+ # service interruptions when a session expires. The CLI or the Amazon
16075
+ # Web Services SDKs use the bucket's default encryption configuration
16076
+ # for the `CreateSession` request. It's not supported to override the
16077
+ # encryption settings values in the `CreateSession` request. So in the
16078
+ # Zonal endpoint API calls (except [CopyObject][4] and
16079
+ # [UploadPartCopy][5]), the encryption request headers must match the
16080
+ # default encryption configuration of the directory bucket.
16081
+ #
16082
+ # </note>
15449
16083
  #
15450
16084
  #
15451
16085
  #
15452
16086
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
16087
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
16088
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
16089
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
16090
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
15453
16091
  #
15454
16092
  # @option params [String] :storage_class
15455
16093
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
@@ -15529,46 +16167,83 @@ module Aws::S3
15529
16167
  # </note>
15530
16168
  #
15531
16169
  # @option params [String] :ssekms_key_id
15532
- # If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
15533
- # `aws:kms:dsse`, this header specifies the ID (Key ID, Key ARN, or Key
15534
- # Alias) of the Key Management Service (KMS) symmetric encryption
15535
- # customer managed key that was used for the object. If you specify
15536
- # `x-amz-server-side-encryption:aws:kms` or
15537
- # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
15538
- # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
15539
- # Amazon Web Services managed key (`aws/s3`) to protect the data. If the
15540
- # KMS key does not exist in the same account that's issuing the
15541
- # command, you must use the full ARN and not just the ID.
16170
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
16171
+ # object encryption. If the KMS key doesn't exist in the same account
16172
+ # that's issuing the command, you must use the full Key ARN not the Key
16173
+ # ID.
16174
+ #
16175
+ # **General purpose buckets** - If you specify
16176
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
16177
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
16178
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
16179
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
16180
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
16181
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
16182
+ #
16183
+ # **Directory buckets** - If you specify `x-amz-server-side-encryption`
16184
+ # with `aws:kms`, you must specify the `
16185
+ # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
16186
+ # ID or Key ARN) of the KMS symmetric encryption customer managed key to
16187
+ # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
16188
+ # key ID or key ARN. The key alias format of the KMS key isn't
16189
+ # supported. Your SSE-KMS configuration can only support 1 [customer
16190
+ # managed key][1] per directory bucket for the lifetime of the bucket.
16191
+ # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
16192
+ #
16193
+ #
16194
+ #
16195
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
16196
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
15542
16197
  #
15543
- # <note markdown="1"> This functionality is not supported for directory buckets.
16198
+ # @option params [String] :ssekms_encryption_context
16199
+ # Specifies the Amazon Web Services KMS Encryption Context as an
16200
+ # additional encryption context to use for object encryption. The value
16201
+ # of this header is a Base64-encoded string of a UTF-8 encoded JSON,
16202
+ # which contains the encryption context as key-value pairs. This value
16203
+ # is stored as object metadata and automatically gets passed on to
16204
+ # Amazon Web Services KMS for future `GetObject` operations on this
16205
+ # object.
15544
16206
  #
15545
- # </note>
16207
+ # **General purpose buckets** - This value must be explicitly added
16208
+ # during `CopyObject` operations if you want an additional encryption
16209
+ # context for your object. For more information, see [Encryption
16210
+ # context][1] in the *Amazon S3 User Guide*.
15546
16211
  #
15547
- # @option params [String] :ssekms_encryption_context
15548
- # Specifies the Amazon Web Services KMS Encryption Context to use for
15549
- # object encryption. The value of this header is a base64-encoded UTF-8
15550
- # string holding JSON with the encryption context key-value pairs. This
15551
- # value is stored as object metadata and automatically gets passed on to
15552
- # Amazon Web Services KMS for future `GetObject` or `CopyObject`
15553
- # operations on this object. This value must be explicitly added during
15554
- # `CopyObject` operations.
16212
+ # **Directory buckets** - You can optionally provide an explicit
16213
+ # encryption context value. The value must match the default encryption
16214
+ # context - the bucket Amazon Resource Name (ARN). An additional
16215
+ # encryption context value is not supported.
15555
16216
  #
15556
- # <note markdown="1"> This functionality is not supported for directory buckets.
15557
16217
  #
15558
- # </note>
16218
+ #
16219
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
15559
16220
  #
15560
16221
  # @option params [Boolean] :bucket_key_enabled
15561
16222
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
15562
16223
  # encryption with server-side encryption using Key Management Service
15563
- # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
15564
- # to use an S3 Bucket Key for object encryption with SSE-KMS.
16224
+ # (KMS) keys (SSE-KMS).
16225
+ #
16226
+ # **General purpose buckets** - Setting this header to `true` causes
16227
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
16228
+ # Also, specifying this header with a PUT action doesn't affect
16229
+ # bucket-level settings for S3 Bucket Key.
15565
16230
  #
15566
- # Specifying this header with a PUT action doesn’t affect bucket-level
15567
- # settings for S3 Bucket Key.
16231
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
16232
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
16233
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
16234
+ # from general purpose buckets to directory buckets, from directory
16235
+ # buckets to general purpose buckets, or between directory buckets,
16236
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
16237
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
16238
+ # makes a call to KMS every time a copy request is made for a
16239
+ # KMS-encrypted object.
15568
16240
  #
15569
- # <note markdown="1"> This functionality is not supported for directory buckets.
15570
16241
  #
15571
- # </note>
16242
+ #
16243
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
16244
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
16245
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
16246
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
15572
16247
  #
15573
16248
  # @option params [String] :request_payer
15574
16249
  # Confirms that the requester knows that they will be charged for the
@@ -15646,24 +16321,22 @@ module Aws::S3
15646
16321
  # * {Types::PutObjectOutput#request_charged #request_charged} => String
15647
16322
  #
15648
16323
  #
15649
- # @example Example: To upload an object (specify optional headers)
16324
+ # @example Example: To upload an object and specify optional tags
15650
16325
  #
15651
- # # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
15652
- # # storage class and use server-side encryption.
16326
+ # # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
16327
+ # # S3 returns version ID of the newly created object.
15653
16328
  #
15654
16329
  # resp = client.put_object({
15655
- # body: "HappyFace.jpg",
16330
+ # body: "c:\\HappyFace.jpg",
15656
16331
  # bucket: "examplebucket",
15657
16332
  # key: "HappyFace.jpg",
15658
- # server_side_encryption: "AES256",
15659
- # storage_class: "STANDARD_IA",
16333
+ # tagging: "key1=value1&key2=value2",
15660
16334
  # })
15661
16335
  #
15662
16336
  # resp.to_h outputs the following:
15663
16337
  # {
15664
16338
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15665
- # server_side_encryption: "AES256",
15666
- # version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
16339
+ # version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
15667
16340
  # }
15668
16341
  #
15669
16342
  # @example Example: To create an object.
@@ -15682,98 +16355,100 @@ module Aws::S3
15682
16355
  # version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
15683
16356
  # }
15684
16357
  #
15685
- # @example Example: To upload an object
16358
+ # @example Example: To upload object and specify user-defined metadata
15686
16359
  #
15687
- # # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
15688
- # # syntax. S3 returns VersionId of the newly created object.
16360
+ # # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
16361
+ # # enabled, S3 returns version ID in response.
15689
16362
  #
15690
16363
  # resp = client.put_object({
15691
- # body: "HappyFace.jpg",
16364
+ # body: "filetoupload",
15692
16365
  # bucket: "examplebucket",
15693
- # key: "HappyFace.jpg",
16366
+ # key: "exampleobject",
16367
+ # metadata: {
16368
+ # "metadata1" => "value1",
16369
+ # "metadata2" => "value2",
16370
+ # },
15694
16371
  # })
15695
16372
  #
15696
16373
  # resp.to_h outputs the following:
15697
16374
  # {
15698
16375
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15699
- # version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
16376
+ # version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
15700
16377
  # }
15701
16378
  #
15702
- # @example Example: To upload an object and specify optional tags
16379
+ # @example Example: To upload an object
15703
16380
  #
15704
- # # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
15705
- # # S3 returns version ID of the newly created object.
16381
+ # # The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file
16382
+ # # syntax. S3 returns VersionId of the newly created object.
15706
16383
  #
15707
16384
  # resp = client.put_object({
15708
- # body: "c:\\HappyFace.jpg",
16385
+ # body: "HappyFace.jpg",
15709
16386
  # bucket: "examplebucket",
15710
16387
  # key: "HappyFace.jpg",
15711
- # tagging: "key1=value1&key2=value2",
15712
16388
  # })
15713
16389
  #
15714
16390
  # resp.to_h outputs the following:
15715
16391
  # {
15716
16392
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15717
- # version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
16393
+ # version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
15718
16394
  # }
15719
16395
  #
15720
- # @example Example: To upload an object and specify canned ACL.
16396
+ # @example Example: To upload an object and specify server-side encryption and object tags
15721
16397
  #
15722
- # # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
15723
- # # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
16398
+ # # The following example uploads an object. The request specifies the optional server-side encryption option. The request
16399
+ # # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
15724
16400
  #
15725
16401
  # resp = client.put_object({
15726
- # acl: "authenticated-read",
15727
16402
  # body: "filetoupload",
15728
16403
  # bucket: "examplebucket",
15729
16404
  # key: "exampleobject",
16405
+ # server_side_encryption: "AES256",
16406
+ # tagging: "key1=value1&key2=value2",
15730
16407
  # })
15731
16408
  #
15732
16409
  # resp.to_h outputs the following:
15733
16410
  # {
15734
16411
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15735
- # version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
16412
+ # server_side_encryption: "AES256",
16413
+ # version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
15736
16414
  # }
15737
16415
  #
15738
- # @example Example: To upload object and specify user-defined metadata
16416
+ # @example Example: To upload an object and specify canned ACL.
15739
16417
  #
15740
- # # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
15741
- # # enabled, S3 returns version ID in response.
16418
+ # # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
16419
+ # # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
15742
16420
  #
15743
16421
  # resp = client.put_object({
16422
+ # acl: "authenticated-read",
15744
16423
  # body: "filetoupload",
15745
16424
  # bucket: "examplebucket",
15746
16425
  # key: "exampleobject",
15747
- # metadata: {
15748
- # "metadata1" => "value1",
15749
- # "metadata2" => "value2",
15750
- # },
15751
16426
  # })
15752
16427
  #
15753
16428
  # resp.to_h outputs the following:
15754
16429
  # {
15755
16430
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15756
- # version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
16431
+ # version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
15757
16432
  # }
15758
16433
  #
15759
- # @example Example: To upload an object and specify server-side encryption and object tags
16434
+ # @example Example: To upload an object (specify optional headers)
15760
16435
  #
15761
- # # The following example uploads an object. The request specifies the optional server-side encryption option. The request
15762
- # # also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.
16436
+ # # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
16437
+ # # storage class and use server-side encryption.
15763
16438
  #
15764
16439
  # resp = client.put_object({
15765
- # body: "filetoupload",
16440
+ # body: "HappyFace.jpg",
15766
16441
  # bucket: "examplebucket",
15767
- # key: "exampleobject",
16442
+ # key: "HappyFace.jpg",
15768
16443
  # server_side_encryption: "AES256",
15769
- # tagging: "key1=value1&key2=value2",
16444
+ # storage_class: "STANDARD_IA",
15770
16445
  # })
15771
16446
  #
15772
16447
  # resp.to_h outputs the following:
15773
16448
  # {
15774
16449
  # etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
15775
16450
  # server_side_encryption: "AES256",
15776
- # version_id: "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt",
16451
+ # version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
15777
16452
  # }
15778
16453
  #
15779
16454
  # @example Streaming a file from disk
@@ -17786,6 +18461,10 @@ module Aws::S3
17786
18461
  # interruptions when a session expires. For more information about
17787
18462
  # authorization, see [ `CreateSession` ][9].
17788
18463
  #
18464
+ # If the object is encrypted with SSE-KMS, you must also have the
18465
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
18466
+ # identity-based policies and KMS key policies for the KMS key.
18467
+ #
17789
18468
  # Data integrity
17790
18469
  #
17791
18470
  # : **General purpose bucket** - To ensure that data is not corrupted
@@ -17837,12 +18516,13 @@ module Aws::S3
17837
18516
  #
17838
18517
  # * x-amz-server-side-encryption-customer-key-MD5
17839
18518
  #
17840
- # * **Directory bucket** - For directory buckets, only server-side
17841
- # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) is
17842
- # supported.
18519
+ # For more information, see [Using Server-Side Encryption][11] in
18520
+ # the *Amazon S3 User Guide*.
17843
18521
  #
17844
- # For more information, see [Using Server-Side Encryption][11] in the
17845
- # *Amazon S3 User Guide*.
18522
+ # * <b>Directory buckets </b> - For directory buckets, there are only
18523
+ # two supported options for server-side encryption: server-side
18524
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
18525
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`).
17846
18526
  #
17847
18527
  # Special errors
17848
18528
  # : * Error Code: `NoSuchUpload`
@@ -18255,6 +18935,10 @@ module Aws::S3
18255
18935
  # destination. The `s3express:SessionMode` condition key cannot be
18256
18936
  # set to `ReadOnly` on the copy destination.
18257
18937
  #
18938
+ # If the object is encrypted with SSE-KMS, you must also have the
18939
+ # `kms:GenerateDataKey` and `kms:Decrypt` permissions in IAM
18940
+ # identity-based policies and KMS key policies for the KMS key.
18941
+ #
18258
18942
  # For example policies, see [Example bucket policies for S3 Express
18259
18943
  # One Zone][10] and [Amazon Web Services Identity and Access
18260
18944
  # Management (IAM) identity-based policies for S3 Express One
@@ -18266,9 +18950,26 @@ module Aws::S3
18266
18950
  # the `UploadPartCopy` operation, see [CopyObject][12] and
18267
18951
  # [UploadPart][2].
18268
18952
  #
18269
- # * <b>Directory buckets </b> - For directory buckets, only
18270
- # server-side encryption with Amazon S3 managed keys (SSE-S3)
18271
- # (`AES256`) is supported.
18953
+ # * <b>Directory buckets </b> - For directory buckets, there are only
18954
+ # two supported options for server-side encryption: server-side
18955
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
18956
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). For
18957
+ # more information, see [Protecting data with server-side
18958
+ # encryption][13] in the *Amazon S3 User Guide*.
18959
+ #
18960
+ # <note markdown="1"> For directory buckets, when you perform a `CreateMultipartUpload`
18961
+ # operation and an `UploadPartCopy` operation, the request headers
18962
+ # you provide in the `CreateMultipartUpload` request must match the
18963
+ # default encryption configuration of the destination bucket.
18964
+ #
18965
+ # </note>
18966
+ #
18967
+ # S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted
18968
+ # objects from general purpose buckets to directory buckets, from
18969
+ # directory buckets to general purpose buckets, or between directory
18970
+ # buckets, through [UploadPartCopy][14]. In this case, Amazon S3
18971
+ # makes a call to KMS every time a copy request is made for a
18972
+ # KMS-encrypted object.
18272
18973
  #
18273
18974
  # Special errors
18274
18975
  # : * Error Code: `NoSuchUpload`
@@ -18293,17 +18994,17 @@ module Aws::S3
18293
18994
  #
18294
18995
  # The following operations are related to `UploadPartCopy`:
18295
18996
  #
18296
- # * [CreateMultipartUpload][13]
18997
+ # * [CreateMultipartUpload][15]
18297
18998
  #
18298
18999
  # * [UploadPart][2]
18299
19000
  #
18300
- # * [CompleteMultipartUpload][14]
19001
+ # * [CompleteMultipartUpload][16]
18301
19002
  #
18302
- # * [AbortMultipartUpload][15]
19003
+ # * [AbortMultipartUpload][17]
18303
19004
  #
18304
- # * [ListParts][16]
19005
+ # * [ListParts][18]
18305
19006
  #
18306
- # * [ListMultipartUploads][17]
19007
+ # * [ListMultipartUploads][19]
18307
19008
  #
18308
19009
  #
18309
19010
  #
@@ -18319,11 +19020,13 @@ module Aws::S3
18319
19020
  # [10]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-example-bucket-policies.html
18320
19021
  # [11]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-security-iam-identity-policies.html
18321
19022
  # [12]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
18322
- # [13]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
18323
- # [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
18324
- # [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
18325
- # [16]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
18326
- # [17]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
19023
+ # [13]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
19024
+ # [14]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
19025
+ # [15]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html
19026
+ # [16]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html
19027
+ # [17]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html
19028
+ # [18]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html
19029
+ # [19]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html
18327
19030
  #
18328
19031
  # @option params [required, String] :bucket
18329
19032
  # The bucket name.
@@ -18609,45 +19312,45 @@ module Aws::S3
18609
19312
  # * {Types::UploadPartCopyOutput#request_charged #request_charged} => String
18610
19313
  #
18611
19314
  #
18612
- # @example Example: To upload a part by copying data from an existing object as data source
19315
+ # @example Example: To upload a part by copying byte range from an existing object as data source
18613
19316
  #
18614
- # # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
19317
+ # # The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as
19318
+ # # data source.
18615
19319
  #
18616
19320
  # resp = client.upload_part_copy({
18617
19321
  # bucket: "examplebucket",
18618
19322
  # copy_source: "/bucketname/sourceobjectkey",
19323
+ # copy_source_range: "bytes=1-100000",
18619
19324
  # key: "examplelargeobject",
18620
- # part_number: 1,
19325
+ # part_number: 2,
18621
19326
  # upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
18622
19327
  # })
18623
19328
  #
18624
19329
  # resp.to_h outputs the following:
18625
19330
  # {
18626
19331
  # copy_part_result: {
18627
- # etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
18628
- # last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
19332
+ # etag: "\"65d16d19e65a7508a51f043180edcc36\"",
19333
+ # last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
18629
19334
  # },
18630
19335
  # }
18631
19336
  #
18632
- # @example Example: To upload a part by copying byte range from an existing object as data source
19337
+ # @example Example: To upload a part by copying data from an existing object as data source
18633
19338
  #
18634
- # # The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as
18635
- # # data source.
19339
+ # # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
18636
19340
  #
18637
19341
  # resp = client.upload_part_copy({
18638
19342
  # bucket: "examplebucket",
18639
19343
  # copy_source: "/bucketname/sourceobjectkey",
18640
- # copy_source_range: "bytes=1-100000",
18641
19344
  # key: "examplelargeobject",
18642
- # part_number: 2,
19345
+ # part_number: 1,
18643
19346
  # upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
18644
19347
  # })
18645
19348
  #
18646
19349
  # resp.to_h outputs the following:
18647
19350
  # {
18648
19351
  # copy_part_result: {
18649
- # etag: "\"65d16d19e65a7508a51f043180edcc36\"",
18650
- # last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
19352
+ # etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
19353
+ # last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
18651
19354
  # },
18652
19355
  # }
18653
19356
  #
@@ -19109,7 +19812,7 @@ module Aws::S3
19109
19812
  tracer: tracer
19110
19813
  )
19111
19814
  context[:gem_name] = 'aws-sdk-s3'
19112
- context[:gem_version] = '1.160.0'
19815
+ context[:gem_version] = '1.166.0'
19113
19816
  Seahorse::Client::Request.new(handlers, context)
19114
19817
  end
19115
19818