aws-sdk-s3 1.109.0 → 1.156.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.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +352 -0
  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 +241 -0
  6. data/lib/aws-sdk-s3/bucket.rb +585 -110
  7. data/lib/aws-sdk-s3/bucket_acl.rb +28 -6
  8. data/lib/aws-sdk-s3/bucket_cors.rb +34 -10
  9. data/lib/aws-sdk-s3/bucket_lifecycle.rb +34 -10
  10. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +34 -10
  11. data/lib/aws-sdk-s3/bucket_logging.rb +35 -6
  12. data/lib/aws-sdk-s3/bucket_notification.rb +12 -6
  13. data/lib/aws-sdk-s3/bucket_policy.rb +78 -10
  14. data/lib/aws-sdk-s3/bucket_region_cache.rb +9 -5
  15. data/lib/aws-sdk-s3/bucket_request_payment.rb +28 -6
  16. data/lib/aws-sdk-s3/bucket_tagging.rb +34 -10
  17. data/lib/aws-sdk-s3/bucket_versioning.rb +72 -14
  18. data/lib/aws-sdk-s3/bucket_website.rb +34 -10
  19. data/lib/aws-sdk-s3/client.rb +7900 -3252
  20. data/lib/aws-sdk-s3/client_api.rb +706 -228
  21. data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
  22. data/lib/aws-sdk-s3/customizations/errors.rb +40 -0
  23. data/lib/aws-sdk-s3/customizations/object.rb +97 -21
  24. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  25. data/lib/aws-sdk-s3/customizations.rb +10 -0
  26. data/lib/aws-sdk-s3/encryption/client.rb +6 -2
  27. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  28. data/lib/aws-sdk-s3/encryptionV2/client.rb +6 -2
  29. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -0
  30. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  31. data/lib/aws-sdk-s3/endpoint_parameters.rb +186 -0
  32. data/lib/aws-sdk-s3/endpoint_provider.rb +592 -0
  33. data/lib/aws-sdk-s3/endpoints.rb +2689 -0
  34. data/lib/aws-sdk-s3/express_credentials.rb +55 -0
  35. data/lib/aws-sdk-s3/express_credentials_provider.rb +59 -0
  36. data/lib/aws-sdk-s3/file_downloader.rb +170 -45
  37. data/lib/aws-sdk-s3/file_uploader.rb +11 -4
  38. data/lib/aws-sdk-s3/multipart_file_uploader.rb +30 -11
  39. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +46 -17
  40. data/lib/aws-sdk-s3/multipart_upload.rb +194 -19
  41. data/lib/aws-sdk-s3/multipart_upload_part.rb +280 -30
  42. data/lib/aws-sdk-s3/object.rb +1753 -266
  43. data/lib/aws-sdk-s3/object_acl.rb +49 -13
  44. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  45. data/lib/aws-sdk-s3/object_multipart_copier.rb +46 -22
  46. data/lib/aws-sdk-s3/object_summary.rb +1497 -221
  47. data/lib/aws-sdk-s3/object_version.rb +383 -58
  48. data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -50
  49. data/lib/aws-sdk-s3/plugins/access_grants.rb +114 -0
  50. data/lib/aws-sdk-s3/plugins/arn.rb +0 -184
  51. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
  52. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  53. data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -49
  54. data/lib/aws-sdk-s3/plugins/endpoints.rb +274 -0
  55. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  56. data/lib/aws-sdk-s3/plugins/express_session_auth.rb +97 -0
  57. data/lib/aws-sdk-s3/plugins/http_200_errors.rb +53 -16
  58. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -29
  59. data/lib/aws-sdk-s3/plugins/location_constraint.rb +3 -1
  60. data/lib/aws-sdk-s3/plugins/md5s.rb +6 -3
  61. data/lib/aws-sdk-s3/plugins/s3_signer.rb +42 -126
  62. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  63. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
  64. data/lib/aws-sdk-s3/presigned_post.rb +99 -78
  65. data/lib/aws-sdk-s3/presigner.rb +28 -37
  66. data/lib/aws-sdk-s3/resource.rb +89 -13
  67. data/lib/aws-sdk-s3/types.rb +6544 -4909
  68. data/lib/aws-sdk-s3.rb +5 -1
  69. data/sig/bucket.rbs +212 -0
  70. data/sig/bucket_acl.rbs +78 -0
  71. data/sig/bucket_cors.rbs +69 -0
  72. data/sig/bucket_lifecycle.rbs +88 -0
  73. data/sig/bucket_lifecycle_configuration.rbs +111 -0
  74. data/sig/bucket_logging.rbs +76 -0
  75. data/sig/bucket_notification.rbs +114 -0
  76. data/sig/bucket_policy.rbs +59 -0
  77. data/sig/bucket_request_payment.rbs +54 -0
  78. data/sig/bucket_tagging.rbs +65 -0
  79. data/sig/bucket_versioning.rbs +77 -0
  80. data/sig/bucket_website.rbs +93 -0
  81. data/sig/client.rbs +2381 -0
  82. data/sig/customizations/bucket.rbs +19 -0
  83. data/sig/customizations/object.rbs +38 -0
  84. data/sig/customizations/object_summary.rbs +35 -0
  85. data/sig/errors.rbs +34 -0
  86. data/sig/multipart_upload.rbs +110 -0
  87. data/sig/multipart_upload_part.rbs +105 -0
  88. data/sig/object.rbs +442 -0
  89. data/sig/object_acl.rbs +86 -0
  90. data/sig/object_summary.rbs +334 -0
  91. data/sig/object_version.rbs +137 -0
  92. data/sig/resource.rbs +127 -0
  93. data/sig/types.rbs +2568 -0
  94. data/sig/waiters.rbs +95 -0
  95. metadata +50 -16
  96. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
  97. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +0 -68
  98. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
  99. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -74
  100. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -0,0 +1,186 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::S3
11
+ # Endpoint parameters used to influence endpoints per request.
12
+ #
13
+ # @!attribute bucket
14
+ # The S3 bucket used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 bucket.
15
+ #
16
+ # @return [String]
17
+ #
18
+ # @!attribute region
19
+ # The AWS region used to dispatch the request.
20
+ #
21
+ # @return [String]
22
+ #
23
+ # @!attribute use_fips
24
+ # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
25
+ #
26
+ # @return [Boolean]
27
+ #
28
+ # @!attribute use_dual_stack
29
+ # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
30
+ #
31
+ # @return [Boolean]
32
+ #
33
+ # @!attribute endpoint
34
+ # Override the endpoint used to send this request
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @!attribute force_path_style
39
+ # When true, force a path-style endpoint to be used where the bucket name is part of the path.
40
+ #
41
+ # @return [Boolean]
42
+ #
43
+ # @!attribute accelerate
44
+ # When true, use S3 Accelerate. NOTE: Not all regions support S3 accelerate.
45
+ #
46
+ # @return [Boolean]
47
+ #
48
+ # @!attribute use_global_endpoint
49
+ # Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.
50
+ #
51
+ # @return [Boolean]
52
+ #
53
+ # @!attribute use_object_lambda_endpoint
54
+ # Internal parameter to use object lambda endpoint for an operation (eg: WriteGetObjectResponse)
55
+ #
56
+ # @return [Boolean]
57
+ #
58
+ # @!attribute key
59
+ # The S3 Key used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Key.
60
+ #
61
+ # @return [String]
62
+ #
63
+ # @!attribute prefix
64
+ # The S3 Prefix used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 Prefix.
65
+ #
66
+ # @return [String]
67
+ #
68
+ # @!attribute copy_source
69
+ # The Copy Source used for Copy Object request. This is an optional parameter that will be set automatically for operations that are scoped to Copy Source.
70
+ #
71
+ # @return [String]
72
+ #
73
+ # @!attribute disable_access_points
74
+ # Internal parameter to disable Access Point Buckets
75
+ #
76
+ # @return [Boolean]
77
+ #
78
+ # @!attribute disable_multi_region_access_points
79
+ # Whether multi-region access points (MRAP) should be disabled.
80
+ #
81
+ # @return [Boolean]
82
+ #
83
+ # @!attribute use_arn_region
84
+ # When an Access Point ARN is provided and this flag is enabled, the SDK MUST use the ARN's region when constructing the endpoint instead of the client's configured region.
85
+ #
86
+ # @return [Boolean]
87
+ #
88
+ # @!attribute use_s3_express_control_endpoint
89
+ # Internal parameter to indicate whether S3Express operation should use control plane, (ex. CreateBucket)
90
+ #
91
+ # @return [Boolean]
92
+ #
93
+ # @!attribute disable_s3_express_session_auth
94
+ # Parameter to indicate whether S3Express session auth should be disabled
95
+ #
96
+ # @return [Boolean]
97
+ #
98
+ EndpointParameters = Struct.new(
99
+ :bucket,
100
+ :region,
101
+ :use_fips,
102
+ :use_dual_stack,
103
+ :endpoint,
104
+ :force_path_style,
105
+ :accelerate,
106
+ :use_global_endpoint,
107
+ :use_object_lambda_endpoint,
108
+ :key,
109
+ :prefix,
110
+ :copy_source,
111
+ :disable_access_points,
112
+ :disable_multi_region_access_points,
113
+ :use_arn_region,
114
+ :use_s3_express_control_endpoint,
115
+ :disable_s3_express_session_auth,
116
+ ) do
117
+ include Aws::Structure
118
+
119
+ # @api private
120
+ class << self
121
+ PARAM_MAP = {
122
+ 'Bucket' => :bucket,
123
+ 'Region' => :region,
124
+ 'UseFIPS' => :use_fips,
125
+ 'UseDualStack' => :use_dual_stack,
126
+ 'Endpoint' => :endpoint,
127
+ 'ForcePathStyle' => :force_path_style,
128
+ 'Accelerate' => :accelerate,
129
+ 'UseGlobalEndpoint' => :use_global_endpoint,
130
+ 'UseObjectLambdaEndpoint' => :use_object_lambda_endpoint,
131
+ 'Key' => :key,
132
+ 'Prefix' => :prefix,
133
+ 'CopySource' => :copy_source,
134
+ 'DisableAccessPoints' => :disable_access_points,
135
+ 'DisableMultiRegionAccessPoints' => :disable_multi_region_access_points,
136
+ 'UseArnRegion' => :use_arn_region,
137
+ 'UseS3ExpressControlEndpoint' => :use_s3_express_control_endpoint,
138
+ 'DisableS3ExpressSessionAuth' => :disable_s3_express_session_auth,
139
+ }.freeze
140
+ end
141
+
142
+ def initialize(options = {})
143
+ self[:bucket] = options[:bucket]
144
+ self[:region] = options[:region]
145
+ self[:use_fips] = options[:use_fips]
146
+ self[:use_fips] = false if self[:use_fips].nil?
147
+ if self[:use_fips].nil?
148
+ raise ArgumentError, "Missing required EndpointParameter: :use_fips"
149
+ end
150
+ self[:use_dual_stack] = options[:use_dual_stack]
151
+ self[:use_dual_stack] = false if self[:use_dual_stack].nil?
152
+ if self[:use_dual_stack].nil?
153
+ raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
154
+ end
155
+ self[:endpoint] = options[:endpoint]
156
+ self[:force_path_style] = options[:force_path_style]
157
+ self[:force_path_style] = false if self[:force_path_style].nil?
158
+ if self[:force_path_style].nil?
159
+ raise ArgumentError, "Missing required EndpointParameter: :force_path_style"
160
+ end
161
+ self[:accelerate] = options[:accelerate]
162
+ self[:accelerate] = false if self[:accelerate].nil?
163
+ if self[:accelerate].nil?
164
+ raise ArgumentError, "Missing required EndpointParameter: :accelerate"
165
+ end
166
+ self[:use_global_endpoint] = options[:use_global_endpoint]
167
+ self[:use_global_endpoint] = false if self[:use_global_endpoint].nil?
168
+ if self[:use_global_endpoint].nil?
169
+ raise ArgumentError, "Missing required EndpointParameter: :use_global_endpoint"
170
+ end
171
+ self[:use_object_lambda_endpoint] = options[:use_object_lambda_endpoint]
172
+ self[:key] = options[:key]
173
+ self[:prefix] = options[:prefix]
174
+ self[:copy_source] = options[:copy_source]
175
+ self[:disable_access_points] = options[:disable_access_points]
176
+ self[:disable_multi_region_access_points] = options[:disable_multi_region_access_points]
177
+ self[:disable_multi_region_access_points] = false if self[:disable_multi_region_access_points].nil?
178
+ if self[:disable_multi_region_access_points].nil?
179
+ raise ArgumentError, "Missing required EndpointParameter: :disable_multi_region_access_points"
180
+ end
181
+ self[:use_arn_region] = options[:use_arn_region]
182
+ self[:use_s3_express_control_endpoint] = options[:use_s3_express_control_endpoint]
183
+ self[:disable_s3_express_session_auth] = options[:disable_s3_express_session_auth]
184
+ end
185
+ end
186
+ end