aws-sdk-s3 1.87.0 → 1.96.1

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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +778 -0
  3. data/LICENSE.txt +202 -0
  4. data/VERSION +1 -0
  5. data/lib/aws-sdk-s3.rb +2 -2
  6. data/lib/aws-sdk-s3/arn/access_point_arn.rb +15 -8
  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 +10 -8
  9. data/lib/aws-sdk-s3/bucket.rb +22 -21
  10. data/lib/aws-sdk-s3/bucket_acl.rb +6 -4
  11. data/lib/aws-sdk-s3/bucket_cors.rb +5 -5
  12. data/lib/aws-sdk-s3/bucket_lifecycle.rb +3 -3
  13. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +3 -3
  14. data/lib/aws-sdk-s3/bucket_logging.rb +3 -4
  15. data/lib/aws-sdk-s3/bucket_notification.rb +2 -2
  16. data/lib/aws-sdk-s3/bucket_policy.rb +3 -3
  17. data/lib/aws-sdk-s3/bucket_request_payment.rb +5 -6
  18. data/lib/aws-sdk-s3/bucket_tagging.rb +3 -3
  19. data/lib/aws-sdk-s3/bucket_versioning.rb +4 -4
  20. data/lib/aws-sdk-s3/bucket_website.rb +3 -3
  21. data/lib/aws-sdk-s3/client.rb +1368 -1015
  22. data/lib/aws-sdk-s3/client_api.rb +62 -1
  23. data/lib/aws-sdk-s3/customizations/bucket.rb +8 -3
  24. data/lib/aws-sdk-s3/customizations/object.rb +39 -14
  25. data/lib/aws-sdk-s3/encryptionV2/default_cipher_provider.rb +3 -3
  26. data/lib/aws-sdk-s3/errors.rb +1 -1
  27. data/lib/aws-sdk-s3/event_streams.rb +1 -1
  28. data/lib/aws-sdk-s3/file_uploader.rb +2 -2
  29. data/lib/aws-sdk-s3/multipart_upload.rb +7 -7
  30. data/lib/aws-sdk-s3/multipart_upload_part.rb +7 -7
  31. data/lib/aws-sdk-s3/object.rb +127 -42
  32. data/lib/aws-sdk-s3/object_acl.rb +7 -5
  33. data/lib/aws-sdk-s3/object_summary.rb +40 -41
  34. data/lib/aws-sdk-s3/object_version.rb +14 -14
  35. data/lib/aws-sdk-s3/plugins/accelerate.rb +7 -4
  36. data/lib/aws-sdk-s3/plugins/arn.rb +96 -55
  37. data/lib/aws-sdk-s3/plugins/dualstack.rb +10 -3
  38. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  39. data/lib/aws-sdk-s3/plugins/get_bucket_location_fix.rb +1 -1
  40. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +11 -11
  41. data/lib/aws-sdk-s3/plugins/md5s.rb +1 -1
  42. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
  43. data/lib/aws-sdk-s3/plugins/s3_signer.rb +24 -26
  44. data/lib/aws-sdk-s3/presigner.rb +27 -30
  45. data/lib/aws-sdk-s3/resource.rb +5 -3
  46. data/lib/aws-sdk-s3/types.rb +1029 -570
  47. data/lib/aws-sdk-s3/waiters.rb +1 -1
  48. metadata +13 -9
@@ -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
 
@@ -152,7 +152,9 @@ module Aws::S3
152
152
  End = Shapes::IntegerShape.new(name: 'End')
153
153
  EndEvent = Shapes::StructureShape.new(name: 'EndEvent')
154
154
  Error = Shapes::StructureShape.new(name: 'Error')
155
+ ErrorCode = Shapes::StringShape.new(name: 'ErrorCode')
155
156
  ErrorDocument = Shapes::StructureShape.new(name: 'ErrorDocument')
157
+ ErrorMessage = Shapes::StringShape.new(name: 'ErrorMessage')
156
158
  Errors = Shapes::ListShape.new(name: 'Errors', flattened: true)
157
159
  Event = Shapes::StringShape.new(name: 'Event')
158
160
  EventList = Shapes::ListShape.new(name: 'EventList', flattened: true)
@@ -223,6 +225,7 @@ module Aws::S3
223
225
  GetObjectLockConfigurationRequest = Shapes::StructureShape.new(name: 'GetObjectLockConfigurationRequest')
224
226
  GetObjectOutput = Shapes::StructureShape.new(name: 'GetObjectOutput')
225
227
  GetObjectRequest = Shapes::StructureShape.new(name: 'GetObjectRequest')
228
+ GetObjectResponseStatusCode = Shapes::IntegerShape.new(name: 'GetObjectResponseStatusCode')
226
229
  GetObjectRetentionOutput = Shapes::StructureShape.new(name: 'GetObjectRetentionOutput')
227
230
  GetObjectRetentionRequest = Shapes::StructureShape.new(name: 'GetObjectRetentionRequest')
228
231
  GetObjectTaggingOutput = Shapes::StructureShape.new(name: 'GetObjectTaggingOutput')
@@ -475,6 +478,8 @@ module Aws::S3
475
478
  RequestPayer = Shapes::StringShape.new(name: 'RequestPayer')
476
479
  RequestPaymentConfiguration = Shapes::StructureShape.new(name: 'RequestPaymentConfiguration')
477
480
  RequestProgress = Shapes::StructureShape.new(name: 'RequestProgress')
481
+ RequestRoute = Shapes::StringShape.new(name: 'RequestRoute')
482
+ RequestToken = Shapes::StringShape.new(name: 'RequestToken')
478
483
  ResponseCacheControl = Shapes::StringShape.new(name: 'ResponseCacheControl')
479
484
  ResponseContentDisposition = Shapes::StringShape.new(name: 'ResponseContentDisposition')
480
485
  ResponseContentEncoding = Shapes::StringShape.new(name: 'ResponseContentEncoding')
@@ -559,6 +564,7 @@ module Aws::S3
559
564
  VersioningConfiguration = Shapes::StructureShape.new(name: 'VersioningConfiguration')
560
565
  WebsiteConfiguration = Shapes::StructureShape.new(name: 'WebsiteConfiguration')
561
566
  WebsiteRedirectLocation = Shapes::StringShape.new(name: 'WebsiteRedirectLocation')
567
+ WriteGetObjectResponseRequest = Shapes::StructureShape.new(name: 'WriteGetObjectResponseRequest')
562
568
  Years = Shapes::IntegerShape.new(name: 'Years')
563
569
 
564
570
  AbortIncompleteMultipartUpload.add_member(:days_after_initiation, Shapes::ShapeRef.new(shape: DaysAfterInitiation, location_name: "DaysAfterInitiation"))
@@ -634,6 +640,7 @@ module Aws::S3
634
640
  CORSConfiguration.add_member(:cors_rules, Shapes::ShapeRef.new(shape: CORSRules, required: true, location_name: "CORSRule"))
635
641
  CORSConfiguration.struct_class = Types::CORSConfiguration
636
642
 
643
+ CORSRule.add_member(:id, Shapes::ShapeRef.new(shape: ID, location_name: "ID"))
637
644
  CORSRule.add_member(:allowed_headers, Shapes::ShapeRef.new(shape: AllowedHeaders, location_name: "AllowedHeader"))
638
645
  CORSRule.add_member(:allowed_methods, Shapes::ShapeRef.new(shape: AllowedMethods, required: true, location_name: "AllowedMethod"))
639
646
  CORSRule.add_member(:allowed_origins, Shapes::ShapeRef.new(shape: AllowedOrigins, required: true, location_name: "AllowedOrigin"))
@@ -1288,6 +1295,7 @@ module Aws::S3
1288
1295
  GetObjectTaggingRequest.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, required: true, location: "uri", location_name: "Key"))
1289
1296
  GetObjectTaggingRequest.add_member(:version_id, Shapes::ShapeRef.new(shape: ObjectVersionId, location: "querystring", location_name: "versionId"))
1290
1297
  GetObjectTaggingRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
1298
+ GetObjectTaggingRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
1291
1299
  GetObjectTaggingRequest.struct_class = Types::GetObjectTaggingRequest
1292
1300
 
1293
1301
  GetObjectTorrentOutput.add_member(:body, Shapes::ShapeRef.new(shape: Body, location_name: "Body", metadata: {"streaming"=>true}))
@@ -2105,6 +2113,7 @@ module Aws::S3
2105
2113
  PutObjectTaggingRequest.add_member(:content_md5, Shapes::ShapeRef.new(shape: ContentMD5, location: "header", location_name: "Content-MD5"))
2106
2114
  PutObjectTaggingRequest.add_member(:tagging, Shapes::ShapeRef.new(shape: Tagging, required: true, location_name: "Tagging", metadata: {"xmlNamespace"=>{"uri"=>"http://s3.amazonaws.com/doc/2006-03-01/"}}))
2107
2115
  PutObjectTaggingRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
2116
+ PutObjectTaggingRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
2108
2117
  PutObjectTaggingRequest.struct_class = Types::PutObjectTaggingRequest
2109
2118
  PutObjectTaggingRequest[:payload] = :tagging
2110
2119
  PutObjectTaggingRequest[:payload_member] = PutObjectTaggingRequest.member(:tagging)
@@ -2429,6 +2438,46 @@ module Aws::S3
2429
2438
  WebsiteConfiguration.add_member(:routing_rules, Shapes::ShapeRef.new(shape: RoutingRules, location_name: "RoutingRules"))
2430
2439
  WebsiteConfiguration.struct_class = Types::WebsiteConfiguration
2431
2440
 
2441
+ WriteGetObjectResponseRequest.add_member(:request_route, Shapes::ShapeRef.new(shape: RequestRoute, required: true, location: "header", location_name: "x-amz-request-route", metadata: {"hostLabel"=>true, "hostLabelName"=>"RequestRoute"}))
2442
+ WriteGetObjectResponseRequest.add_member(:request_token, Shapes::ShapeRef.new(shape: RequestToken, required: true, location: "header", location_name: "x-amz-request-token"))
2443
+ WriteGetObjectResponseRequest.add_member(:body, Shapes::ShapeRef.new(shape: Body, location_name: "Body", metadata: {"streaming"=>true}))
2444
+ WriteGetObjectResponseRequest.add_member(:status_code, Shapes::ShapeRef.new(shape: GetObjectResponseStatusCode, location: "header", location_name: "x-amz-fwd-status"))
2445
+ WriteGetObjectResponseRequest.add_member(:error_code, Shapes::ShapeRef.new(shape: ErrorCode, location: "header", location_name: "x-amz-fwd-error-code"))
2446
+ WriteGetObjectResponseRequest.add_member(:error_message, Shapes::ShapeRef.new(shape: ErrorMessage, location: "header", location_name: "x-amz-fwd-error-message"))
2447
+ WriteGetObjectResponseRequest.add_member(:accept_ranges, Shapes::ShapeRef.new(shape: AcceptRanges, location: "header", location_name: "x-amz-fwd-header-accept-ranges"))
2448
+ WriteGetObjectResponseRequest.add_member(:cache_control, Shapes::ShapeRef.new(shape: CacheControl, location: "header", location_name: "x-amz-fwd-header-Cache-Control"))
2449
+ WriteGetObjectResponseRequest.add_member(:content_disposition, Shapes::ShapeRef.new(shape: ContentDisposition, location: "header", location_name: "x-amz-fwd-header-Content-Disposition"))
2450
+ WriteGetObjectResponseRequest.add_member(:content_encoding, Shapes::ShapeRef.new(shape: ContentEncoding, location: "header", location_name: "x-amz-fwd-header-Content-Encoding"))
2451
+ WriteGetObjectResponseRequest.add_member(:content_language, Shapes::ShapeRef.new(shape: ContentLanguage, location: "header", location_name: "x-amz-fwd-header-Content-Language"))
2452
+ WriteGetObjectResponseRequest.add_member(:content_length, Shapes::ShapeRef.new(shape: ContentLength, location: "header", location_name: "Content-Length"))
2453
+ WriteGetObjectResponseRequest.add_member(:content_range, Shapes::ShapeRef.new(shape: ContentRange, location: "header", location_name: "x-amz-fwd-header-Content-Range"))
2454
+ WriteGetObjectResponseRequest.add_member(:content_type, Shapes::ShapeRef.new(shape: ContentType, location: "header", location_name: "x-amz-fwd-header-Content-Type"))
2455
+ WriteGetObjectResponseRequest.add_member(:delete_marker, Shapes::ShapeRef.new(shape: DeleteMarker, location: "header", location_name: "x-amz-fwd-header-x-amz-delete-marker"))
2456
+ WriteGetObjectResponseRequest.add_member(:etag, Shapes::ShapeRef.new(shape: ETag, location: "header", location_name: "x-amz-fwd-header-ETag"))
2457
+ WriteGetObjectResponseRequest.add_member(:expires, Shapes::ShapeRef.new(shape: Expires, location: "header", location_name: "x-amz-fwd-header-Expires"))
2458
+ WriteGetObjectResponseRequest.add_member(:expiration, Shapes::ShapeRef.new(shape: Expiration, location: "header", location_name: "x-amz-fwd-header-x-amz-expiration"))
2459
+ WriteGetObjectResponseRequest.add_member(:last_modified, Shapes::ShapeRef.new(shape: LastModified, location: "header", location_name: "x-amz-fwd-header-Last-Modified"))
2460
+ WriteGetObjectResponseRequest.add_member(:missing_meta, Shapes::ShapeRef.new(shape: MissingMeta, location: "header", location_name: "x-amz-fwd-header-x-amz-missing-meta"))
2461
+ WriteGetObjectResponseRequest.add_member(:metadata, Shapes::ShapeRef.new(shape: Metadata, location: "headers", location_name: "x-amz-meta-"))
2462
+ WriteGetObjectResponseRequest.add_member(:object_lock_mode, Shapes::ShapeRef.new(shape: ObjectLockMode, location: "header", location_name: "x-amz-fwd-header-x-amz-object-lock-mode"))
2463
+ WriteGetObjectResponseRequest.add_member(:object_lock_legal_hold_status, Shapes::ShapeRef.new(shape: ObjectLockLegalHoldStatus, location: "header", location_name: "x-amz-fwd-header-x-amz-object-lock-legal-hold"))
2464
+ WriteGetObjectResponseRequest.add_member(:object_lock_retain_until_date, Shapes::ShapeRef.new(shape: ObjectLockRetainUntilDate, location: "header", location_name: "x-amz-fwd-header-x-amz-object-lock-retain-until-date"))
2465
+ WriteGetObjectResponseRequest.add_member(:parts_count, Shapes::ShapeRef.new(shape: PartsCount, location: "header", location_name: "x-amz-fwd-header-x-amz-mp-parts-count"))
2466
+ WriteGetObjectResponseRequest.add_member(:replication_status, Shapes::ShapeRef.new(shape: ReplicationStatus, location: "header", location_name: "x-amz-fwd-header-x-amz-replication-status"))
2467
+ WriteGetObjectResponseRequest.add_member(:request_charged, Shapes::ShapeRef.new(shape: RequestCharged, location: "header", location_name: "x-amz-fwd-header-x-amz-request-charged"))
2468
+ WriteGetObjectResponseRequest.add_member(:restore, Shapes::ShapeRef.new(shape: Restore, location: "header", location_name: "x-amz-fwd-header-x-amz-restore"))
2469
+ WriteGetObjectResponseRequest.add_member(:server_side_encryption, Shapes::ShapeRef.new(shape: ServerSideEncryption, location: "header", location_name: "x-amz-fwd-header-x-amz-server-side-encryption"))
2470
+ WriteGetObjectResponseRequest.add_member(:sse_customer_algorithm, Shapes::ShapeRef.new(shape: SSECustomerAlgorithm, location: "header", location_name: "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"))
2471
+ WriteGetObjectResponseRequest.add_member(:ssekms_key_id, Shapes::ShapeRef.new(shape: SSEKMSKeyId, location: "header", location_name: "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"))
2472
+ WriteGetObjectResponseRequest.add_member(:sse_customer_key_md5, Shapes::ShapeRef.new(shape: SSECustomerKeyMD5, location: "header", location_name: "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"))
2473
+ WriteGetObjectResponseRequest.add_member(:storage_class, Shapes::ShapeRef.new(shape: StorageClass, location: "header", location_name: "x-amz-fwd-header-x-amz-storage-class"))
2474
+ WriteGetObjectResponseRequest.add_member(:tag_count, Shapes::ShapeRef.new(shape: TagCount, location: "header", location_name: "x-amz-fwd-header-x-amz-tagging-count"))
2475
+ WriteGetObjectResponseRequest.add_member(:version_id, Shapes::ShapeRef.new(shape: ObjectVersionId, location: "header", location_name: "x-amz-fwd-header-x-amz-version-id"))
2476
+ WriteGetObjectResponseRequest.add_member(:bucket_key_enabled, Shapes::ShapeRef.new(shape: BucketKeyEnabled, location: "header", location_name: "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"))
2477
+ WriteGetObjectResponseRequest.struct_class = Types::WriteGetObjectResponseRequest
2478
+ WriteGetObjectResponseRequest[:payload] = :body
2479
+ WriteGetObjectResponseRequest[:payload_member] = WriteGetObjectResponseRequest.member(:body)
2480
+
2432
2481
 
2433
2482
  # @api private
2434
2483
  API = Seahorse::Model::Api.new.tap do |api|
@@ -3285,6 +3334,18 @@ module Aws::S3
3285
3334
  o.input = Shapes::ShapeRef.new(shape: UploadPartCopyRequest)
3286
3335
  o.output = Shapes::ShapeRef.new(shape: UploadPartCopyOutput)
3287
3336
  end)
3337
+
3338
+ api.add_operation(:write_get_object_response, Seahorse::Model::Operation.new.tap do |o|
3339
+ o.name = "WriteGetObjectResponse"
3340
+ o.http_method = "POST"
3341
+ o.http_request_uri = "/WriteGetObjectResponse"
3342
+ o['authtype'] = "v4-unsigned-body"
3343
+ o.endpoint_pattern = {
3344
+ "hostPrefix" => "{RequestRoute}.",
3345
+ }
3346
+ o.input = Shapes::ShapeRef.new(shape: WriteGetObjectResponseRequest)
3347
+ o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
3348
+ end)
3288
3349
  end
3289
3350
 
3290
3351
  end
@@ -88,18 +88,23 @@ module Aws
88
88
  # You can pass `virtual_host: true` to use the bucket name as the
89
89
  # host name.
90
90
  #
91
- # bucket = s3.bucket('my.bucket.com')
91
+ # bucket = s3.bucket('my-bucket.com')
92
92
  # bucket.url(virtual_host: true)
93
- # #=> "http://my.bucket.com"
93
+ # #=> "http://my-bucket.com"
94
94
  #
95
95
  # @option options [Boolean] :virtual_host (false) When `true`,
96
96
  # the bucket name will be used as the host name. This is useful
97
97
  # when you have a CNAME configured for this bucket.
98
98
  #
99
+ # @option options [Boolean] :secure (true) When `false`, http
100
+ # will be used with virtual_host. This is required when
101
+ # the bucket name has a dot (.) in it.
102
+ #
99
103
  # @return [String] the URL for this bucket.
100
104
  def url(options = {})
101
105
  if options[:virtual_host]
102
- "http://#{name}"
106
+ scheme = options.fetch(:secure, true) ? 'https' : 'http'
107
+ "#{scheme}://#{name}"
103
108
  elsif @arn
104
109
  Plugins::ARN.resolve_url!(
105
110
  client.config.endpoint.dup,
@@ -153,21 +153,35 @@ module Aws
153
153
  # obj.presigned_url(:put, acl: 'public-read')
154
154
  # #=> "https://bucket-name.s3.amazonaws.com/object-key?..."
155
155
  #
156
- # @param [Symbol] http_method
157
- # The HTTP method to generate a presigned URL for. Valid values
158
- # are `:get`, `:put`, `:head`, and `:delete`.
156
+ # @example Pre-signed UploadPart PUT
157
+ #
158
+ # # the object uploaded using this URL will be publicly accessible
159
+ # obj.presigned_url(:upload_part, part_number: 1, upload_id: 'uploadIdToken')
160
+ # #=> "https://bucket-name.s3.amazonaws.com/object-key?..."
161
+ #
162
+ # @param [Symbol] method
163
+ # The S3 operation to generate a presigned URL for. Valid values
164
+ # are `:get`, `:put`, `:head`, `:delete`, `:create_multipart_upload`,
165
+ # `:list_multipart_uploads`, `:complete_multipart_upload`,
166
+ # `:abort_multipart_upload`, `:list_parts`, and `:upload_part`.
159
167
  #
160
168
  # @param [Hash] params
161
169
  # Additional request parameters to use when generating the pre-signed
162
170
  # URL. See the related documentation in {Client} for accepted
163
171
  # params.
164
172
  #
165
- # | HTTP Method | Client Method |
166
- # |---------------|------------------------|
167
- # | `:get` | {Client#get_object} |
168
- # | `:put` | {Client#put_object} |
169
- # | `:head` | {Client#head_object} |
170
- # | `:delete` | {Client#delete_object} |
173
+ # | Method | Client Method |
174
+ # |------------------------------|------------------------------------|
175
+ # | `:get` | {Client#get_object} |
176
+ # | `:put` | {Client#put_object} |
177
+ # | `:head` | {Client#head_object} |
178
+ # | `:delete` | {Client#delete_object} |
179
+ # | `:create_multipart_upload` | {Client#create_multipart_upload} |
180
+ # | `:list_multipart_uploads` | {Client#list_multipart_uploads} |
181
+ # | `:complete_multipart_upload` | {Client#complete_multipart_upload} |
182
+ # | `:abort_multipart_upload` | {Client#abort_multipart_upload} |
183
+ # | `:list_parts` | {Client#list_parts} |
184
+ # | `:upload_part` | {Client#upload_part} |
171
185
  #
172
186
  # @option params [Boolean] :virtual_host (false) When `true` the
173
187
  # presigned URL will use the bucket name as a virtual host.
@@ -188,10 +202,15 @@ module Aws
188
202
  #
189
203
  # @return [String]
190
204
  #
191
- def presigned_url(http_method, params = {})
205
+ def presigned_url(method, params = {})
192
206
  presigner = Presigner.new(client: client)
207
+
208
+ if %w(delete head get put).include?(method.to_s)
209
+ method = "#{method}_object".to_sym
210
+ end
211
+
193
212
  presigner.presigned_url(
194
- "#{http_method.downcase}_object",
213
+ method.downcase,
195
214
  params.merge(bucket: bucket_name, key: key)
196
215
  )
197
216
  end
@@ -201,16 +220,22 @@ module Aws
201
220
  # s3.bucket('bucket-name').object('obj-key').public_url
202
221
  # #=> "https://bucket-name.s3.amazonaws.com/obj-key"
203
222
  #
204
- # To use virtual hosted bucket url (disables https):
223
+ # To use virtual hosted bucket url.
224
+ # Uses https unless secure: false is set. If the bucket
225
+ # name contains dots (.) then you will need to set secure: false.
205
226
  #
206
- # s3.bucket('my.bucket.com').object('key')
227
+ # s3.bucket('my-bucket.com').object('key')
207
228
  # .public_url(virtual_host: true)
208
- # #=> "http://my.bucket.com/key"
229
+ # #=> "https://my-bucket.com/key"
209
230
  #
210
231
  # @option options [Boolean] :virtual_host (false) When `true`, the bucket
211
232
  # name will be used as the host name. This is useful when you have
212
233
  # a CNAME configured for the bucket.
213
234
  #
235
+ # @option options [Boolean] :secure (true) When `false`, http
236
+ # will be used with virtual_host. This is required when
237
+ # the bucket name has a dot (.) in it.
238
+ #
214
239
  # @return [String]
215
240
  def public_url(options = {})
216
241
  url = URI.parse(bucket.url(options))
@@ -87,9 +87,9 @@ module Aws
87
87
  ' kms+context. Please configure the client with the' \
88
88
  ' required kms_key_id'
89
89
  else
90
- raise ArgumentError, 'Unsupported wrap-alg: ' \
91
- "#{envelope['x-amz-wrap-alg']}"
92
- end
90
+ raise ArgumentError, 'Unsupported wrap-alg: ' \
91
+ "#{envelope['x-amz-wrap-alg']}"
92
+ end
93
93
  iv = decode64(envelope['x-amz-iv'])
94
94
  Utils.aes_decryption_cipher(:GCM, key, iv)
95
95
  end
@@ -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
 
@@ -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
 
@@ -7,7 +7,7 @@ module Aws
7
7
  # @api private
8
8
  class FileUploader
9
9
 
10
- FIFTEEN_MEGABYTES = 15 * 1024 * 1024
10
+ ONE_HUNDRED_MEGABYTES = 100 * 1024 * 1024
11
11
 
12
12
  # @param [Hash] options
13
13
  # @option options [Client] :client
@@ -16,7 +16,7 @@ module Aws
16
16
  @options = options
17
17
  @client = options[:client] || Client.new
18
18
  @multipart_threshold = options[:multipart_threshold] ||
19
- FIFTEEN_MEGABYTES
19
+ ONE_HUNDRED_MEGABYTES
20
20
  end
21
21
 
22
22
  # @return [Client]
@@ -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
 
@@ -228,13 +228,13 @@ module Aws::S3
228
228
  # request. Bucket owners need not specify this parameter in their
229
229
  # requests. For information about downloading objects from requester
230
230
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
231
- # in the *Amazon S3 Developer Guide*.
231
+ # in the *Amazon S3 User Guide*.
232
232
  #
233
233
  #
234
234
  #
235
235
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
236
236
  # @option options [String] :expected_bucket_owner
237
- # The account id of the expected bucket owner. If the bucket is owned by
237
+ # The account ID of the expected bucket owner. If the bucket is owned by
238
238
  # a different account, the request will fail with an HTTP `403 (Access
239
239
  # Denied)` error.
240
240
  # @return [Types::AbortMultipartUploadOutput]
@@ -270,13 +270,13 @@ module Aws::S3
270
270
  # request. Bucket owners need not specify this parameter in their
271
271
  # requests. For information about downloading objects from requester
272
272
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
273
- # in the *Amazon S3 Developer Guide*.
273
+ # in the *Amazon S3 User Guide*.
274
274
  #
275
275
  #
276
276
  #
277
277
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
278
278
  # @option options [String] :expected_bucket_owner
279
- # The account id of the expected bucket owner. If the bucket is owned by
279
+ # The account ID of the expected bucket owner. If the bucket is owned by
280
280
  # a different account, the request will fail with an HTTP `403 (Access
281
281
  # Denied)` error.
282
282
  # @return [Object]
@@ -329,13 +329,13 @@ module Aws::S3
329
329
  # request. Bucket owners need not specify this parameter in their
330
330
  # requests. For information about downloading objects from requester
331
331
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
332
- # in the *Amazon S3 Developer Guide*.
332
+ # in the *Amazon S3 User Guide*.
333
333
  #
334
334
  #
335
335
  #
336
336
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
337
337
  # @option options [String] :expected_bucket_owner
338
- # The account id of the expected bucket owner. If the bucket is owned by
338
+ # The account ID of the expected bucket owner. If the bucket is owned by
339
339
  # a different account, the request will fail with an HTTP `403 (Access
340
340
  # Denied)` error.
341
341
  # @return [MultipartUploadPart::Collection]
@@ -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
 
@@ -269,7 +269,7 @@ module Aws::S3
269
269
  #
270
270
  #
271
271
  #
272
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points.html
272
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
273
273
  # @option options [String] :copy_source_if_match
274
274
  # Copies the object if its entity tag (ETag) matches the specified tag.
275
275
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
@@ -317,17 +317,17 @@ module Aws::S3
317
317
  # request. Bucket owners need not specify this parameter in their
318
318
  # requests. For information about downloading objects from requester
319
319
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
320
- # in the *Amazon S3 Developer Guide*.
320
+ # in the *Amazon S3 User Guide*.
321
321
  #
322
322
  #
323
323
  #
324
324
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
325
325
  # @option options [String] :expected_bucket_owner
326
- # The account id of the expected destination bucket owner. If the
326
+ # The account ID of the expected destination bucket owner. If the
327
327
  # destination bucket is owned by a different account, the request will
328
328
  # fail with an HTTP `403 (Access Denied)` error.
329
329
  # @option options [String] :expected_source_bucket_owner
330
- # The account id of the expected source bucket owner. If the source
330
+ # The account ID of the expected source bucket owner. If the source
331
331
  # bucket is owned by a different account, the request will fail with an
332
332
  # HTTP `403 (Access Denied)` error.
333
333
  # @return [Types::UploadPartCopyOutput]
@@ -384,13 +384,13 @@ module Aws::S3
384
384
  # request. Bucket owners need not specify this parameter in their
385
385
  # requests. For information about downloading objects from requester
386
386
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
387
- # in the *Amazon S3 Developer Guide*.
387
+ # in the *Amazon S3 User Guide*.
388
388
  #
389
389
  #
390
390
  #
391
391
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
392
392
  # @option options [String] :expected_bucket_owner
393
- # The account id of the expected bucket owner. If the bucket is owned by
393
+ # The account ID of the expected bucket owner. If the bucket is owned by
394
394
  # a different account, the request will fail with an HTTP `403 (Access
395
395
  # Denied)` error.
396
396
  # @return [Types::UploadPartOutput]
@@ -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
 
@@ -73,7 +73,7 @@ module Aws::S3
73
73
  # If an archive copy is already restored, the header value indicates
74
74
  # when Amazon S3 is scheduled to delete the object copy. For example:
75
75
  #
76
- # `x-amz-restore: ongoing-request="false", expiry-date="Fri, 23 Dec 2012
76
+ # `x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012
77
77
  # 00:00:00 GMT"`
78
78
  #
79
79
  # If the object restoration is in progress, the header returns the value
@@ -97,7 +97,7 @@ module Aws::S3
97
97
  data[:archive_status]
98
98
  end
99
99
 
100
- # Last modified date of the object
100
+ # Creation date of the object.
101
101
  # @return [Time]
102
102
  def last_modified
103
103
  data[:last_modified]
@@ -632,7 +632,7 @@ module Aws::S3
632
632
  #
633
633
  #
634
634
  #
635
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points.html
635
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
636
636
  # @option options [String] :copy_source_if_match
637
637
  # Copies the object if its entity tag (ETag) matches the specified tag.
638
638
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
@@ -679,7 +679,7 @@ module Aws::S3
679
679
  # and high availability. Depending on performance needs, you can specify
680
680
  # a different Storage Class. Amazon S3 on Outposts only uses the
681
681
  # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
682
- # in the *Amazon S3 Service Developer Guide*.
682
+ # in the *Amazon S3 User Guide*.
683
683
  #
684
684
  #
685
685
  #
@@ -706,8 +706,8 @@ module Aws::S3
706
706
  # PUT requests for an object protected by AWS KMS will fail if not made
707
707
  # via SSL or using SigV4. For information about configuring using any of
708
708
  # the officially supported AWS SDKs and AWS CLI, see [Specifying the
709
- # Signature Version in Request Authentication][1] in the *Amazon S3
710
- # Developer Guide*.
709
+ # Signature Version in Request Authentication][1] in the *Amazon S3 User
710
+ # Guide*.
711
711
  #
712
712
  #
713
713
  #
@@ -722,8 +722,8 @@ module Aws::S3
722
722
  # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
723
723
  # for object encryption with SSE-KMS.
724
724
  #
725
- # Specifying this header with a COPY operation doesn’t affect
726
- # bucket-level settings for S3 Bucket Key.
725
+ # Specifying this header with a COPY action doesn’t affect bucket-level
726
+ # settings for S3 Bucket Key.
727
727
  # @option options [String] :copy_source_sse_customer_algorithm
728
728
  # Specifies the algorithm to use when decrypting the source object (for
729
729
  # example, AES256).
@@ -740,7 +740,7 @@ module Aws::S3
740
740
  # request. Bucket owners need not specify this parameter in their
741
741
  # requests. For information about downloading objects from requester
742
742
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
743
- # in the *Amazon S3 Developer Guide*.
743
+ # in the *Amazon S3 User Guide*.
744
744
  #
745
745
  #
746
746
  #
@@ -757,11 +757,11 @@ module Aws::S3
757
757
  # @option options [String] :object_lock_legal_hold_status
758
758
  # Specifies whether you want to apply a Legal Hold to the copied object.
759
759
  # @option options [String] :expected_bucket_owner
760
- # The account id of the expected destination bucket owner. If the
760
+ # The account ID of the expected destination bucket owner. If the
761
761
  # destination bucket is owned by a different account, the request will
762
762
  # fail with an HTTP `403 (Access Denied)` error.
763
763
  # @option options [String] :expected_source_bucket_owner
764
- # The account id of the expected source bucket owner. If the source
764
+ # The account ID of the expected source bucket owner. If the source
765
765
  # bucket is owned by a different account, the request will fail with an
766
766
  # HTTP `403 (Access Denied)` error.
767
767
  # @return [Types::CopyObjectOutput]
@@ -796,7 +796,7 @@ module Aws::S3
796
796
  # request. Bucket owners need not specify this parameter in their
797
797
  # requests. For information about downloading objects from requester
798
798
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
799
- # in the *Amazon S3 Developer Guide*.
799
+ # in the *Amazon S3 User Guide*.
800
800
  #
801
801
  #
802
802
  #
@@ -805,7 +805,7 @@ module Aws::S3
805
805
  # Indicates whether S3 Object Lock should bypass Governance-mode
806
806
  # restrictions to process this operation.
807
807
  # @option options [String] :expected_bucket_owner
808
- # The account id of the expected bucket owner. If the bucket is owned by
808
+ # The account ID of the expected bucket owner. If the bucket is owned by
809
809
  # a different account, the request will fail with an HTTP `403 (Access
810
810
  # Denied)` error.
811
811
  # @return [Types::DeleteObjectOutput]
@@ -881,13 +881,13 @@ module Aws::S3
881
881
  # @option options [String] :version_id
882
882
  # VersionId used to reference a specific version of the object.
883
883
  # @option options [String] :sse_customer_algorithm
884
- # Specifies the algorithm to use to when encrypting the object (for
884
+ # Specifies the algorithm to use to when decrypting the object (for
885
885
  # example, AES256).
886
886
  # @option options [String] :sse_customer_key
887
- # Specifies the customer-provided encryption key for Amazon S3 to use in
888
- # encrypting data. This value is used to store the object and then it is
889
- # discarded; Amazon S3 does not store the encryption key. The key must
890
- # be appropriate for use with the algorithm specified in the
887
+ # Specifies the customer-provided encryption key for Amazon S3 used to
888
+ # encrypt the data. This value is used to decrypt the object when
889
+ # recovering it and must match the one used when storing the data. The
890
+ # key must be appropriate for use with the algorithm specified in the
891
891
  # `x-amz-server-side-encryption-customer-algorithm` header.
892
892
  # @option options [String] :sse_customer_key_md5
893
893
  # Specifies the 128-bit MD5 digest of the encryption key according to
@@ -898,7 +898,7 @@ module Aws::S3
898
898
  # request. Bucket owners need not specify this parameter in their
899
899
  # requests. For information about downloading objects from requester
900
900
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
901
- # in the *Amazon S3 Developer Guide*.
901
+ # in the *Amazon S3 User Guide*.
902
902
  #
903
903
  #
904
904
  #
@@ -909,7 +909,7 @@ module Aws::S3
909
909
  # for the part specified. Useful for downloading just a part of an
910
910
  # object.
911
911
  # @option options [String] :expected_bucket_owner
912
- # The account id of the expected bucket owner. If the bucket is owned by
912
+ # The account ID of the expected bucket owner. If the bucket is owned by
913
913
  # a different account, the request will fail with an HTTP `403 (Access
914
914
  # Denied)` error.
915
915
  # @return [Types::GetObjectOutput]
@@ -1002,7 +1002,7 @@ module Aws::S3
1002
1002
  # and high availability. Depending on performance needs, you can specify
1003
1003
  # a different Storage Class. Amazon S3 on Outposts only uses the
1004
1004
  # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
1005
- # in the *Amazon S3 Service Developer Guide*.
1005
+ # in the *Amazon S3 User Guide*.
1006
1006
  #
1007
1007
  #
1008
1008
  #
@@ -1030,11 +1030,11 @@ module Aws::S3
1030
1030
  # protected by AWS KMS will fail if not made via SSL or using SigV4. For
1031
1031
  # information about configuring using any of the officially supported
1032
1032
  # AWS SDKs and AWS CLI, see [Specifying the Signature Version in Request
1033
- # Authentication][1] in the *Amazon S3 Developer Guide*.
1033
+ # Authentication][1] in the *Amazon S3 User Guide*.
1034
1034
  #
1035
1035
  #
1036
1036
  #
1037
- # [1]: https://docs.aws.amazon.com/http:/docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1037
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version
1038
1038
  # @option options [String] :ssekms_encryption_context
1039
1039
  # Specifies the AWS KMS Encryption Context to use for object encryption.
1040
1040
  # The value of this header is a base64-encoded UTF-8 string holding JSON
@@ -1045,14 +1045,14 @@ module Aws::S3
1045
1045
  # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1046
1046
  # for object encryption with SSE-KMS.
1047
1047
  #
1048
- # Specifying this header with an object operation doesn’t affect
1048
+ # Specifying this header with an object action doesn’t affect
1049
1049
  # bucket-level settings for S3 Bucket Key.
1050
1050
  # @option options [String] :request_payer
1051
1051
  # Confirms that the requester knows that they will be charged for the
1052
1052
  # request. Bucket owners need not specify this parameter in their
1053
1053
  # requests. For information about downloading objects from requester
1054
1054
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1055
- # in the *Amazon S3 Developer Guide*.
1055
+ # in the *Amazon S3 User Guide*.
1056
1056
  #
1057
1057
  #
1058
1058
  #
@@ -1069,7 +1069,7 @@ module Aws::S3
1069
1069
  # Specifies whether you want to apply a Legal Hold to the uploaded
1070
1070
  # object.
1071
1071
  # @option options [String] :expected_bucket_owner
1072
- # The account id of the expected bucket owner. If the bucket is owned by
1072
+ # The account ID of the expected bucket owner. If the bucket is owned by
1073
1073
  # a different account, the request will fail with an HTTP `403 (Access
1074
1074
  # Denied)` error.
1075
1075
  # @return [MultipartUpload]
@@ -1226,7 +1226,7 @@ module Aws::S3
1226
1226
  # and high availability. Depending on performance needs, you can specify
1227
1227
  # a different Storage Class. Amazon S3 on Outposts only uses the
1228
1228
  # OUTPOSTS Storage Class. For more information, see [Storage Classes][1]
1229
- # in the *Amazon S3 Service Developer Guide*.
1229
+ # in the *Amazon S3 User Guide*.
1230
1230
  #
1231
1231
  #
1232
1232
  #
@@ -1273,14 +1273,12 @@ module Aws::S3
1273
1273
  # If `x-amz-server-side-encryption` is present and has the value of
1274
1274
  # `aws:kms`, this header specifies the ID of the AWS Key Management
1275
1275
  # Service (AWS KMS) symmetrical customer managed customer master key
1276
- # (CMK) that was used for the object.
1277
- #
1278
- # If the value of `x-amz-server-side-encryption` is `aws:kms`, this
1279
- # header specifies the ID of the symmetric customer managed AWS KMS CMK
1280
- # that will be used for the object. If you specify
1276
+ # (CMK) that was used for the object. If you specify
1281
1277
  # `x-amz-server-side-encryption:aws:kms`, but do not provide`
1282
1278
  # x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the AWS
1283
- # managed CMK in AWS to protect the data.
1279
+ # managed CMK in AWS to protect the data. If the KMS key does not exist
1280
+ # in the same account issuing the command, you must use the full ARN and
1281
+ # not just the ID.
1284
1282
  # @option options [String] :ssekms_encryption_context
1285
1283
  # Specifies the AWS KMS Encryption Context to use for object encryption.
1286
1284
  # The value of this header is a base64-encoded UTF-8 string holding JSON
@@ -1291,14 +1289,14 @@ module Aws::S3
1291
1289
  # Setting this header to `true` causes Amazon S3 to use an S3 Bucket Key
1292
1290
  # for object encryption with SSE-KMS.
1293
1291
  #
1294
- # Specifying this header with a PUT operation doesn’t affect
1295
- # bucket-level settings for S3 Bucket Key.
1292
+ # Specifying this header with a PUT action doesn’t affect bucket-level
1293
+ # settings for S3 Bucket Key.
1296
1294
  # @option options [String] :request_payer
1297
1295
  # Confirms that the requester knows that they will be charged for the
1298
1296
  # request. Bucket owners need not specify this parameter in their
1299
1297
  # requests. For information about downloading objects from requester
1300
1298
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1301
- # in the *Amazon S3 Developer Guide*.
1299
+ # in the *Amazon S3 User Guide*.
1302
1300
  #
1303
1301
  #
1304
1302
  #
@@ -1310,6 +1308,7 @@ module Aws::S3
1310
1308
  # The Object Lock mode that you want to apply to this object.
1311
1309
  # @option options [Time,DateTime,Date,Integer,String] :object_lock_retain_until_date
1312
1310
  # The date and time when you want this object's Object Lock to expire.
1311
+ # Must be formatted as a timestamp parameter.
1313
1312
  # @option options [String] :object_lock_legal_hold_status
1314
1313
  # Specifies whether a legal hold will be applied to this object. For
1315
1314
  # more information about S3 Object Lock, see [Object Lock][1].
@@ -1318,7 +1317,7 @@ module Aws::S3
1318
1317
  #
1319
1318
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1320
1319
  # @option options [String] :expected_bucket_owner
1321
- # The account id of the expected bucket owner. If the bucket is owned by
1320
+ # The account ID of the expected bucket owner. If the bucket is owned by
1322
1321
  # a different account, the request will fail with an HTTP `403 (Access
1323
1322
  # Denied)` error.
1324
1323
  # @return [Types::PutObjectOutput]
@@ -1429,13 +1428,13 @@ module Aws::S3
1429
1428
  # request. Bucket owners need not specify this parameter in their
1430
1429
  # requests. For information about downloading objects from requester
1431
1430
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1432
- # in the *Amazon S3 Developer Guide*.
1431
+ # in the *Amazon S3 User Guide*.
1433
1432
  #
1434
1433
  #
1435
1434
  #
1436
1435
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1437
1436
  # @option options [String] :expected_bucket_owner
1438
- # The account id of the expected bucket owner. If the bucket is owned by
1437
+ # The account ID of the expected bucket owner. If the bucket is owned by
1439
1438
  # a different account, the request will fail with an HTTP `403 (Access
1440
1439
  # Denied)` error.
1441
1440
  # @return [Types::RestoreObjectOutput]
@@ -1448,6 +1447,92 @@ module Aws::S3
1448
1447
  resp.data
1449
1448
  end
1450
1449
 
1450
+ # @example Request syntax with placeholder values
1451
+ #
1452
+ # object.head({
1453
+ # if_match: "IfMatch",
1454
+ # if_modified_since: Time.now,
1455
+ # if_none_match: "IfNoneMatch",
1456
+ # if_unmodified_since: Time.now,
1457
+ # range: "Range",
1458
+ # version_id: "ObjectVersionId",
1459
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
1460
+ # sse_customer_key: "SSECustomerKey",
1461
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
1462
+ # request_payer: "requester", # accepts requester
1463
+ # part_number: 1,
1464
+ # expected_bucket_owner: "AccountId",
1465
+ # })
1466
+ # @param [Hash] options ({})
1467
+ # @option options [String] :if_match
1468
+ # Return the object only if its entity tag (ETag) is the same as the one
1469
+ # specified, otherwise return a 412 (precondition failed).
1470
+ # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
1471
+ # Return the object only if it has been modified since the specified
1472
+ # time, otherwise return a 304 (not modified).
1473
+ # @option options [String] :if_none_match
1474
+ # Return the object only if its entity tag (ETag) is different from the
1475
+ # one specified, otherwise return a 304 (not modified).
1476
+ # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
1477
+ # Return the object only if it has not been modified since the specified
1478
+ # time, otherwise return a 412 (precondition failed).
1479
+ # @option options [String] :range
1480
+ # Downloads the specified range bytes of an object. For more information
1481
+ # about the HTTP Range header, see
1482
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
1483
+ #
1484
+ # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
1485
+ # `GET` request.
1486
+ #
1487
+ # </note>
1488
+ #
1489
+ #
1490
+ #
1491
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
1492
+ # @option options [String] :version_id
1493
+ # VersionId used to reference a specific version of the object.
1494
+ # @option options [String] :sse_customer_algorithm
1495
+ # Specifies the algorithm to use to when encrypting the object (for
1496
+ # example, AES256).
1497
+ # @option options [String] :sse_customer_key
1498
+ # Specifies the customer-provided encryption key for Amazon S3 to use in
1499
+ # encrypting data. This value is used to store the object and then it is
1500
+ # discarded; Amazon S3 does not store the encryption key. The key must
1501
+ # be appropriate for use with the algorithm specified in the
1502
+ # `x-amz-server-side-encryption-customer-algorithm` header.
1503
+ # @option options [String] :sse_customer_key_md5
1504
+ # Specifies the 128-bit MD5 digest of the encryption key according to
1505
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
1506
+ # ensure that the encryption key was transmitted without error.
1507
+ # @option options [String] :request_payer
1508
+ # Confirms that the requester knows that they will be charged for the
1509
+ # request. Bucket owners need not specify this parameter in their
1510
+ # requests. For information about downloading objects from requester
1511
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1512
+ # in the *Amazon S3 User Guide*.
1513
+ #
1514
+ #
1515
+ #
1516
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1517
+ # @option options [Integer] :part_number
1518
+ # Part number of the object being read. This is a positive integer
1519
+ # between 1 and 10,000. Effectively performs a 'ranged' HEAD request
1520
+ # for the part specified. Useful querying about the size of the part and
1521
+ # the number of parts in this object.
1522
+ # @option options [String] :expected_bucket_owner
1523
+ # The account ID of the expected bucket owner. If the bucket is owned by
1524
+ # a different account, the request will fail with an HTTP `403 (Access
1525
+ # Denied)` error.
1526
+ # @return [Types::HeadObjectOutput]
1527
+ def head(options = {})
1528
+ options = options.merge(
1529
+ bucket: @bucket_name,
1530
+ key: @key
1531
+ )
1532
+ resp = @client.head_object(options)
1533
+ resp.data
1534
+ end
1535
+
1451
1536
  # @!group Associations
1452
1537
 
1453
1538
  # @return [ObjectAcl]
@@ -1573,7 +1658,7 @@ module Aws::S3
1573
1658
  # request. Bucket owners need not specify this parameter in their
1574
1659
  # requests. For information about downloading objects from requester
1575
1660
  # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1576
- # in the *Amazon S3 Developer Guide*.
1661
+ # in the *Amazon S3 User Guide*.
1577
1662
  #
1578
1663
  #
1579
1664
  #
@@ -1583,7 +1668,7 @@ module Aws::S3
1583
1668
  # Governance-type Object Lock in place. You must have sufficient
1584
1669
  # permissions to perform this operation.
1585
1670
  # @option options [String] :expected_bucket_owner
1586
- # The account id of the expected bucket owner. If the bucket is owned by
1671
+ # The account ID of the expected bucket owner. If the bucket is owned by
1587
1672
  # a different account, the request will fail with an HTTP `403 (Access
1588
1673
  # Denied)` error.
1589
1674
  # @return [void]