import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint"; import { Command as $Command } from "@aws-sdk/smithy-client"; import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types"; import { SelectObjectContentOutput, SelectObjectContentRequest } from "../models/models_1"; import { S3ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3Client"; /** * @public * * The input for {@link SelectObjectContentCommand}. */ export interface SelectObjectContentCommandInput extends SelectObjectContentRequest { } /** * @public * * The output of {@link SelectObjectContentCommand}. */ export interface SelectObjectContentCommandOutput extends SelectObjectContentOutput, __MetadataBearer { } /** * @public *

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.

*

For more information about using SQL with Amazon S3 Select, see SQL Reference for Amazon S3 Select * and S3 Glacier Select 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:

* *

* 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.

* *

*

* Special Errors *

*

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

*

* Related Resources *

* * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { S3Client, SelectObjectContentCommand } from "@aws-sdk/client-s3"; // ES Modules import * // const { S3Client, SelectObjectContentCommand } = require("@aws-sdk/client-s3"); // CommonJS import * const client = new S3Client(config); * const input = { // SelectObjectContentRequest * Bucket: "STRING_VALUE", // required * Key: "STRING_VALUE", // required * SSECustomerAlgorithm: "STRING_VALUE", * SSECustomerKey: "STRING_VALUE", * SSECustomerKeyMD5: "STRING_VALUE", * Expression: "STRING_VALUE", // required * ExpressionType: "SQL", // required * RequestProgress: { // RequestProgress * Enabled: true || false, * }, * InputSerialization: { // InputSerialization * CSV: { // CSVInput * FileHeaderInfo: "USE" || "IGNORE" || "NONE", * Comments: "STRING_VALUE", * QuoteEscapeCharacter: "STRING_VALUE", * RecordDelimiter: "STRING_VALUE", * FieldDelimiter: "STRING_VALUE", * QuoteCharacter: "STRING_VALUE", * AllowQuotedRecordDelimiter: true || false, * }, * CompressionType: "NONE" || "GZIP" || "BZIP2", * JSON: { // JSONInput * Type: "DOCUMENT" || "LINES", * }, * Parquet: {}, * }, * OutputSerialization: { // OutputSerialization * CSV: { // CSVOutput * QuoteFields: "ALWAYS" || "ASNEEDED", * QuoteEscapeCharacter: "STRING_VALUE", * RecordDelimiter: "STRING_VALUE", * FieldDelimiter: "STRING_VALUE", * QuoteCharacter: "STRING_VALUE", * }, * JSON: { // JSONOutput * RecordDelimiter: "STRING_VALUE", * }, * }, * ScanRange: { // ScanRange * Start: Number("long"), * End: Number("long"), * }, * ExpectedBucketOwner: "STRING_VALUE", * }; * const command = new SelectObjectContentCommand(input); * const response = await client.send(command); * ``` * * @param SelectObjectContentCommandInput - {@link SelectObjectContentCommandInput} * @returns {@link SelectObjectContentCommandOutput} * @see {@link SelectObjectContentCommandInput} for command's `input` shape. * @see {@link SelectObjectContentCommandOutput} for command's `response` shape. * @see {@link S3ClientResolvedConfig | config} for S3Client's `config` shape. * * */ export declare class SelectObjectContentCommand extends $Command { readonly input: SelectObjectContentCommandInput; static getEndpointParameterInstructions(): EndpointParameterInstructions; /** * @public */ constructor(input: SelectObjectContentCommandInput); /** * @internal */ resolveMiddleware(clientStack: MiddlewareStack, configuration: S3ClientResolvedConfig, options?: __HttpHandlerOptions): Handler; /** * @internal */ private serialize; /** * @internal */ private deserialize; }