aws-sdk-s3 1.147.0 → 1.163.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +103 -2
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/access_grants_credentials.rb +57 -0
  5. data/lib/aws-sdk-s3/access_grants_credentials_provider.rb +250 -0
  6. data/lib/aws-sdk-s3/bucket.rb +209 -69
  7. data/lib/aws-sdk-s3/bucket_acl.rb +3 -3
  8. data/lib/aws-sdk-s3/bucket_cors.rb +4 -4
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +4 -4
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +4 -4
  11. data/lib/aws-sdk-s3/bucket_logging.rb +3 -3
  12. data/lib/aws-sdk-s3/bucket_notification.rb +3 -3
  13. data/lib/aws-sdk-s3/bucket_policy.rb +4 -4
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +3 -3
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +4 -4
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +5 -5
  18. data/lib/aws-sdk-s3/bucket_website.rb +4 -4
  19. data/lib/aws-sdk-s3/client.rb +1653 -637
  20. data/lib/aws-sdk-s3/client_api.rb +35 -3
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +1 -1
  22. data/lib/aws-sdk-s3/customizations/errors.rb +15 -2
  23. data/lib/aws-sdk-s3/customizations/object.rb +5 -5
  24. data/lib/aws-sdk-s3/customizations.rb +4 -1
  25. data/lib/aws-sdk-s3/encryption/client.rb +2 -2
  26. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +2 -2
  27. data/lib/aws-sdk-s3/encryptionV2/client.rb +2 -2
  28. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +2 -2
  29. data/lib/aws-sdk-s3/endpoint_parameters.rb +8 -0
  30. data/lib/aws-sdk-s3/endpoint_provider.rb +1 -0
  31. data/lib/aws-sdk-s3/endpoints.rb +199 -397
  32. data/lib/aws-sdk-s3/express_credentials_provider.rb +27 -4
  33. data/lib/aws-sdk-s3/file_downloader.rb +1 -1
  34. data/lib/aws-sdk-s3/file_uploader.rb +1 -1
  35. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +1 -1
  36. data/lib/aws-sdk-s3/multipart_upload.rb +24 -4
  37. data/lib/aws-sdk-s3/multipart_upload_part.rb +3 -3
  38. data/lib/aws-sdk-s3/object.rb +394 -137
  39. data/lib/aws-sdk-s3/object_acl.rb +3 -3
  40. data/lib/aws-sdk-s3/object_copier.rb +1 -1
  41. data/lib/aws-sdk-s3/object_multipart_copier.rb +10 -8
  42. data/lib/aws-sdk-s3/object_summary.rb +358 -115
  43. data/lib/aws-sdk-s3/object_version.rb +46 -9
  44. data/lib/aws-sdk-s3/plugins/access_grants.rb +178 -0
  45. data/lib/aws-sdk-s3/plugins/endpoints.rb +10 -1
  46. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +8 -2
  47. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
  48. data/lib/aws-sdk-s3/plugins/s3_signer.rb +7 -2
  49. data/lib/aws-sdk-s3/presigner.rb +1 -0
  50. data/lib/aws-sdk-s3/resource.rb +12 -10
  51. data/lib/aws-sdk-s3/types.rb +966 -350
  52. data/lib/aws-sdk-s3.rb +1 -1
  53. data/sig/bucket.rbs +1 -0
  54. data/sig/client.rbs +38 -2
  55. data/sig/customizations/bucket.rbs +19 -0
  56. data/sig/customizations/object.rbs +38 -0
  57. data/sig/customizations/object_summary.rbs +35 -0
  58. data/sig/multipart_upload.rbs +1 -0
  59. data/sig/object.rbs +7 -0
  60. data/sig/object_summary.rbs +1 -0
  61. data/sig/object_version.rbs +6 -0
  62. data/sig/resource.rbs +6 -1
  63. data/sig/types.rbs +25 -2
  64. data/sig/waiters.rbs +12 -0
  65. metadata +12 -7
  66. data/lib/aws-sdk-s3/express_credentials_cache.rb +0 -30
@@ -95,7 +95,7 @@ module Aws::S3
95
95
  options, params = separate_params_and_options(options)
96
96
  waiter = Waiters::BucketExists.new(options)
97
97
  yield_waiter_and_warn(waiter, &block) if block_given?
98
- Aws::Plugins::UserAgent.feature('resource') do
98
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
99
99
  waiter.wait(params.merge(bucket: @name))
100
100
  end
101
101
  Bucket.new({
@@ -114,7 +114,7 @@ module Aws::S3
114
114
  options, params = separate_params_and_options(options)
115
115
  waiter = Waiters::BucketNotExists.new(options)
116
116
  yield_waiter_and_warn(waiter, &block) if block_given?
117
- Aws::Plugins::UserAgent.feature('resource') do
117
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
118
118
  waiter.wait(params.merge(bucket: @name))
119
119
  end
120
120
  Bucket.new({
@@ -217,7 +217,7 @@ module Aws::S3
217
217
  :retry
218
218
  end
219
219
  end
220
- Aws::Plugins::UserAgent.feature('resource') do
220
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
221
221
  Aws::Waiters::Waiter.new(options).wait({})
222
222
  end
223
223
  end
@@ -334,7 +334,7 @@ module Aws::S3
334
334
  # @return [Types::CreateBucketOutput]
335
335
  def create(options = {})
336
336
  options = options.merge(bucket: @name)
337
- resp = Aws::Plugins::UserAgent.feature('resource') do
337
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
338
338
  @client.create_bucket(options)
339
339
  end
340
340
  resp.data
@@ -359,7 +359,7 @@ module Aws::S3
359
359
  # @return [EmptyStructure]
360
360
  def delete(options = {})
361
361
  options = options.merge(bucket: @name)
362
- resp = Aws::Plugins::UserAgent.feature('resource') do
362
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
363
363
  @client.delete_bucket(options)
364
364
  end
365
365
  resp.data
@@ -473,7 +473,7 @@ module Aws::S3
473
473
  # @return [Types::DeleteObjectsOutput]
474
474
  def delete_objects(options = {})
475
475
  options = options.merge(bucket: @name)
476
- resp = Aws::Plugins::UserAgent.feature('resource') do
476
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
477
477
  @client.delete_objects(options)
478
478
  end
479
479
  resp.data
@@ -497,6 +497,7 @@ module Aws::S3
497
497
  # checksum_sha1: "ChecksumSHA1",
498
498
  # checksum_sha256: "ChecksumSHA256",
499
499
  # expires: Time.now,
500
+ # if_none_match: "IfNoneMatch",
500
501
  # grant_full_control: "GrantFullControl",
501
502
  # grant_read: "GrantRead",
502
503
  # grant_read_acp: "GrantReadACP",
@@ -712,6 +713,24 @@ module Aws::S3
712
713
  #
713
714
  #
714
715
  # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
716
+ # @option options [String] :if_none_match
717
+ # Uploads the object only if the object key name does not already exist
718
+ # in the bucket specified. Otherwise, Amazon S3 returns a `412
719
+ # Precondition Failed` error.
720
+ #
721
+ # If a conflicting operation occurs during the upload S3 returns a `409
722
+ # ConditionalRequestConflict` response. On a 409 failure you should
723
+ # retry the upload.
724
+ #
725
+ # Expects the '*' (asterisk) character.
726
+ #
727
+ # For more information about conditional requests, see [RFC 7232][1], or
728
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
729
+ #
730
+ #
731
+ #
732
+ # [1]: https://tools.ietf.org/html/rfc7232
733
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
715
734
  # @option options [String] :grant_full_control
716
735
  # Gives the grantee READ, READ\_ACP, and WRITE\_ACP permissions on the
717
736
  # object.
@@ -754,25 +773,65 @@ module Aws::S3
754
773
  # object in Amazon S3 (for example, `AES256`, `aws:kms`,
755
774
  # `aws:kms:dsse`).
756
775
  #
757
- # <b>General purpose buckets </b> - You have four mutually exclusive
758
- # options to protect data using server-side encryption in Amazon S3,
759
- # depending on how you choose to manage the encryption keys.
760
- # Specifically, the encryption key options are Amazon S3 managed keys
761
- # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
762
- # customer-provided keys (SSE-C). Amazon S3 encrypts data with
763
- # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
764
- # default. You can optionally tell Amazon S3 to encrypt data at rest by
765
- # using server-side encryption with other key options. For more
766
- # information, see [Using Server-Side Encryption][1] in the *Amazon S3
767
- # User Guide*.
768
- #
769
- # <b>Directory buckets </b> - For directory buckets, only the
770
- # server-side encryption with Amazon S3 managed keys (SSE-S3) (`AES256`)
771
- # value is supported.
776
+ # * <b>General purpose buckets </b> - You have four mutually exclusive
777
+ # options to protect data using server-side encryption in Amazon S3,
778
+ # depending on how you choose to manage the encryption keys.
779
+ # Specifically, the encryption key options are Amazon S3 managed keys
780
+ # (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and
781
+ # customer-provided keys (SSE-C). Amazon S3 encrypts data with
782
+ # server-side encryption by using Amazon S3 managed keys (SSE-S3) by
783
+ # default. You can optionally tell Amazon S3 to encrypt data at rest
784
+ # by using server-side encryption with other key options. For more
785
+ # information, see [Using Server-Side Encryption][1] in the *Amazon S3
786
+ # User Guide*.
787
+ #
788
+ # * <b>Directory buckets </b> - For directory buckets, there are only
789
+ # two supported options for server-side encryption: server-side
790
+ # encryption with Amazon S3 managed keys (SSE-S3) (`AES256`) and
791
+ # server-side encryption with KMS keys (SSE-KMS) (`aws:kms`). We
792
+ # recommend that the bucket's default encryption uses the desired
793
+ # encryption configuration and you don't override the bucket default
794
+ # encryption in your `CreateSession` requests or `PUT` object
795
+ # requests. Then, new objects are automatically encrypted with the
796
+ # desired encryption settings. For more information, see [Protecting
797
+ # data with server-side encryption][2] in the *Amazon S3 User Guide*.
798
+ # For more information about the encryption overriding behaviors in
799
+ # directory buckets, see [Specifying server-side encryption with KMS
800
+ # for new object uploads][3].
801
+ #
802
+ # In the Zonal endpoint API calls (except [CopyObject][4] and
803
+ # [UploadPartCopy][5]) using the REST API, the encryption request
804
+ # headers must match the encryption settings that are specified in the
805
+ # `CreateSession` request. You can't override the values of the
806
+ # encryption settings (`x-amz-server-side-encryption`,
807
+ # `x-amz-server-side-encryption-aws-kms-key-id`,
808
+ # `x-amz-server-side-encryption-context`, and
809
+ # `x-amz-server-side-encryption-bucket-key-enabled`) that are
810
+ # specified in the `CreateSession` request. You don't need to
811
+ # explicitly specify these encryption settings values in Zonal
812
+ # endpoint API calls, and Amazon S3 will use the encryption settings
813
+ # values from the `CreateSession` request to protect new objects in
814
+ # the directory bucket.
815
+ #
816
+ # <note markdown="1"> When you use the CLI or the Amazon Web Services SDKs, for
817
+ # `CreateSession`, the session token refreshes automatically to avoid
818
+ # service interruptions when a session expires. The CLI or the Amazon
819
+ # Web Services SDKs use the bucket's default encryption configuration
820
+ # for the `CreateSession` request. It's not supported to override the
821
+ # encryption settings values in the `CreateSession` request. So in the
822
+ # Zonal endpoint API calls (except [CopyObject][4] and
823
+ # [UploadPartCopy][5]), the encryption request headers must match the
824
+ # default encryption configuration of the directory bucket.
825
+ #
826
+ # </note>
772
827
  #
773
828
  #
774
829
  #
775
830
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html
831
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-serv-side-encryption.html
832
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-express-specifying-kms-encryption.html
833
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
834
+ # [5]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
776
835
  # @option options [String] :storage_class
777
836
  # By default, Amazon S3 uses the STANDARD Storage Class to store newly
778
837
  # created objects. The STANDARD storage class provides high durability
@@ -846,44 +905,81 @@ module Aws::S3
846
905
  #
847
906
  # </note>
848
907
  # @option options [String] :ssekms_key_id
849
- # If `x-amz-server-side-encryption` has a valid value of `aws:kms` or
850
- # `aws:kms:dsse`, this header specifies the ID (Key ID, Key ARN, or Key
851
- # Alias) of the Key Management Service (KMS) symmetric encryption
852
- # customer managed key that was used for the object. If you specify
853
- # `x-amz-server-side-encryption:aws:kms` or
854
- # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide`
855
- # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
856
- # Amazon Web Services managed key (`aws/s3`) to protect the data. If the
857
- # KMS key does not exist in the same account that's issuing the
858
- # command, you must use the full ARN and not just the ID.
908
+ # Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for
909
+ # object encryption. If the KMS key doesn't exist in the same account
910
+ # that's issuing the command, you must use the full Key ARN not the Key
911
+ # ID.
912
+ #
913
+ # **General purpose buckets** - If you specify
914
+ # `x-amz-server-side-encryption` with `aws:kms` or `aws:kms:dsse`, this
915
+ # header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS key
916
+ # to use. If you specify `x-amz-server-side-encryption:aws:kms` or
917
+ # `x-amz-server-side-encryption:aws:kms:dsse`, but do not provide
918
+ # `x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
919
+ # Amazon Web Services managed key (`aws/s3`) to protect the data.
920
+ #
921
+ # **Directory buckets** - If you specify `x-amz-server-side-encryption`
922
+ # with `aws:kms`, you must specify the `
923
+ # x-amz-server-side-encryption-aws-kms-key-id` header with the ID (Key
924
+ # ID or Key ARN) of the KMS symmetric encryption customer managed key to
925
+ # use. Otherwise, you get an HTTP `400 Bad Request` error. Only use the
926
+ # key ID or key ARN. The key alias format of the KMS key isn't
927
+ # supported. Your SSE-KMS configuration can only support 1 [customer
928
+ # managed key][1] per directory bucket for the lifetime of the bucket.
929
+ # [Amazon Web Services managed key][2] (`aws/s3`) isn't supported.
930
+ #
931
+ #
932
+ #
933
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
934
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
935
+ # @option options [String] :ssekms_encryption_context
936
+ # Specifies the Amazon Web Services KMS Encryption Context as an
937
+ # additional encryption context to use for object encryption. The value
938
+ # of this header is a Base64-encoded string of a UTF-8 encoded JSON,
939
+ # which contains the encryption context as key-value pairs. This value
940
+ # is stored as object metadata and automatically gets passed on to
941
+ # Amazon Web Services KMS for future `GetObject` operations on this
942
+ # object.
859
943
  #
860
- # <note markdown="1"> This functionality is not supported for directory buckets.
944
+ # **General purpose buckets** - This value must be explicitly added
945
+ # during `CopyObject` operations if you want an additional encryption
946
+ # context for your object. For more information, see [Encryption
947
+ # context][1] in the *Amazon S3 User Guide*.
861
948
  #
862
- # </note>
863
- # @option options [String] :ssekms_encryption_context
864
- # Specifies the Amazon Web Services KMS Encryption Context to use for
865
- # object encryption. The value of this header is a base64-encoded UTF-8
866
- # string holding JSON with the encryption context key-value pairs. This
867
- # value is stored as object metadata and automatically gets passed on to
868
- # Amazon Web Services KMS for future `GetObject` or `CopyObject`
869
- # operations on this object. This value must be explicitly added during
870
- # `CopyObject` operations.
949
+ # **Directory buckets** - You can optionally provide an explicit
950
+ # encryption context value. The value must match the default encryption
951
+ # context - the bucket Amazon Resource Name (ARN). An additional
952
+ # encryption context value is not supported.
871
953
  #
872
- # <note markdown="1"> This functionality is not supported for directory buckets.
873
954
  #
874
- # </note>
955
+ #
956
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html#encryption-context
875
957
  # @option options [Boolean] :bucket_key_enabled
876
958
  # Specifies whether Amazon S3 should use an S3 Bucket Key for object
877
959
  # encryption with server-side encryption using Key Management Service
878
- # (KMS) keys (SSE-KMS). Setting this header to `true` causes Amazon S3
879
- # to use an S3 Bucket Key for object encryption with SSE-KMS.
960
+ # (KMS) keys (SSE-KMS).
880
961
  #
881
- # Specifying this header with a PUT action doesn’t affect bucket-level
882
- # settings for S3 Bucket Key.
962
+ # **General purpose buckets** - Setting this header to `true` causes
963
+ # Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS.
964
+ # Also, specifying this header with a PUT action doesn't affect
965
+ # bucket-level settings for S3 Bucket Key.
883
966
  #
884
- # <note markdown="1"> This functionality is not supported for directory buckets.
967
+ # **Directory buckets** - S3 Bucket Keys are always enabled for `GET`
968
+ # and `PUT` operations in a directory bucket and can’t be disabled. S3
969
+ # Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects
970
+ # from general purpose buckets to directory buckets, from directory
971
+ # buckets to general purpose buckets, or between directory buckets,
972
+ # through [CopyObject][1], [UploadPartCopy][2], [the Copy operation in
973
+ # Batch Operations][3], or [the import jobs][4]. In this case, Amazon S3
974
+ # makes a call to KMS every time a copy request is made for a
975
+ # KMS-encrypted object.
885
976
  #
886
- # </note>
977
+ #
978
+ #
979
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html
980
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html
981
+ # [3]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/directory-buckets-objects-Batch-Ops
982
+ # [4]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-import-job
887
983
  # @option options [String] :request_payer
888
984
  # Confirms that the requester knows that they will be charged for the
889
985
  # request. Bucket owners need not specify this parameter in their
@@ -939,7 +1035,7 @@ module Aws::S3
939
1035
  # @return [Object]
940
1036
  def put_object(options = {})
941
1037
  options = options.merge(bucket: @name)
942
- Aws::Plugins::UserAgent.feature('resource') do
1038
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
943
1039
  @client.put_object(options)
944
1040
  end
945
1041
  Object.new(
@@ -1018,12 +1114,26 @@ module Aws::S3
1018
1114
  #
1019
1115
  # </note>
1020
1116
  # @option options [String] :encoding_type
1021
- # Requests Amazon S3 to encode the object keys in the response and
1022
- # specifies the encoding method to use. An object key can contain any
1023
- # Unicode character; however, the XML 1.0 parser cannot parse some
1024
- # characters, such as characters with an ASCII value from 0 to 10. For
1025
- # characters that are not supported in XML 1.0, you can add this
1026
- # parameter to request that Amazon S3 encode the keys in the response.
1117
+ # Encoding type used by Amazon S3 to encode the [object keys][1] in the
1118
+ # response. Responses are encoded only in UTF-8. An object key can
1119
+ # contain any Unicode character. However, the XML 1.0 parser can't
1120
+ # parse certain characters, such as characters with an ASCII value from
1121
+ # 0 to 10. For characters that aren't supported in XML 1.0, you can add
1122
+ # this parameter to request that Amazon S3 encode the keys in the
1123
+ # response. For more information about characters to avoid in object key
1124
+ # names, see [Object key naming guidelines][2].
1125
+ #
1126
+ # <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
1127
+ # in an object's key name will be percent-encoded according to UTF-8
1128
+ # code values. For example, the object `test_file(3).png` will appear as
1129
+ # `test_file%283%29.png`.
1130
+ #
1131
+ # </note>
1132
+ #
1133
+ #
1134
+ #
1135
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
1136
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
1027
1137
  # @option options [String] :key_marker
1028
1138
  # Specifies the multipart upload after which listing should begin.
1029
1139
  #
@@ -1097,7 +1207,7 @@ module Aws::S3
1097
1207
  def multipart_uploads(options = {})
1098
1208
  batches = Enumerator.new do |y|
1099
1209
  options = options.merge(bucket: @name)
1100
- resp = Aws::Plugins::UserAgent.feature('resource') do
1210
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1101
1211
  @client.list_multipart_uploads(options)
1102
1212
  end
1103
1213
  resp.each_page do |page|
@@ -1156,12 +1266,26 @@ module Aws::S3
1156
1266
  # the `max-keys` limitation. These keys are not returned elsewhere in
1157
1267
  # the response.
1158
1268
  # @option options [String] :encoding_type
1159
- # Requests Amazon S3 to encode the object keys in the response and
1160
- # specifies the encoding method to use. An object key can contain any
1161
- # Unicode character; however, the XML 1.0 parser cannot parse some
1162
- # characters, such as characters with an ASCII value from 0 to 10. For
1163
- # characters that are not supported in XML 1.0, you can add this
1164
- # parameter to request that Amazon S3 encode the keys in the response.
1269
+ # Encoding type used by Amazon S3 to encode the [object keys][1] in the
1270
+ # response. Responses are encoded only in UTF-8. An object key can
1271
+ # contain any Unicode character. However, the XML 1.0 parser can't
1272
+ # parse certain characters, such as characters with an ASCII value from
1273
+ # 0 to 10. For characters that aren't supported in XML 1.0, you can add
1274
+ # this parameter to request that Amazon S3 encode the keys in the
1275
+ # response. For more information about characters to avoid in object key
1276
+ # names, see [Object key naming guidelines][2].
1277
+ #
1278
+ # <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
1279
+ # in an object's key name will be percent-encoded according to UTF-8
1280
+ # code values. For example, the object `test_file(3).png` will appear as
1281
+ # `test_file%283%29.png`.
1282
+ #
1283
+ # </note>
1284
+ #
1285
+ #
1286
+ #
1287
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
1288
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
1165
1289
  # @option options [String] :key_marker
1166
1290
  # Specifies the key to start with when listing objects in a bucket.
1167
1291
  # @option options [String] :prefix
@@ -1200,7 +1324,7 @@ module Aws::S3
1200
1324
  def object_versions(options = {})
1201
1325
  batches = Enumerator.new do |y|
1202
1326
  options = options.merge(bucket: @name)
1203
- resp = Aws::Plugins::UserAgent.feature('resource') do
1327
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1204
1328
  @client.list_object_versions(options)
1205
1329
  end
1206
1330
  resp.each_page do |page|
@@ -1252,10 +1376,26 @@ module Aws::S3
1252
1376
  #
1253
1377
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html
1254
1378
  # @option options [String] :encoding_type
1255
- # Encoding type used by Amazon S3 to encode object keys in the response.
1256
- # If using `url`, non-ASCII characters used in an object's key name
1257
- # will be URL encoded. For example, the object test\_file(3).png will
1258
- # appear as test\_file%283%29.png.
1379
+ # Encoding type used by Amazon S3 to encode the [object keys][1] in the
1380
+ # response. Responses are encoded only in UTF-8. An object key can
1381
+ # contain any Unicode character. However, the XML 1.0 parser can't
1382
+ # parse certain characters, such as characters with an ASCII value from
1383
+ # 0 to 10. For characters that aren't supported in XML 1.0, you can add
1384
+ # this parameter to request that Amazon S3 encode the keys in the
1385
+ # response. For more information about characters to avoid in object key
1386
+ # names, see [Object key naming guidelines][2].
1387
+ #
1388
+ # <note markdown="1"> When using the URL encoding type, non-ASCII characters that are used
1389
+ # in an object's key name will be percent-encoded according to UTF-8
1390
+ # code values. For example, the object `test_file(3).png` will appear as
1391
+ # `test_file%283%29.png`.
1392
+ #
1393
+ # </note>
1394
+ #
1395
+ #
1396
+ #
1397
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html
1398
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-guidelines
1259
1399
  # @option options [String] :prefix
1260
1400
  # Limits the response to keys that begin with the specified prefix.
1261
1401
  #
@@ -1303,7 +1443,7 @@ module Aws::S3
1303
1443
  def objects(options = {})
1304
1444
  batches = Enumerator.new do |y|
1305
1445
  options = options.merge(bucket: @name)
1306
- resp = Aws::Plugins::UserAgent.feature('resource') do
1446
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
1307
1447
  @client.list_objects_v2(options)
1308
1448
  end
1309
1449
  resp.each_page do |page|
@@ -60,7 +60,7 @@ module Aws::S3
60
60
  #
61
61
  # @return [self]
62
62
  def load
63
- resp = Aws::Plugins::UserAgent.feature('resource') do
63
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
64
64
  @client.get_bucket_acl(bucket: @bucket_name)
65
65
  end
66
66
  @data = resp.data
@@ -177,7 +177,7 @@ module Aws::S3
177
177
  :retry
178
178
  end
179
179
  end
180
- Aws::Plugins::UserAgent.feature('resource') do
180
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
181
181
  Aws::Waiters::Waiter.new(options).wait({})
182
182
  end
183
183
  end
@@ -269,7 +269,7 @@ module Aws::S3
269
269
  # @return [EmptyStructure]
270
270
  def put(options = {})
271
271
  options = options.merge(bucket: @bucket_name)
272
- resp = Aws::Plugins::UserAgent.feature('resource') do
272
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
273
273
  @client.put_bucket_acl(options)
274
274
  end
275
275
  resp.data
@@ -55,7 +55,7 @@ module Aws::S3
55
55
  #
56
56
  # @return [self]
57
57
  def load
58
- resp = Aws::Plugins::UserAgent.feature('resource') do
58
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
59
59
  @client.get_bucket_cors(bucket: @bucket_name)
60
60
  end
61
61
  @data = resp.data
@@ -172,7 +172,7 @@ module Aws::S3
172
172
  :retry
173
173
  end
174
174
  end
175
- Aws::Plugins::UserAgent.feature('resource') do
175
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
176
176
  Aws::Waiters::Waiter.new(options).wait({})
177
177
  end
178
178
  end
@@ -192,7 +192,7 @@ module Aws::S3
192
192
  # @return [EmptyStructure]
193
193
  def delete(options = {})
194
194
  options = options.merge(bucket: @bucket_name)
195
- resp = Aws::Plugins::UserAgent.feature('resource') do
195
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
196
196
  @client.delete_bucket_cors(options)
197
197
  end
198
198
  resp.data
@@ -260,7 +260,7 @@ module Aws::S3
260
260
  # @return [EmptyStructure]
261
261
  def put(options = {})
262
262
  options = options.merge(bucket: @bucket_name)
263
- resp = Aws::Plugins::UserAgent.feature('resource') do
263
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
264
264
  @client.put_bucket_cors(options)
265
265
  end
266
266
  resp.data
@@ -54,7 +54,7 @@ module Aws::S3
54
54
  #
55
55
  # @return [self]
56
56
  def load
57
- resp = Aws::Plugins::UserAgent.feature('resource') do
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
58
58
  @client.get_bucket_lifecycle(bucket: @bucket_name)
59
59
  end
60
60
  @data = resp.data
@@ -171,7 +171,7 @@ module Aws::S3
171
171
  :retry
172
172
  end
173
173
  end
174
- Aws::Plugins::UserAgent.feature('resource') do
174
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
175
175
  Aws::Waiters::Waiter.new(options).wait({})
176
176
  end
177
177
  end
@@ -191,7 +191,7 @@ module Aws::S3
191
191
  # @return [EmptyStructure]
192
192
  def delete(options = {})
193
193
  options = options.merge(bucket: @bucket_name)
194
- resp = Aws::Plugins::UserAgent.feature('resource') do
194
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
195
195
  @client.delete_bucket_lifecycle(options)
196
196
  end
197
197
  resp.data
@@ -263,7 +263,7 @@ module Aws::S3
263
263
  # @return [EmptyStructure]
264
264
  def put(options = {})
265
265
  options = options.merge(bucket: @bucket_name)
266
- resp = Aws::Plugins::UserAgent.feature('resource') do
266
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
267
267
  @client.put_bucket_lifecycle(options)
268
268
  end
269
269
  resp.data
@@ -54,7 +54,7 @@ module Aws::S3
54
54
  #
55
55
  # @return [self]
56
56
  def load
57
- resp = Aws::Plugins::UserAgent.feature('resource') do
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
58
58
  @client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
59
59
  end
60
60
  @data = resp.data
@@ -171,7 +171,7 @@ module Aws::S3
171
171
  :retry
172
172
  end
173
173
  end
174
- Aws::Plugins::UserAgent.feature('resource') do
174
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
175
175
  Aws::Waiters::Waiter.new(options).wait({})
176
176
  end
177
177
  end
@@ -191,7 +191,7 @@ module Aws::S3
191
191
  # @return [EmptyStructure]
192
192
  def delete(options = {})
193
193
  options = options.merge(bucket: @bucket_name)
194
- resp = Aws::Plugins::UserAgent.feature('resource') do
194
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
195
195
  @client.delete_bucket_lifecycle(options)
196
196
  end
197
197
  resp.data
@@ -283,7 +283,7 @@ module Aws::S3
283
283
  # @return [EmptyStructure]
284
284
  def put(options = {})
285
285
  options = options.merge(bucket: @bucket_name)
286
- resp = Aws::Plugins::UserAgent.feature('resource') do
286
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
287
287
  @client.put_bucket_lifecycle_configuration(options)
288
288
  end
289
289
  resp.data
@@ -60,7 +60,7 @@ module Aws::S3
60
60
  #
61
61
  # @return [self]
62
62
  def load
63
- resp = Aws::Plugins::UserAgent.feature('resource') do
63
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
64
64
  @client.get_bucket_logging(bucket: @bucket_name)
65
65
  end
66
66
  @data = resp.data
@@ -177,7 +177,7 @@ module Aws::S3
177
177
  :retry
178
178
  end
179
179
  end
180
- Aws::Plugins::UserAgent.feature('resource') do
180
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
181
181
  Aws::Waiters::Waiter.new(options).wait({})
182
182
  end
183
183
  end
@@ -247,7 +247,7 @@ module Aws::S3
247
247
  # @return [EmptyStructure]
248
248
  def put(options = {})
249
249
  options = options.merge(bucket: @bucket_name)
250
- resp = Aws::Plugins::UserAgent.feature('resource') do
250
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
251
251
  @client.put_bucket_logging(options)
252
252
  end
253
253
  resp.data
@@ -75,7 +75,7 @@ module Aws::S3
75
75
  #
76
76
  # @return [self]
77
77
  def load
78
- resp = Aws::Plugins::UserAgent.feature('resource') do
78
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
79
79
  @client.get_bucket_notification_configuration(bucket: @bucket_name)
80
80
  end
81
81
  @data = resp.data
@@ -192,7 +192,7 @@ module Aws::S3
192
192
  :retry
193
193
  end
194
194
  end
195
- Aws::Plugins::UserAgent.feature('resource') do
195
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
196
196
  Aws::Waiters::Waiter.new(options).wait({})
197
197
  end
198
198
  end
@@ -275,7 +275,7 @@ module Aws::S3
275
275
  # @return [EmptyStructure]
276
276
  def put(options = {})
277
277
  options = options.merge(bucket: @bucket_name)
278
- resp = Aws::Plugins::UserAgent.feature('resource') do
278
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
279
279
  @client.put_bucket_notification_configuration(options)
280
280
  end
281
281
  resp.data
@@ -54,7 +54,7 @@ module Aws::S3
54
54
  #
55
55
  # @return [self]
56
56
  def load
57
- resp = Aws::Plugins::UserAgent.feature('resource') do
57
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
58
58
  @client.get_bucket_policy(bucket: @bucket_name)
59
59
  end
60
60
  @data = resp.data
@@ -171,7 +171,7 @@ module Aws::S3
171
171
  :retry
172
172
  end
173
173
  end
174
- Aws::Plugins::UserAgent.feature('resource') do
174
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
175
175
  Aws::Waiters::Waiter.new(options).wait({})
176
176
  end
177
177
  end
@@ -197,7 +197,7 @@ module Aws::S3
197
197
  # @return [EmptyStructure]
198
198
  def delete(options = {})
199
199
  options = options.merge(bucket: @bucket_name)
200
- resp = Aws::Plugins::UserAgent.feature('resource') do
200
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
201
201
  @client.delete_bucket_policy(options)
202
202
  end
203
203
  resp.data
@@ -284,7 +284,7 @@ module Aws::S3
284
284
  # @return [EmptyStructure]
285
285
  def put(options = {})
286
286
  options = options.merge(bucket: @bucket_name)
287
- resp = Aws::Plugins::UserAgent.feature('resource') do
287
+ resp = Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
288
288
  @client.put_bucket_policy(options)
289
289
  end
290
290
  resp.data