aws-sdk-s3 1.91.0 → 1.94.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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3.rb +1 -1
  5. data/lib/aws-sdk-s3/arn/access_point_arn.rb +4 -6
  6. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +64 -0
  7. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +4 -6
  8. data/lib/aws-sdk-s3/bucket.rb +6 -6
  9. data/lib/aws-sdk-s3/bucket_acl.rb +1 -1
  10. data/lib/aws-sdk-s3/bucket_cors.rb +3 -4
  11. data/lib/aws-sdk-s3/bucket_lifecycle.rb +2 -2
  12. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +2 -2
  13. data/lib/aws-sdk-s3/bucket_logging.rb +1 -1
  14. data/lib/aws-sdk-s3/bucket_notification.rb +1 -1
  15. data/lib/aws-sdk-s3/bucket_policy.rb +2 -2
  16. data/lib/aws-sdk-s3/bucket_request_payment.rb +1 -1
  17. data/lib/aws-sdk-s3/bucket_tagging.rb +2 -2
  18. data/lib/aws-sdk-s3/bucket_versioning.rb +3 -3
  19. data/lib/aws-sdk-s3/bucket_website.rb +2 -2
  20. data/lib/aws-sdk-s3/client.rb +758 -482
  21. data/lib/aws-sdk-s3/client_api.rb +58 -0
  22. data/lib/aws-sdk-s3/customizations/object.rb +30 -11
  23. data/lib/aws-sdk-s3/file_uploader.rb +2 -2
  24. data/lib/aws-sdk-s3/multipart_upload.rb +3 -3
  25. data/lib/aws-sdk-s3/multipart_upload_part.rb +4 -4
  26. data/lib/aws-sdk-s3/object.rb +96 -10
  27. data/lib/aws-sdk-s3/object_acl.rb +1 -1
  28. data/lib/aws-sdk-s3/object_summary.rb +9 -9
  29. data/lib/aws-sdk-s3/object_version.rb +4 -4
  30. data/lib/aws-sdk-s3/plugins/arn.rb +57 -34
  31. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +9 -9
  32. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +25 -0
  33. data/lib/aws-sdk-s3/plugins/s3_signer.rb +6 -0
  34. data/lib/aws-sdk-s3/presigner.rb +12 -3
  35. data/lib/aws-sdk-s3/types.rb +567 -243
  36. metadata +7 -6
@@ -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"))
@@ -2432,6 +2438,46 @@ module Aws::S3
2432
2438
  WebsiteConfiguration.add_member(:routing_rules, Shapes::ShapeRef.new(shape: RoutingRules, location_name: "RoutingRules"))
2433
2439
  WebsiteConfiguration.struct_class = Types::WebsiteConfiguration
2434
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
+
2435
2481
 
2436
2482
  # @api private
2437
2483
  API = Seahorse::Model::Api.new.tap do |api|
@@ -3288,6 +3334,18 @@ module Aws::S3
3288
3334
  o.input = Shapes::ShapeRef.new(shape: UploadPartCopyRequest)
3289
3335
  o.output = Shapes::ShapeRef.new(shape: UploadPartCopyOutput)
3290
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)
3291
3349
  end
3292
3350
 
3293
3351
  end
@@ -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
@@ -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]
@@ -234,7 +234,7 @@ module Aws::S3
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]
@@ -276,7 +276,7 @@ module Aws::S3
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]
@@ -335,7 +335,7 @@ module Aws::S3
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]
@@ -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
@@ -323,11 +323,11 @@ module Aws::S3
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]
@@ -390,7 +390,7 @@ module Aws::S3
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]
@@ -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
@@ -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
@@ -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]
@@ -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]
@@ -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]
@@ -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]
@@ -1318,7 +1318,7 @@ module Aws::S3
1318
1318
  #
1319
1319
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1320
1320
  # @option options [String] :expected_bucket_owner
1321
- # The account id of the expected bucket owner. If the bucket is owned by
1321
+ # The account ID of the expected bucket owner. If the bucket is owned by
1322
1322
  # a different account, the request will fail with an HTTP `403 (Access
1323
1323
  # Denied)` error.
1324
1324
  # @return [Types::PutObjectOutput]
@@ -1435,7 +1435,7 @@ module Aws::S3
1435
1435
  #
1436
1436
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1437
1437
  # @option options [String] :expected_bucket_owner
1438
- # The account id of the expected bucket owner. If the bucket is owned by
1438
+ # The account ID of the expected bucket owner. If the bucket is owned by
1439
1439
  # a different account, the request will fail with an HTTP `403 (Access
1440
1440
  # Denied)` error.
1441
1441
  # @return [Types::RestoreObjectOutput]
@@ -1448,6 +1448,92 @@ module Aws::S3
1448
1448
  resp.data
1449
1449
  end
1450
1450
 
1451
+ # @example Request syntax with placeholder values
1452
+ #
1453
+ # object.head({
1454
+ # if_match: "IfMatch",
1455
+ # if_modified_since: Time.now,
1456
+ # if_none_match: "IfNoneMatch",
1457
+ # if_unmodified_since: Time.now,
1458
+ # range: "Range",
1459
+ # version_id: "ObjectVersionId",
1460
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
1461
+ # sse_customer_key: "SSECustomerKey",
1462
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
1463
+ # request_payer: "requester", # accepts requester
1464
+ # part_number: 1,
1465
+ # expected_bucket_owner: "AccountId",
1466
+ # })
1467
+ # @param [Hash] options ({})
1468
+ # @option options [String] :if_match
1469
+ # Return the object only if its entity tag (ETag) is the same as the one
1470
+ # specified, otherwise return a 412 (precondition failed).
1471
+ # @option options [Time,DateTime,Date,Integer,String] :if_modified_since
1472
+ # Return the object only if it has been modified since the specified
1473
+ # time, otherwise return a 304 (not modified).
1474
+ # @option options [String] :if_none_match
1475
+ # Return the object only if its entity tag (ETag) is different from the
1476
+ # one specified, otherwise return a 304 (not modified).
1477
+ # @option options [Time,DateTime,Date,Integer,String] :if_unmodified_since
1478
+ # Return the object only if it has not been modified since the specified
1479
+ # time, otherwise return a 412 (precondition failed).
1480
+ # @option options [String] :range
1481
+ # Downloads the specified range bytes of an object. For more information
1482
+ # about the HTTP Range header, see
1483
+ # [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35][1].
1484
+ #
1485
+ # <note markdown="1"> Amazon S3 doesn't support retrieving multiple ranges of data per
1486
+ # `GET` request.
1487
+ #
1488
+ # </note>
1489
+ #
1490
+ #
1491
+ #
1492
+ # [1]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
1493
+ # @option options [String] :version_id
1494
+ # VersionId used to reference a specific version of the object.
1495
+ # @option options [String] :sse_customer_algorithm
1496
+ # Specifies the algorithm to use to when encrypting the object (for
1497
+ # example, AES256).
1498
+ # @option options [String] :sse_customer_key
1499
+ # Specifies the customer-provided encryption key for Amazon S3 to use in
1500
+ # encrypting data. This value is used to store the object and then it is
1501
+ # discarded; Amazon S3 does not store the encryption key. The key must
1502
+ # be appropriate for use with the algorithm specified in the
1503
+ # `x-amz-server-side-encryption-customer-algorithm` header.
1504
+ # @option options [String] :sse_customer_key_md5
1505
+ # Specifies the 128-bit MD5 digest of the encryption key according to
1506
+ # RFC 1321. Amazon S3 uses this header for a message integrity check to
1507
+ # ensure that the encryption key was transmitted without error.
1508
+ # @option options [String] :request_payer
1509
+ # Confirms that the requester knows that they will be charged for the
1510
+ # request. Bucket owners need not specify this parameter in their
1511
+ # requests. For information about downloading objects from requester
1512
+ # pays buckets, see [Downloading Objects in Requestor Pays Buckets][1]
1513
+ # in the *Amazon S3 Developer Guide*.
1514
+ #
1515
+ #
1516
+ #
1517
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1518
+ # @option options [Integer] :part_number
1519
+ # Part number of the object being read. This is a positive integer
1520
+ # between 1 and 10,000. Effectively performs a 'ranged' HEAD request
1521
+ # for the part specified. Useful querying about the size of the part and
1522
+ # the number of parts in this object.
1523
+ # @option options [String] :expected_bucket_owner
1524
+ # The account ID of the expected bucket owner. If the bucket is owned by
1525
+ # a different account, the request will fail with an HTTP `403 (Access
1526
+ # Denied)` error.
1527
+ # @return [Types::HeadObjectOutput]
1528
+ def head(options = {})
1529
+ options = options.merge(
1530
+ bucket: @bucket_name,
1531
+ key: @key
1532
+ )
1533
+ resp = @client.head_object(options)
1534
+ resp.data
1535
+ end
1536
+
1451
1537
  # @!group Associations
1452
1538
 
1453
1539
  # @return [ObjectAcl]
@@ -1583,7 +1669,7 @@ module Aws::S3
1583
1669
  # Governance-type Object Lock in place. You must have sufficient
1584
1670
  # permissions to perform this operation.
1585
1671
  # @option options [String] :expected_bucket_owner
1586
- # The account id of the expected bucket owner. If the bucket is owned by
1672
+ # The account ID of the expected bucket owner. If the bucket is owned by
1587
1673
  # a different account, the request will fail with an HTTP `403 (Access
1588
1674
  # Denied)` error.
1589
1675
  # @return [void]
@@ -286,7 +286,7 @@ module Aws::S3
286
286
  # @option options [String] :version_id
287
287
  # VersionId used to reference a specific version of the object.
288
288
  # @option options [String] :expected_bucket_owner
289
- # The account id of the expected bucket owner. If the bucket is owned by
289
+ # The account ID of the expected bucket owner. If the bucket is owned by
290
290
  # a different account, the request will fail with an HTTP `403 (Access
291
291
  # Denied)` error.
292
292
  # @return [Types::PutObjectAclOutput]
@@ -375,7 +375,7 @@ module Aws::S3
375
375
  #
376
376
  #
377
377
  #
378
- # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/access-points.html
378
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html
379
379
  # @option options [String] :copy_source_if_match
380
380
  # Copies the object if its entity tag (ETag) matches the specified tag.
381
381
  # @option options [Time,DateTime,Date,Integer,String] :copy_source_if_modified_since
@@ -500,11 +500,11 @@ module Aws::S3
500
500
  # @option options [String] :object_lock_legal_hold_status
501
501
  # Specifies whether you want to apply a Legal Hold to the copied object.
502
502
  # @option options [String] :expected_bucket_owner
503
- # The account id of the expected destination bucket owner. If the
503
+ # The account ID of the expected destination bucket owner. If the
504
504
  # destination bucket is owned by a different account, the request will
505
505
  # fail with an HTTP `403 (Access Denied)` error.
506
506
  # @option options [String] :expected_source_bucket_owner
507
- # The account id of the expected source bucket owner. If the source
507
+ # The account ID of the expected source bucket owner. If the source
508
508
  # bucket is owned by a different account, the request will fail with an
509
509
  # HTTP `403 (Access Denied)` error.
510
510
  # @return [Types::CopyObjectOutput]
@@ -548,7 +548,7 @@ module Aws::S3
548
548
  # Indicates whether S3 Object Lock should bypass Governance-mode
549
549
  # restrictions to process this operation.
550
550
  # @option options [String] :expected_bucket_owner
551
- # The account id of the expected bucket owner. If the bucket is owned by
551
+ # The account ID of the expected bucket owner. If the bucket is owned by
552
552
  # a different account, the request will fail with an HTTP `403 (Access
553
553
  # Denied)` error.
554
554
  # @return [Types::DeleteObjectOutput]
@@ -652,7 +652,7 @@ module Aws::S3
652
652
  # for the part specified. Useful for downloading just a part of an
653
653
  # object.
654
654
  # @option options [String] :expected_bucket_owner
655
- # The account id of the expected bucket owner. If the bucket is owned by
655
+ # The account ID of the expected bucket owner. If the bucket is owned by
656
656
  # a different account, the request will fail with an HTTP `403 (Access
657
657
  # Denied)` error.
658
658
  # @return [Types::GetObjectOutput]
@@ -812,7 +812,7 @@ module Aws::S3
812
812
  # Specifies whether you want to apply a Legal Hold to the uploaded
813
813
  # object.
814
814
  # @option options [String] :expected_bucket_owner
815
- # The account id of the expected bucket owner. If the bucket is owned by
815
+ # The account ID of the expected bucket owner. If the bucket is owned by
816
816
  # a different account, the request will fail with an HTTP `403 (Access
817
817
  # Denied)` error.
818
818
  # @return [MultipartUpload]
@@ -1061,7 +1061,7 @@ module Aws::S3
1061
1061
  #
1062
1062
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html
1063
1063
  # @option options [String] :expected_bucket_owner
1064
- # The account id of the expected bucket owner. If the bucket is owned by
1064
+ # The account ID of the expected bucket owner. If the bucket is owned by
1065
1065
  # a different account, the request will fail with an HTTP `403 (Access
1066
1066
  # Denied)` error.
1067
1067
  # @return [Types::PutObjectOutput]
@@ -1178,7 +1178,7 @@ module Aws::S3
1178
1178
  #
1179
1179
  # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
1180
1180
  # @option options [String] :expected_bucket_owner
1181
- # The account id of the expected bucket owner. If the bucket is owned by
1181
+ # The account ID of the expected bucket owner. If the bucket is owned by
1182
1182
  # a different account, the request will fail with an HTTP `403 (Access
1183
1183
  # Denied)` error.
1184
1184
  # @return [Types::RestoreObjectOutput]
@@ -1335,7 +1335,7 @@ module Aws::S3
1335
1335
  # Governance-type Object Lock in place. You must have sufficient
1336
1336
  # permissions to perform this operation.
1337
1337
  # @option options [String] :expected_bucket_owner
1338
- # The account id of the expected bucket owner. If the bucket is owned by
1338
+ # The account ID of the expected bucket owner. If the bucket is owned by
1339
1339
  # a different account, the request will fail with an HTTP `403 (Access
1340
1340
  # Denied)` error.
1341
1341
  # @return [void]