aws-sdk-s3 1.10.0 → 1.11.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c3cdb2267f9db3b24c69b3bde9a7ee42637407c0
4
- data.tar.gz: ae2c5a0e62aee3b9e6c322d47a9a9d4467ea4fc1
3
+ metadata.gz: f4419ca6ab198acdec407d9fa884810a22922412
4
+ data.tar.gz: 2702cb357a1179d9be860a7c8de36688376aa117
5
5
  SHA512:
6
- metadata.gz: 8d912841c11d6e18bef66d7c99ddca0ced245430d0c86d43382d39aa5ab39d45fabd1151f87ba4c73690b28cb1be0bf6d95b6a5444f0efffee9e9165633e54fd
7
- data.tar.gz: e38849a9eb4566eb83aa3ec5d739a141350a8e594a42a6cf030c51494554a25b9678ae5777fa6075870cc7db1abbf67d8a778cc52c1331f968837d965ac01d56
6
+ metadata.gz: 0abf87e5ab7b503cdf34108d6799b87d8086c37773333a8ff35583d9e65037db969d60054f94a7109af25560cc1be067a02cb0f00bca1b4f5cc282871ba4e418
7
+ data.tar.gz: 66c2afd51b78892d73173e84ab3ea17853e53a165047016aee38a7921f94186a114f1c743154eebe13f88e291e05d121e0d11a65503dbaf1309d9902dad27595
@@ -34,6 +34,7 @@ require_relative 'aws-sdk-s3/object_acl'
34
34
  require_relative 'aws-sdk-s3/object_summary'
35
35
  require_relative 'aws-sdk-s3/object_version'
36
36
  require_relative 'aws-sdk-s3/customizations'
37
+ require_relative 'aws-sdk-s3/event_streams'
37
38
 
38
39
  # This module provides support for Amazon Simple Storage Service. This module is available in the
39
40
  # `aws-sdk-s3` gem.
@@ -62,6 +63,6 @@ require_relative 'aws-sdk-s3/customizations'
62
63
  # @service
63
64
  module Aws::S3
64
65
 
65
- GEM_VERSION = '1.10.0'
66
+ GEM_VERSION = '1.11.0'
66
67
 
67
68
  end
@@ -34,6 +34,7 @@ require 'aws-sdk-s3/plugins/sse_cpk.rb'
34
34
  require 'aws-sdk-s3/plugins/url_encoded_keys.rb'
35
35
  require 'aws-sdk-s3/plugins/s3_signer.rb'
36
36
  require 'aws-sdk-s3/plugins/bucket_name_restrictions.rb'
37
+ require 'aws-sdk-core/plugins/event_stream_configuration.rb'
37
38
 
38
39
  Aws::Plugins::GlobalConfiguration.add_identifier(:s3)
39
40
 
@@ -75,6 +76,7 @@ module Aws::S3
75
76
  add_plugin(Aws::S3::Plugins::UrlEncodedKeys)
76
77
  add_plugin(Aws::S3::Plugins::S3Signer)
77
78
  add_plugin(Aws::S3::Plugins::BucketNameRestrictions)
79
+ add_plugin(Aws::Plugins::EventStreamConfiguration)
78
80
 
79
81
  # @option options [required, Aws::CredentialProvider] :credentials
80
82
  # Your AWS credentials. This can be an instance of any one of the
@@ -133,6 +135,9 @@ module Aws::S3
133
135
  # option. You should only configure an `:endpoint` when connecting
134
136
  # to test endpoints. This should be avalid HTTP(S) URI.
135
137
  #
138
+ # @option options [Proc] :event_stream_handler
139
+ # When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
140
+ #
136
141
  # @option options [Boolean] :follow_redirects (true)
137
142
  # When `true`, this client will follow 307 redirects returned
138
143
  # by Amazon S3.
@@ -5790,6 +5795,278 @@ module Aws::S3
5790
5795
  req.send_request(options)
5791
5796
  end
5792
5797
 
5798
+ # This operation filters the contents of an Amazon S3 object based on a
5799
+ # simple Structured Query Language (SQL) statement. In the request,
5800
+ # along with the SQL expression, you must also specify a data
5801
+ # serialization format (JSON or CSV) of the object. Amazon S3 uses this
5802
+ # to parse object data into records, and returns only records that match
5803
+ # the specified SQL expression. You must also specify the data
5804
+ # serialization format for the response.
5805
+ #
5806
+ # @option params [required, String] :bucket
5807
+ # The S3 Bucket.
5808
+ #
5809
+ # @option params [required, String] :key
5810
+ # The Object Key.
5811
+ #
5812
+ # @option params [String] :sse_customer_algorithm
5813
+ # The SSE Algorithm used to encrypt the object. For more information, go
5814
+ # to [ Server-Side Encryption (Using Customer-Provided Encryption
5815
+ # Keys][1].
5816
+ #
5817
+ #
5818
+ #
5819
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
5820
+ #
5821
+ # @option params [String] :sse_customer_key
5822
+ # The SSE Customer Key. For more information, go to [ Server-Side
5823
+ # Encryption (Using Customer-Provided Encryption Keys][1].
5824
+ #
5825
+ #
5826
+ #
5827
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
5828
+ #
5829
+ # @option params [String] :sse_customer_key_md5
5830
+ # The SSE Customer Key MD5. For more information, go to [ Server-Side
5831
+ # Encryption (Using Customer-Provided Encryption Keys][1].
5832
+ #
5833
+ #
5834
+ #
5835
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
5836
+ #
5837
+ # @option params [required, String] :expression
5838
+ # The expression that is used to query the object.
5839
+ #
5840
+ # @option params [required, String] :expression_type
5841
+ # The type of the provided expression (e.g., SQL).
5842
+ #
5843
+ # @option params [Types::RequestProgress] :request_progress
5844
+ # Specifies if periodic request progress information should be enabled.
5845
+ #
5846
+ # @option params [required, Types::InputSerialization] :input_serialization
5847
+ # Describes the format of the data in the object that is being queried.
5848
+ #
5849
+ # @option params [required, Types::OutputSerialization] :output_serialization
5850
+ # Describes the format of the data that you want Amazon S3 to return in
5851
+ # response.
5852
+ #
5853
+ # @return [Types::SelectObjectContentOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5854
+ #
5855
+ # * {Types::SelectObjectContentOutput#payload #payload} => Types::SelectObjectContentEventStream
5856
+ #
5857
+ # @example EventStream Operation Example
5858
+ #
5859
+ # You can process event once it arrives immediately, or wait until
5860
+ # full response complete and iterate through eventstream enumerator.
5861
+ #
5862
+ # To interact with event immediately, you need to register #select_object_content
5863
+ # with callbacks, callbacks can be register for specifc events or for all events,
5864
+ # callback for errors in the event stream is also available for register.
5865
+ #
5866
+ # Callbacks can be passed in by `:event_stream_handler` option or within block
5867
+ # statement attached to #select_object_content call directly. Hybrid pattern of both
5868
+ # is also supported.
5869
+ #
5870
+ # `:event_stream_handler` option takes in either Proc object or
5871
+ # EventStreams::SelectObjectContentEventStream object.
5872
+ #
5873
+ # Usage pattern a): callbacks with a block attached to #select_object_content
5874
+ # Example for registering callbacks for all event types and error event
5875
+ #
5876
+ # client.select_object_content( # params input# ) do |stream|
5877
+ #
5878
+ # stream.on_error_event do |event|
5879
+ # # catch unmodeled error event in the stream
5880
+ # raise event
5881
+ # # => Aws::Errors::EventError
5882
+ # # event.event_type => :error
5883
+ # # event.error_code => String
5884
+ # # event.error_message => String
5885
+ # end
5886
+ #
5887
+ # stream.on_event do |event|
5888
+ # # process all events arrive
5889
+ # puts event.event_type
5890
+ # ...
5891
+ # end
5892
+ #
5893
+ # end
5894
+ #
5895
+ # Usage pattern b): pass in `:event_stream_handler` for #select_object_content
5896
+ #
5897
+ # 1) create a EventStreams::SelectObjectContentEventStream object
5898
+ # Example for registering callbacks with specific events
5899
+ #
5900
+ # handler = Aws::S3::EventStreams::SelectObjectContentEventStream.new
5901
+ # handler.on_records_event do |event|
5902
+ # event # => Aws::S3::Types::Records
5903
+ # end
5904
+ # handler.on_stats_event do |event|
5905
+ # event # => Aws::S3::Types::Stats
5906
+ # end
5907
+ # handler.on_progress_event do |event|
5908
+ # event # => Aws::S3::Types::Progress
5909
+ # end
5910
+ # handler.on_cont_event do |event|
5911
+ # event # => Aws::S3::Types::Cont
5912
+ # end
5913
+ # handler.on_end_event do |event|
5914
+ # event # => Aws::S3::Types::End
5915
+ # end
5916
+ #
5917
+ # client.select_object_content( # params input #, event_stream_handler: handler)
5918
+ #
5919
+ # 2) use a Ruby Proc object
5920
+ # Example for registering callbacks with specific events
5921
+ #
5922
+ # handler = Proc.new do |stream|
5923
+ # stream.on_records_event do |event|
5924
+ # event # => Aws::S3::Types::Records
5925
+ # end
5926
+ # stream.on_stats_event do |event|
5927
+ # event # => Aws::S3::Types::Stats
5928
+ # end
5929
+ # stream.on_progress_event do |event|
5930
+ # event # => Aws::S3::Types::Progress
5931
+ # end
5932
+ # stream.on_cont_event do |event|
5933
+ # event # => Aws::S3::Types::Cont
5934
+ # end
5935
+ # stream.on_end_event do |event|
5936
+ # event # => Aws::S3::Types::End
5937
+ # end
5938
+ # end
5939
+ #
5940
+ # client.select_object_content( # params input #, event_stream_handler: handler)
5941
+ #
5942
+ # Usage pattern c): hybird pattern of a) and b)
5943
+ #
5944
+ # handler = Aws::S3::EventStreams::SelectObjectContentEventStream.new
5945
+ # handler.on_records_event do |event|
5946
+ # event # => Aws::S3::Types::Records
5947
+ # end
5948
+ # handler.on_stats_event do |event|
5949
+ # event # => Aws::S3::Types::Stats
5950
+ # end
5951
+ # handler.on_progress_event do |event|
5952
+ # event # => Aws::S3::Types::Progress
5953
+ # end
5954
+ # handler.on_cont_event do |event|
5955
+ # event # => Aws::S3::Types::Cont
5956
+ # end
5957
+ # handler.on_end_event do |event|
5958
+ # event # => Aws::S3::Types::End
5959
+ # end
5960
+ #
5961
+ # client.select_object_content( # params input #, event_stream_handler: handler) do |stream|
5962
+ # stream.on_error_event do |event|
5963
+ # # catch unmodeled error event in the stream
5964
+ # raise event
5965
+ # # => Aws::Errors::EventError
5966
+ # # event.event_type => :error
5967
+ # # event.error_code => String
5968
+ # # event.error_message => String
5969
+ # end
5970
+ # end
5971
+ #
5972
+ # Besides above usage patterns for process events when they arrive immediately, you can also
5973
+ # iterate through events after response complete.
5974
+ #
5975
+ # Events are available at resp.payload # => Enumerator
5976
+ # For parameter input example, please refer to following request syntax
5977
+ #
5978
+ # @example Request syntax with placeholder values
5979
+ #
5980
+ # resp = client.select_object_content({
5981
+ # bucket: "BucketName", # required
5982
+ # key: "ObjectKey", # required
5983
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
5984
+ # sse_customer_key: "SSECustomerKey",
5985
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
5986
+ # expression: "Expression", # required
5987
+ # expression_type: "SQL", # required, accepts SQL
5988
+ # request_progress: {
5989
+ # enabled: false,
5990
+ # },
5991
+ # input_serialization: { # required
5992
+ # csv: {
5993
+ # file_header_info: "USE", # accepts USE, IGNORE, NONE
5994
+ # comments: "Comments",
5995
+ # quote_escape_character: "QuoteEscapeCharacter",
5996
+ # record_delimiter: "RecordDelimiter",
5997
+ # field_delimiter: "FieldDelimiter",
5998
+ # quote_character: "QuoteCharacter",
5999
+ # },
6000
+ # compression_type: "NONE", # accepts NONE, GZIP
6001
+ # json: {
6002
+ # type: "DOCUMENT", # accepts DOCUMENT, LINES
6003
+ # },
6004
+ # },
6005
+ # output_serialization: { # required
6006
+ # csv: {
6007
+ # quote_fields: "ALWAYS", # accepts ALWAYS, ASNEEDED
6008
+ # quote_escape_character: "QuoteEscapeCharacter",
6009
+ # record_delimiter: "RecordDelimiter",
6010
+ # field_delimiter: "FieldDelimiter",
6011
+ # quote_character: "QuoteCharacter",
6012
+ # },
6013
+ # json: {
6014
+ # record_delimiter: "RecordDelimiter",
6015
+ # },
6016
+ # },
6017
+ # })
6018
+ #
6019
+ # @example Response structure
6020
+ #
6021
+ # All events are available at resp.payload:
6022
+ # resp.payload #=> Enumerator
6023
+ # resp.payload.event_types #=> [:records, :stats, :progress, :cont, :end]
6024
+ #
6025
+ # For :records event available at #on_records_event callback and response eventstream enumerator:
6026
+ # event.payload #=> IO
6027
+ #
6028
+ # For :stats event available at #on_stats_event callback and response eventstream enumerator:
6029
+ # event.details.bytes_scanned #=> Integer
6030
+ # event.details.bytes_processed #=> Integer
6031
+ # event.details.bytes_returned #=> Integer
6032
+ #
6033
+ # For :progress event available at #on_progress_event callback and response eventstream enumerator:
6034
+ # event.details.bytes_scanned #=> Integer
6035
+ # event.details.bytes_processed #=> Integer
6036
+ # event.details.bytes_returned #=> Integer
6037
+ #
6038
+ # For :cont event available at #on_cont_event callback and response eventstream enumerator:
6039
+ # #=> EmptyStruct
6040
+ # For :end event available at #on_end_event callback and response eventstream enumerator:
6041
+ # #=> EmptyStruct
6042
+ #
6043
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent AWS API Documentation
6044
+ #
6045
+ # @overload select_object_content(params = {})
6046
+ # @param [Hash] params ({})
6047
+ def select_object_content(params = {}, options = {}, &block)
6048
+ params = params.dup
6049
+ event_stream_handler = case handler = params.delete(:event_stream_handler)
6050
+ when EventStreams::SelectObjectContentEventStream then handler
6051
+ when Proc then EventStreams::SelectObjectContentEventStream.new.tap(&handler)
6052
+ when nil then EventStreams::SelectObjectContentEventStream.new
6053
+ else
6054
+ msg = "expected :event_stream_handler to be a block or "\
6055
+ "instance of Aws::S3::EventStreams::SelectObjectContentEventStream"\
6056
+ ", got `#{handler.inspect}` instead"
6057
+ raise ArgumentError, msg
6058
+ end
6059
+
6060
+ yield(event_stream_handler) if block_given?
6061
+
6062
+ req = build_request(:select_object_content, params)
6063
+
6064
+ req.context[:event_stream_handler] = event_stream_handler
6065
+ req.handlers.add(Aws::Binary::DecodeHandler, priority: 95)
6066
+
6067
+ req.send_request(options, &block)
6068
+ end
6069
+
5793
6070
  # Uploads a part in a multipart upload.
5794
6071
  #
5795
6072
  # **Note:** After you initiate multipart upload and upload one or more
@@ -6094,7 +6371,7 @@ module Aws::S3
6094
6371
  params: params,
6095
6372
  config: config)
6096
6373
  context[:gem_name] = 'aws-sdk-s3'
6097
- context[:gem_version] = '1.10.0'
6374
+ context[:gem_version] = '1.11.0'
6098
6375
  Seahorse::Client::Request.new(handlers, context)
6099
6376
  end
6100
6377
 
@@ -79,6 +79,7 @@ module Aws::S3
79
79
  ContentMD5 = Shapes::StringShape.new(name: 'ContentMD5')
80
80
  ContentRange = Shapes::StringShape.new(name: 'ContentRange')
81
81
  ContentType = Shapes::StringShape.new(name: 'ContentType')
82
+ ContinuationEvent = Shapes::StructureShape.new(name: 'ContinuationEvent')
82
83
  CopyObjectOutput = Shapes::StructureShape.new(name: 'CopyObjectOutput')
83
84
  CopyObjectRequest = Shapes::StructureShape.new(name: 'CopyObjectRequest')
84
85
  CopyObjectResult = Shapes::StructureShape.new(name: 'CopyObjectResult')
@@ -136,6 +137,7 @@ module Aws::S3
136
137
  EncodingType = Shapes::StringShape.new(name: 'EncodingType')
137
138
  Encryption = Shapes::StructureShape.new(name: 'Encryption')
138
139
  EncryptionConfiguration = Shapes::StructureShape.new(name: 'EncryptionConfiguration')
140
+ EndEvent = Shapes::StructureShape.new(name: 'EndEvent')
139
141
  Error = Shapes::StructureShape.new(name: 'Error')
140
142
  ErrorDocument = Shapes::StructureShape.new(name: 'ErrorDocument')
141
143
  Errors = Shapes::ListShape.new(name: 'Errors', flattened: true)
@@ -343,6 +345,7 @@ module Aws::S3
343
345
  Policy = Shapes::StringShape.new(name: 'Policy')
344
346
  Prefix = Shapes::StringShape.new(name: 'Prefix')
345
347
  Progress = Shapes::StructureShape.new(name: 'Progress')
348
+ ProgressEvent = Shapes::StructureShape.new(name: 'ProgressEvent')
346
349
  Protocol = Shapes::StringShape.new(name: 'Protocol')
347
350
  PutBucketAccelerateConfigurationRequest = Shapes::StructureShape.new(name: 'PutBucketAccelerateConfigurationRequest')
348
351
  PutBucketAclRequest = Shapes::StructureShape.new(name: 'PutBucketAclRequest')
@@ -378,6 +381,7 @@ module Aws::S3
378
381
  QuoteFields = Shapes::StringShape.new(name: 'QuoteFields')
379
382
  Range = Shapes::StringShape.new(name: 'Range')
380
383
  RecordDelimiter = Shapes::StringShape.new(name: 'RecordDelimiter')
384
+ RecordsEvent = Shapes::StructureShape.new(name: 'RecordsEvent')
381
385
  Redirect = Shapes::StructureShape.new(name: 'Redirect')
382
386
  RedirectAllRequestsTo = Shapes::StructureShape.new(name: 'RedirectAllRequestsTo')
383
387
  ReplaceKeyPrefixWith = Shapes::StringShape.new(name: 'ReplaceKeyPrefixWith')
@@ -417,6 +421,9 @@ module Aws::S3
417
421
  SSEKMS = Shapes::StructureShape.new(name: 'SSEKMS')
418
422
  SSEKMSKeyId = Shapes::StringShape.new(name: 'SSEKMSKeyId')
419
423
  SSES3 = Shapes::StructureShape.new(name: 'SSES3')
424
+ SelectObjectContentEventStream = Shapes::StructureShape.new(name: 'SelectObjectContentEventStream')
425
+ SelectObjectContentOutput = Shapes::StructureShape.new(name: 'SelectObjectContentOutput')
426
+ SelectObjectContentRequest = Shapes::StructureShape.new(name: 'SelectObjectContentRequest')
420
427
  SelectParameters = Shapes::StructureShape.new(name: 'SelectParameters')
421
428
  ServerSideEncryption = Shapes::StringShape.new(name: 'ServerSideEncryption')
422
429
  ServerSideEncryptionByDefault = Shapes::StructureShape.new(name: 'ServerSideEncryptionByDefault')
@@ -429,6 +436,7 @@ module Aws::S3
429
436
  SseKmsEncryptedObjectsStatus = Shapes::StringShape.new(name: 'SseKmsEncryptedObjectsStatus')
430
437
  StartAfter = Shapes::StringShape.new(name: 'StartAfter')
431
438
  Stats = Shapes::StructureShape.new(name: 'Stats')
439
+ StatsEvent = Shapes::StructureShape.new(name: 'StatsEvent')
432
440
  StorageClass = Shapes::StringShape.new(name: 'StorageClass')
433
441
  StorageClassAnalysis = Shapes::StructureShape.new(name: 'StorageClassAnalysis')
434
442
  StorageClassAnalysisDataExport = Shapes::StructureShape.new(name: 'StorageClassAnalysisDataExport')
@@ -604,6 +612,8 @@ module Aws::S3
604
612
  Condition.add_member(:key_prefix_equals, Shapes::ShapeRef.new(shape: KeyPrefixEquals, location_name: "KeyPrefixEquals"))
605
613
  Condition.struct_class = Types::Condition
606
614
 
615
+ ContinuationEvent.struct_class = Types::ContinuationEvent
616
+
607
617
  CopyObjectOutput.add_member(:copy_object_result, Shapes::ShapeRef.new(shape: CopyObjectResult, location_name: "CopyObjectResult"))
608
618
  CopyObjectOutput.add_member(:expiration, Shapes::ShapeRef.new(shape: Expiration, location: "header", location_name: "x-amz-expiration"))
609
619
  CopyObjectOutput.add_member(:copy_source_version_id, Shapes::ShapeRef.new(shape: CopySourceVersionId, location: "header", location_name: "x-amz-copy-source-version-id"))
@@ -820,6 +830,8 @@ module Aws::S3
820
830
  EncryptionConfiguration.add_member(:replica_kms_key_id, Shapes::ShapeRef.new(shape: ReplicaKmsKeyID, location_name: "ReplicaKmsKeyID"))
821
831
  EncryptionConfiguration.struct_class = Types::EncryptionConfiguration
822
832
 
833
+ EndEvent.struct_class = Types::EndEvent
834
+
823
835
  Error.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, location_name: "Key"))
824
836
  Error.add_member(:version_id, Shapes::ShapeRef.new(shape: ObjectVersionId, location_name: "VersionId"))
825
837
  Error.add_member(:code, Shapes::ShapeRef.new(shape: Code, location_name: "Code"))
@@ -1464,6 +1476,9 @@ module Aws::S3
1464
1476
  Progress.add_member(:bytes_returned, Shapes::ShapeRef.new(shape: BytesReturned, location_name: "BytesReturned"))
1465
1477
  Progress.struct_class = Types::Progress
1466
1478
 
1479
+ ProgressEvent.add_member(:details, Shapes::ShapeRef.new(shape: Progress, eventpayload: true, eventpayload_type: 'structure', location_name: "Details", metadata: {"eventpayload"=>true}))
1480
+ ProgressEvent.struct_class = Types::ProgressEvent
1481
+
1467
1482
  PutBucketAccelerateConfigurationRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket"))
1468
1483
  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/"}}))
1469
1484
  PutBucketAccelerateConfigurationRequest.struct_class = Types::PutBucketAccelerateConfigurationRequest
@@ -1680,6 +1695,9 @@ module Aws::S3
1680
1695
 
1681
1696
  QueueConfigurationList.member = Shapes::ShapeRef.new(shape: QueueConfiguration)
1682
1697
 
1698
+ RecordsEvent.add_member(:payload, Shapes::ShapeRef.new(shape: Body, eventpayload: true, eventpayload_type: 'blob', location_name: "Payload", metadata: {"eventpayload"=>true}))
1699
+ RecordsEvent.struct_class = Types::RecordsEvent
1700
+
1683
1701
  Redirect.add_member(:host_name, Shapes::ShapeRef.new(shape: HostName, location_name: "HostName"))
1684
1702
  Redirect.add_member(:http_redirect_code, Shapes::ShapeRef.new(shape: HttpRedirectCode, location_name: "HttpRedirectCode"))
1685
1703
  Redirect.add_member(:protocol, Shapes::ShapeRef.new(shape: Protocol, location_name: "Protocol"))
@@ -1768,6 +1786,30 @@ module Aws::S3
1768
1786
 
1769
1787
  SSES3.struct_class = Types::SSES3
1770
1788
 
1789
+ SelectObjectContentEventStream.add_member(:records, Shapes::ShapeRef.new(shape: RecordsEvent, event: true, location_name: "Records"))
1790
+ SelectObjectContentEventStream.add_member(:stats, Shapes::ShapeRef.new(shape: StatsEvent, event: true, location_name: "Stats"))
1791
+ SelectObjectContentEventStream.add_member(:progress, Shapes::ShapeRef.new(shape: ProgressEvent, event: true, location_name: "Progress"))
1792
+ SelectObjectContentEventStream.add_member(:cont, Shapes::ShapeRef.new(shape: ContinuationEvent, event: true, location_name: "Cont"))
1793
+ SelectObjectContentEventStream.add_member(:end, Shapes::ShapeRef.new(shape: EndEvent, event: true, location_name: "End"))
1794
+ SelectObjectContentEventStream.struct_class = Types::SelectObjectContentEventStream
1795
+
1796
+ SelectObjectContentOutput.add_member(:payload, Shapes::ShapeRef.new(shape: SelectObjectContentEventStream, eventstream: true, location_name: "Payload"))
1797
+ SelectObjectContentOutput.struct_class = Types::SelectObjectContentOutput
1798
+ SelectObjectContentOutput[:payload] = :payload
1799
+ SelectObjectContentOutput[:payload_member] = SelectObjectContentOutput.member(:payload)
1800
+
1801
+ SelectObjectContentRequest.add_member(:bucket, Shapes::ShapeRef.new(shape: BucketName, required: true, location: "uri", location_name: "Bucket"))
1802
+ SelectObjectContentRequest.add_member(:key, Shapes::ShapeRef.new(shape: ObjectKey, required: true, location: "uri", location_name: "Key"))
1803
+ SelectObjectContentRequest.add_member(:sse_customer_algorithm, Shapes::ShapeRef.new(shape: SSECustomerAlgorithm, location: "header", location_name: "x-amz-server-side-encryption-customer-algorithm"))
1804
+ SelectObjectContentRequest.add_member(:sse_customer_key, Shapes::ShapeRef.new(shape: SSECustomerKey, location: "header", location_name: "x-amz-server-side-encryption-customer-key"))
1805
+ SelectObjectContentRequest.add_member(:sse_customer_key_md5, Shapes::ShapeRef.new(shape: SSECustomerKeyMD5, location: "header", location_name: "x-amz-server-side-encryption-customer-key-MD5"))
1806
+ SelectObjectContentRequest.add_member(:expression, Shapes::ShapeRef.new(shape: Expression, required: true, location_name: "Expression"))
1807
+ SelectObjectContentRequest.add_member(:expression_type, Shapes::ShapeRef.new(shape: ExpressionType, required: true, location_name: "ExpressionType"))
1808
+ SelectObjectContentRequest.add_member(:request_progress, Shapes::ShapeRef.new(shape: RequestProgress, location_name: "RequestProgress"))
1809
+ SelectObjectContentRequest.add_member(:input_serialization, Shapes::ShapeRef.new(shape: InputSerialization, required: true, location_name: "InputSerialization"))
1810
+ SelectObjectContentRequest.add_member(:output_serialization, Shapes::ShapeRef.new(shape: OutputSerialization, required: true, location_name: "OutputSerialization"))
1811
+ SelectObjectContentRequest.struct_class = Types::SelectObjectContentRequest
1812
+
1771
1813
  SelectParameters.add_member(:input_serialization, Shapes::ShapeRef.new(shape: InputSerialization, required: true, location_name: "InputSerialization"))
1772
1814
  SelectParameters.add_member(:expression_type, Shapes::ShapeRef.new(shape: ExpressionType, required: true, location_name: "ExpressionType"))
1773
1815
  SelectParameters.add_member(:expression, Shapes::ShapeRef.new(shape: Expression, required: true, location_name: "Expression"))
@@ -1797,6 +1839,9 @@ module Aws::S3
1797
1839
  Stats.add_member(:bytes_returned, Shapes::ShapeRef.new(shape: BytesReturned, location_name: "BytesReturned"))
1798
1840
  Stats.struct_class = Types::Stats
1799
1841
 
1842
+ StatsEvent.add_member(:details, Shapes::ShapeRef.new(shape: Stats, eventpayload: true, eventpayload_type: 'structure', location_name: "Details", metadata: {"eventpayload"=>true}))
1843
+ StatsEvent.struct_class = Types::StatsEvent
1844
+
1800
1845
  StorageClassAnalysis.add_member(:data_export, Shapes::ShapeRef.new(shape: StorageClassAnalysisDataExport, location_name: "DataExport"))
1801
1846
  StorageClassAnalysis.struct_class = Types::StorageClassAnalysis
1802
1847
 
@@ -2570,6 +2615,19 @@ module Aws::S3
2570
2615
  o.errors << Shapes::ShapeRef.new(shape: ObjectAlreadyInActiveTierError)
2571
2616
  end)
2572
2617
 
2618
+ api.add_operation(:select_object_content, Seahorse::Model::Operation.new.tap do |o|
2619
+ o.name = "SelectObjectContent"
2620
+ o.http_method = "POST"
2621
+ o.http_request_uri = "/{Bucket}/{Key+}?select&select-type=2"
2622
+ o.input = Shapes::ShapeRef.new(shape: SelectObjectContentRequest,
2623
+ location_name: "SelectObjectContentRequest",
2624
+ metadata: {
2625
+ "xmlNamespace" => {"uri"=>"http://s3.amazonaws.com/doc/2006-03-01/"}
2626
+ }
2627
+ )
2628
+ o.output = Shapes::ShapeRef.new(shape: SelectObjectContentOutput)
2629
+ end)
2630
+
2573
2631
  api.add_operation(:upload_part, Seahorse::Model::Operation.new.tap do |o|
2574
2632
  o.name = "UploadPart"
2575
2633
  o.http_method = "PUT"
@@ -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 = 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 EventEmitter
50
+ attr_reader :event_emitter
51
+
52
+ end
53
+
54
+ end
55
+ end
56
+
@@ -871,6 +871,13 @@ module Aws::S3
871
871
  include Aws::Structure
872
872
  end
873
873
 
874
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ContinuationEvent AWS API Documentation
875
+ #
876
+ class ContinuationEvent < Struct.new(
877
+ :event_type)
878
+ include Aws::Structure
879
+ end
880
+
874
881
  # @!attribute [rw] copy_object_result
875
882
  # @return [Types::CopyObjectResult]
876
883
  #
@@ -2114,6 +2121,13 @@ module Aws::S3
2114
2121
  include Aws::Structure
2115
2122
  end
2116
2123
 
2124
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/EndEvent AWS API Documentation
2125
+ #
2126
+ class EndEvent < Struct.new(
2127
+ :event_type)
2128
+ include Aws::Structure
2129
+ end
2130
+
2117
2131
  # @!attribute [rw] key
2118
2132
  # @return [String]
2119
2133
  #
@@ -5807,6 +5821,18 @@ module Aws::S3
5807
5821
  include Aws::Structure
5808
5822
  end
5809
5823
 
5824
+ # @!attribute [rw] details
5825
+ # The Progress event details.
5826
+ # @return [Types::Progress]
5827
+ #
5828
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ProgressEvent AWS API Documentation
5829
+ #
5830
+ class ProgressEvent < Struct.new(
5831
+ :details,
5832
+ :event_type)
5833
+ include Aws::Structure
5834
+ end
5835
+
5810
5836
  # @note When making an API call, you may pass PutBucketAccelerateConfigurationRequest
5811
5837
  # data as a hash:
5812
5838
  #
@@ -7209,6 +7235,18 @@ module Aws::S3
7209
7235
  include Aws::Structure
7210
7236
  end
7211
7237
 
7238
+ # @!attribute [rw] payload
7239
+ # The byte array of partial, one or more result records.
7240
+ # @return [String]
7241
+ #
7242
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RecordsEvent AWS API Documentation
7243
+ #
7244
+ class RecordsEvent < Struct.new(
7245
+ :payload,
7246
+ :event_type)
7247
+ include Aws::Structure
7248
+ end
7249
+
7212
7250
  # @note When making an API call, you may pass Redirect
7213
7251
  # data as a hash:
7214
7252
  #
@@ -7419,6 +7457,13 @@ module Aws::S3
7419
7457
  include Aws::Structure
7420
7458
  end
7421
7459
 
7460
+ # @note When making an API call, you may pass RequestProgress
7461
+ # data as a hash:
7462
+ #
7463
+ # {
7464
+ # enabled: false,
7465
+ # }
7466
+ #
7422
7467
  # @!attribute [rw] enabled
7423
7468
  # Specifies whether periodic QueryProgress frames should be sent.
7424
7469
  # Valid values: TRUE, FALSE. Default value: FALSE.
@@ -7971,6 +8016,146 @@ module Aws::S3
7971
8016
  #
7972
8017
  class SSES3 < Aws::EmptyStructure; end
7973
8018
 
8019
+ # @!attribute [rw] payload
8020
+ # @return [Types::SelectObjectContentEventStream]
8021
+ #
8022
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContentOutput AWS API Documentation
8023
+ #
8024
+ class SelectObjectContentOutput < Struct.new(
8025
+ :payload)
8026
+ include Aws::Structure
8027
+ end
8028
+
8029
+ # Request to filter the contents of an Amazon S3 object based on a
8030
+ # simple Structured Query Language (SQL) statement. In the request,
8031
+ # along with the SQL expression, you must also specify a data
8032
+ # serialization format (JSON or CSV) of the object. Amazon S3 uses this
8033
+ # to parse object data into records, and returns only records that match
8034
+ # the specified SQL expression. You must also specify the data
8035
+ # serialization format for the response. For more information, go to
8036
+ # [S3Select API Documentation][1].
8037
+ #
8038
+ #
8039
+ #
8040
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html
8041
+ #
8042
+ # @note When making an API call, you may pass SelectObjectContentRequest
8043
+ # data as a hash:
8044
+ #
8045
+ # {
8046
+ # bucket: "BucketName", # required
8047
+ # key: "ObjectKey", # required
8048
+ # sse_customer_algorithm: "SSECustomerAlgorithm",
8049
+ # sse_customer_key: "SSECustomerKey",
8050
+ # sse_customer_key_md5: "SSECustomerKeyMD5",
8051
+ # expression: "Expression", # required
8052
+ # expression_type: "SQL", # required, accepts SQL
8053
+ # request_progress: {
8054
+ # enabled: false,
8055
+ # },
8056
+ # input_serialization: { # required
8057
+ # csv: {
8058
+ # file_header_info: "USE", # accepts USE, IGNORE, NONE
8059
+ # comments: "Comments",
8060
+ # quote_escape_character: "QuoteEscapeCharacter",
8061
+ # record_delimiter: "RecordDelimiter",
8062
+ # field_delimiter: "FieldDelimiter",
8063
+ # quote_character: "QuoteCharacter",
8064
+ # },
8065
+ # compression_type: "NONE", # accepts NONE, GZIP
8066
+ # json: {
8067
+ # type: "DOCUMENT", # accepts DOCUMENT, LINES
8068
+ # },
8069
+ # },
8070
+ # output_serialization: { # required
8071
+ # csv: {
8072
+ # quote_fields: "ALWAYS", # accepts ALWAYS, ASNEEDED
8073
+ # quote_escape_character: "QuoteEscapeCharacter",
8074
+ # record_delimiter: "RecordDelimiter",
8075
+ # field_delimiter: "FieldDelimiter",
8076
+ # quote_character: "QuoteCharacter",
8077
+ # },
8078
+ # json: {
8079
+ # record_delimiter: "RecordDelimiter",
8080
+ # },
8081
+ # },
8082
+ # }
8083
+ #
8084
+ # @!attribute [rw] bucket
8085
+ # The S3 Bucket.
8086
+ # @return [String]
8087
+ #
8088
+ # @!attribute [rw] key
8089
+ # The Object Key.
8090
+ # @return [String]
8091
+ #
8092
+ # @!attribute [rw] sse_customer_algorithm
8093
+ # The SSE Algorithm used to encrypt the object. For more information,
8094
+ # go to [ Server-Side Encryption (Using Customer-Provided Encryption
8095
+ # Keys][1].
8096
+ #
8097
+ #
8098
+ #
8099
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
8100
+ # @return [String]
8101
+ #
8102
+ # @!attribute [rw] sse_customer_key
8103
+ # The SSE Customer Key. For more information, go to [ Server-Side
8104
+ # Encryption (Using Customer-Provided Encryption Keys][1].
8105
+ #
8106
+ #
8107
+ #
8108
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
8109
+ # @return [String]
8110
+ #
8111
+ # @!attribute [rw] sse_customer_key_md5
8112
+ # The SSE Customer Key MD5. For more information, go to [ Server-Side
8113
+ # Encryption (Using Customer-Provided Encryption Keys][1].
8114
+ #
8115
+ #
8116
+ #
8117
+ # [1]: https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
8118
+ # @return [String]
8119
+ #
8120
+ # @!attribute [rw] expression
8121
+ # The expression that is used to query the object.
8122
+ # @return [String]
8123
+ #
8124
+ # @!attribute [rw] expression_type
8125
+ # The type of the provided expression (e.g., SQL).
8126
+ # @return [String]
8127
+ #
8128
+ # @!attribute [rw] request_progress
8129
+ # Specifies if periodic request progress information should be
8130
+ # enabled.
8131
+ # @return [Types::RequestProgress]
8132
+ #
8133
+ # @!attribute [rw] input_serialization
8134
+ # Describes the format of the data in the object that is being
8135
+ # queried.
8136
+ # @return [Types::InputSerialization]
8137
+ #
8138
+ # @!attribute [rw] output_serialization
8139
+ # Describes the format of the data that you want Amazon S3 to return
8140
+ # in response.
8141
+ # @return [Types::OutputSerialization]
8142
+ #
8143
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContentRequest AWS API Documentation
8144
+ #
8145
+ class SelectObjectContentRequest < Struct.new(
8146
+ :bucket,
8147
+ :key,
8148
+ :sse_customer_algorithm,
8149
+ :sse_customer_key,
8150
+ :sse_customer_key_md5,
8151
+ :expression,
8152
+ :expression_type,
8153
+ :request_progress,
8154
+ :input_serialization,
8155
+ :output_serialization)
8156
+ include Aws::Structure
8157
+ end
8158
+
7974
8159
  # Describes the parameters for Select job types.
7975
8160
  #
7976
8161
  # @note When making an API call, you may pass SelectParameters
@@ -8184,6 +8369,18 @@ module Aws::S3
8184
8369
  include Aws::Structure
8185
8370
  end
8186
8371
 
8372
+ # @!attribute [rw] details
8373
+ # The Stats event details.
8374
+ # @return [Types::Stats]
8375
+ #
8376
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/StatsEvent AWS API Documentation
8377
+ #
8378
+ class StatsEvent < Struct.new(
8379
+ :details,
8380
+ :event_type)
8381
+ include Aws::Structure
8382
+ end
8383
+
8187
8384
  # @note When making an API call, you may pass StorageClassAnalysis
8188
8385
  # data as a hash:
8189
8386
  #
@@ -8854,5 +9051,24 @@ module Aws::S3
8854
9051
  include Aws::Structure
8855
9052
  end
8856
9053
 
9054
+ # EventStream is an Enumerator of Events.
9055
+ # #event_types #=> Array, returns all modeled event types in the stream
9056
+ #
9057
+ # @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContentEventStream AWS API Documentation
9058
+ #
9059
+ class SelectObjectContentEventStream < Enumerator
9060
+
9061
+ def event_types
9062
+ [
9063
+ :records,
9064
+ :stats,
9065
+ :progress,
9066
+ :cont,
9067
+ :end
9068
+ ]
9069
+ end
9070
+
9071
+ end
9072
+
8857
9073
  end
8858
9074
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-07 00:00:00.000000000 Z
11
+ date: 2018-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-kms
@@ -45,6 +45,9 @@ dependencies:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 3.21.0
48
51
  type: :runtime
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -52,6 +55,9 @@ dependencies:
52
55
  - - "~>"
53
56
  - !ruby/object:Gem::Version
54
57
  version: '3'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 3.21.0
55
61
  description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
56
62
  This gem is part of the AWS SDK for Ruby.
57
63
  email:
@@ -97,6 +103,7 @@ files:
97
103
  - lib/aws-sdk-s3/encryption/materials.rb
98
104
  - lib/aws-sdk-s3/encryption/utils.rb
99
105
  - lib/aws-sdk-s3/errors.rb
106
+ - lib/aws-sdk-s3/event_streams.rb
100
107
  - lib/aws-sdk-s3/file_downloader.rb
101
108
  - lib/aws-sdk-s3/file_part.rb
102
109
  - lib/aws-sdk-s3/file_uploader.rb