Class: Aws::S3::Types::SelectObjectContentRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb

Overview

Note:

When making an API call, you may pass SelectObjectContentRequest data as a hash:

{
  bucket: "BucketName", # required
  key: "ObjectKey", # required
  sse_customer_algorithm: "SSECustomerAlgorithm",
  sse_customer_key: "SSECustomerKey",
  sse_customer_key_md5: "SSECustomerKeyMD5",
  expression: "Expression", # required
  expression_type: "SQL", # required, accepts SQL
  request_progress: {
    enabled: false,
  },
  input_serialization: { # required
    csv: {
      file_header_info: "USE", # accepts USE, IGNORE, NONE
      comments: "Comments",
      quote_escape_character: "QuoteEscapeCharacter",
      record_delimiter: "RecordDelimiter",
      field_delimiter: "FieldDelimiter",
      quote_character: "QuoteCharacter",
      allow_quoted_record_delimiter: false,
    },
    compression_type: "NONE", # accepts NONE, GZIP, BZIP2
    json: {
      type: "DOCUMENT", # accepts DOCUMENT, LINES
    },
    parquet: {
    },
  },
  output_serialization: { # required
    csv: {
      quote_fields: "ALWAYS", # accepts ALWAYS, ASNEEDED
      quote_escape_character: "QuoteEscapeCharacter",
      record_delimiter: "RecordDelimiter",
      field_delimiter: "FieldDelimiter",
      quote_character: "QuoteCharacter",
    },
    json: {
      record_delimiter: "RecordDelimiter",
    },
  },
  scan_range: {
    start: 1,
    end: 1,
  },
  expected_bucket_owner: "AccountId",
}

Request to filter the contents of an Amazon S3 object based on a simple Structured Query Language (SQL) statement. In the request, along with the SQL expression, you must specify a data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data into records. It returns only records that match the specified SQL expression. You must also specify the data serialization format for the response. For more information, see S3Select API Documentation.

Constant Summary collapse

SENSITIVE =
[:sse_customer_key]

Instance Attribute Summary collapse

Instance Attribute Details

#bucketString

The S3 bucket.

Returns:

  • (String)


12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end

#expected_bucket_ownerString

The account id of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Returns:

  • (String)


12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end

#expressionString

The expression that is used to query the object.

Returns:

  • (String)


12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end

#expression_typeString

The type of the provided expression (for example, SQL).

Returns:

  • (String)


12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end

#input_serializationTypes::InputSerialization

Describes the format of the data in the object that is being queried.



12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end

#keyString

The object key.

Returns:

  • (String)


12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end

#output_serializationTypes::OutputSerialization

Describes the format of the data that you want Amazon S3 to return in response.



12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end

#request_progressTypes::RequestProgress

Specifies if periodic request progress information should be enabled.



12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end

#scan_rangeTypes::ScanRange

Specifies the byte range of the object to get the records from. A record is processed when its first byte is contained by the range. This parameter is optional, but when specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the start and end of the range.

ScanRangemay be used in the following ways:

  • <scanrange><start>50</start><end>100</end></scanrange> - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)

  • <scanrange><start>50</start></scanrange> - process only the records starting after the byte 50

  • <scanrange><end>50</end></scanrange> - process only the records within the last 50 bytes of the file.

Returns:



12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end

#sse_customer_algorithmString

The SSE Algorithm used to encrypt the object. For more information, see Server-Side Encryption (Using Customer-Provided Encryption Keys.

Returns:

  • (String)


12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end

#sse_customer_keyString

The SSE Customer Key. For more information, see Server-Side Encryption (Using Customer-Provided Encryption Keys.

Returns:

  • (String)


12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end

#sse_customer_key_md5String

The SSE Customer Key MD5. For more information, see Server-Side Encryption (Using Customer-Provided Encryption Keys.

Returns:

  • (String)


12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
# File 'gems/aws-sdk-s3/lib/aws-sdk-s3/types.rb', line 12823

class SelectObjectContentRequest < Struct.new(
  :bucket,
  :key,
  :sse_customer_algorithm,
  :sse_customer_key,
  :sse_customer_key_md5,
  :expression,
  :expression_type,
  :request_progress,
  :input_serialization,
  :output_serialization,
  :scan_range,
  :expected_bucket_owner)
  SENSITIVE = [:sse_customer_key]
  include Aws::Structure
end