Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Runs the SQL query statements contained in the Query
. Requires you to
have access to the workgroup in which the query ran. Running queries
against an external catalog requires GetDataCatalog permission to the
catalog. For code samples using the Amazon Web Services SDK for Java,
see
Examples and Code Samples
in the Amazon Athena User Guide.
Synopsis
- data StartQueryExecution = StartQueryExecution' {}
- newStartQueryExecution :: Text -> StartQueryExecution
- startQueryExecution_queryExecutionContext :: Lens' StartQueryExecution (Maybe QueryExecutionContext)
- startQueryExecution_resultConfiguration :: Lens' StartQueryExecution (Maybe ResultConfiguration)
- startQueryExecution_clientRequestToken :: Lens' StartQueryExecution (Maybe Text)
- startQueryExecution_workGroup :: Lens' StartQueryExecution (Maybe Text)
- startQueryExecution_queryString :: Lens' StartQueryExecution Text
- data StartQueryExecutionResponse = StartQueryExecutionResponse' {}
- newStartQueryExecutionResponse :: Int -> StartQueryExecutionResponse
- startQueryExecutionResponse_queryExecutionId :: Lens' StartQueryExecutionResponse (Maybe Text)
- startQueryExecutionResponse_httpStatus :: Lens' StartQueryExecutionResponse Int
Creating a Request
data StartQueryExecution Source #
See: newStartQueryExecution
smart constructor.
StartQueryExecution' | |
|
Instances
newStartQueryExecution Source #
Create a value of StartQueryExecution
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:queryExecutionContext:StartQueryExecution'
, startQueryExecution_queryExecutionContext
- The database within which the query executes.
$sel:resultConfiguration:StartQueryExecution'
, startQueryExecution_resultConfiguration
- Specifies information about where and how to save the results of the
query execution. If the query runs in a workgroup, then workgroup's
settings may override query settings. This affects the query results
location. The workgroup settings override is specified in
EnforceWorkGroupConfiguration (true/false) in the
WorkGroupConfiguration. See
WorkGroupConfiguration$EnforceWorkGroupConfiguration.
$sel:clientRequestToken:StartQueryExecution'
, startQueryExecution_clientRequestToken
- A unique case-sensitive string used to ensure the request to create the
query is idempotent (executes only once). If another
StartQueryExecution
request is received, the same response is returned
and another query is not created. If a parameter has changed, for
example, the QueryString
, an error is returned.
This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
$sel:workGroup:StartQueryExecution'
, startQueryExecution_workGroup
- The name of the workgroup in which the query is being started.
$sel:queryString:StartQueryExecution'
, startQueryExecution_queryString
- The SQL query statements to be executed.
Request Lenses
startQueryExecution_queryExecutionContext :: Lens' StartQueryExecution (Maybe QueryExecutionContext) Source #
The database within which the query executes.
startQueryExecution_resultConfiguration :: Lens' StartQueryExecution (Maybe ResultConfiguration) Source #
Specifies information about where and how to save the results of the query execution. If the query runs in a workgroup, then workgroup's settings may override query settings. This affects the query results location. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.
startQueryExecution_clientRequestToken :: Lens' StartQueryExecution (Maybe Text) Source #
A unique case-sensitive string used to ensure the request to create the
query is idempotent (executes only once). If another
StartQueryExecution
request is received, the same response is returned
and another query is not created. If a parameter has changed, for
example, the QueryString
, an error is returned.
This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.
startQueryExecution_workGroup :: Lens' StartQueryExecution (Maybe Text) Source #
The name of the workgroup in which the query is being started.
startQueryExecution_queryString :: Lens' StartQueryExecution Text Source #
The SQL query statements to be executed.
Destructuring the Response
data StartQueryExecutionResponse Source #
See: newStartQueryExecutionResponse
smart constructor.
StartQueryExecutionResponse' | |
|
Instances
newStartQueryExecutionResponse Source #
Create a value of StartQueryExecutionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:queryExecutionId:StartQueryExecutionResponse'
, startQueryExecutionResponse_queryExecutionId
- The unique ID of the query that ran as a result of this request.
$sel:httpStatus:StartQueryExecutionResponse'
, startQueryExecutionResponse_httpStatus
- The response's http status code.
Response Lenses
startQueryExecutionResponse_queryExecutionId :: Lens' StartQueryExecutionResponse (Maybe Text) Source #
The unique ID of the query that ran as a result of this request.
startQueryExecutionResponse_httpStatus :: Lens' StartQueryExecutionResponse Int Source #
The response's http status code.