aws-sdk-s3 1.9.0 → 1.24.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.
- checksums.yaml +4 -4
- data/lib/aws-sdk-s3/bucket.rb +1 -1
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -2
- data/lib/aws-sdk-s3/client.rb +706 -198
- data/lib/aws-sdk-s3/client_api.rb +171 -2
- data/lib/aws-sdk-s3/customizations/bucket.rb +2 -2
- data/lib/aws-sdk-s3/customizations/object.rb +60 -0
- data/lib/aws-sdk-s3/customizations/object_summary.rb +7 -0
- data/lib/aws-sdk-s3/customizations.rb +1 -0
- data/lib/aws-sdk-s3/encryption/io_auth_decrypter.rb +9 -3
- data/lib/aws-sdk-s3/event_streams.rb +56 -0
- data/lib/aws-sdk-s3/file_downloader.rb +10 -9
- data/lib/aws-sdk-s3/file_part.rb +5 -7
- data/lib/aws-sdk-s3/file_uploader.rb +1 -3
- data/lib/aws-sdk-s3/multipart_stream_uploader.rb +160 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +1 -1
- data/lib/aws-sdk-s3/object.rb +5 -2
- data/lib/aws-sdk-s3/object_summary.rb +5 -2
- data/lib/aws-sdk-s3/plugins/accelerate.rb +4 -0
- data/lib/aws-sdk-s3/plugins/md5s.rb +1 -1
- data/lib/aws-sdk-s3/plugins/redirects.rb +3 -1
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +5 -1
- data/lib/aws-sdk-s3/presigner.rb +1 -0
- data/lib/aws-sdk-s3/types.rb +866 -129
- data/lib/aws-sdk-s3.rb +2 -1
- metadata +11 -3
@@ -21,6 +21,7 @@ module Aws::S3
|
|
21
21
|
AccessControlPolicy = Shapes::StructureShape.new(name: 'AccessControlPolicy')
|
22
22
|
AccessControlTranslation = Shapes::StructureShape.new(name: 'AccessControlTranslation')
|
23
23
|
AccountId = Shapes::StringShape.new(name: 'AccountId')
|
24
|
+
AllowQuotedRecordDelimiter = Shapes::BooleanShape.new(name: 'AllowQuotedRecordDelimiter')
|
24
25
|
AllowedHeader = Shapes::StringShape.new(name: 'AllowedHeader')
|
25
26
|
AllowedHeaders = Shapes::ListShape.new(name: 'AllowedHeaders', flattened: true)
|
26
27
|
AllowedMethod = Shapes::StringShape.new(name: 'AllowedMethod')
|
@@ -49,6 +50,7 @@ module Aws::S3
|
|
49
50
|
BucketVersioningStatus = Shapes::StringShape.new(name: 'BucketVersioningStatus')
|
50
51
|
Buckets = Shapes::ListShape.new(name: 'Buckets')
|
51
52
|
BytesProcessed = Shapes::IntegerShape.new(name: 'BytesProcessed')
|
53
|
+
BytesReturned = Shapes::IntegerShape.new(name: 'BytesReturned')
|
52
54
|
BytesScanned = Shapes::IntegerShape.new(name: 'BytesScanned')
|
53
55
|
CORSConfiguration = Shapes::StructureShape.new(name: 'CORSConfiguration')
|
54
56
|
CORSRule = Shapes::StructureShape.new(name: 'CORSRule')
|
@@ -78,6 +80,7 @@ module Aws::S3
|
|
78
80
|
ContentMD5 = Shapes::StringShape.new(name: 'ContentMD5')
|
79
81
|
ContentRange = Shapes::StringShape.new(name: 'ContentRange')
|
80
82
|
ContentType = Shapes::StringShape.new(name: 'ContentType')
|
83
|
+
ContinuationEvent = Shapes::StructureShape.new(name: 'ContinuationEvent')
|
81
84
|
CopyObjectOutput = Shapes::StructureShape.new(name: 'CopyObjectOutput')
|
82
85
|
CopyObjectRequest = Shapes::StructureShape.new(name: 'CopyObjectRequest')
|
83
86
|
CopyObjectResult = Shapes::StructureShape.new(name: 'CopyObjectResult')
|
@@ -115,6 +118,8 @@ module Aws::S3
|
|
115
118
|
DeleteBucketWebsiteRequest = Shapes::StructureShape.new(name: 'DeleteBucketWebsiteRequest')
|
116
119
|
DeleteMarker = Shapes::BooleanShape.new(name: 'DeleteMarker')
|
117
120
|
DeleteMarkerEntry = Shapes::StructureShape.new(name: 'DeleteMarkerEntry')
|
121
|
+
DeleteMarkerReplication = Shapes::StructureShape.new(name: 'DeleteMarkerReplication')
|
122
|
+
DeleteMarkerReplicationStatus = Shapes::StringShape.new(name: 'DeleteMarkerReplicationStatus')
|
118
123
|
DeleteMarkerVersionId = Shapes::StringShape.new(name: 'DeleteMarkerVersionId')
|
119
124
|
DeleteMarkers = Shapes::ListShape.new(name: 'DeleteMarkers', flattened: true)
|
120
125
|
DeleteObjectOutput = Shapes::StructureShape.new(name: 'DeleteObjectOutput')
|
@@ -123,6 +128,7 @@ module Aws::S3
|
|
123
128
|
DeleteObjectTaggingRequest = Shapes::StructureShape.new(name: 'DeleteObjectTaggingRequest')
|
124
129
|
DeleteObjectsOutput = Shapes::StructureShape.new(name: 'DeleteObjectsOutput')
|
125
130
|
DeleteObjectsRequest = Shapes::StructureShape.new(name: 'DeleteObjectsRequest')
|
131
|
+
DeletePublicAccessBlockRequest = Shapes::StructureShape.new(name: 'DeletePublicAccessBlockRequest')
|
126
132
|
DeletedObject = Shapes::StructureShape.new(name: 'DeletedObject')
|
127
133
|
DeletedObjects = Shapes::ListShape.new(name: 'DeletedObjects', flattened: true)
|
128
134
|
Delimiter = Shapes::StringShape.new(name: 'Delimiter')
|
@@ -135,6 +141,7 @@ module Aws::S3
|
|
135
141
|
EncodingType = Shapes::StringShape.new(name: 'EncodingType')
|
136
142
|
Encryption = Shapes::StructureShape.new(name: 'Encryption')
|
137
143
|
EncryptionConfiguration = Shapes::StructureShape.new(name: 'EncryptionConfiguration')
|
144
|
+
EndEvent = Shapes::StructureShape.new(name: 'EndEvent')
|
138
145
|
Error = Shapes::StructureShape.new(name: 'Error')
|
139
146
|
ErrorDocument = Shapes::StructureShape.new(name: 'ErrorDocument')
|
140
147
|
Errors = Shapes::ListShape.new(name: 'Errors', flattened: true)
|
@@ -181,6 +188,8 @@ module Aws::S3
|
|
181
188
|
GetBucketNotificationConfigurationRequest = Shapes::StructureShape.new(name: 'GetBucketNotificationConfigurationRequest')
|
182
189
|
GetBucketPolicyOutput = Shapes::StructureShape.new(name: 'GetBucketPolicyOutput')
|
183
190
|
GetBucketPolicyRequest = Shapes::StructureShape.new(name: 'GetBucketPolicyRequest')
|
191
|
+
GetBucketPolicyStatusOutput = Shapes::StructureShape.new(name: 'GetBucketPolicyStatusOutput')
|
192
|
+
GetBucketPolicyStatusRequest = Shapes::StructureShape.new(name: 'GetBucketPolicyStatusRequest')
|
184
193
|
GetBucketReplicationOutput = Shapes::StructureShape.new(name: 'GetBucketReplicationOutput')
|
185
194
|
GetBucketReplicationRequest = Shapes::StructureShape.new(name: 'GetBucketReplicationRequest')
|
186
195
|
GetBucketRequestPaymentOutput = Shapes::StructureShape.new(name: 'GetBucketRequestPaymentOutput')
|
@@ -199,6 +208,8 @@ module Aws::S3
|
|
199
208
|
GetObjectTaggingRequest = Shapes::StructureShape.new(name: 'GetObjectTaggingRequest')
|
200
209
|
GetObjectTorrentOutput = Shapes::StructureShape.new(name: 'GetObjectTorrentOutput')
|
201
210
|
GetObjectTorrentRequest = Shapes::StructureShape.new(name: 'GetObjectTorrentRequest')
|
211
|
+
GetPublicAccessBlockOutput = Shapes::StructureShape.new(name: 'GetPublicAccessBlockOutput')
|
212
|
+
GetPublicAccessBlockRequest = Shapes::StructureShape.new(name: 'GetPublicAccessBlockRequest')
|
202
213
|
GlacierJobParameters = Shapes::StructureShape.new(name: 'GlacierJobParameters')
|
203
214
|
Grant = Shapes::StructureShape.new(name: 'Grant')
|
204
215
|
GrantFullControl = Shapes::StringShape.new(name: 'GrantFullControl')
|
@@ -238,6 +249,7 @@ module Aws::S3
|
|
238
249
|
InventorySchedule = Shapes::StructureShape.new(name: 'InventorySchedule')
|
239
250
|
IsEnabled = Shapes::BooleanShape.new(name: 'IsEnabled')
|
240
251
|
IsLatest = Shapes::BooleanShape.new(name: 'IsLatest')
|
252
|
+
IsPublic = Shapes::BooleanShape.new(name: 'IsPublic')
|
241
253
|
IsTruncated = Shapes::BooleanShape.new(name: 'IsTruncated')
|
242
254
|
JSONInput = Shapes::StructureShape.new(name: 'JSONInput')
|
243
255
|
JSONOutput = Shapes::StructureShape.new(name: 'JSONOutput')
|
@@ -332,6 +344,7 @@ module Aws::S3
|
|
332
344
|
OutputSerialization = Shapes::StructureShape.new(name: 'OutputSerialization')
|
333
345
|
Owner = Shapes::StructureShape.new(name: 'Owner')
|
334
346
|
OwnerOverride = Shapes::StringShape.new(name: 'OwnerOverride')
|
347
|
+
ParquetInput = Shapes::StructureShape.new(name: 'ParquetInput')
|
335
348
|
Part = Shapes::StructureShape.new(name: 'Part')
|
336
349
|
PartNumber = Shapes::IntegerShape.new(name: 'PartNumber')
|
337
350
|
PartNumberMarker = Shapes::IntegerShape.new(name: 'PartNumberMarker')
|
@@ -340,9 +353,13 @@ module Aws::S3
|
|
340
353
|
Payer = Shapes::StringShape.new(name: 'Payer')
|
341
354
|
Permission = Shapes::StringShape.new(name: 'Permission')
|
342
355
|
Policy = Shapes::StringShape.new(name: 'Policy')
|
356
|
+
PolicyStatus = Shapes::StructureShape.new(name: 'PolicyStatus')
|
343
357
|
Prefix = Shapes::StringShape.new(name: 'Prefix')
|
358
|
+
Priority = Shapes::IntegerShape.new(name: 'Priority')
|
344
359
|
Progress = Shapes::StructureShape.new(name: 'Progress')
|
360
|
+
ProgressEvent = Shapes::StructureShape.new(name: 'ProgressEvent')
|
345
361
|
Protocol = Shapes::StringShape.new(name: 'Protocol')
|
362
|
+
PublicAccessBlockConfiguration = Shapes::StructureShape.new(name: 'PublicAccessBlockConfiguration')
|
346
363
|
PutBucketAccelerateConfigurationRequest = Shapes::StructureShape.new(name: 'PutBucketAccelerateConfigurationRequest')
|
347
364
|
PutBucketAclRequest = Shapes::StructureShape.new(name: 'PutBucketAclRequest')
|
348
365
|
PutBucketAnalyticsConfigurationRequest = Shapes::StructureShape.new(name: 'PutBucketAnalyticsConfigurationRequest')
|
@@ -367,6 +384,7 @@ module Aws::S3
|
|
367
384
|
PutObjectRequest = Shapes::StructureShape.new(name: 'PutObjectRequest')
|
368
385
|
PutObjectTaggingOutput = Shapes::StructureShape.new(name: 'PutObjectTaggingOutput')
|
369
386
|
PutObjectTaggingRequest = Shapes::StructureShape.new(name: 'PutObjectTaggingRequest')
|
387
|
+
PutPublicAccessBlockRequest = Shapes::StructureShape.new(name: 'PutPublicAccessBlockRequest')
|
370
388
|
QueueArn = Shapes::StringShape.new(name: 'QueueArn')
|
371
389
|
QueueConfiguration = Shapes::StructureShape.new(name: 'QueueConfiguration')
|
372
390
|
QueueConfigurationDeprecated = Shapes::StructureShape.new(name: 'QueueConfigurationDeprecated')
|
@@ -377,6 +395,7 @@ module Aws::S3
|
|
377
395
|
QuoteFields = Shapes::StringShape.new(name: 'QuoteFields')
|
378
396
|
Range = Shapes::StringShape.new(name: 'Range')
|
379
397
|
RecordDelimiter = Shapes::StringShape.new(name: 'RecordDelimiter')
|
398
|
+
RecordsEvent = Shapes::StructureShape.new(name: 'RecordsEvent')
|
380
399
|
Redirect = Shapes::StructureShape.new(name: 'Redirect')
|
381
400
|
RedirectAllRequestsTo = Shapes::StructureShape.new(name: 'RedirectAllRequestsTo')
|
382
401
|
ReplaceKeyPrefixWith = Shapes::StringShape.new(name: 'ReplaceKeyPrefixWith')
|
@@ -384,6 +403,8 @@ module Aws::S3
|
|
384
403
|
ReplicaKmsKeyID = Shapes::StringShape.new(name: 'ReplicaKmsKeyID')
|
385
404
|
ReplicationConfiguration = Shapes::StructureShape.new(name: 'ReplicationConfiguration')
|
386
405
|
ReplicationRule = Shapes::StructureShape.new(name: 'ReplicationRule')
|
406
|
+
ReplicationRuleAndOperator = Shapes::StructureShape.new(name: 'ReplicationRuleAndOperator')
|
407
|
+
ReplicationRuleFilter = Shapes::StructureShape.new(name: 'ReplicationRuleFilter')
|
387
408
|
ReplicationRuleStatus = Shapes::StringShape.new(name: 'ReplicationRuleStatus')
|
388
409
|
ReplicationRules = Shapes::ListShape.new(name: 'ReplicationRules', flattened: true)
|
389
410
|
ReplicationStatus = Shapes::StringShape.new(name: 'ReplicationStatus')
|
@@ -416,18 +437,23 @@ module Aws::S3
|
|
416
437
|
SSEKMS = Shapes::StructureShape.new(name: 'SSEKMS')
|
417
438
|
SSEKMSKeyId = Shapes::StringShape.new(name: 'SSEKMSKeyId')
|
418
439
|
SSES3 = Shapes::StructureShape.new(name: 'SSES3')
|
440
|
+
SelectObjectContentEventStream = Shapes::StructureShape.new(name: 'SelectObjectContentEventStream')
|
441
|
+
SelectObjectContentOutput = Shapes::StructureShape.new(name: 'SelectObjectContentOutput')
|
442
|
+
SelectObjectContentRequest = Shapes::StructureShape.new(name: 'SelectObjectContentRequest')
|
419
443
|
SelectParameters = Shapes::StructureShape.new(name: 'SelectParameters')
|
420
444
|
ServerSideEncryption = Shapes::StringShape.new(name: 'ServerSideEncryption')
|
421
445
|
ServerSideEncryptionByDefault = Shapes::StructureShape.new(name: 'ServerSideEncryptionByDefault')
|
422
446
|
ServerSideEncryptionConfiguration = Shapes::StructureShape.new(name: 'ServerSideEncryptionConfiguration')
|
423
447
|
ServerSideEncryptionRule = Shapes::StructureShape.new(name: 'ServerSideEncryptionRule')
|
424
448
|
ServerSideEncryptionRules = Shapes::ListShape.new(name: 'ServerSideEncryptionRules', flattened: true)
|
449
|
+
Setting = Shapes::BooleanShape.new(name: 'Setting')
|
425
450
|
Size = Shapes::IntegerShape.new(name: 'Size')
|
426
451
|
SourceSelectionCriteria = Shapes::StructureShape.new(name: 'SourceSelectionCriteria')
|
427
452
|
SseKmsEncryptedObjects = Shapes::StructureShape.new(name: 'SseKmsEncryptedObjects')
|
428
453
|
SseKmsEncryptedObjectsStatus = Shapes::StringShape.new(name: 'SseKmsEncryptedObjectsStatus')
|
429
454
|
StartAfter = Shapes::StringShape.new(name: 'StartAfter')
|
430
455
|
Stats = Shapes::StructureShape.new(name: 'Stats')
|
456
|
+
StatsEvent = Shapes::StructureShape.new(name: 'StatsEvent')
|
431
457
|
StorageClass = Shapes::StringShape.new(name: 'StorageClass')
|
432
458
|
StorageClassAnalysis = Shapes::StructureShape.new(name: 'StorageClassAnalysis')
|
433
459
|
StorageClassAnalysisDataExport = Shapes::StructureShape.new(name: 'StorageClassAnalysisDataExport')
|
@@ -549,6 +575,7 @@ module Aws::S3
|
|
549
575
|
CSVInput.add_member(:record_delimiter, Shapes::ShapeRef.new(shape: RecordDelimiter, location_name: "RecordDelimiter"))
|
550
576
|
CSVInput.add_member(:field_delimiter, Shapes::ShapeRef.new(shape: FieldDelimiter, location_name: "FieldDelimiter"))
|
551
577
|
CSVInput.add_member(:quote_character, Shapes::ShapeRef.new(shape: QuoteCharacter, location_name: "QuoteCharacter"))
|
578
|
+
CSVInput.add_member(:allow_quoted_record_delimiter, Shapes::ShapeRef.new(shape: AllowQuotedRecordDelimiter, location_name: "AllowQuotedRecordDelimiter"))
|
552
579
|
CSVInput.struct_class = Types::CSVInput
|
553
580
|
|
554
581
|
CSVOutput.add_member(:quote_fields, Shapes::ShapeRef.new(shape: QuoteFields, location_name: "QuoteFields"))
|
@@ -603,6 +630,8 @@ module Aws::S3
|
|
603
630
|
Condition.add_member(:key_prefix_equals, Shapes::ShapeRef.new(shape: KeyPrefixEquals, location_name: "KeyPrefixEquals"))
|
604
631
|
Condition.struct_class = Types::Condition
|
605
632
|
|
633
|
+
ContinuationEvent.struct_class = Types::ContinuationEvent
|
634
|
+
|
606
635
|
CopyObjectOutput.add_member(:copy_object_result, Shapes::ShapeRef.new(shape: CopyObjectResult, location_name: "CopyObjectResult"))
|
607
636
|
CopyObjectOutput.add_member(:expiration, Shapes::ShapeRef.new(shape: Expiration, location: "header", location_name: "x-amz-expiration"))
|
608
637
|
CopyObjectOutput.add_member(:copy_source_version_id, Shapes::ShapeRef.new(shape: CopySourceVersionId, location: "header", location_name: "x-amz-copy-source-version-id"))
|
@@ -761,6 +790,9 @@ module Aws::S3
|
|
761
790
|
DeleteMarkerEntry.add_member(:last_modified, Shapes::ShapeRef.new(shape: LastModified, location_name: "LastModified"))
|
762
791
|
DeleteMarkerEntry.struct_class = Types::DeleteMarkerEntry
|
763
792
|
|
793
|
+
DeleteMarkerReplication.add_member(:status, Shapes::ShapeRef.new(shape: DeleteMarkerReplicationStatus, location_name: "Status"))
|
794
|
+
DeleteMarkerReplication.struct_class = Types::DeleteMarkerReplication
|
795
|
+
|
764
796
|
DeleteMarkers.member = Shapes::ShapeRef.new(shape: DeleteMarkerEntry)
|
765
797
|
|
766
798
|
DeleteObjectOutput.add_member(:delete_marker, Shapes::ShapeRef.new(shape: DeleteMarker, location: "header", location_name: "x-amz-delete-marker"))
|
@@ -796,6 +828,9 @@ module Aws::S3
|
|
796
828
|
DeleteObjectsRequest[:payload] = :delete
|
797
829
|
DeleteObjectsRequest[:payload_member] = DeleteObjectsRequest.member(:delete)
|
798
830
|
|
831
|
+
DeletePublicAccessBlockRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket"))
|
832
|
+
DeletePublicAccessBlockRequest.struct_class = Types::DeletePublicAccessBlockRequest
|
833
|
+
|
799
834
|
DeletedObject.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, location_name: "Key"))
|
800
835
|
DeletedObject.add_member(:version_id, Shapes::ShapeRef.new(shape: ObjectVersionId, location_name: "VersionId"))
|
801
836
|
DeletedObject.add_member(:delete_marker, Shapes::ShapeRef.new(shape: DeleteMarker, location_name: "DeleteMarker"))
|
@@ -819,6 +854,8 @@ module Aws::S3
|
|
819
854
|
EncryptionConfiguration.add_member(:replica_kms_key_id, Shapes::ShapeRef.new(shape: ReplicaKmsKeyID, location_name: "ReplicaKmsKeyID"))
|
820
855
|
EncryptionConfiguration.struct_class = Types::EncryptionConfiguration
|
821
856
|
|
857
|
+
EndEvent.struct_class = Types::EndEvent
|
858
|
+
|
822
859
|
Error.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, location_name: "Key"))
|
823
860
|
Error.add_member(:version_id, Shapes::ShapeRef.new(shape: ObjectVersionId, location_name: "VersionId"))
|
824
861
|
Error.add_member(:code, Shapes::ShapeRef.new(shape: Code, location_name: "Code"))
|
@@ -929,6 +966,14 @@ module Aws::S3
|
|
929
966
|
GetBucketPolicyRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket"))
|
930
967
|
GetBucketPolicyRequest.struct_class = Types::GetBucketPolicyRequest
|
931
968
|
|
969
|
+
GetBucketPolicyStatusOutput.add_member(:policy_status, Shapes::ShapeRef.new(shape: PolicyStatus, location_name: "PolicyStatus"))
|
970
|
+
GetBucketPolicyStatusOutput.struct_class = Types::GetBucketPolicyStatusOutput
|
971
|
+
GetBucketPolicyStatusOutput[:payload] = :policy_status
|
972
|
+
GetBucketPolicyStatusOutput[:payload_member] = GetBucketPolicyStatusOutput.member(:policy_status)
|
973
|
+
|
974
|
+
GetBucketPolicyStatusRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket"))
|
975
|
+
GetBucketPolicyStatusRequest.struct_class = Types::GetBucketPolicyStatusRequest
|
976
|
+
|
932
977
|
GetBucketReplicationOutput.add_member(:replication_configuration, Shapes::ShapeRef.new(shape: ReplicationConfiguration, location_name: "ReplicationConfiguration"))
|
933
978
|
GetBucketReplicationOutput.struct_class = Types::GetBucketReplicationOutput
|
934
979
|
GetBucketReplicationOutput[:payload] = :replication_configuration
|
@@ -1050,6 +1095,14 @@ module Aws::S3
|
|
1050
1095
|
GetObjectTorrentRequest.add_member(:request_payer, Shapes::ShapeRef.new(shape: RequestPayer, location: "header", location_name: "x-amz-request-payer"))
|
1051
1096
|
GetObjectTorrentRequest.struct_class = Types::GetObjectTorrentRequest
|
1052
1097
|
|
1098
|
+
GetPublicAccessBlockOutput.add_member(:public_access_block_configuration, Shapes::ShapeRef.new(shape: PublicAccessBlockConfiguration, location_name: "PublicAccessBlockConfiguration"))
|
1099
|
+
GetPublicAccessBlockOutput.struct_class = Types::GetPublicAccessBlockOutput
|
1100
|
+
GetPublicAccessBlockOutput[:payload] = :public_access_block_configuration
|
1101
|
+
GetPublicAccessBlockOutput[:payload_member] = GetPublicAccessBlockOutput.member(:public_access_block_configuration)
|
1102
|
+
|
1103
|
+
GetPublicAccessBlockRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket"))
|
1104
|
+
GetPublicAccessBlockRequest.struct_class = Types::GetPublicAccessBlockRequest
|
1105
|
+
|
1053
1106
|
GlacierJobParameters.add_member(:tier, Shapes::ShapeRef.new(shape: Tier, required: true, location_name: "Tier"))
|
1054
1107
|
GlacierJobParameters.struct_class = Types::GlacierJobParameters
|
1055
1108
|
|
@@ -1122,6 +1175,7 @@ module Aws::S3
|
|
1122
1175
|
InputSerialization.add_member(:csv, Shapes::ShapeRef.new(shape: CSVInput, location_name: "CSV"))
|
1123
1176
|
InputSerialization.add_member(:compression_type, Shapes::ShapeRef.new(shape: CompressionType, location_name: "CompressionType"))
|
1124
1177
|
InputSerialization.add_member(:json, Shapes::ShapeRef.new(shape: JSONInput, location_name: "JSON"))
|
1178
|
+
InputSerialization.add_member(:parquet, Shapes::ShapeRef.new(shape: ParquetInput, location_name: "Parquet"))
|
1125
1179
|
InputSerialization.struct_class = Types::InputSerialization
|
1126
1180
|
|
1127
1181
|
InventoryConfiguration.add_member(:destination, Shapes::ShapeRef.new(shape: InventoryDestination, required: true, location_name: "Destination"))
|
@@ -1450,6 +1504,8 @@ module Aws::S3
|
|
1450
1504
|
Owner.add_member(:id, Shapes::ShapeRef.new(shape: ID, location_name: "ID"))
|
1451
1505
|
Owner.struct_class = Types::Owner
|
1452
1506
|
|
1507
|
+
ParquetInput.struct_class = Types::ParquetInput
|
1508
|
+
|
1453
1509
|
Part.add_member(:part_number, Shapes::ShapeRef.new(shape: PartNumber, location_name: "PartNumber"))
|
1454
1510
|
Part.add_member(:last_modified, Shapes::ShapeRef.new(shape: LastModified, location_name: "LastModified"))
|
1455
1511
|
Part.add_member(:etag, Shapes::ShapeRef.new(shape: ETag, location_name: "ETag"))
|
@@ -1458,10 +1514,23 @@ module Aws::S3
|
|
1458
1514
|
|
1459
1515
|
Parts.member = Shapes::ShapeRef.new(shape: Part)
|
1460
1516
|
|
1517
|
+
PolicyStatus.add_member(:is_public, Shapes::ShapeRef.new(shape: IsPublic, location_name: "IsPublic"))
|
1518
|
+
PolicyStatus.struct_class = Types::PolicyStatus
|
1519
|
+
|
1461
1520
|
Progress.add_member(:bytes_scanned, Shapes::ShapeRef.new(shape: BytesScanned, location_name: "BytesScanned"))
|
1462
1521
|
Progress.add_member(:bytes_processed, Shapes::ShapeRef.new(shape: BytesProcessed, location_name: "BytesProcessed"))
|
1522
|
+
Progress.add_member(:bytes_returned, Shapes::ShapeRef.new(shape: BytesReturned, location_name: "BytesReturned"))
|
1463
1523
|
Progress.struct_class = Types::Progress
|
1464
1524
|
|
1525
|
+
ProgressEvent.add_member(:details, Shapes::ShapeRef.new(shape: Progress, eventpayload: true, eventpayload_type: 'structure', location_name: "Details", metadata: {"eventpayload"=>true}))
|
1526
|
+
ProgressEvent.struct_class = Types::ProgressEvent
|
1527
|
+
|
1528
|
+
PublicAccessBlockConfiguration.add_member(:block_public_acls, Shapes::ShapeRef.new(shape: Setting, location_name: "BlockPublicAcls"))
|
1529
|
+
PublicAccessBlockConfiguration.add_member(:ignore_public_acls, Shapes::ShapeRef.new(shape: Setting, location_name: "IgnorePublicAcls"))
|
1530
|
+
PublicAccessBlockConfiguration.add_member(:block_public_policy, Shapes::ShapeRef.new(shape: Setting, location_name: "BlockPublicPolicy"))
|
1531
|
+
PublicAccessBlockConfiguration.add_member(:restrict_public_buckets, Shapes::ShapeRef.new(shape: Setting, location_name: "RestrictPublicBuckets"))
|
1532
|
+
PublicAccessBlockConfiguration.struct_class = Types::PublicAccessBlockConfiguration
|
1533
|
+
|
1465
1534
|
PutBucketAccelerateConfigurationRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket"))
|
1466
1535
|
PutBucketAccelerateConfigurationRequest.add_member(:accelerate_configuration, Shapes::ShapeRef.new(shape: AccelerateConfiguration, required: true, location_name: "AccelerateConfiguration", metadata: {"xmlNamespace"=>{"uri"=>"http://s3.amazonaws.com/doc/2006-03-01/"}}))
|
1467
1536
|
PutBucketAccelerateConfigurationRequest.struct_class = Types::PutBucketAccelerateConfigurationRequest
|
@@ -1664,6 +1733,13 @@ module Aws::S3
|
|
1664
1733
|
PutObjectTaggingRequest[:payload] = :tagging
|
1665
1734
|
PutObjectTaggingRequest[:payload_member] = PutObjectTaggingRequest.member(:tagging)
|
1666
1735
|
|
1736
|
+
PutPublicAccessBlockRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket"))
|
1737
|
+
PutPublicAccessBlockRequest.add_member(:content_md5, Shapes::ShapeRef.new(shape: ContentMD5, location: "header", location_name: "Content-MD5"))
|
1738
|
+
PutPublicAccessBlockRequest.add_member(:public_access_block_configuration, Shapes::ShapeRef.new(shape: PublicAccessBlockConfiguration, required: true, location_name: "PublicAccessBlockConfiguration", metadata: {"xmlNamespace"=>{"uri"=>"http://s3.amazonaws.com/doc/2006-03-01/"}}))
|
1739
|
+
PutPublicAccessBlockRequest.struct_class = Types::PutPublicAccessBlockRequest
|
1740
|
+
PutPublicAccessBlockRequest[:payload] = :public_access_block_configuration
|
1741
|
+
PutPublicAccessBlockRequest[:payload_member] = PutPublicAccessBlockRequest.member(:public_access_block_configuration)
|
1742
|
+
|
1667
1743
|
QueueConfiguration.add_member(:id, Shapes::ShapeRef.new(shape: NotificationId, location_name: "Id"))
|
1668
1744
|
QueueConfiguration.add_member(:queue_arn, Shapes::ShapeRef.new(shape: QueueArn, required: true, location_name: "Queue"))
|
1669
1745
|
QueueConfiguration.add_member(:events, Shapes::ShapeRef.new(shape: EventList, required: true, location_name: "Event"))
|
@@ -1678,6 +1754,9 @@ module Aws::S3
|
|
1678
1754
|
|
1679
1755
|
QueueConfigurationList.member = Shapes::ShapeRef.new(shape: QueueConfiguration)
|
1680
1756
|
|
1757
|
+
RecordsEvent.add_member(:payload, Shapes::ShapeRef.new(shape: Body, eventpayload: true, eventpayload_type: 'blob', location_name: "Payload", metadata: {"eventpayload"=>true}))
|
1758
|
+
RecordsEvent.struct_class = Types::RecordsEvent
|
1759
|
+
|
1681
1760
|
Redirect.add_member(:host_name, Shapes::ShapeRef.new(shape: HostName, location_name: "HostName"))
|
1682
1761
|
Redirect.add_member(:http_redirect_code, Shapes::ShapeRef.new(shape: HttpRedirectCode, location_name: "HttpRedirectCode"))
|
1683
1762
|
Redirect.add_member(:protocol, Shapes::ShapeRef.new(shape: Protocol, location_name: "Protocol"))
|
@@ -1694,12 +1773,24 @@ module Aws::S3
|
|
1694
1773
|
ReplicationConfiguration.struct_class = Types::ReplicationConfiguration
|
1695
1774
|
|
1696
1775
|
ReplicationRule.add_member(:id, Shapes::ShapeRef.new(shape: ID, location_name: "ID"))
|
1697
|
-
ReplicationRule.add_member(:
|
1776
|
+
ReplicationRule.add_member(:priority, Shapes::ShapeRef.new(shape: Priority, location_name: "Priority"))
|
1777
|
+
ReplicationRule.add_member(:prefix, Shapes::ShapeRef.new(shape: Prefix, deprecated: true, location_name: "Prefix"))
|
1778
|
+
ReplicationRule.add_member(:filter, Shapes::ShapeRef.new(shape: ReplicationRuleFilter, location_name: "Filter"))
|
1698
1779
|
ReplicationRule.add_member(:status, Shapes::ShapeRef.new(shape: ReplicationRuleStatus, required: true, location_name: "Status"))
|
1699
1780
|
ReplicationRule.add_member(:source_selection_criteria, Shapes::ShapeRef.new(shape: SourceSelectionCriteria, location_name: "SourceSelectionCriteria"))
|
1700
1781
|
ReplicationRule.add_member(:destination, Shapes::ShapeRef.new(shape: Destination, required: true, location_name: "Destination"))
|
1782
|
+
ReplicationRule.add_member(:delete_marker_replication, Shapes::ShapeRef.new(shape: DeleteMarkerReplication, location_name: "DeleteMarkerReplication"))
|
1701
1783
|
ReplicationRule.struct_class = Types::ReplicationRule
|
1702
1784
|
|
1785
|
+
ReplicationRuleAndOperator.add_member(:prefix, Shapes::ShapeRef.new(shape: Prefix, location_name: "Prefix"))
|
1786
|
+
ReplicationRuleAndOperator.add_member(:tags, Shapes::ShapeRef.new(shape: TagSet, location_name: "Tag", metadata: {"flattened"=>true}))
|
1787
|
+
ReplicationRuleAndOperator.struct_class = Types::ReplicationRuleAndOperator
|
1788
|
+
|
1789
|
+
ReplicationRuleFilter.add_member(:prefix, Shapes::ShapeRef.new(shape: Prefix, location_name: "Prefix"))
|
1790
|
+
ReplicationRuleFilter.add_member(:tag, Shapes::ShapeRef.new(shape: Tag, location_name: "Tag"))
|
1791
|
+
ReplicationRuleFilter.add_member(:and, Shapes::ShapeRef.new(shape: ReplicationRuleAndOperator, location_name: "And"))
|
1792
|
+
ReplicationRuleFilter.struct_class = Types::ReplicationRuleFilter
|
1793
|
+
|
1703
1794
|
ReplicationRules.member = Shapes::ShapeRef.new(shape: ReplicationRule)
|
1704
1795
|
|
1705
1796
|
RequestPaymentConfiguration.add_member(:payer, Shapes::ShapeRef.new(shape: Payer, required: true, location_name: "Payer"))
|
@@ -1766,6 +1857,30 @@ module Aws::S3
|
|
1766
1857
|
|
1767
1858
|
SSES3.struct_class = Types::SSES3
|
1768
1859
|
|
1860
|
+
SelectObjectContentEventStream.add_member(:records, Shapes::ShapeRef.new(shape: RecordsEvent, event: true, location_name: "Records"))
|
1861
|
+
SelectObjectContentEventStream.add_member(:stats, Shapes::ShapeRef.new(shape: StatsEvent, event: true, location_name: "Stats"))
|
1862
|
+
SelectObjectContentEventStream.add_member(:progress, Shapes::ShapeRef.new(shape: ProgressEvent, event: true, location_name: "Progress"))
|
1863
|
+
SelectObjectContentEventStream.add_member(:cont, Shapes::ShapeRef.new(shape: ContinuationEvent, event: true, location_name: "Cont"))
|
1864
|
+
SelectObjectContentEventStream.add_member(:end, Shapes::ShapeRef.new(shape: EndEvent, event: true, location_name: "End"))
|
1865
|
+
SelectObjectContentEventStream.struct_class = Types::SelectObjectContentEventStream
|
1866
|
+
|
1867
|
+
SelectObjectContentOutput.add_member(:payload, Shapes::ShapeRef.new(shape: SelectObjectContentEventStream, eventstream: true, location_name: "Payload"))
|
1868
|
+
SelectObjectContentOutput.struct_class = Types::SelectObjectContentOutput
|
1869
|
+
SelectObjectContentOutput[:payload] = :payload
|
1870
|
+
SelectObjectContentOutput[:payload_member] = SelectObjectContentOutput.member(:payload)
|
1871
|
+
|
1872
|
+
SelectObjectContentRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket"))
|
1873
|
+
SelectObjectContentRequest.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, required: true, location: "uri", location_name: "Key"))
|
1874
|
+
SelectObjectContentRequest.add_member(:sse_customer_algorithm, Shapes::ShapeRef.new(shape: SSECustomerAlgorithm, location: "header", location_name: "x-amz-server-side-encryption-customer-algorithm"))
|
1875
|
+
SelectObjectContentRequest.add_member(:sse_customer_key, Shapes::ShapeRef.new(shape: SSECustomerKey, location: "header", location_name: "x-amz-server-side-encryption-customer-key"))
|
1876
|
+
SelectObjectContentRequest.add_member(:sse_customer_key_md5, Shapes::ShapeRef.new(shape: SSECustomerKeyMD5, location: "header", location_name: "x-amz-server-side-encryption-customer-key-MD5"))
|
1877
|
+
SelectObjectContentRequest.add_member(:expression, Shapes::ShapeRef.new(shape: Expression, required: true, location_name: "Expression"))
|
1878
|
+
SelectObjectContentRequest.add_member(:expression_type, Shapes::ShapeRef.new(shape: ExpressionType, required: true, location_name: "ExpressionType"))
|
1879
|
+
SelectObjectContentRequest.add_member(:request_progress, Shapes::ShapeRef.new(shape: RequestProgress, location_name: "RequestProgress"))
|
1880
|
+
SelectObjectContentRequest.add_member(:input_serialization, Shapes::ShapeRef.new(shape: InputSerialization, required: true, location_name: "InputSerialization"))
|
1881
|
+
SelectObjectContentRequest.add_member(:output_serialization, Shapes::ShapeRef.new(shape: OutputSerialization, required: true, location_name: "OutputSerialization"))
|
1882
|
+
SelectObjectContentRequest.struct_class = Types::SelectObjectContentRequest
|
1883
|
+
|
1769
1884
|
SelectParameters.add_member(:input_serialization, Shapes::ShapeRef.new(shape: InputSerialization, required: true, location_name: "InputSerialization"))
|
1770
1885
|
SelectParameters.add_member(:expression_type, Shapes::ShapeRef.new(shape: ExpressionType, required: true, location_name: "ExpressionType"))
|
1771
1886
|
SelectParameters.add_member(:expression, Shapes::ShapeRef.new(shape: Expression, required: true, location_name: "Expression"))
|
@@ -1792,8 +1907,12 @@ module Aws::S3
|
|
1792
1907
|
|
1793
1908
|
Stats.add_member(:bytes_scanned, Shapes::ShapeRef.new(shape: BytesScanned, location_name: "BytesScanned"))
|
1794
1909
|
Stats.add_member(:bytes_processed, Shapes::ShapeRef.new(shape: BytesProcessed, location_name: "BytesProcessed"))
|
1910
|
+
Stats.add_member(:bytes_returned, Shapes::ShapeRef.new(shape: BytesReturned, location_name: "BytesReturned"))
|
1795
1911
|
Stats.struct_class = Types::Stats
|
1796
1912
|
|
1913
|
+
StatsEvent.add_member(:details, Shapes::ShapeRef.new(shape: Stats, eventpayload: true, eventpayload_type: 'structure', location_name: "Details", metadata: {"eventpayload"=>true}))
|
1914
|
+
StatsEvent.struct_class = Types::StatsEvent
|
1915
|
+
|
1797
1916
|
StorageClassAnalysis.add_member(:data_export, Shapes::ShapeRef.new(shape: StorageClassAnalysisDataExport, location_name: "DataExport"))
|
1798
1917
|
StorageClassAnalysis.struct_class = Types::StorageClassAnalysis
|
1799
1918
|
|
@@ -1909,10 +2028,15 @@ module Aws::S3
|
|
1909
2028
|
api.version = "2006-03-01"
|
1910
2029
|
|
1911
2030
|
api.metadata = {
|
2031
|
+
"apiVersion" => "2006-03-01",
|
2032
|
+
"checksumFormat" => "md5",
|
1912
2033
|
"endpointPrefix" => "s3",
|
2034
|
+
"globalEndpoint" => "s3.amazonaws.com",
|
1913
2035
|
"protocol" => "rest-xml",
|
2036
|
+
"serviceAbbreviation" => "Amazon S3",
|
1914
2037
|
"serviceFullName" => "Amazon Simple Storage Service",
|
1915
|
-
"
|
2038
|
+
"serviceId" => "S3",
|
2039
|
+
"uid" => "s3-2006-03-01",
|
1916
2040
|
}
|
1917
2041
|
|
1918
2042
|
api.add_operation(:abort_multipart_upload, Seahorse::Model::Operation.new.tap do |o|
|
@@ -2071,6 +2195,14 @@ module Aws::S3
|
|
2071
2195
|
o.output = Shapes::ShapeRef.new(shape: DeleteObjectsOutput)
|
2072
2196
|
end)
|
2073
2197
|
|
2198
|
+
api.add_operation(:delete_public_access_block, Seahorse::Model::Operation.new.tap do |o|
|
2199
|
+
o.name = "DeletePublicAccessBlock"
|
2200
|
+
o.http_method = "DELETE"
|
2201
|
+
o.http_request_uri = "/{Bucket}?publicAccessBlock"
|
2202
|
+
o.input = Shapes::ShapeRef.new(shape: DeletePublicAccessBlockRequest)
|
2203
|
+
o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
|
2204
|
+
end)
|
2205
|
+
|
2074
2206
|
api.add_operation(:get_bucket_accelerate_configuration, Seahorse::Model::Operation.new.tap do |o|
|
2075
2207
|
o.name = "GetBucketAccelerateConfiguration"
|
2076
2208
|
o.http_method = "GET"
|
@@ -2185,6 +2317,14 @@ module Aws::S3
|
|
2185
2317
|
o.output = Shapes::ShapeRef.new(shape: GetBucketPolicyOutput)
|
2186
2318
|
end)
|
2187
2319
|
|
2320
|
+
api.add_operation(:get_bucket_policy_status, Seahorse::Model::Operation.new.tap do |o|
|
2321
|
+
o.name = "GetBucketPolicyStatus"
|
2322
|
+
o.http_method = "GET"
|
2323
|
+
o.http_request_uri = "/{Bucket}?policyStatus"
|
2324
|
+
o.input = Shapes::ShapeRef.new(shape: GetBucketPolicyStatusRequest)
|
2325
|
+
o.output = Shapes::ShapeRef.new(shape: GetBucketPolicyStatusOutput)
|
2326
|
+
end)
|
2327
|
+
|
2188
2328
|
api.add_operation(:get_bucket_replication, Seahorse::Model::Operation.new.tap do |o|
|
2189
2329
|
o.name = "GetBucketReplication"
|
2190
2330
|
o.http_method = "GET"
|
@@ -2259,6 +2399,14 @@ module Aws::S3
|
|
2259
2399
|
o.output = Shapes::ShapeRef.new(shape: GetObjectTorrentOutput)
|
2260
2400
|
end)
|
2261
2401
|
|
2402
|
+
api.add_operation(:get_public_access_block, Seahorse::Model::Operation.new.tap do |o|
|
2403
|
+
o.name = "GetPublicAccessBlock"
|
2404
|
+
o.http_method = "GET"
|
2405
|
+
o.http_request_uri = "/{Bucket}?publicAccessBlock"
|
2406
|
+
o.input = Shapes::ShapeRef.new(shape: GetPublicAccessBlockRequest)
|
2407
|
+
o.output = Shapes::ShapeRef.new(shape: GetPublicAccessBlockOutput)
|
2408
|
+
end)
|
2409
|
+
|
2262
2410
|
api.add_operation(:head_bucket, Seahorse::Model::Operation.new.tap do |o|
|
2263
2411
|
o.name = "HeadBucket"
|
2264
2412
|
o.http_method = "HEAD"
|
@@ -2558,6 +2706,14 @@ module Aws::S3
|
|
2558
2706
|
o.output = Shapes::ShapeRef.new(shape: PutObjectTaggingOutput)
|
2559
2707
|
end)
|
2560
2708
|
|
2709
|
+
api.add_operation(:put_public_access_block, Seahorse::Model::Operation.new.tap do |o|
|
2710
|
+
o.name = "PutPublicAccessBlock"
|
2711
|
+
o.http_method = "PUT"
|
2712
|
+
o.http_request_uri = "/{Bucket}?publicAccessBlock"
|
2713
|
+
o.input = Shapes::ShapeRef.new(shape: PutPublicAccessBlockRequest)
|
2714
|
+
o.output = Shapes::ShapeRef.new(shape: Shapes::StructureShape.new(struct_class: Aws::EmptyStructure))
|
2715
|
+
end)
|
2716
|
+
|
2561
2717
|
api.add_operation(:restore_object, Seahorse::Model::Operation.new.tap do |o|
|
2562
2718
|
o.name = "RestoreObject"
|
2563
2719
|
o.http_method = "POST"
|
@@ -2567,6 +2723,19 @@ module Aws::S3
|
|
2567
2723
|
o.errors << Shapes::ShapeRef.new(shape: ObjectAlreadyInActiveTierError)
|
2568
2724
|
end)
|
2569
2725
|
|
2726
|
+
api.add_operation(:select_object_content, Seahorse::Model::Operation.new.tap do |o|
|
2727
|
+
o.name = "SelectObjectContent"
|
2728
|
+
o.http_method = "POST"
|
2729
|
+
o.http_request_uri = "/{Bucket}/{Key+}?select&select-type=2"
|
2730
|
+
o.input = Shapes::ShapeRef.new(shape: SelectObjectContentRequest,
|
2731
|
+
location_name: "SelectObjectContentRequest",
|
2732
|
+
metadata: {
|
2733
|
+
"xmlNamespace" => {"uri"=>"http://s3.amazonaws.com/doc/2006-03-01/"}
|
2734
|
+
}
|
2735
|
+
)
|
2736
|
+
o.output = Shapes::ShapeRef.new(shape: SelectObjectContentOutput)
|
2737
|
+
end)
|
2738
|
+
|
2570
2739
|
api.add_operation(:upload_part, Seahorse::Model::Operation.new.tap do |o|
|
2571
2740
|
o.name = "UploadPart"
|
2572
2741
|
o.http_method = "PUT"
|
@@ -61,8 +61,8 @@ module Aws
|
|
61
61
|
# You can pass `virtual_host: true` to use the bucket name as the
|
62
62
|
# host name.
|
63
63
|
#
|
64
|
-
# bucket = s3.bucket('my.bucket.com'
|
65
|
-
# bucket.url
|
64
|
+
# bucket = s3.bucket('my.bucket.com')
|
65
|
+
# bucket.url(virtual_host: true)
|
66
66
|
# #=> "http://my.bucket.com"
|
67
67
|
#
|
68
68
|
# @option options [Boolean] :virtual_host (false) When `true`,
|
@@ -214,6 +214,62 @@ module Aws
|
|
214
214
|
url.to_s
|
215
215
|
end
|
216
216
|
|
217
|
+
# Uploads a stream in a streaming fashion to the current object in S3.
|
218
|
+
#
|
219
|
+
# # Passed chunks automatically split into multipart upload parts
|
220
|
+
# # and the parts are uploaded in parallel. This allows for streaming uploads
|
221
|
+
# # that never touch the disk.
|
222
|
+
#
|
223
|
+
# Note that this is known to have issues in JRuby until jruby-9.1.15.0, so avoid using this with older versions of JRuby.
|
224
|
+
#
|
225
|
+
# @example Streaming chunks of data
|
226
|
+
# obj.upload_stream do |write_stream|
|
227
|
+
# 10.times { write_stream << 'foo' }
|
228
|
+
# end
|
229
|
+
# @example Streaming chunks of data
|
230
|
+
# obj.upload_stream do |write_stream|
|
231
|
+
# IO.copy_stream(IO.popen('ls'), write_stream)
|
232
|
+
# end
|
233
|
+
# @example Streaming chunks of data
|
234
|
+
# obj.upload_stream do |write_stream|
|
235
|
+
# IO.copy_stream(STDIN, write_stream)
|
236
|
+
# end
|
237
|
+
#
|
238
|
+
# @option options [Integer] :thread_count
|
239
|
+
# The number of parallel multipart uploads
|
240
|
+
# Default `:thread_count` is `10`.
|
241
|
+
#
|
242
|
+
# @option options [Boolean] :tempfile
|
243
|
+
# Normally read data is stored in memory when building the parts in order to complete
|
244
|
+
# the underlying multipart upload. By passing `:tempfile => true` data read will be
|
245
|
+
# temporarily stored on disk reducing the memory footprint vastly.
|
246
|
+
# Default `:tempfile` is `false`.
|
247
|
+
#
|
248
|
+
# @option options [Integer] :part_size
|
249
|
+
# Define how big each part size but the last should be.
|
250
|
+
# Default `:part_size` is `5 * 1024 * 1024`.
|
251
|
+
#
|
252
|
+
# @raise [MultipartUploadError] If an object is being uploaded in
|
253
|
+
# parts, and the upload can not be completed, then the upload is
|
254
|
+
# aborted and this error is raised. The raised error has a `#errors`
|
255
|
+
# method that returns the failures that caused the upload to be
|
256
|
+
# aborted.
|
257
|
+
#
|
258
|
+
# @return [Boolean] Returns `true` when the object is uploaded
|
259
|
+
# without any errors.
|
260
|
+
#
|
261
|
+
def upload_stream(options = {}, &block)
|
262
|
+
uploading_options = options.dup
|
263
|
+
uploader = MultipartStreamUploader.new(
|
264
|
+
client: client,
|
265
|
+
thread_count: uploading_options.delete(:thread_count),
|
266
|
+
tempfile: uploading_options.delete(:tempfile),
|
267
|
+
part_size: uploading_options.delete(:part_size),
|
268
|
+
)
|
269
|
+
uploader.upload(uploading_options.merge(bucket: bucket_name, key: key), &block)
|
270
|
+
true
|
271
|
+
end
|
272
|
+
|
217
273
|
# Uploads a file from disk to the current object in S3.
|
218
274
|
#
|
219
275
|
# # small files are uploaded in a single API call
|
@@ -277,6 +333,10 @@ module Aws
|
|
277
333
|
# @option options [String] thread_count Customize threads used in multipart
|
278
334
|
# download, if not provided, 10 is default value
|
279
335
|
#
|
336
|
+
# @option options [String] version_id The object version id used to retrieve
|
337
|
+
# the object, to know more about object versioning, see:
|
338
|
+
# https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectVersioning.html
|
339
|
+
#
|
280
340
|
# @return [Boolean] Returns `true` when the file is downloaded
|
281
341
|
# without any errors.
|
282
342
|
def download_file(destination, options = {})
|
@@ -60,6 +60,13 @@ module Aws
|
|
60
60
|
object.upload_file(source, options)
|
61
61
|
end
|
62
62
|
|
63
|
+
# @options (see Object#upload_stream)
|
64
|
+
# @return (see Object#upload_stream)
|
65
|
+
# @see Object#upload_stream
|
66
|
+
def upload_stream(options = {}, &block)
|
67
|
+
object.upload_stream(options, &block)
|
68
|
+
end
|
69
|
+
|
63
70
|
# @param (see Object#download_file)
|
64
71
|
# @options (see Object#download_file)
|
65
72
|
# @return (see Object#download_file)
|
@@ -6,6 +6,7 @@ require 'aws-sdk-s3/file_uploader'
|
|
6
6
|
require 'aws-sdk-s3/file_downloader'
|
7
7
|
require 'aws-sdk-s3/legacy_signer'
|
8
8
|
require 'aws-sdk-s3/multipart_file_uploader'
|
9
|
+
require 'aws-sdk-s3/multipart_stream_uploader'
|
9
10
|
require 'aws-sdk-s3/multipart_upload_error'
|
10
11
|
require 'aws-sdk-s3/object_copier'
|
11
12
|
require 'aws-sdk-s3/object_multipart_copier'
|
@@ -22,8 +22,10 @@ module Aws
|
|
22
22
|
|
23
23
|
def write(chunk)
|
24
24
|
chunk = truncate_chunk(chunk)
|
25
|
-
|
26
|
-
|
25
|
+
if chunk.bytesize > 0
|
26
|
+
@bytes_written += chunk.bytesize
|
27
|
+
@decrypter.write(chunk)
|
28
|
+
end
|
27
29
|
end
|
28
30
|
|
29
31
|
def finalize
|
@@ -39,8 +41,12 @@ module Aws
|
|
39
41
|
def truncate_chunk(chunk)
|
40
42
|
if chunk.bytesize + @bytes_written <= @max_bytes
|
41
43
|
chunk
|
42
|
-
|
44
|
+
elsif @bytes_written < @max_bytes
|
43
45
|
chunk[0..(@max_bytes - @bytes_written - 1)]
|
46
|
+
else
|
47
|
+
# If the tag was sent over after the full body has been read,
|
48
|
+
# we don't want to accidentally append it.
|
49
|
+
""
|
44
50
|
end
|
45
51
|
end
|
46
52
|
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::S3
|
9
|
+
module EventStreams
|
10
|
+
class SelectObjectContentEventStream
|
11
|
+
|
12
|
+
def initialize
|
13
|
+
@event_emitter = Aws::EventEmitter.new
|
14
|
+
end
|
15
|
+
|
16
|
+
def on_records_event(&block)
|
17
|
+
@event_emitter.on(:records, Proc.new)
|
18
|
+
end
|
19
|
+
|
20
|
+
def on_stats_event(&block)
|
21
|
+
@event_emitter.on(:stats, Proc.new)
|
22
|
+
end
|
23
|
+
|
24
|
+
def on_progress_event(&block)
|
25
|
+
@event_emitter.on(:progress, Proc.new)
|
26
|
+
end
|
27
|
+
|
28
|
+
def on_cont_event(&block)
|
29
|
+
@event_emitter.on(:cont, Proc.new)
|
30
|
+
end
|
31
|
+
|
32
|
+
def on_end_event(&block)
|
33
|
+
@event_emitter.on(:end, Proc.new)
|
34
|
+
end
|
35
|
+
|
36
|
+
def on_error_event(&block)
|
37
|
+
@event_emitter.on(:error, Proc.new)
|
38
|
+
end
|
39
|
+
|
40
|
+
def on_event(&block)
|
41
|
+
on_records_event(&block)
|
42
|
+
on_stats_event(&block)
|
43
|
+
on_progress_event(&block)
|
44
|
+
on_cont_event(&block)
|
45
|
+
on_end_event(&block)
|
46
|
+
end
|
47
|
+
|
48
|
+
# @api private
|
49
|
+
# @return Aws::EventEmitter
|
50
|
+
attr_reader :event_emitter
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|