aws-sdk-s3 1.91.0 → 1.92.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -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]
@@ -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]
@@ -1583,7 +1583,7 @@ module Aws::S3
1583
1583
  # Governance-type Object Lock in place. You must have sufficient
1584
1584
  # permissions to perform this operation.
1585
1585
  # @option options [String] :expected_bucket_owner
1586
- # The account id of the expected bucket owner. If the bucket is owned by
1586
+ # The account ID of the expected bucket owner. If the bucket is owned by
1587
1587
  # a different account, the request will fail with an HTTP `403 (Access
1588
1588
  # Denied)` error.
1589
1589
  # @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]
@@ -256,7 +256,7 @@ module Aws::S3
256
256
  # Indicates whether S3 Object Lock should bypass Governance-mode
257
257
  # restrictions to process this operation.
258
258
  # @option options [String] :expected_bucket_owner
259
- # The account id of the expected bucket owner. If the bucket is owned by
259
+ # The account ID of the expected bucket owner. If the bucket is owned by
260
260
  # a different account, the request will fail with an HTTP `403 (Access
261
261
  # Denied)` error.
262
262
  # @return [Types::DeleteObjectOutput]
@@ -358,7 +358,7 @@ module Aws::S3
358
358
  # for the part specified. Useful for downloading just a part of an
359
359
  # object.
360
360
  # @option options [String] :expected_bucket_owner
361
- # The account id of the expected bucket owner. If the bucket is owned by
361
+ # The account ID of the expected bucket owner. If the bucket is owned by
362
362
  # a different account, the request will fail with an HTTP `403 (Access
363
363
  # Denied)` error.
364
364
  # @return [Types::GetObjectOutput]
@@ -442,7 +442,7 @@ module Aws::S3
442
442
  # for the part specified. Useful querying about the size of the part and
443
443
  # the number of parts in this object.
444
444
  # @option options [String] :expected_bucket_owner
445
- # The account id of the expected bucket owner. If the bucket is owned by
445
+ # The account ID of the expected bucket owner. If the bucket is owned by
446
446
  # a different account, the request will fail with an HTTP `403 (Access
447
447
  # Denied)` error.
448
448
  # @return [Types::HeadObjectOutput]
@@ -546,7 +546,7 @@ module Aws::S3
546
546
  # Governance-type Object Lock in place. You must have sufficient
547
547
  # permissions to perform this operation.
548
548
  # @option options [String] :expected_bucket_owner
549
- # The account id of the expected bucket owner. If the bucket is owned by
549
+ # The account ID of the expected bucket owner. If the bucket is owned by
550
550
  # a different account, the request will fail with an HTTP `403 (Access
551
551
  # Denied)` error.
552
552
  # @return [void]
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative '../arn/access_point_arn'
4
+ require_relative '../arn/object_lambda_arn'
4
5
  require_relative '../arn/outpost_access_point_arn'
5
6
 
6
7
  module Aws
@@ -22,9 +23,9 @@ be made. Set to `false` to use the client's region instead.
22
23
  resolve_s3_use_arn_region(cfg)
23
24
  end
24
25
 
25
- # param validator is validate:50 (required to add account_id from arn)
26
+ # param validator is validate:50
26
27
  # endpoint is build:90 (populates the URI for the first time)
27
- # endpoint pattern is build:10 (prefix account id to host)
28
+ # endpoint pattern is build:10
28
29
  def add_handlers(handlers, _config)
29
30
  handlers.add(ARNHandler, step: :validate, priority: 75)
30
31
  handlers.add(UrlHandler)
@@ -114,15 +115,7 @@ be made. Set to `false` to use the client's region instead.
114
115
  def resolve_arn!(member_value, region, use_arn_region)
115
116
  if Aws::ARNParser.arn?(member_value)
116
117
  arn = Aws::ARNParser.parse(member_value)
117
- if arn.resource.start_with?('accesspoint')
118
- s3_arn = Aws::S3::AccessPointARN.new(arn.to_h)
119
- elsif arn.resource.start_with?('outpost')
120
- s3_arn = Aws::S3::OutpostAccessPointARN.new(arn.to_h)
121
- else
122
- raise ArgumentError,
123
- 'Only Access Point and Outpost Access Point type ARNs '\
124
- 'are currently supported.'
125
- end
118
+ s3_arn = resolve_arn_type!(arn)
126
119
  s3_arn.validate_arn!
127
120
  validate_region_config!(s3_arn, region, use_arn_region)
128
121
  region = s3_arn.region if use_arn_region
@@ -142,6 +135,21 @@ be made. Set to `false` to use the client's region instead.
142
135
 
143
136
  private
144
137
 
138
+ def resolve_arn_type!(arn)
139
+ case arn.service
140
+ when 's3'
141
+ Aws::S3::AccessPointARN.new(arn.to_h)
142
+ when 's3-outposts'
143
+ Aws::S3::OutpostAccessPointARN.new(arn.to_h)
144
+ when 's3-object-lambda'
145
+ Aws::S3::ObjectLambdaARN.new(arn.to_h)
146
+ else
147
+ raise ArgumentError,
148
+ 'Only Access Point, Outposts, and Object Lambdas ARNs '\
149
+ 'are currently supported.'
150
+ end
151
+ end
152
+
145
153
  def resolve_s3_use_arn_region(cfg)
146
154
  value = ENV['AWS_S3_USE_ARN_REGION'] ||
147
155
  Aws.shared_config.s3_use_arn_region(profile: cfg.profile) ||
@@ -157,8 +165,7 @@ be made. Set to `false` to use the client's region instead.
157
165
  value
158
166
  end
159
167
 
160
- # Remove ARN from the path since it was substituted already
161
- # This only works because accesspoints care about the URL
168
+ # Remove ARN from the path because we've already set the new host
162
169
  def url_path(path, arn)
163
170
  path = path.sub("/#{Seahorse::Util.uri_escape(arn.to_s)}", '')
164
171
  .sub("/#{arn}", '')
@@ -10,8 +10,8 @@ module Aws
10
10
  default: 'legacy',
11
11
  doc_type: String,
12
12
  docstring: <<-DOCS) do |cfg|
13
- Passing in `regional` to enable regional endpoint for S3's `us-east-1`
14
- region. Defaults to `legacy` mode using global endpoint.
13
+ Pass in `regional` to enable the `us-east-1` regional endpoint.
14
+ Defaults to `legacy` mode which uses the global endpoint.
15
15
  DOCS
16
16
  resolve_iad_regional_endpoint(cfg)
17
17
  end
@@ -27,14 +27,14 @@ region. Defaults to `legacy` mode using global endpoint.
27
27
  class Handler < Seahorse::Client::Handler
28
28
 
29
29
  def call(context)
30
- # keep legacy global endpoint pattern by default
31
- if context.config.s3_us_east_1_regional_endpoint == 'legacy'
30
+ # WriteGetObjectResponse does not have a global endpoint
31
+ # ARNs are regionalized, so don't touch those either.
32
+ if context.operation.name != 'WriteGetObjectResponse' &&
33
+ context.config.s3_us_east_1_regional_endpoint == 'legacy' &&
34
+ !context.metadata[:s3_arn]
32
35
  host = context.http_request.endpoint.host
33
- # if it's an ARN then don't touch the endpoint at all
34
- unless context.metadata[:s3_arn]
35
- legacy_host = IADRegionalEndpoint.legacy_host(host)
36
- context.http_request.endpoint.host = legacy_host
37
- end
36
+ legacy_host = IADRegionalEndpoint.legacy_host(host)
37
+ context.http_request.endpoint.host = legacy_host
38
38
  end
39
39
  @handler.call(context)
40
40
  end