aws-sdk-s3 1.169.0 → 1.175.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -169,6 +169,7 @@ module Aws::S3
169
169
  EncodingType = Shapes::StringShape.new(name: 'EncodingType')
170
170
  Encryption = Shapes::StructureShape.new(name: 'Encryption')
171
171
  EncryptionConfiguration = Shapes::StructureShape.new(name: 'EncryptionConfiguration')
172
+ EncryptionTypeMismatch = Shapes::StructureShape.new(name: 'EncryptionTypeMismatch')
172
173
  End = Shapes::IntegerShape.new(name: 'End')
173
174
  EndEvent = Shapes::StructureShape.new(name: 'EndEvent')
174
175
  Error = Shapes::StructureShape.new(name: 'Error')
@@ -276,6 +277,9 @@ module Aws::S3
276
277
  HttpRedirectCode = Shapes::StringShape.new(name: 'HttpRedirectCode')
277
278
  ID = Shapes::StringShape.new(name: 'ID')
278
279
  IfMatch = Shapes::StringShape.new(name: 'IfMatch')
280
+ IfMatchInitiatedTime = Shapes::TimestampShape.new(name: 'IfMatchInitiatedTime', timestampFormat: "rfc822")
281
+ IfMatchLastModifiedTime = Shapes::TimestampShape.new(name: 'IfMatchLastModifiedTime', timestampFormat: "rfc822")
282
+ IfMatchSize = Shapes::IntegerShape.new(name: 'IfMatchSize')
279
283
  IfModifiedSince = Shapes::TimestampShape.new(name: 'IfModifiedSince')
280
284
  IfNoneMatch = Shapes::StringShape.new(name: 'IfNoneMatch')
281
285
  IfUnmodifiedSince = Shapes::TimestampShape.new(name: 'IfUnmodifiedSince')
@@ -292,6 +296,8 @@ module Aws::S3
292
296
  IntelligentTieringId = Shapes::StringShape.new(name: 'IntelligentTieringId')
293
297
  IntelligentTieringStatus = Shapes::StringShape.new(name: 'IntelligentTieringStatus')
294
298
  InvalidObjectState = Shapes::StructureShape.new(name: 'InvalidObjectState')
299
+ InvalidRequest = Shapes::StructureShape.new(name: 'InvalidRequest')
300
+ InvalidWriteOffset = Shapes::StructureShape.new(name: 'InvalidWriteOffset')
295
301
  InventoryConfiguration = Shapes::StructureShape.new(name: 'InventoryConfiguration')
296
302
  InventoryConfigurationList = Shapes::ListShape.new(name: 'InventoryConfigurationList', flattened: true)
297
303
  InventoryDestination = Shapes::StructureShape.new(name: 'InventoryDestination')
@@ -321,6 +327,7 @@ module Aws::S3
321
327
  LambdaFunctionConfiguration = Shapes::StructureShape.new(name: 'LambdaFunctionConfiguration')
322
328
  LambdaFunctionConfigurationList = Shapes::ListShape.new(name: 'LambdaFunctionConfigurationList', flattened: true)
323
329
  LastModified = Shapes::TimestampShape.new(name: 'LastModified')
330
+ LastModifiedTime = Shapes::TimestampShape.new(name: 'LastModifiedTime', timestampFormat: "rfc822")
324
331
  LifecycleConfiguration = Shapes::StructureShape.new(name: 'LifecycleConfiguration')
325
332
  LifecycleExpiration = Shapes::StructureShape.new(name: 'LifecycleExpiration')
326
333
  LifecycleRule = Shapes::StructureShape.new(name: 'LifecycleRule')
@@ -600,6 +607,7 @@ module Aws::S3
600
607
  Tiering = Shapes::StructureShape.new(name: 'Tiering')
601
608
  TieringList = Shapes::ListShape.new(name: 'TieringList', flattened: true)
602
609
  Token = Shapes::StringShape.new(name: 'Token')
610
+ TooManyParts = Shapes::StructureShape.new(name: 'TooManyParts')
603
611
  TopicArn = Shapes::StringShape.new(name: 'TopicArn')
604
612
  TopicConfiguration = Shapes::StructureShape.new(name: 'TopicConfiguration')
605
613
  TopicConfigurationDeprecated = Shapes::StructureShape.new(name: 'TopicConfigurationDeprecated')
@@ -623,6 +631,7 @@ module Aws::S3
623
631
  WebsiteConfiguration = Shapes::StructureShape.new(name: 'WebsiteConfiguration')
624
632
  WebsiteRedirectLocation = Shapes::StringShape.new(name: 'WebsiteRedirectLocation')
625
633
  WriteGetObjectResponseRequest = Shapes::StructureShape.new(name: 'WriteGetObjectResponseRequest')
634
+ WriteOffsetBytes = Shapes::IntegerShape.new(name: 'WriteOffsetBytes')
626
635
  Years = Shapes::IntegerShape.new(name: 'Years')
627
636
 
628
637
  AbortIncompleteMultipartUpload.add_member(:days_after_initiation, Shapes::ShapeRef.new(shape: DaysAfterInitiation, location_name: "DaysAfterInitiation"))
@@ -636,6 +645,7 @@ module Aws::S3
636
645
  AbortMultipartUploadRequest.add_member(:upload_id, Shapes::ShapeRef.new(shape: MultipartUploadId, required: true, location: "querystring", location_name: "uploadId"))
637
646
  AbortMultipartUploadRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
638
647
  AbortMultipartUploadRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
648
+ AbortMultipartUploadRequest.add_member(:if_match_initiated_time, Shapes::ShapeRef.new(shape: IfMatchInitiatedTime, location: "header", location_name: "x-amz-if-match-initiated-time"))
639
649
  AbortMultipartUploadRequest.struct_class = Types::AbortMultipartUploadRequest
640
650
 
641
651
  AccelerateConfiguration.add_member(:status, Shapes::ShapeRef.new(shape: BucketAccelerateStatus, location_name: "Status"))
@@ -775,6 +785,7 @@ module Aws::S3
775
785
  CompleteMultipartUploadRequest.add_member(:checksum_sha256, Shapes::ShapeRef.new(shape: ChecksumSHA256, location: "header", location_name: "x-amz-checksum-sha256"))
776
786
  CompleteMultipartUploadRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
777
787
  CompleteMultipartUploadRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
788
+ CompleteMultipartUploadRequest.add_member(:if_match, Shapes::ShapeRef.new(shape: IfMatch, location: "header", location_name: "If-Match"))
778
789
  CompleteMultipartUploadRequest.add_member(:if_none_match, Shapes::ShapeRef.new(shape: IfNoneMatch, location: "header", location_name: "If-None-Match"))
779
790
  CompleteMultipartUploadRequest.add_member(:sse_customer_algorithm, Shapes::ShapeRef.new(shape: SSECustomerAlgorithm, location: "header", location_name: "x-amz-server-side-encryption-customer-algorithm"))
780
791
  CompleteMultipartUploadRequest.add_member(:sse_customer_key, Shapes::ShapeRef.new(shape: SSECustomerKey, location: "header", location_name: "x-amz-server-side-encryption-customer-key"))
@@ -1048,6 +1059,9 @@ module Aws::S3
1048
1059
  DeleteObjectRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
1049
1060
  DeleteObjectRequest.add_member(:bypass_governance_retention, Shapes::ShapeRef.new(shape: BypassGovernanceRetention, location: "header", location_name: "x-amz-bypass-governance-retention"))
1050
1061
  DeleteObjectRequest.add_member(:expected_bucket_owner, Shapes::ShapeRef.new(shape: AccountId, location: "header", location_name: "x-amz-expected-bucket-owner"))
1062
+ DeleteObjectRequest.add_member(:if_match, Shapes::ShapeRef.new(shape: IfMatch, location: "header", location_name: "If-Match"))
1063
+ DeleteObjectRequest.add_member(:if_match_last_modified_time, Shapes::ShapeRef.new(shape: IfMatchLastModifiedTime, location: "header", location_name: "x-amz-if-match-last-modified-time"))
1064
+ DeleteObjectRequest.add_member(:if_match_size, Shapes::ShapeRef.new(shape: IfMatchSize, location: "header", location_name: "x-amz-if-match-size"))
1051
1065
  DeleteObjectRequest.struct_class = Types::DeleteObjectRequest
1052
1066
 
1053
1067
  DeleteObjectTaggingOutput.add_member(:version_id, Shapes::ShapeRef.new(shape: ObjectVersionId, location: "header", location_name: "x-amz-version-id"))
@@ -1104,6 +1118,8 @@ module Aws::S3
1104
1118
  EncryptionConfiguration.add_member(:replica_kms_key_id, Shapes::ShapeRef.new(shape: ReplicaKmsKeyID, location_name: "ReplicaKmsKeyID"))
1105
1119
  EncryptionConfiguration.struct_class = Types::EncryptionConfiguration
1106
1120
 
1121
+ EncryptionTypeMismatch.struct_class = Types::EncryptionTypeMismatch
1122
+
1107
1123
  EndEvent.struct_class = Types::EndEvent
1108
1124
 
1109
1125
  Error.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, location_name: "Key"))
@@ -1598,6 +1614,10 @@ module Aws::S3
1598
1614
  InvalidObjectState.add_member(:access_tier, Shapes::ShapeRef.new(shape: IntelligentTieringAccessTier, location_name: "AccessTier"))
1599
1615
  InvalidObjectState.struct_class = Types::InvalidObjectState
1600
1616
 
1617
+ InvalidRequest.struct_class = Types::InvalidRequest
1618
+
1619
+ InvalidWriteOffset.struct_class = Types::InvalidWriteOffset
1620
+
1601
1621
  InventoryConfiguration.add_member(:destination, Shapes::ShapeRef.new(shape: InventoryDestination, required: true, location_name: "Destination"))
1602
1622
  InventoryConfiguration.add_member(:is_enabled, Shapes::ShapeRef.new(shape: IsEnabled, required: true, location_name: "IsEnabled"))
1603
1623
  InventoryConfiguration.add_member(:filter, Shapes::ShapeRef.new(shape: InventoryFilter, location_name: "Filter"))
@@ -1973,6 +1993,9 @@ module Aws::S3
1973
1993
 
1974
1994
  ObjectIdentifier.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, required: true, location_name: "Key"))
1975
1995
  ObjectIdentifier.add_member(:version_id, Shapes::ShapeRef.new(shape: ObjectVersionId, location_name: "VersionId"))
1996
+ ObjectIdentifier.add_member(:etag, Shapes::ShapeRef.new(shape: ETag, location_name: "ETag"))
1997
+ ObjectIdentifier.add_member(:last_modified_time, Shapes::ShapeRef.new(shape: LastModifiedTime, location_name: "LastModifiedTime"))
1998
+ ObjectIdentifier.add_member(:size, Shapes::ShapeRef.new(shape: Size, location_name: "Size"))
1976
1999
  ObjectIdentifier.struct_class = Types::ObjectIdentifier
1977
2000
 
1978
2001
  ObjectIdentifierList.member = Shapes::ShapeRef.new(shape: ObjectIdentifier)
@@ -2321,6 +2344,7 @@ module Aws::S3
2321
2344
  PutObjectOutput.add_member(:ssekms_key_id, Shapes::ShapeRef.new(shape: SSEKMSKeyId, location: "header", location_name: "x-amz-server-side-encryption-aws-kms-key-id"))
2322
2345
  PutObjectOutput.add_member(:ssekms_encryption_context, Shapes::ShapeRef.new(shape: SSEKMSEncryptionContext, location: "header", location_name: "x-amz-server-side-encryption-context"))
2323
2346
  PutObjectOutput.add_member(:bucket_key_enabled, Shapes::ShapeRef.new(shape: BucketKeyEnabled, location: "header", location_name: "x-amz-server-side-encryption-bucket-key-enabled"))
2347
+ PutObjectOutput.add_member(:size, Shapes::ShapeRef.new(shape: Size, location: "header", location_name: "x-amz-object-size"))
2324
2348
  PutObjectOutput.add_member(:request_charged, Shapes::ShapeRef.new(shape: RequestCharged, location: "header", location_name: "x-amz-request-charged"))
2325
2349
  PutObjectOutput.struct_class = Types::PutObjectOutput
2326
2350
 
@@ -2340,12 +2364,14 @@ module Aws::S3
2340
2364
  PutObjectRequest.add_member(:checksum_sha1, Shapes::ShapeRef.new(shape: ChecksumSHA1, location: "header", location_name: "x-amz-checksum-sha1"))
2341
2365
  PutObjectRequest.add_member(:checksum_sha256, Shapes::ShapeRef.new(shape: ChecksumSHA256, location: "header", location_name: "x-amz-checksum-sha256"))
2342
2366
  PutObjectRequest.add_member(:expires, Shapes::ShapeRef.new(shape: Expires, location: "header", location_name: "Expires"))
2367
+ PutObjectRequest.add_member(:if_match, Shapes::ShapeRef.new(shape: IfMatch, location: "header", location_name: "If-Match"))
2343
2368
  PutObjectRequest.add_member(:if_none_match, Shapes::ShapeRef.new(shape: IfNoneMatch, location: "header", location_name: "If-None-Match"))
2344
2369
  PutObjectRequest.add_member(:grant_full_control, Shapes::ShapeRef.new(shape: GrantFullControl, location: "header", location_name: "x-amz-grant-full-control"))
2345
2370
  PutObjectRequest.add_member(:grant_read, Shapes::ShapeRef.new(shape: GrantRead, location: "header", location_name: "x-amz-grant-read"))
2346
2371
  PutObjectRequest.add_member(:grant_read_acp, Shapes::ShapeRef.new(shape: GrantReadACP, location: "header", location_name: "x-amz-grant-read-acp"))
2347
2372
  PutObjectRequest.add_member(:grant_write_acp, Shapes::ShapeRef.new(shape: GrantWriteACP, location: "header", location_name: "x-amz-grant-write-acp"))
2348
2373
  PutObjectRequest.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, required: true, location: "uri", location_name: "Key", metadata: {"contextParam"=>{"name"=>"Key"}}))
2374
+ PutObjectRequest.add_member(:write_offset_bytes, Shapes::ShapeRef.new(shape: WriteOffsetBytes, location: "header", location_name: "x-amz-write-offset-bytes"))
2349
2375
  PutObjectRequest.add_member(:metadata, Shapes::ShapeRef.new(shape: Metadata, location: "headers", location_name: "x-amz-meta-"))
2350
2376
  PutObjectRequest.add_member(:server_side_encryption, Shapes::ShapeRef.new(shape: ServerSideEncryption, location: "header", location_name: "x-amz-server-side-encryption"))
2351
2377
  PutObjectRequest.add_member(:storage_class, Shapes::ShapeRef.new(shape: StorageClass, location: "header", location_name: "x-amz-storage-class"))
@@ -2644,6 +2670,8 @@ module Aws::S3
2644
2670
 
2645
2671
  TieringList.member = Shapes::ShapeRef.new(shape: Tiering)
2646
2672
 
2673
+ TooManyParts.struct_class = Types::TooManyParts
2674
+
2647
2675
  TopicConfiguration.add_member(:id, Shapes::ShapeRef.new(shape: NotificationId, location_name: "Id"))
2648
2676
  TopicConfiguration.add_member(:topic_arn, Shapes::ShapeRef.new(shape: TopicArn, required: true, location_name: "Topic"))
2649
2677
  TopicConfiguration.add_member(:events, Shapes::ShapeRef.new(shape: EventList, required: true, location_name: "Event"))
@@ -3714,6 +3742,10 @@ module Aws::S3
3714
3742
  }
3715
3743
  o.input = Shapes::ShapeRef.new(shape: PutObjectRequest)
3716
3744
  o.output = Shapes::ShapeRef.new(shape: PutObjectOutput)
3745
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequest)
3746
+ o.errors << Shapes::ShapeRef.new(shape: InvalidWriteOffset)
3747
+ o.errors << Shapes::ShapeRef.new(shape: TooManyParts)
3748
+ o.errors << Shapes::ShapeRef.new(shape: EncryptionTypeMismatch)
3717
3749
  end)
3718
3750
 
3719
3751
  api.add_operation(:put_object_acl, Seahorse::Model::Operation.new.tap do |o|
@@ -94,6 +94,24 @@ module Aws::S3
94
94
  end
95
95
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
96
96
  end
97
+ if (s3express_availability_zone_id = Aws::Endpoints::Matchers.substring(bucket, 6, 19, true)) && (s3express_availability_zone_delim = Aws::Endpoints::Matchers.substring(bucket, 19, 21, true)) && Aws::Endpoints::Matchers.string_equals?(s3express_availability_zone_delim, "--")
98
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
99
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-fips-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
100
+ end
101
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
102
+ end
103
+ if (s3express_availability_zone_id = Aws::Endpoints::Matchers.substring(bucket, 6, 20, true)) && (s3express_availability_zone_delim = Aws::Endpoints::Matchers.substring(bucket, 20, 22, true)) && Aws::Endpoints::Matchers.string_equals?(s3express_availability_zone_delim, "--")
104
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
105
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-fips-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
106
+ end
107
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
108
+ end
109
+ if (s3express_availability_zone_id = Aws::Endpoints::Matchers.substring(bucket, 6, 26, true)) && (s3express_availability_zone_delim = Aws::Endpoints::Matchers.substring(bucket, 26, 28, true)) && Aws::Endpoints::Matchers.string_equals?(s3express_availability_zone_delim, "--")
110
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
111
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-fips-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
112
+ end
113
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
114
+ end
97
115
  raise ArgumentError, "Unrecognized S3Express bucket name format."
98
116
  end
99
117
  if (s3express_availability_zone_id = Aws::Endpoints::Matchers.substring(bucket, 6, 14, true)) && (s3express_availability_zone_delim = Aws::Endpoints::Matchers.substring(bucket, 14, 16, true)) && Aws::Endpoints::Matchers.string_equals?(s3express_availability_zone_delim, "--")
@@ -108,6 +126,24 @@ module Aws::S3
108
126
  end
109
127
  return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4-s3express", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
110
128
  end
129
+ if (s3express_availability_zone_id = Aws::Endpoints::Matchers.substring(bucket, 6, 19, true)) && (s3express_availability_zone_delim = Aws::Endpoints::Matchers.substring(bucket, 19, 21, true)) && Aws::Endpoints::Matchers.string_equals?(s3express_availability_zone_delim, "--")
130
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
131
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-fips-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4-s3express", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
132
+ end
133
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4-s3express", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
134
+ end
135
+ if (s3express_availability_zone_id = Aws::Endpoints::Matchers.substring(bucket, 6, 20, true)) && (s3express_availability_zone_delim = Aws::Endpoints::Matchers.substring(bucket, 20, 22, true)) && Aws::Endpoints::Matchers.string_equals?(s3express_availability_zone_delim, "--")
136
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
137
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-fips-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4-s3express", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
138
+ end
139
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4-s3express", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
140
+ end
141
+ if (s3express_availability_zone_id = Aws::Endpoints::Matchers.substring(bucket, 6, 26, true)) && (s3express_availability_zone_delim = Aws::Endpoints::Matchers.substring(bucket, 26, 28, true)) && Aws::Endpoints::Matchers.string_equals?(s3express_availability_zone_delim, "--")
142
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
143
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-fips-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4-s3express", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
144
+ end
145
+ return Aws::Endpoints::Endpoint.new(url: "https://#{bucket}.s3express-#{s3express_availability_zone_id}.#{region}.amazonaws.com", headers: {}, properties: {"backend"=>"S3Express", "authSchemes"=>[{"disableDoubleEncoding"=>true, "name"=>"sigv4-s3express", "signingName"=>"s3express", "signingRegion"=>"#{region}"}]})
146
+ end
111
147
  raise ArgumentError, "Unrecognized S3Express bucket name format."
112
148
  end
113
149
  raise ArgumentError, "S3Express bucket name is not a valid virtual hostable name."
@@ -29,12 +29,16 @@ module Aws::S3
29
29
  # ## Error Classes
30
30
  # * {BucketAlreadyExists}
31
31
  # * {BucketAlreadyOwnedByYou}
32
+ # * {EncryptionTypeMismatch}
32
33
  # * {InvalidObjectState}
34
+ # * {InvalidRequest}
35
+ # * {InvalidWriteOffset}
33
36
  # * {NoSuchBucket}
34
37
  # * {NoSuchKey}
35
38
  # * {NoSuchUpload}
36
39
  # * {ObjectAlreadyInActiveTierError}
37
40
  # * {ObjectNotInActiveTierError}
41
+ # * {TooManyParts}
38
42
  #
39
43
  # Additionally, error classes are dynamically generated for service errors based on the error code
40
44
  # if they are not defined above.
@@ -62,6 +66,16 @@ module Aws::S3
62
66
  end
63
67
  end
64
68
 
69
+ class EncryptionTypeMismatch < ServiceError
70
+
71
+ # @param [Seahorse::Client::RequestContext] context
72
+ # @param [String] message
73
+ # @param [Aws::S3::Types::EncryptionTypeMismatch] data
74
+ def initialize(context, message, data = Aws::EmptyStructure.new)
75
+ super(context, message, data)
76
+ end
77
+ end
78
+
65
79
  class InvalidObjectState < ServiceError
66
80
 
67
81
  # @param [Seahorse::Client::RequestContext] context
@@ -82,6 +96,26 @@ module Aws::S3
82
96
  end
83
97
  end
84
98
 
99
+ class InvalidRequest < ServiceError
100
+
101
+ # @param [Seahorse::Client::RequestContext] context
102
+ # @param [String] message
103
+ # @param [Aws::S3::Types::InvalidRequest] data
104
+ def initialize(context, message, data = Aws::EmptyStructure.new)
105
+ super(context, message, data)
106
+ end
107
+ end
108
+
109
+ class InvalidWriteOffset < ServiceError
110
+
111
+ # @param [Seahorse::Client::RequestContext] context
112
+ # @param [String] message
113
+ # @param [Aws::S3::Types::InvalidWriteOffset] data
114
+ def initialize(context, message, data = Aws::EmptyStructure.new)
115
+ super(context, message, data)
116
+ end
117
+ end
118
+
85
119
  class NoSuchBucket < ServiceError
86
120
 
87
121
  # @param [Seahorse::Client::RequestContext] context
@@ -132,6 +166,16 @@ module Aws::S3
132
166
  end
133
167
  end
134
168
 
169
+ class TooManyParts < ServiceError
170
+
171
+ # @param [Seahorse::Client::RequestContext] context
172
+ # @param [String] message
173
+ # @param [Aws::S3::Types::TooManyParts] data
174
+ def initialize(context, message, data = Aws::EmptyStructure.new)
175
+ super(context, message, data)
176
+ end
177
+ end
178
+
135
179
  end
136
180
  end
137
181
 
@@ -239,6 +239,7 @@ module Aws::S3
239
239
  # multipart_upload.abort({
240
240
  # request_payer: "requester", # accepts requester
241
241
  # expected_bucket_owner: "AccountId",
242
+ # if_match_initiated_time: Time.now,
242
243
  # })
243
244
  # @param [Hash] options ({})
244
245
  # @option options [String] :request_payer
@@ -261,6 +262,17 @@ module Aws::S3
261
262
  # The account ID of the expected bucket owner. If the account ID that
262
263
  # you provide does not match the actual owner of the bucket, the request
263
264
  # fails with the HTTP status code `403 Forbidden` (access denied).
265
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_initiated_time
266
+ # If present, this header aborts an in progress multipart upload only if
267
+ # it was initiated on the provided timestamp. If the initiated timestamp
268
+ # of the multipart upload does not match the provided value, the
269
+ # operation returns a `412 Precondition Failed` error. If the initiated
270
+ # timestamp matches or if the multipart upload doesn’t exist, the
271
+ # operation returns a `204 Success (No Content)` response.
272
+ #
273
+ # <note markdown="1"> This functionality is only supported for directory buckets.
274
+ #
275
+ # </note>
264
276
  # @return [Types::AbortMultipartUploadOutput]
265
277
  def abort(options = {})
266
278
  options = options.merge(
@@ -295,6 +307,7 @@ module Aws::S3
295
307
  # checksum_sha256: "ChecksumSHA256",
296
308
  # request_payer: "requester", # accepts requester
297
309
  # expected_bucket_owner: "AccountId",
310
+ # if_match: "IfMatch",
298
311
  # if_none_match: "IfNoneMatch",
299
312
  # sse_customer_algorithm: "SSECustomerAlgorithm",
300
313
  # sse_customer_key: "SSECustomerKey",
@@ -363,6 +376,26 @@ module Aws::S3
363
376
  # The account ID of the expected bucket owner. If the account ID that
364
377
  # you provide does not match the actual owner of the bucket, the request
365
378
  # fails with the HTTP status code `403 Forbidden` (access denied).
379
+ # @option options [String] :if_match
380
+ # Uploads the object only if the ETag (entity tag) value provided during
381
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
382
+ # values do not match, the operation returns a `412 Precondition Failed`
383
+ # error.
384
+ #
385
+ # If a conflicting operation occurs during the upload S3 returns a `409
386
+ # ConditionalRequestConflict` response. On a 409 failure you should
387
+ # fetch the object's ETag, re-initiate the multipart upload with
388
+ # `CreateMultipartUpload`, and re-upload each part.
389
+ #
390
+ # Expects the ETag value as a string.
391
+ #
392
+ # For more information about conditional requests, see [RFC 7232][1], or
393
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
394
+ #
395
+ #
396
+ #
397
+ # [1]: https://tools.ietf.org/html/rfc7232
398
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
366
399
  # @option options [String] :if_none_match
367
400
  # Uploads the object only if the object key name does not already exist
368
401
  # in the bucket specified. Otherwise, Amazon S3 returns a `412
@@ -66,7 +66,9 @@ module Aws::S3
66
66
  # providing object expiration information. The value of the `rule-id` is
67
67
  # URL-encoded.
68
68
  #
69
- # <note markdown="1"> This functionality is not supported for directory buckets.
69
+ # <note markdown="1"> Object expiration information is not returned in directory buckets and
70
+ # this header returns the value "`NotImplemented`" in all responses
71
+ # for directory buckets.
70
72
  #
71
73
  # </note>
72
74
  #
@@ -1410,6 +1412,9 @@ module Aws::S3
1410
1412
  # request_payer: "requester", # accepts requester
1411
1413
  # bypass_governance_retention: false,
1412
1414
  # expected_bucket_owner: "AccountId",
1415
+ # if_match: "IfMatch",
1416
+ # if_match_last_modified_time: Time.now,
1417
+ # if_match_size: 1,
1413
1418
  # })
1414
1419
  # @param [Hash] options ({})
1415
1420
  # @option options [String] :mfa
@@ -1456,6 +1461,46 @@ module Aws::S3
1456
1461
  # The account ID of the expected bucket owner. If the account ID that
1457
1462
  # you provide does not match the actual owner of the bucket, the request
1458
1463
  # fails with the HTTP status code `403 Forbidden` (access denied).
1464
+ # @option options [String] :if_match
1465
+ # The `If-Match` header field makes the request method conditional on
1466
+ # ETags. If the ETag value does not match, the operation returns a `412
1467
+ # Precondition Failed` error. If the ETag matches or if the object
1468
+ # doesn't exist, the operation will return a `204 Success (No Content)
1469
+ # response`.
1470
+ #
1471
+ # For more information about conditional requests, see [RFC 7232][1].
1472
+ #
1473
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1474
+ #
1475
+ # </note>
1476
+ #
1477
+ #
1478
+ #
1479
+ # [1]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232
1480
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
1481
+ # If present, the object is deleted only if its modification times
1482
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
1483
+ # match, the operation returns a `412 Precondition Failed` error. If the
1484
+ # `Timestamp` matches or if the object doesn’t exist, the operation
1485
+ # returns a `204 Success (No Content)` response.
1486
+ #
1487
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1488
+ #
1489
+ # </note>
1490
+ # @option options [Integer] :if_match_size
1491
+ # If present, the object is deleted only if its size matches the
1492
+ # provided size in bytes. If the `Size` value does not match, the
1493
+ # operation returns a `412 Precondition Failed` error. If the `Size`
1494
+ # matches or if the object doesn’t exist, the operation returns a `204
1495
+ # Success (No Content)` response.
1496
+ #
1497
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1498
+ #
1499
+ # </note>
1500
+ #
1501
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
1502
+ # `x-amz-if-match-size` conditional headers in conjunction with
1503
+ # each-other or individually.
1459
1504
  # @return [Types::DeleteObjectOutput]
1460
1505
  def delete(options = {})
1461
1506
  options = options.merge(
@@ -2325,11 +2370,13 @@ module Aws::S3
2325
2370
  # checksum_sha1: "ChecksumSHA1",
2326
2371
  # checksum_sha256: "ChecksumSHA256",
2327
2372
  # expires: Time.now,
2373
+ # if_match: "IfMatch",
2328
2374
  # if_none_match: "IfNoneMatch",
2329
2375
  # grant_full_control: "GrantFullControl",
2330
2376
  # grant_read: "GrantRead",
2331
2377
  # grant_read_acp: "GrantReadACP",
2332
2378
  # grant_write_acp: "GrantWriteACP",
2379
+ # write_offset_bytes: 1,
2333
2380
  # metadata: {
2334
2381
  # "MetadataKey" => "MetadataValue",
2335
2382
  # },
@@ -2548,6 +2595,25 @@ module Aws::S3
2548
2595
  #
2549
2596
  #
2550
2597
  # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
2598
+ # @option options [String] :if_match
2599
+ # Uploads the object only if the ETag (entity tag) value provided during
2600
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
2601
+ # values do not match, the operation returns a `412 Precondition Failed`
2602
+ # error.
2603
+ #
2604
+ # If a conflicting operation occurs during the upload S3 returns a `409
2605
+ # ConditionalRequestConflict` response. On a 409 failure you should
2606
+ # fetch the object's ETag and retry the upload.
2607
+ #
2608
+ # Expects the ETag value as a string.
2609
+ #
2610
+ # For more information about conditional requests, see [RFC 7232][1], or
2611
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2612
+ #
2613
+ #
2614
+ #
2615
+ # [1]: https://tools.ietf.org/html/rfc7232
2616
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
2551
2617
  # @option options [String] :if_none_match
2552
2618
  # Uploads the object only if the object key name does not already exist
2553
2619
  # in the bucket specified. Otherwise, Amazon S3 returns a `412
@@ -2599,6 +2665,16 @@ module Aws::S3
2599
2665
  # * This functionality is not supported for Amazon S3 on Outposts.
2600
2666
  #
2601
2667
  # </note>
2668
+ # @option options [Integer] :write_offset_bytes
2669
+ # Specifies the offset for appending data to existing objects in bytes.
2670
+ # The offset must be equal to the size of the existing object being
2671
+ # appended to. If no object exists, setting this header to 0 will create
2672
+ # a new object.
2673
+ #
2674
+ # <note markdown="1"> This functionality is only supported for objects in the Amazon S3
2675
+ # Express One Zone storage class in directory buckets.
2676
+ #
2677
+ # </note>
2602
2678
  # @option options [Hash<String,String>] :metadata
2603
2679
  # A map of metadata to store with the object in S3.
2604
2680
  # @option options [String] :server_side_encryption
@@ -1060,6 +1060,9 @@ module Aws::S3
1060
1060
  # request_payer: "requester", # accepts requester
1061
1061
  # bypass_governance_retention: false,
1062
1062
  # expected_bucket_owner: "AccountId",
1063
+ # if_match: "IfMatch",
1064
+ # if_match_last_modified_time: Time.now,
1065
+ # if_match_size: 1,
1063
1066
  # })
1064
1067
  # @param [Hash] options ({})
1065
1068
  # @option options [String] :mfa
@@ -1106,6 +1109,46 @@ module Aws::S3
1106
1109
  # The account ID of the expected bucket owner. If the account ID that
1107
1110
  # you provide does not match the actual owner of the bucket, the request
1108
1111
  # fails with the HTTP status code `403 Forbidden` (access denied).
1112
+ # @option options [String] :if_match
1113
+ # The `If-Match` header field makes the request method conditional on
1114
+ # ETags. If the ETag value does not match, the operation returns a `412
1115
+ # Precondition Failed` error. If the ETag matches or if the object
1116
+ # doesn't exist, the operation will return a `204 Success (No Content)
1117
+ # response`.
1118
+ #
1119
+ # For more information about conditional requests, see [RFC 7232][1].
1120
+ #
1121
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1122
+ #
1123
+ # </note>
1124
+ #
1125
+ #
1126
+ #
1127
+ # [1]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232
1128
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
1129
+ # If present, the object is deleted only if its modification times
1130
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
1131
+ # match, the operation returns a `412 Precondition Failed` error. If the
1132
+ # `Timestamp` matches or if the object doesn’t exist, the operation
1133
+ # returns a `204 Success (No Content)` response.
1134
+ #
1135
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1136
+ #
1137
+ # </note>
1138
+ # @option options [Integer] :if_match_size
1139
+ # If present, the object is deleted only if its size matches the
1140
+ # provided size in bytes. If the `Size` value does not match, the
1141
+ # operation returns a `412 Precondition Failed` error. If the `Size`
1142
+ # matches or if the object doesn’t exist, the operation returns a `204
1143
+ # Success (No Content)` response.
1144
+ #
1145
+ # <note markdown="1"> This functionality is only supported for directory buckets.
1146
+ #
1147
+ # </note>
1148
+ #
1149
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
1150
+ # `x-amz-if-match-size` conditional headers in conjunction with
1151
+ # each-other or individually.
1109
1152
  # @return [Types::DeleteObjectOutput]
1110
1153
  def delete(options = {})
1111
1154
  options = options.merge(
@@ -1975,11 +2018,13 @@ module Aws::S3
1975
2018
  # checksum_sha1: "ChecksumSHA1",
1976
2019
  # checksum_sha256: "ChecksumSHA256",
1977
2020
  # expires: Time.now,
2021
+ # if_match: "IfMatch",
1978
2022
  # if_none_match: "IfNoneMatch",
1979
2023
  # grant_full_control: "GrantFullControl",
1980
2024
  # grant_read: "GrantRead",
1981
2025
  # grant_read_acp: "GrantReadACP",
1982
2026
  # grant_write_acp: "GrantWriteACP",
2027
+ # write_offset_bytes: 1,
1983
2028
  # metadata: {
1984
2029
  # "MetadataKey" => "MetadataValue",
1985
2030
  # },
@@ -2198,6 +2243,25 @@ module Aws::S3
2198
2243
  #
2199
2244
  #
2200
2245
  # [1]: https://www.rfc-editor.org/rfc/rfc7234#section-5.3
2246
+ # @option options [String] :if_match
2247
+ # Uploads the object only if the ETag (entity tag) value provided during
2248
+ # the WRITE operation matches the ETag of the object in S3. If the ETag
2249
+ # values do not match, the operation returns a `412 Precondition Failed`
2250
+ # error.
2251
+ #
2252
+ # If a conflicting operation occurs during the upload S3 returns a `409
2253
+ # ConditionalRequestConflict` response. On a 409 failure you should
2254
+ # fetch the object's ETag and retry the upload.
2255
+ #
2256
+ # Expects the ETag value as a string.
2257
+ #
2258
+ # For more information about conditional requests, see [RFC 7232][1], or
2259
+ # [Conditional requests][2] in the *Amazon S3 User Guide*.
2260
+ #
2261
+ #
2262
+ #
2263
+ # [1]: https://tools.ietf.org/html/rfc7232
2264
+ # [2]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html
2201
2265
  # @option options [String] :if_none_match
2202
2266
  # Uploads the object only if the object key name does not already exist
2203
2267
  # in the bucket specified. Otherwise, Amazon S3 returns a `412
@@ -2249,6 +2313,16 @@ module Aws::S3
2249
2313
  # * This functionality is not supported for Amazon S3 on Outposts.
2250
2314
  #
2251
2315
  # </note>
2316
+ # @option options [Integer] :write_offset_bytes
2317
+ # Specifies the offset for appending data to existing objects in bytes.
2318
+ # The offset must be equal to the size of the existing object being
2319
+ # appended to. If no object exists, setting this header to 0 will create
2320
+ # a new object.
2321
+ #
2322
+ # <note markdown="1"> This functionality is only supported for objects in the Amazon S3
2323
+ # Express One Zone storage class in directory buckets.
2324
+ #
2325
+ # </note>
2252
2326
  # @option options [Hash<String,String>] :metadata
2253
2327
  # A map of metadata to store with the object in S3.
2254
2328
  # @option options [String] :server_side_encryption
@@ -257,6 +257,9 @@ module Aws::S3
257
257
  # request_payer: "requester", # accepts requester
258
258
  # bypass_governance_retention: false,
259
259
  # expected_bucket_owner: "AccountId",
260
+ # if_match: "IfMatch",
261
+ # if_match_last_modified_time: Time.now,
262
+ # if_match_size: 1,
260
263
  # })
261
264
  # @param [Hash] options ({})
262
265
  # @option options [String] :mfa
@@ -296,6 +299,46 @@ module Aws::S3
296
299
  # The account ID of the expected bucket owner. If the account ID that
297
300
  # you provide does not match the actual owner of the bucket, the request
298
301
  # fails with the HTTP status code `403 Forbidden` (access denied).
302
+ # @option options [String] :if_match
303
+ # The `If-Match` header field makes the request method conditional on
304
+ # ETags. If the ETag value does not match, the operation returns a `412
305
+ # Precondition Failed` error. If the ETag matches or if the object
306
+ # doesn't exist, the operation will return a `204 Success (No Content)
307
+ # response`.
308
+ #
309
+ # For more information about conditional requests, see [RFC 7232][1].
310
+ #
311
+ # <note markdown="1"> This functionality is only supported for directory buckets.
312
+ #
313
+ # </note>
314
+ #
315
+ #
316
+ #
317
+ # [1]: https://docs.aws.amazon.com/https:/tools.ietf.org/html/rfc7232
318
+ # @option options [Time,DateTime,Date,Integer,String] :if_match_last_modified_time
319
+ # If present, the object is deleted only if its modification times
320
+ # matches the provided `Timestamp`. If the `Timestamp` values do not
321
+ # match, the operation returns a `412 Precondition Failed` error. If the
322
+ # `Timestamp` matches or if the object doesn’t exist, the operation
323
+ # returns a `204 Success (No Content)` response.
324
+ #
325
+ # <note markdown="1"> This functionality is only supported for directory buckets.
326
+ #
327
+ # </note>
328
+ # @option options [Integer] :if_match_size
329
+ # If present, the object is deleted only if its size matches the
330
+ # provided size in bytes. If the `Size` value does not match, the
331
+ # operation returns a `412 Precondition Failed` error. If the `Size`
332
+ # matches or if the object doesn’t exist, the operation returns a `204
333
+ # Success (No Content)` response.
334
+ #
335
+ # <note markdown="1"> This functionality is only supported for directory buckets.
336
+ #
337
+ # </note>
338
+ #
339
+ # You can use the `If-Match`, `x-amz-if-match-last-modified-time` and
340
+ # `x-amz-if-match-size` conditional headers in conjunction with
341
+ # each-other or individually.
299
342
  # @return [Types::DeleteObjectOutput]
300
343
  def delete(options = {})
301
344
  options = options.merge(
@@ -71,9 +71,9 @@ module Aws
71
71
 
72
72
  def check_for_error(context)
73
73
  xml = context.http_response.body_contents
74
- if xml.match(/\?>\s*<Error>/)
75
- error_code = xml.match(/<Code>(.+?)<\/Code>/)[1]
76
- error_message = xml.match(/<Message>(.+?)<\/Message>/)[1]
74
+ if xml.match(/<\?xml\s[^>]*\?>\s*<Error>/)
75
+ error_code = xml.match(%r{<Code>(.+?)</Code>})[1]
76
+ error_message = xml.match(%r{<Message>(.+?)</Message>})[1]
77
77
  S3::Errors.error_class(error_code).new(context, error_message)
78
78
  elsif incomplete_xml_body?(xml, context.operation.output)
79
79
  Seahorse::Client::NetworkingError.new(