pub struct SelectObjectContentFluentBuilder { /* private fields */ }
Expand description

Fluent builder constructing a request to SelectObjectContent.

This action filters 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 also specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse object data into records, and returns only records that match the specified SQL expression. You must also specify the data serialization format for the response.

This action is not supported by Amazon S3 on Outposts.

For more information about Amazon S3 Select, see Selecting Content from Objects and SELECT Command in the Amazon S3 User Guide.

Permissions

You must have s3:GetObject permission for this operation. Amazon S3 Select does not support anonymous access. For more information about permissions, see Specifying Permissions in a Policy in the Amazon S3 User Guide.

Object Data Formats

You can use Amazon S3 Select to query objects that have the following format properties:

  • CSV, JSON, and Parquet - Objects must be in CSV, JSON, or Parquet format.

  • UTF-8 - UTF-8 is the only encoding type Amazon S3 Select supports.

  • GZIP or BZIP2 - CSV and JSON files can be compressed using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support whole-object compression for Parquet objects.

  • Server-side encryption - Amazon S3 Select supports querying objects that are protected with server-side encryption.

    For objects that are encrypted with customer-provided encryption keys (SSE-C), you must use HTTPS, and you must use the headers that are documented in the GetObject. For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) in the Amazon S3 User Guide.

    For objects that are encrypted with Amazon S3 managed keys (SSE-S3) and Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently, so you don't need to specify anything. For more information about server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the Amazon S3 User Guide.

Working with the Response Body

Given the response size is unknown, Amazon S3 Select streams the response as a series of messages and includes a Transfer-Encoding header with chunked as its value in the response. For more information, see Appendix: SelectObjectContent Response.

GetObject Support

The SelectObjectContent action does not support the following GetObject functionality. For more information, see GetObject.

  • Range: Although you can specify a scan range for an Amazon S3 Select request (see SelectObjectContentRequest - ScanRange in the request parameters), you cannot specify the range of bytes of an object to return.

  • The GLACIER, DEEP_ARCHIVE, and REDUCED_REDUNDANCY storage classes, or the ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS access tiers of the INTELLIGENT_TIERING storage class: You cannot query objects in the GLACIER, DEEP_ARCHIVE, or REDUCED_REDUNDANCY storage classes, nor objects in the ARCHIVE_ACCESS or DEEP_ARCHIVE_ACCESS access tiers of the INTELLIGENT_TIERING storage class. For more information about storage classes, see Using Amazon S3 storage classes in the Amazon S3 User Guide.

Special Errors

For a list of special errors for this operation, see List of SELECT Object Content Error Codes

The following operations are related to SelectObjectContent:

Implementations§

§

impl SelectObjectContentFluentBuilder

pub fn as_input(&self) -> &SelectObjectContentInputBuilder

Access the SelectObjectContent as a reference.

pub async fn send( self ) -> impl Future<Output = Result<SelectObjectContentOutput, SdkError<SelectObjectContentError, Response<SdkBody>>>>

Sends the request and returns the response.

If an error occurs, an SdkError will be returned with additional details that can be matched against.

By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.

pub async fn customize( self ) -> impl Future<Output = Result<CustomizableOperation<SelectObjectContentOutput, SelectObjectContentError, SelectObjectContentFluentBuilder>, SdkError<SelectObjectContentError, Response>>>

Consumes this builder, creating a customizable operation that can be modified before being sent.

pub fn bucket( self, input: impl Into<String> ) -> SelectObjectContentFluentBuilder

The S3 bucket.

pub fn set_bucket( self, input: Option<String> ) -> SelectObjectContentFluentBuilder

The S3 bucket.

pub fn get_bucket(&self) -> &Option<String>

The S3 bucket.

pub fn key(self, input: impl Into<String>) -> SelectObjectContentFluentBuilder

The object key.

pub fn set_key(self, input: Option<String>) -> SelectObjectContentFluentBuilder

The object key.

pub fn get_key(&self) -> &Option<String>

The object key.

pub fn sse_customer_algorithm( self, input: impl Into<String> ) -> SelectObjectContentFluentBuilder

The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

pub fn set_sse_customer_algorithm( self, input: Option<String> ) -> SelectObjectContentFluentBuilder

The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

pub fn get_sse_customer_algorithm(&self) -> &Option<String>

The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

pub fn sse_customer_key( self, input: impl Into<String> ) -> SelectObjectContentFluentBuilder

The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

pub fn set_sse_customer_key( self, input: Option<String> ) -> SelectObjectContentFluentBuilder

The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

pub fn get_sse_customer_key(&self) -> &Option<String>

The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

pub fn sse_customer_key_md5( self, input: impl Into<String> ) -> SelectObjectContentFluentBuilder

The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

pub fn set_sse_customer_key_md5( self, input: Option<String> ) -> SelectObjectContentFluentBuilder

The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

pub fn get_sse_customer_key_md5(&self) -> &Option<String>

The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. For more information, see Protecting data using SSE-C keys in the Amazon S3 User Guide.

pub fn expression( self, input: impl Into<String> ) -> SelectObjectContentFluentBuilder

The expression that is used to query the object.

pub fn set_expression( self, input: Option<String> ) -> SelectObjectContentFluentBuilder

The expression that is used to query the object.

pub fn get_expression(&self) -> &Option<String>

The expression that is used to query the object.

pub fn expression_type( self, input: ExpressionType ) -> SelectObjectContentFluentBuilder

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

pub fn set_expression_type( self, input: Option<ExpressionType> ) -> SelectObjectContentFluentBuilder

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

pub fn get_expression_type(&self) -> &Option<ExpressionType>

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

pub fn request_progress( self, input: RequestProgress ) -> SelectObjectContentFluentBuilder

Specifies if periodic request progress information should be enabled.

pub fn set_request_progress( self, input: Option<RequestProgress> ) -> SelectObjectContentFluentBuilder

Specifies if periodic request progress information should be enabled.

pub fn get_request_progress(&self) -> &Option<RequestProgress>

Specifies if periodic request progress information should be enabled.

pub fn input_serialization( self, input: InputSerialization ) -> SelectObjectContentFluentBuilder

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

pub fn set_input_serialization( self, input: Option<InputSerialization> ) -> SelectObjectContentFluentBuilder

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

pub fn get_input_serialization(&self) -> &Option<InputSerialization>

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

pub fn output_serialization( self, input: OutputSerialization ) -> SelectObjectContentFluentBuilder

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

pub fn set_output_serialization( self, input: Option<OutputSerialization> ) -> SelectObjectContentFluentBuilder

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

pub fn get_output_serialization(&self) -> &Option<OutputSerialization>

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

pub fn scan_range(self, input: ScanRange) -> SelectObjectContentFluentBuilder

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:

  • 50 100 - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)

  • 50 - process only the records starting after the byte 50

  • 50 - process only the records within the last 50 bytes of the file.

pub fn set_scan_range( self, input: Option<ScanRange> ) -> SelectObjectContentFluentBuilder

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:

  • 50 100 - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)

  • 50 - process only the records starting after the byte 50

  • 50 - process only the records within the last 50 bytes of the file.

pub fn get_scan_range(&self) -> &Option<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:

  • 50 100 - process only the records starting between the bytes 50 and 100 (inclusive, counting from zero)

  • 50 - process only the records starting after the byte 50

  • 50 - process only the records within the last 50 bytes of the file.

pub fn expected_bucket_owner( self, input: impl Into<String> ) -> SelectObjectContentFluentBuilder

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

pub fn set_expected_bucket_owner( self, input: Option<String> ) -> SelectObjectContentFluentBuilder

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

pub fn get_expected_bucket_owner(&self) -> &Option<String>

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied).

Trait Implementations§

§

impl Clone for SelectObjectContentFluentBuilder

§

fn clone(&self) -> SelectObjectContentFluentBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for SelectObjectContentFluentBuilder

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32 ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more