aws-sdk-s3 1.80.0 → 1.114.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +903 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3/arn/access_point_arn.rb +69 -0
  6. data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +68 -0
  7. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +69 -0
  8. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +74 -0
  9. data/lib/aws-sdk-s3/bucket.rb +172 -46
  10. data/lib/aws-sdk-s3/bucket_acl.rb +28 -6
  11. data/lib/aws-sdk-s3/bucket_cors.rb +29 -9
  12. data/lib/aws-sdk-s3/bucket_lifecycle.rb +30 -9
  13. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +31 -9
  14. data/lib/aws-sdk-s3/bucket_logging.rb +25 -6
  15. data/lib/aws-sdk-s3/bucket_notification.rb +21 -9
  16. data/lib/aws-sdk-s3/bucket_policy.rb +27 -7
  17. data/lib/aws-sdk-s3/bucket_request_payment.rb +27 -8
  18. data/lib/aws-sdk-s3/bucket_tagging.rb +27 -7
  19. data/lib/aws-sdk-s3/bucket_versioning.rb +70 -10
  20. data/lib/aws-sdk-s3/bucket_website.rb +27 -7
  21. data/lib/aws-sdk-s3/client.rb +4415 -1650
  22. data/lib/aws-sdk-s3/client_api.rb +661 -41
  23. data/lib/aws-sdk-s3/customizations/bucket.rb +15 -7
  24. data/lib/aws-sdk-s3/customizations/object.rb +120 -21
  25. data/lib/aws-sdk-s3/customizations.rb +1 -1
  26. data/lib/aws-sdk-s3/encryption/client.rb +1 -1
  27. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +0 -4
  28. data/lib/aws-sdk-s3/encryptionV2/client.rb +1 -1
  29. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +0 -4
  30. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +3 -3
  31. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +0 -4
  32. data/lib/aws-sdk-s3/errors.rb +22 -1
  33. data/lib/aws-sdk-s3/event_streams.rb +1 -1
  34. data/lib/aws-sdk-s3/file_downloader.rb +7 -2
  35. data/lib/aws-sdk-s3/file_uploader.rb +9 -4
  36. data/lib/aws-sdk-s3/legacy_signer.rb +15 -25
  37. data/lib/aws-sdk-s3/multipart_file_uploader.rb +26 -7
  38. data/lib/aws-sdk-s3/multipart_upload.rb +133 -19
  39. data/lib/aws-sdk-s3/multipart_upload_part.rb +152 -23
  40. data/lib/aws-sdk-s3/object.rb +501 -126
  41. data/lib/aws-sdk-s3/object_acl.rb +39 -9
  42. data/lib/aws-sdk-s3/object_summary.rb +330 -110
  43. data/lib/aws-sdk-s3/object_version.rb +80 -49
  44. data/lib/aws-sdk-s3/plugins/accelerate.rb +13 -4
  45. data/lib/aws-sdk-s3/plugins/arn.rb +254 -0
  46. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +1 -3
  47. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -1
  48. data/lib/aws-sdk-s3/plugins/dualstack.rb +33 -32
  49. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  50. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +1 -1
  51. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +18 -7
  52. data/lib/aws-sdk-s3/plugins/md5s.rb +5 -3
  53. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
  54. data/lib/aws-sdk-s3/plugins/s3_signer.rb +66 -17
  55. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  56. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
  57. data/lib/aws-sdk-s3/presigned_post.rb +38 -19
  58. data/lib/aws-sdk-s3/presigner.rb +34 -17
  59. data/lib/aws-sdk-s3/resource.rb +23 -3
  60. data/lib/aws-sdk-s3/types.rb +4792 -1089
  61. data/lib/aws-sdk-s3/waiters.rb +1 -1
  62. data/lib/aws-sdk-s3.rb +3 -2
  63. metadata +21 -13
  64. data/lib/aws-sdk-s3/plugins/bucket_arn.rb +0 -212
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
data/lib/aws-sdk-s3.rb CHANGED
@@ -3,10 +3,11 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
10
+
10
11
  require 'aws-sdk-kms'
11
12
  require 'aws-sigv4'
12
13
  require 'aws-sdk-core'
@@ -68,6 +69,6 @@ require_relative 'aws-sdk-s3/event_streams'
68
69
  # @!group service
69
70
  module Aws::S3
70
71
 
71
- GEM_VERSION = '1.80.0'
72
+ GEM_VERSION = '1.114.0'
72
73
 
73
74
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.80.0
4
+ version: 1.114.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-10 00:00:00.000000000 Z
11
+ date: 2022-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-kms
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.1'
33
+ version: '1.4'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.1'
40
+ version: '1.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: aws-sdk-core
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -47,7 +47,7 @@ dependencies:
47
47
  version: '3'
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 3.104.3
50
+ version: 3.127.0
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,16 +57,23 @@ dependencies:
57
57
  version: '3'
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 3.104.3
60
+ version: 3.127.0
61
61
  description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
62
62
  This gem is part of the AWS SDK for Ruby.
63
63
  email:
64
- - trevrowe@amazon.com
64
+ - aws-dr-rubygems@amazon.com
65
65
  executables: []
66
66
  extensions: []
67
67
  extra_rdoc_files: []
68
68
  files:
69
+ - CHANGELOG.md
70
+ - LICENSE.txt
71
+ - VERSION
69
72
  - lib/aws-sdk-s3.rb
73
+ - lib/aws-sdk-s3/arn/access_point_arn.rb
74
+ - lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb
75
+ - lib/aws-sdk-s3/arn/object_lambda_arn.rb
76
+ - lib/aws-sdk-s3/arn/outpost_access_point_arn.rb
70
77
  - lib/aws-sdk-s3/bucket.rb
71
78
  - lib/aws-sdk-s3/bucket_acl.rb
72
79
  - lib/aws-sdk-s3/bucket_cors.rb
@@ -134,7 +141,7 @@ files:
134
141
  - lib/aws-sdk-s3/object_summary.rb
135
142
  - lib/aws-sdk-s3/object_version.rb
136
143
  - lib/aws-sdk-s3/plugins/accelerate.rb
137
- - lib/aws-sdk-s3/plugins/bucket_arn.rb
144
+ - lib/aws-sdk-s3/plugins/arn.rb
138
145
  - lib/aws-sdk-s3/plugins/bucket_dns.rb
139
146
  - lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb
140
147
  - lib/aws-sdk-s3/plugins/dualstack.rb
@@ -144,9 +151,11 @@ files:
144
151
  - lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb
145
152
  - lib/aws-sdk-s3/plugins/location_constraint.rb
146
153
  - lib/aws-sdk-s3/plugins/md5s.rb
154
+ - lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb
147
155
  - lib/aws-sdk-s3/plugins/redirects.rb
148
156
  - lib/aws-sdk-s3/plugins/s3_host_id.rb
149
157
  - lib/aws-sdk-s3/plugins/s3_signer.rb
158
+ - lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb
150
159
  - lib/aws-sdk-s3/plugins/sse_cpk.rb
151
160
  - lib/aws-sdk-s3/plugins/streaming_retry.rb
152
161
  - lib/aws-sdk-s3/plugins/url_encoded_keys.rb
@@ -159,8 +168,8 @@ homepage: https://github.com/aws/aws-sdk-ruby
159
168
  licenses:
160
169
  - Apache-2.0
161
170
  metadata:
162
- source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-s3
163
- changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/master/gems/aws-sdk-s3/CHANGELOG.md
171
+ source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-s3
172
+ changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-s3/CHANGELOG.md
164
173
  post_install_message:
165
174
  rdoc_options: []
166
175
  require_paths:
@@ -169,15 +178,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
178
  requirements:
170
179
  - - ">="
171
180
  - !ruby/object:Gem::Version
172
- version: '0'
181
+ version: '2.3'
173
182
  required_rubygems_version: !ruby/object:Gem::Requirement
174
183
  requirements:
175
184
  - - ">="
176
185
  - !ruby/object:Gem::Version
177
186
  version: '0'
178
187
  requirements: []
179
- rubyforge_project:
180
- rubygems_version: 2.7.6.2
188
+ rubygems_version: 3.1.6
181
189
  signing_key:
182
190
  specification_version: 4
183
191
  summary: AWS SDK for Ruby - Amazon S3
@@ -1,212 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Aws
4
- module S3
5
- module Plugins
6
- # When an accesspoint ARN is provided for :bucket in S3 operations, this
7
- # plugin resolves the request endpoint from the ARN when possible.
8
- class BucketARN < Seahorse::Client::Plugin
9
- option(
10
- :s3_use_arn_region,
11
- default: true,
12
- doc_type: 'Boolean',
13
- docstring: <<-DOCS) do |cfg|
14
- By default, the SDK will use the S3 ARN region, and cross-region
15
- requests could be made. Set to `false` to not use the region from
16
- the S3 ARN.
17
- DOCS
18
- resolve_s3_use_arn_region(cfg)
19
- end
20
-
21
- def add_handlers(handlers, _config)
22
- handlers.add(Handler)
23
- end
24
-
25
- # @api private
26
- class Handler < Seahorse::Client::Handler
27
- def call(context)
28
- bucket_member = _bucket_member(context.operation.input.shape)
29
- if bucket_member && (bucket = context.params[bucket_member])
30
- _resolved_bucket, _resolved_region, arn = BucketARN.resolve_arn!(
31
- bucket,
32
- context.config.region,
33
- context.config.s3_use_arn_region
34
- )
35
- if arn
36
- if arn.resource.start_with?('accesspoint')
37
- validate_config!(context.config)
38
- end
39
-
40
- dualstack = extract_dualstack_config!(context)
41
-
42
- BucketARN.resolve_url!(
43
- context.http_request.endpoint,
44
- arn,
45
- dualstack
46
- )
47
- end
48
- end
49
- @handler.call(context)
50
- end
51
-
52
- private
53
-
54
- def _bucket_member(input)
55
- input.members.each do |member, ref|
56
- return member if ref.shape.name == 'BucketName'
57
- end
58
- nil
59
- end
60
-
61
- # other plugins use dualstack so disable it when we're done
62
- def extract_dualstack_config!(context)
63
- dualstack = context[:use_dualstack_endpoint]
64
- context[:use_dualstack_endpoint] = false if dualstack
65
- dualstack
66
- end
67
-
68
- def validate_config!(config)
69
- unless config.regional_endpoint
70
- raise ArgumentError,
71
- 'Cannot provide both an accesspoint ARN and :endpoint.'
72
- end
73
-
74
- if config.use_accelerate_endpoint
75
- raise ArgumentError,
76
- 'Cannot provide both an accesspoint ARN and setting '\
77
- ':use_accelerate_endpoint to true.'
78
- end
79
-
80
- if config.force_path_style
81
- raise ArgumentError,
82
- 'Cannot provide both an accesspoint ARN and setting '\
83
- ':force_path_style to true.'
84
- end
85
- end
86
- end
87
-
88
- class << self
89
-
90
- # @api private
91
- def resolve_arn!(bucket_name, region, s3_use_arn_region)
92
- if Aws::ARNParser.arn?(bucket_name)
93
- arn = Aws::ARNParser.parse(bucket_name)
94
- validate_s3_arn!(arn)
95
- validate_region!(arn, region, s3_use_arn_region)
96
- if arn.resource.start_with?('accesspoint')
97
- region = arn.region if s3_use_arn_region
98
- [bucket_name, region, arn]
99
- else
100
- raise ArgumentError,
101
- 'Only accesspoint type ARNs are currently supported.'
102
- end
103
- else
104
- [bucket_name, region]
105
- end
106
- end
107
-
108
- # @api private
109
- def resolve_url!(url, arn, dualstack = false)
110
- if arn.resource.start_with?('accesspoint')
111
- url.host = accesspoint_arn_host(arn, dualstack)
112
- else
113
- raise ArgumentError,
114
- 'Only accesspoint type ARNs are currently supported.'
115
- end
116
- url.path = url_path(url.path, arn)
117
- url
118
- end
119
-
120
- private
121
-
122
- def accesspoint_arn_host(arn, dualstack)
123
- _resource_type, resource_name = parse_resource(arn.resource)
124
- sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(arn.region)
125
- "#{resource_name}-#{arn.account_id}"\
126
- '.s3-accesspoint'\
127
- "#{'.dualstack' if dualstack}"\
128
- ".#{arn.region}.#{sfx}"
129
- end
130
-
131
- def parse_resource(str)
132
- slash = str.index('/') || str.length
133
- colon = str.index(':') || str.length
134
- delimiter = slash < colon ? slash : colon
135
- if delimiter < str.length
136
- [str[0..(delimiter - 1)], str[(delimiter + 1)..-1]]
137
- else
138
- [nil, str]
139
- end
140
- end
141
-
142
- def resolve_s3_use_arn_region(cfg)
143
- value = ENV['AWS_S3_USE_ARN_REGION'] ||
144
- Aws.shared_config.s3_use_arn_region(profile: cfg.profile) ||
145
- 'true'
146
-
147
- # Raise if provided value is not true or false
148
- if value != 'true' && value != 'false'
149
- raise ArgumentError,
150
- 'Must provide either `true` or `false` for '\
151
- 's3_use_arn_region profile option or for '\
152
- 'ENV[\'AWS_S3_USE_ARN_REGION\']'
153
- end
154
-
155
- value == 'true'
156
- end
157
-
158
- def url_path(path, arn)
159
- path = path.sub("/#{Seahorse::Util.uri_escape(arn.to_s)}", '')
160
- .sub("/#{arn}", '')
161
- "/#{path}" unless path.match(/^\//)
162
- path
163
- end
164
-
165
- def validate_s3_arn!(arn)
166
- _resource_type, resource_name = parse_resource(arn.resource)
167
-
168
- unless arn.service == 's3'
169
- raise ArgumentError, 'Must provide an S3 ARN.'
170
- end
171
-
172
- if arn.region.empty? || arn.account_id.empty?
173
- raise ArgumentError,
174
- 'S3 Access Point ARNs must contain both a valid region '\
175
- ' and a valid account id.'
176
- end
177
-
178
- if resource_name.include?(':') || resource_name.include?('/')
179
- raise ArgumentError,
180
- 'ARN resource id must be a single value.'
181
- end
182
-
183
- unless Plugins::BucketDns.valid_subdomain?(
184
- "#{resource_name}-#{arn.account_id}"
185
- )
186
- raise ArgumentError,
187
- "#{resource_name}-#{arn.account_id} is not a "\
188
- 'valid subdomain.'
189
- end
190
- end
191
-
192
- def validate_region!(arn, region, s3_use_arn_region)
193
- if region.include?('fips')
194
- raise ArgumentError,
195
- 'FIPS client regions are currently not supported with '\
196
- 'accesspoint ARNs.'
197
- end
198
-
199
- if s3_use_arn_region &&
200
- !Aws::Partitions.partition(arn.partition).region?(region)
201
- raise Aws::Errors::InvalidARNPartitionError
202
- end
203
-
204
- if !s3_use_arn_region && region != arn.region
205
- raise Aws::Errors::InvalidARNRegionError
206
- end
207
- end
208
- end
209
- end
210
- end
211
- end
212
- end