Class: AWS.Athena
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.Athena
- Identifier:
- athena
- API Version:
- 2017-05-18
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
Amazon Athena is an interactive query service that lets you use standard SQL to analyze data directly in Amazon S3. You can point Athena at your data in Amazon S3 and run ad-hoc queries and get results in seconds. Athena is serverless, so there is no infrastructure to set up or manage. You pay only for the queries you run. Athena scales automatically—executing queries in parallel—so results are fast, even with large datasets and complex queries. For more information, see What is Amazon Athena in the Amazon Athena User Guide.
If you connect to Athena using the JDBC driver, use version 1.1.0 of the driver or later with the Amazon Athena API. Earlier version drivers do not support the API. For more information and to download the driver, see Accessing Amazon Athena with JDBC.
Sending a Request Using Athena
var athena = new AWS.Athena();
athena.batchGetNamedQuery(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the Athena object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var athena = new AWS.Athena({apiVersion: '2017-05-18'});
You can also set the API version globally in AWS.config.apiVersions
using
the athena service identifier:
AWS.config.apiVersions = {
athena: '2017-05-18',
// other service API versions
};
var athena = new AWS.Athena();
Version:
-
2017-05-18
Constructor Summary collapse
-
new AWS.Athena(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
batchGetNamedQuery(params = {}, callback) ⇒ AWS.Request
Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings.
-
batchGetPreparedStatement(params = {}, callback) ⇒ AWS.Request
Returns the details of a single prepared statement or a list of up to 256 prepared statements for the array of prepared statement names that you provide.
-
batchGetQueryExecution(params = {}, callback) ⇒ AWS.Request
Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings.
-
cancelCapacityReservation(params = {}, callback) ⇒ AWS.Request
Cancels the capacity reservation with the specified name.
-
createCapacityReservation(params = {}, callback) ⇒ AWS.Request
Creates a capacity reservation with the specified name and number of requested data processing units.
.
-
createDataCatalog(params = {}, callback) ⇒ AWS.Request
Creates (registers) a data catalog with the specified name and properties.
-
createNamedQuery(params = {}, callback) ⇒ AWS.Request
Creates a named query in the specified workgroup.
-
createNotebook(params = {}, callback) ⇒ AWS.Request
Creates an empty
ipynb
file in the specified Apache Spark enabled workgroup. -
createPreparedStatement(params = {}, callback) ⇒ AWS.Request
Creates a prepared statement for use with SQL queries in Athena.
.
-
createPresignedNotebookUrl(params = {}, callback) ⇒ AWS.Request
Gets an authentication token and the URL at which the notebook can be accessed.
-
createWorkGroup(params = {}, callback) ⇒ AWS.Request
Creates a workgroup with the specified name.
-
deleteCapacityReservation(params = {}, callback) ⇒ AWS.Request
Deletes a cancelled capacity reservation.
-
deleteDataCatalog(params = {}, callback) ⇒ AWS.Request
Deletes a data catalog.
.
-
deleteNamedQuery(params = {}, callback) ⇒ AWS.Request
Deletes the named query if you have access to the workgroup in which the query was saved.
.
-
deleteNotebook(params = {}, callback) ⇒ AWS.Request
Deletes the specified notebook.
.
-
deletePreparedStatement(params = {}, callback) ⇒ AWS.Request
Deletes the prepared statement with the specified name from the specified workgroup.
.
-
deleteWorkGroup(params = {}, callback) ⇒ AWS.Request
Deletes the workgroup with the specified name.
-
exportNotebook(params = {}, callback) ⇒ AWS.Request
Exports the specified notebook and its metadata.
.
-
getCalculationExecution(params = {}, callback) ⇒ AWS.Request
Describes a previously submitted calculation execution.
.
-
getCalculationExecutionCode(params = {}, callback) ⇒ AWS.Request
Retrieves the unencrypted code that was executed for the calculation.
.
-
getCalculationExecutionStatus(params = {}, callback) ⇒ AWS.Request
Gets the status of a current calculation.
.
-
getCapacityAssignmentConfiguration(params = {}, callback) ⇒ AWS.Request
Gets the capacity assignment configuration for a capacity reservation, if one exists.
.
-
getCapacityReservation(params = {}, callback) ⇒ AWS.Request
Returns information about the capacity reservation with the specified name.
.
-
getDatabase(params = {}, callback) ⇒ AWS.Request
Returns a database object for the specified database and data catalog.
.
-
getDataCatalog(params = {}, callback) ⇒ AWS.Request
Returns the specified data catalog.
.
-
getNamedQuery(params = {}, callback) ⇒ AWS.Request
Returns information about a single query.
-
getNotebookMetadata(params = {}, callback) ⇒ AWS.Request
Retrieves notebook metadata for the specified notebook ID.
.
-
getPreparedStatement(params = {}, callback) ⇒ AWS.Request
Retrieves the prepared statement with the specified name from the specified workgroup.
.
-
getQueryExecution(params = {}, callback) ⇒ AWS.Request
Returns information about a single execution of a query if you have access to the workgroup in which the query ran.
-
getQueryResults(params = {}, callback) ⇒ AWS.Request
Streams the results of a single query execution specified by
QueryExecutionId
from the Athena query results location in Amazon S3. -
getQueryRuntimeStatistics(params = {}, callback) ⇒ AWS.Request
Returns query execution runtime statistics related to a single execution of a query if you have access to the workgroup in which the query ran.
-
getSession(params = {}, callback) ⇒ AWS.Request
Gets the full details of a previously created session, including the session status and configuration.
.
-
getSessionStatus(params = {}, callback) ⇒ AWS.Request
Gets the current status of a session.
.
-
getTableMetadata(params = {}, callback) ⇒ AWS.Request
Returns table metadata for the specified catalog, database, and table.
.
-
getWorkGroup(params = {}, callback) ⇒ AWS.Request
Returns information about the workgroup with the specified name.
.
-
importNotebook(params = {}, callback) ⇒ AWS.Request
Imports a single
ipynb
file to a Spark enabled workgroup. -
listApplicationDPUSizes(params = {}, callback) ⇒ AWS.Request
Returns the supported DPU sizes for the supported application runtimes (for example,
Athena notebook version 1
). -
listCalculationExecutions(params = {}, callback) ⇒ AWS.Request
Lists the calculations that have been submitted to a session in descending order.
-
listCapacityReservations(params = {}, callback) ⇒ AWS.Request
Lists the capacity reservations for the current account.
.
-
listDatabases(params = {}, callback) ⇒ AWS.Request
Lists the databases in the specified data catalog.
.
-
listDataCatalogs(params = {}, callback) ⇒ AWS.Request
Lists the data catalogs in the current Amazon Web Services account.
Note: In the Athena console, data catalogs are listed as "data sources" on the Data sources page under the Data source name column.- listEngineVersions(params = {}, callback) ⇒ AWS.Request
Returns a list of engine versions that are available to choose from, including the Auto option.
.
- listExecutors(params = {}, callback) ⇒ AWS.Request
Lists, in descending order, the executors that joined a session.
- listNamedQueries(params = {}, callback) ⇒ AWS.Request
Provides a list of available query IDs only for queries saved in the specified workgroup.
- listNotebookMetadata(params = {}, callback) ⇒ AWS.Request
Displays the notebook files for the specified workgroup in paginated format.
.
- listNotebookSessions(params = {}, callback) ⇒ AWS.Request
Lists, in descending order, the sessions that have been created in a notebook that are in an active state like
CREATING
,CREATED
,IDLE
orBUSY
.- listPreparedStatements(params = {}, callback) ⇒ AWS.Request
Lists the prepared statements in the specified workgroup.
.
- listQueryExecutions(params = {}, callback) ⇒ AWS.Request
Provides a list of available query execution IDs for the queries in the specified workgroup.
- listSessions(params = {}, callback) ⇒ AWS.Request
Lists the sessions in a workgroup that are in an active state like
CREATING
,CREATED
,IDLE
, orBUSY
.- listTableMetadata(params = {}, callback) ⇒ AWS.Request
Lists the metadata for the tables in the specified data catalog database.
.
- listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists the tags associated with an Athena resource.
.
- listWorkGroups(params = {}, callback) ⇒ AWS.Request
Lists available workgroups for the account.
.
- putCapacityAssignmentConfiguration(params = {}, callback) ⇒ AWS.Request
Puts a new capacity assignment configuration for a specified capacity reservation.
- startCalculationExecution(params = {}, callback) ⇒ AWS.Request
Submits calculations for execution within a session.
- startQueryExecution(params = {}, callback) ⇒ AWS.Request
Runs the SQL query statements contained in the
Query
.- startSession(params = {}, callback) ⇒ AWS.Request
Creates a session for running calculations within a workgroup.
- stopCalculationExecution(params = {}, callback) ⇒ AWS.Request
Requests the cancellation of a calculation.
- stopQueryExecution(params = {}, callback) ⇒ AWS.Request
Stops a query execution.
- tagResource(params = {}, callback) ⇒ AWS.Request
Adds one or more tags to an Athena resource.
- terminateSession(params = {}, callback) ⇒ AWS.Request
Terminates an active session.
- untagResource(params = {}, callback) ⇒ AWS.Request
Removes one or more tags from an Athena resource.
.
- updateCapacityReservation(params = {}, callback) ⇒ AWS.Request
Updates the number of requested data processing units for the capacity reservation with the specified name.
.
- updateDataCatalog(params = {}, callback) ⇒ AWS.Request
Updates the data catalog that has the specified name.
.
- updateNamedQuery(params = {}, callback) ⇒ AWS.Request
Updates a NamedQuery object.
- updateNotebook(params = {}, callback) ⇒ AWS.Request
Updates the contents of a Spark notebook.
.
- updateNotebookMetadata(params = {}, callback) ⇒ AWS.Request
Updates the metadata for a notebook.
.
- updatePreparedStatement(params = {}, callback) ⇒ AWS.Request
Updates a prepared statement.
.
- updateWorkGroup(params = {}, callback) ⇒ AWS.Request
Updates the workgroup with the specified name.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.Athena(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Examples:
Constructing a Athena object
var athena = new AWS.Athena({apiVersion: '2017-05-18'});
Options Hash (options):
-
params
(map)
—
An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.
-
endpoint
(String|AWS.Endpoint)
—
The endpoint URI to send requests to. The default endpoint is built from the configured
region
. The endpoint should be a string like'https://{service}.{region}.amazonaws.com'
or an Endpoint object. -
accessKeyId
(String)
—
your AWS access key ID.
-
secretAccessKey
(String)
—
your AWS secret access key.
-
sessionToken
(AWS.Credentials)
—
the optional AWS session token to sign requests with.
-
credentials
(AWS.Credentials)
—
the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.
-
credentialProvider
(AWS.CredentialProviderChain)
—
the provider chain used to resolve credentials if no static
credentials
property is set. -
region
(String)
—
the region to send service requests to. See AWS.Athena.region for more information.
-
maxRetries
(Integer)
—
the maximum amount of retries to attempt with a request. See AWS.Athena.maxRetries for more information.
-
maxRedirects
(Integer)
—
the maximum amount of redirects to follow with a request. See AWS.Athena.maxRedirects for more information.
-
sslEnabled
(Boolean)
—
whether to enable SSL for requests.
-
paramValidation
(Boolean|map)
—
whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
true
. - max [Boolean] — Validates that a value meets the max constraint.
- pattern [Boolean] — Validates that a string value matches a regular expression.
- enum [Boolean] — Validates that a string value matches one of the allowable enum values.
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
-
computeChecksums
(Boolean)
—
whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)
-
convertResponseTypes
(Boolean)
—
whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to
true
. -
correctClockSkew
(Boolean)
—
whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to
false
. -
s3ForcePathStyle
(Boolean)
—
whether to force path style URLs for S3 objects.
-
s3BucketEndpoint
(Boolean)
—
whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an
endpoint
to be provided explicitly to the service constructor. -
s3DisableBodySigning
(Boolean)
—
whether S3 body signing should be disabled when using signature version
v4
. Body signing can only be disabled when using https. Defaults totrue
. -
s3UsEast1RegionalEndpoint
('legacy'|'regional')
—
when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to
legacy
-
s3UseArnRegion
(Boolean)
—
whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to
true
-
retryDelayOptions
(map)
—
A set of options to configure the retry delay on retryable errors. Currently supported options are:
- base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
- customBackoff [function] — A custom function that accepts a
retry count and error and returns the amount of time to delay in
milliseconds. If the result is a non-zero negative value, no further
retry attempts will be made. The
base
option will be ignored if this option is supplied. The function is only called for retryable errors.
-
httpOptions
(map)
—
A set of options to pass to the low-level HTTP request. Currently supported options are:
- proxy [String] — the URL to proxy requests through
- agent [http.Agent, https.Agent] — the Agent object to perform
HTTP requests with. Used for connection pooling. Defaults to the global
agent (
http.globalAgent
) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment. - connectTimeout [Integer] — Sets the socket to timeout after
failing to establish a connection with the server after
connectTimeout
milliseconds. This timeout has no effect once a socket connection has been established. - timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
- xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
- xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
-
apiVersion
(String, Date)
—
a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by
apiVersions
). Specify 'latest' to use the latest possible version. -
apiVersions
(map<String, String|Date>)
—
a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.
-
logger
(#write, #log)
—
an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests
-
systemClockOffset
(Number)
—
an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global
AWS.config
object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds. -
signatureVersion
(String)
—
the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.
-
signatureCache
(Boolean)
—
whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to
true
. -
dynamoDbCrc32
(Boolean)
—
whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default:
true
. -
useAccelerateEndpoint
(Boolean)
—
Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default:
false
. -
clientSideMonitoring
(Boolean)
—
whether to collect and publish this client's performance metrics of all its API requests.
-
endpointDiscoveryEnabled
(Boolean|undefined)
—
whether to call operations with endpoints given by service dynamically. Setting this
-
endpointCacheSize
(Number)
—
the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000
-
hostPrefixEnabled
(Boolean)
—
whether to marshal request parameters to the prefix of hostname. Defaults to
true
. -
stsRegionalEndpoints
('legacy'|'regional')
—
whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.
-
useFipsEndpoint
(Boolean)
—
Enables FIPS compatible endpoints. Defaults to
false
. -
useDualstackEndpoint
(Boolean)
—
Enables IPv6 dualstack endpoint. Defaults to
false
.
Property Details
Method Details
batchGetNamedQuery(params = {}, callback) ⇒ AWS.Request
Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings. Requires you to have access to the workgroup in which the queries were saved. Use ListNamedQueriesInput to get the list of named query IDs in the specified workgroup. If information could not be retrieved for a submitted query ID, information about the query ID submitted is listed under UnprocessedNamedQueryId. Named queries differ from executed queries. Use BatchGetQueryExecutionInput to get details about each unique query execution, and ListQueryExecutionsInput to get a list of query execution IDs.
Service Reference:
Examples:
Calling the batchGetNamedQuery operation
var params = { NamedQueryIds: [ /* required */ 'STRING_VALUE', /* more items */ ] }; athena.batchGetNamedQuery(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NamedQueryIds
— (Array<String>
)An array of query IDs.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NamedQueries
— (Array<map>
)Information about the named query IDs submitted.
Name
— required — (String
)The query name.
Description
— (String
)The query description.
Database
— required — (String
)The database to which the query belongs.
QueryString
— required — (String
)The SQL statements that make up the query.
NamedQueryId
— (String
)The unique identifier of the query.
WorkGroup
— (String
)The name of the workgroup that contains the named query.
UnprocessedNamedQueryIds
— (Array<map>
)Information about provided query IDs.
NamedQueryId
— (String
)The unique identifier of the named query.
ErrorCode
— (String
)The error code returned when the processing request for the named query failed, if applicable.
ErrorMessage
— (String
)The error message returned when the processing request for the named query failed, if applicable.
-
(AWS.Response)
—
Returns:
batchGetPreparedStatement(params = {}, callback) ⇒ AWS.Request
Returns the details of a single prepared statement or a list of up to 256 prepared statements for the array of prepared statement names that you provide. Requires you to have access to the workgroup to which the prepared statements belong. If a prepared statement cannot be retrieved for the name specified, the statement is listed in
UnprocessedPreparedStatementNames
.Service Reference:
Examples:
Calling the batchGetPreparedStatement operation
var params = { PreparedStatementNames: [ /* required */ 'STRING_VALUE', /* more items */ ], WorkGroup: 'STRING_VALUE' /* required */ }; athena.batchGetPreparedStatement(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
PreparedStatementNames
— (Array<String>
)A list of prepared statement names to return.
WorkGroup
— (String
)The name of the workgroup to which the prepared statements belong.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:PreparedStatements
— (Array<map>
)The list of prepared statements returned.
StatementName
— (String
)The name of the prepared statement.
QueryStatement
— (String
)The query string for the prepared statement.
WorkGroupName
— (String
)The name of the workgroup to which the prepared statement belongs.
Description
— (String
)The description of the prepared statement.
LastModifiedTime
— (Date
)The last modified time of the prepared statement.
UnprocessedPreparedStatementNames
— (Array<map>
)A list of one or more prepared statements that were requested but could not be returned.
StatementName
— (String
)The name of a prepared statement that could not be returned due to an error.
ErrorCode
— (String
)The error code returned when the request for the prepared statement failed.
ErrorMessage
— (String
)The error message containing the reason why the prepared statement could not be returned. The following error messages are possible:
-
INVALID_INPUT
- The name of the prepared statement that was provided is not valid (for example, the name is too long). -
STATEMENT_NOT_FOUND
- A prepared statement with the name provided could not be found. -
UNAUTHORIZED
- The requester does not have permission to access the workgroup that contains the prepared statement.
-
-
(AWS.Response)
—
Returns:
batchGetQueryExecution(params = {}, callback) ⇒ AWS.Request
Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. Requires you to have access to the workgroup in which the queries ran. To get a list of query execution IDs, use ListQueryExecutionsInput$WorkGroup. Query executions differ from named (saved) queries. Use BatchGetNamedQueryInput to get details about named queries.
Service Reference:
Examples:
Calling the batchGetQueryExecution operation
var params = { QueryExecutionIds: [ /* required */ 'STRING_VALUE', /* more items */ ] }; athena.batchGetQueryExecution(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
QueryExecutionIds
— (Array<String>
)An array of query execution IDs.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:QueryExecutions
— (Array<map>
)Information about a query execution.
QueryExecutionId
— (String
)The unique identifier for each query execution.
Query
— (String
)The SQL query statements which the query execution ran.
StatementType
— (String
)The type of query statement that was run.
Possible values include:DDL
indicates DDL query statements.DML
indicates DML (Data Manipulation Language) query statements, such asCREATE TABLE AS SELECT
.UTILITY
indicates query statements other than DDL and DML, such asSHOW CREATE TABLE
, orDESCRIBE TABLE
."DDL"
"DML"
"UTILITY"
ResultConfiguration
— (map
)The location in Amazon S3 where query and calculation results are stored and the encryption option, if any, used for query results. These are known as "client-side settings". If workgroup settings override client-side settings, then the query uses the location for the query results and the encryption configuration that are specified for the workgroup.
OutputLocation
— (String
)The location in Amazon S3 where your query and calculation results are stored, such as
s3://path/to/query/bucket/
. To run the query, you must specify the query results location using one of the ways: either for individual queries using either this setting (client-side), or in the workgroup, using WorkGroupConfiguration. If none of them is set, Athena issues an error that no output location is provided. If workgroup settings override client-side settings, then the query uses the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.EncryptionConfiguration
— (map
)If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example,
SSE_KMS
orCSE_KMS
) and key information. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.EncryptionOption
— required — (String
)Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (
SSE_S3
), server-side encryption with KMS-managed keys (SSE_KMS
), or client-side encryption with KMS-managed keys (CSE_KMS
) is used.If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup.
Possible values include:"SSE_S3"
"SSE_KMS"
"CSE_KMS"
KmsKey
— (String
)For
SSE_KMS
andCSE_KMS
, this is the KMS key ARN or ID.
ExpectedBucketOwner
— (String
)The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If set, Athena uses the value for
ExpectedBucketOwner
when it makes Amazon S3 calls to your specified output location. If theExpectedBucketOwner
Amazon Web Services account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error.This is a client-side setting. If workgroup settings override client-side settings, then the query uses the
ExpectedBucketOwner
setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.AclConfiguration
— (map
)Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results. Currently the only supported canned ACL is
BUCKET_OWNER_FULL_CONTROL
. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ACL configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. For more information, see WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.S3AclOption
— required — (String
)The Amazon S3 canned ACL that Athena should specify when storing query results. Currently the only supported canned ACL is
Possible values include:BUCKET_OWNER_FULL_CONTROL
. If a query runs in a workgroup and the workgroup overrides client-side settings, then the Amazon S3 canned ACL specified in the workgroup's settings is used for all queries that run in the workgroup. For more information about Amazon S3 canned ACLs, see Canned ACL in the Amazon S3 User Guide."BUCKET_OWNER_FULL_CONTROL"
ResultReuseConfiguration
— (map
)Specifies the query result reuse behavior that was used for the query.
ResultReuseByAgeConfiguration
— (map
)Specifies whether previous query results are reused, and if so, their maximum age.
Enabled
— required — (Boolean
)True if previous query results can be reused when the query is run; otherwise, false. The default is false.
MaxAgeInMinutes
— (Integer
)Specifies, in minutes, the maximum age of a previous query result that Athena should consider for reuse. The default is 60.
QueryExecutionContext
— (map
)The database in which the query execution occurred.
Database
— (String
)The name of the database used in the query execution. The database must exist in the catalog.
Catalog
— (String
)The name of the data catalog used in the query execution.
Status
— (map
)The completion date, current state, submission time, and state change reason (if applicable) for the query execution.
State
— (String
)The state of query execution.
QUEUED
indicates that the query has been submitted to the service, and Athena will execute the query as soon as resources are available.RUNNING
indicates that the query is in execution phase.SUCCEEDED
indicates that the query completed without errors.FAILED
indicates that the query experienced an error and did not complete processing.CANCELLED
indicates that a user input interrupted query execution.Note: Athena automatically retries your queries in cases of certain transient errors. As a result, you may see the query state transition fromPossible values include:RUNNING
orFAILED
toQUEUED
."QUEUED"
"RUNNING"
"SUCCEEDED"
"FAILED"
"CANCELLED"
StateChangeReason
— (String
)Further detail about the status of the query.
SubmissionDateTime
— (Date
)The date and time that the query was submitted.
CompletionDateTime
— (Date
)The date and time that the query completed.
AthenaError
— (map
)Provides information about an Athena query error.
ErrorCategory
— (Integer
)An integer value that specifies the category of a query failure error. The following list shows the category for each integer value.
1 - System
2 - User
3 - Other
ErrorType
— (Integer
)An integer value that provides specific information about an Athena query error. For the meaning of specific values, see the Error Type Reference in the Amazon Athena User Guide.
Retryable
— (Boolean
)True if the query might succeed if resubmitted.
ErrorMessage
— (String
)Contains a short description of the error that occurred.
Statistics
— (map
)Query execution statistics, such as the amount of data scanned, the amount of time that the query took to process, and the type of statement that was run.
EngineExecutionTimeInMillis
— (Integer
)The number of milliseconds that the query took to execute.
DataScannedInBytes
— (Integer
)The number of bytes in the data that was queried.
DataManifestLocation
— (String
)The location and file name of a data manifest file. The manifest file is saved to the Athena query results location in Amazon S3. The manifest file tracks files that the query wrote to Amazon S3. If the query fails, the manifest file also tracks files that the query intended to write. The manifest is useful for identifying orphaned files resulting from a failed query. For more information, see Working with Query Results, Output Files, and Query History in the Amazon Athena User Guide.
TotalExecutionTimeInMillis
— (Integer
)The number of milliseconds that Athena took to run the query.
QueryQueueTimeInMillis
— (Integer
)The number of milliseconds that the query was in your query queue waiting for resources. Note that if transient errors occur, Athena might automatically add the query back to the queue.
ServicePreProcessingTimeInMillis
— (Integer
)The number of milliseconds that Athena took to preprocess the query before submitting the query to the query engine.
QueryPlanningTimeInMillis
— (Integer
)The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent retrieving table partitions from the data source. Note that because the query engine performs the query planning, query planning time is a subset of engine processing time.
ServiceProcessingTimeInMillis
— (Integer
)The number of milliseconds that Athena took to finalize and publish the query results after the query engine finished running the query.
ResultReuseInformation
— (map
)Contains information about whether previous query results were reused for the query.
ReusedPreviousResult
— required — (Boolean
)True if a previous query result was reused; false if the result was generated from a new run of the query.
WorkGroup
— (String
)The name of the workgroup in which the query ran.
EngineVersion
— (map
)The engine version that executed the query.
SelectedEngineVersion
— (String
)The engine version requested by the user. Possible values are determined by the output of
ListEngineVersions
, including AUTO. The default is AUTO.EffectiveEngineVersion
— (String
)Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a
CreateWorkGroup
orUpdateWorkGroup
operation, theEffectiveEngineVersion
field is ignored.
ExecutionParameters
— (Array<String>
)A list of values for the parameters in a query. The values are applied sequentially to the parameters in the query in the order in which the parameters occur. The list of parameters is not returned in the response.
SubstatementType
— (String
)The kind of query statement that was run.
QueryResultsS3AccessGrantsConfiguration
— (map
)Specifies whether Amazon S3 access grants are enabled for query results.
EnableS3AccessGrants
— required — (Boolean
)Specifies whether Amazon S3 access grants are enabled for query results.
CreateUserLevelPrefix
— (Boolean
)When enabled, appends the user ID as an Amazon S3 path prefix to the query result output location.
AuthenticationType
— required — (String
)The authentication type used for Amazon S3 access grants. Currently, only
Possible values include:DIRECTORY_IDENTITY
is supported."DIRECTORY_IDENTITY"
UnprocessedQueryExecutionIds
— (Array<map>
)Information about the query executions that failed to run.
QueryExecutionId
— (String
)The unique identifier of the query execution.
ErrorCode
— (String
)The error code returned when the query execution failed to process, if applicable.
ErrorMessage
— (String
)The error message returned when the query execution failed to process, if applicable.
-
(AWS.Response)
—
Returns:
cancelCapacityReservation(params = {}, callback) ⇒ AWS.Request
Cancels the capacity reservation with the specified name. Cancelled reservations remain in your account and will be deleted 45 days after cancellation. During the 45 days, you cannot re-purpose or reuse a reservation that has been cancelled, but you can refer to its tags and view it for historical reference.
Service Reference:
Examples:
Calling the cancelCapacityReservation operation
var params = { Name: 'STRING_VALUE' /* required */ }; athena.cancelCapacityReservation(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The name of the capacity reservation to cancel.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
createCapacityReservation(params = {}, callback) ⇒ AWS.Request
Creates a capacity reservation with the specified name and number of requested data processing units.
Service Reference:
Examples:
Calling the createCapacityReservation operation
var params = { Name: 'STRING_VALUE', /* required */ TargetDpus: 'NUMBER_VALUE', /* required */ Tags: [ { Key: 'STRING_VALUE', Value: 'STRING_VALUE' }, /* more items */ ] }; athena.createCapacityReservation(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
TargetDpus
— (Integer
)The number of requested data processing units.
Name
— (String
)The name of the capacity reservation to create.
Tags
— (Array<map>
)The tags for the capacity reservation.
Key
— (String
)A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource.
Value
— (String
)A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
createDataCatalog(params = {}, callback) ⇒ AWS.Request
Creates (registers) a data catalog with the specified name and properties. Catalogs created are visible to all users of the same Amazon Web Services account.
Service Reference:
Examples:
Calling the createDataCatalog operation
var params = { Name: 'STRING_VALUE', /* required */ Type: LAMBDA | GLUE | HIVE, /* required */ Description: 'STRING_VALUE', Parameters: { '<KeyString>': 'STRING_VALUE', /* '<KeyString>': ... */ }, Tags: [ { Key: 'STRING_VALUE', Value: 'STRING_VALUE' }, /* more items */ ] }; athena.createDataCatalog(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The name of the data catalog to create. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.
Type
— (String
)The type of data catalog to create:
Possible values include:LAMBDA
for a federated catalog,HIVE
for an external hive metastore, orGLUE
for an Glue Data Catalog."LAMBDA"
"GLUE"
"HIVE"
Description
— (String
)A description of the data catalog to be created.
Parameters
— (map<String>
)Specifies the Lambda function or functions to use for creating the data catalog. This is a mapping whose values depend on the catalog type.
-
For the
HIVE
data catalog type, use the following syntax. Themetadata-function
parameter is required.The sdk-version
parameter is optional and defaults to the currently supported version.metadata-function=lambda_arn, sdk-version=version_number
-
For the
LAMBDA
data catalog type, use one of the following sets of required parameters, but not both.-
If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.
metadata-function=lambda_arn, record-function=lambda_arn
-
If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.
function=lambda_arn
-
-
The
GLUE
type takes a catalog ID parameter and is required. Thecatalog_id
is the account ID of the Amazon Web Services account to which the Glue Data Catalog belongs.catalog-id=catalog_id
-
The
GLUE
data catalog type also applies to the defaultAwsDataCatalog
that already exists in your account, of which you can have only one and cannot modify.
-
-
Tags
— (Array<map>
)A list of comma separated tags to add to the data catalog that is created.
Key
— (String
)A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource.
Value
— (String
)A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
createNamedQuery(params = {}, callback) ⇒ AWS.Request
Creates a named query in the specified workgroup. Requires that you have access to the workgroup.
Service Reference:
Examples:
Calling the createNamedQuery operation
var params = { Database: 'STRING_VALUE', /* required */ Name: 'STRING_VALUE', /* required */ QueryString: 'STRING_VALUE', /* required */ ClientRequestToken: 'STRING_VALUE', Description: 'STRING_VALUE', WorkGroup: 'STRING_VALUE' }; athena.createNamedQuery(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The query name.
Description
— (String
)The query description.
Database
— (String
)The database to which the query belongs.
QueryString
— (String
)The contents of the query with all query statements.
ClientRequestToken
— (String
)A unique case-sensitive string used to ensure the request to create the query is idempotent (executes only once). If another
CreateNamedQuery
request is received, the same response is returned and another query is not created. If a parameter has changed, for example, theQueryString
, 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.
WorkGroup
— (String
)The name of the workgroup in which the named query is being created.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NamedQueryId
— (String
)The unique ID of the query.
-
(AWS.Response)
—
Returns:
createNotebook(params = {}, callback) ⇒ AWS.Request
Creates an empty
ipynb
file in the specified Apache Spark enabled workgroup. Throws an error if a file in the workgroup with the same name already exists.Service Reference:
Examples:
Calling the createNotebook operation
var params = { Name: 'STRING_VALUE', /* required */ WorkGroup: 'STRING_VALUE', /* required */ ClientRequestToken: 'STRING_VALUE' }; athena.createNotebook(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
WorkGroup
— (String
)The name of the Spark enabled workgroup in which the notebook will be created.
Name
— (String
)The name of the
ipynb
file to be created in the Spark workgroup, without the.ipynb
extension.ClientRequestToken
— (String
)A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).
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 you. 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.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NotebookId
— (String
)A unique identifier for the notebook.
-
(AWS.Response)
—
Returns:
createPreparedStatement(params = {}, callback) ⇒ AWS.Request
Creates a prepared statement for use with SQL queries in Athena.
Service Reference:
Examples:
Calling the createPreparedStatement operation
var params = { QueryStatement: 'STRING_VALUE', /* required */ StatementName: 'STRING_VALUE', /* required */ WorkGroup: 'STRING_VALUE', /* required */ Description: 'STRING_VALUE' }; athena.createPreparedStatement(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
StatementName
— (String
)The name of the prepared statement.
WorkGroup
— (String
)The name of the workgroup to which the prepared statement belongs.
QueryStatement
— (String
)The query string for the prepared statement.
Description
— (String
)The description of the prepared statement.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
createPresignedNotebookUrl(params = {}, callback) ⇒ AWS.Request
Gets an authentication token and the URL at which the notebook can be accessed. During programmatic access,
CreatePresignedNotebookUrl
must be called every 10 minutes to refresh the authentication token. For information about granting programmatic access, see Grant programmatic access.Service Reference:
Examples:
Calling the createPresignedNotebookUrl operation
var params = { SessionId: 'STRING_VALUE' /* required */ }; athena.createPresignedNotebookUrl(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SessionId
— (String
)The session ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NotebookUrl
— (String
)The URL of the notebook. The URL includes the authentication token and notebook file name and points directly to the opened notebook.
AuthToken
— (String
)The authentication token for the notebook.
AuthTokenExpirationTime
— (Integer
)The UTC epoch time when the authentication token expires.
-
(AWS.Response)
—
Returns:
createWorkGroup(params = {}, callback) ⇒ AWS.Request
Creates a workgroup with the specified name. A workgroup can be an Apache Spark enabled workgroup or an Athena SQL workgroup.
Service Reference:
Examples:
Calling the createWorkGroup operation
var params = { Name: 'STRING_VALUE', /* required */ Configuration: { AdditionalConfiguration: 'STRING_VALUE', BytesScannedCutoffPerQuery: 'NUMBER_VALUE', CustomerContentEncryptionConfiguration: { KmsKey: 'STRING_VALUE' /* required */ }, EnableMinimumEncryptionConfiguration: true || false, EnforceWorkGroupConfiguration: true || false, EngineVersion: { EffectiveEngineVersion: 'STRING_VALUE', SelectedEngineVersion: 'STRING_VALUE' }, ExecutionRole: 'STRING_VALUE', IdentityCenterConfiguration: { EnableIdentityCenter: true || false, IdentityCenterInstanceArn: 'STRING_VALUE' }, PublishCloudWatchMetricsEnabled: true || false, QueryResultsS3AccessGrantsConfiguration: { AuthenticationType: DIRECTORY_IDENTITY, /* required */ EnableS3AccessGrants: true || false, /* required */ CreateUserLevelPrefix: true || false }, RequesterPaysEnabled: true || false, ResultConfiguration: { AclConfiguration: { S3AclOption: BUCKET_OWNER_FULL_CONTROL /* required */ }, EncryptionConfiguration: { EncryptionOption: SSE_S3 | SSE_KMS | CSE_KMS, /* required */ KmsKey: 'STRING_VALUE' }, ExpectedBucketOwner: 'STRING_VALUE', OutputLocation: 'STRING_VALUE' } }, Description: 'STRING_VALUE', Tags: [ { Key: 'STRING_VALUE', Value: 'STRING_VALUE' }, /* more items */ ] }; athena.createWorkGroup(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The workgroup name.
Configuration
— (map
)Contains configuration information for creating an Athena SQL workgroup or Spark enabled Athena workgroup. Athena SQL workgroup configuration includes the location in Amazon S3 where query and calculation results are stored, the encryption configuration, if any, used for encrypting query results, whether the Amazon CloudWatch Metrics are enabled for the workgroup, the limit for the amount of bytes scanned (cutoff) per query, if it is specified, and whether workgroup's settings (specified with
EnforceWorkGroupConfiguration
) in theWorkGroupConfiguration
override client-side settings. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.ResultConfiguration
— (map
)The configuration for the workgroup, which includes the location in Amazon S3 where query and calculation results are stored and the encryption option, if any, used for query and calculation results. To run the query, you must specify the query results location using one of the ways: either in the workgroup using this setting, or for individual queries (client-side), using ResultConfiguration$OutputLocation. If none of them is set, Athena issues an error that no output location is provided.
OutputLocation
— (String
)The location in Amazon S3 where your query and calculation results are stored, such as
s3://path/to/query/bucket/
. To run the query, you must specify the query results location using one of the ways: either for individual queries using either this setting (client-side), or in the workgroup, using WorkGroupConfiguration. If none of them is set, Athena issues an error that no output location is provided. If workgroup settings override client-side settings, then the query uses the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.EncryptionConfiguration
— (map
)If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example,
SSE_KMS
orCSE_KMS
) and key information. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.EncryptionOption
— required — (String
)Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (
SSE_S3
), server-side encryption with KMS-managed keys (SSE_KMS
), or client-side encryption with KMS-managed keys (CSE_KMS
) is used.If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup.
Possible values include:"SSE_S3"
"SSE_KMS"
"CSE_KMS"
KmsKey
— (String
)For
SSE_KMS
andCSE_KMS
, this is the KMS key ARN or ID.
ExpectedBucketOwner
— (String
)The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If set, Athena uses the value for
ExpectedBucketOwner
when it makes Amazon S3 calls to your specified output location. If theExpectedBucketOwner
Amazon Web Services account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error.This is a client-side setting. If workgroup settings override client-side settings, then the query uses the
ExpectedBucketOwner
setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.AclConfiguration
— (map
)Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results. Currently the only supported canned ACL is
BUCKET_OWNER_FULL_CONTROL
. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ACL configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. For more information, see WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.S3AclOption
— required — (String
)The Amazon S3 canned ACL that Athena should specify when storing query results. Currently the only supported canned ACL is
Possible values include:BUCKET_OWNER_FULL_CONTROL
. If a query runs in a workgroup and the workgroup overrides client-side settings, then the Amazon S3 canned ACL specified in the workgroup's settings is used for all queries that run in the workgroup. For more information about Amazon S3 canned ACLs, see Canned ACL in the Amazon S3 User Guide."BUCKET_OWNER_FULL_CONTROL"
EnforceWorkGroupConfiguration
— (Boolean
)If set to "true", the settings for the workgroup override client-side settings. If set to "false", client-side settings are used. For more information, see Workgroup Settings Override Client-Side Settings.
PublishCloudWatchMetricsEnabled
— (Boolean
)Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.
BytesScannedCutoffPerQuery
— (Integer
)The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.
RequesterPaysEnabled
— (Boolean
)If set to
true
, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets in queries. If set tofalse
, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default isfalse
. For more information about Requester Pays buckets, see Requester Pays Buckets in the Amazon Simple Storage Service Developer Guide.EngineVersion
— (map
)The engine version that all queries running on the workgroup use. Queries on the
AmazonAthenaPreviewFunctionality
workgroup run on the preview engine regardless of this setting.SelectedEngineVersion
— (String
)The engine version requested by the user. Possible values are determined by the output of
ListEngineVersions
, including AUTO. The default is AUTO.EffectiveEngineVersion
— (String
)Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a
CreateWorkGroup
orUpdateWorkGroup
operation, theEffectiveEngineVersion
field is ignored.
AdditionalConfiguration
— (String
)Specifies a user defined JSON string that is passed to the notebook engine.
ExecutionRole
— (String
)The ARN of the execution role used to access user resources for Spark sessions and IAM Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and IAM Identity Center enabled workgroups. The property is required for IAM Identity Center enabled workgroups.
CustomerContentEncryptionConfiguration
— (map
)Specifies the KMS key that is used to encrypt the user's data stores in Athena. This setting does not apply to Athena SQL workgroups.
KmsKey
— required — (String
)The customer managed KMS key that is used to encrypt the user's data stores in Athena.
EnableMinimumEncryptionConfiguration
— (Boolean
)Enforces a minimal level of encryption for the workgroup for query and calculation results that are written to Amazon S3. When enabled, workgroup users can set encryption only to the minimum level set by the administrator or higher when they submit queries.
The
EnforceWorkGroupConfiguration
setting takes precedence over theEnableMinimumEncryptionConfiguration
flag. This means that ifEnforceWorkGroupConfiguration
is true, theEnableMinimumEncryptionConfiguration
flag is ignored, and the workgroup configuration for encryption is used.IdentityCenterConfiguration
— (map
)Specifies whether the workgroup is IAM Identity Center supported.
EnableIdentityCenter
— (Boolean
)Specifies whether the workgroup is IAM Identity Center supported.
IdentityCenterInstanceArn
— (String
)The IAM Identity Center instance ARN that the workgroup associates to.
QueryResultsS3AccessGrantsConfiguration
— (map
)Specifies whether Amazon S3 access grants are enabled for query results.
EnableS3AccessGrants
— required — (Boolean
)Specifies whether Amazon S3 access grants are enabled for query results.
CreateUserLevelPrefix
— (Boolean
)When enabled, appends the user ID as an Amazon S3 path prefix to the query result output location.
AuthenticationType
— required — (String
)The authentication type used for Amazon S3 access grants. Currently, only
Possible values include:DIRECTORY_IDENTITY
is supported."DIRECTORY_IDENTITY"
Description
— (String
)The workgroup description.
Tags
— (Array<map>
)A list of comma separated tags to add to the workgroup that is created.
Key
— (String
)A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource.
Value
— (String
)A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteCapacityReservation(params = {}, callback) ⇒ AWS.Request
Deletes a cancelled capacity reservation. A reservation must be cancelled before it can be deleted. A deleted reservation is immediately removed from your account and can no longer be referenced, including by its ARN. A deleted reservation cannot be called by
GetCapacityReservation
, and deleted reservations do not appear in the output ofListCapacityReservations
.Service Reference:
Examples:
Calling the deleteCapacityReservation operation
var params = { Name: 'STRING_VALUE' /* required */ }; athena.deleteCapacityReservation(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The name of the capacity reservation to delete.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteDataCatalog(params = {}, callback) ⇒ AWS.Request
Deletes a data catalog.
Service Reference:
Examples:
Calling the deleteDataCatalog operation
var params = { Name: 'STRING_VALUE' /* required */ }; athena.deleteDataCatalog(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The name of the data catalog to delete.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteNamedQuery(params = {}, callback) ⇒ AWS.Request
Deletes the named query if you have access to the workgroup in which the query was saved.
Service Reference:
Examples:
Calling the deleteNamedQuery operation
var params = { NamedQueryId: 'STRING_VALUE' /* required */ }; athena.deleteNamedQuery(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NamedQueryId
— (String
)The unique ID of the query to delete.
If a token is not provided, the SDK will use a version 4 UUID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteNotebook(params = {}, callback) ⇒ AWS.Request
Deletes the specified notebook.
Service Reference:
Examples:
Calling the deleteNotebook operation
var params = { NotebookId: 'STRING_VALUE' /* required */ }; athena.deleteNotebook(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NotebookId
— (String
)The ID of the notebook to delete.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deletePreparedStatement(params = {}, callback) ⇒ AWS.Request
Deletes the prepared statement with the specified name from the specified workgroup.
Service Reference:
Examples:
Calling the deletePreparedStatement operation
var params = { StatementName: 'STRING_VALUE', /* required */ WorkGroup: 'STRING_VALUE' /* required */ }; athena.deletePreparedStatement(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
StatementName
— (String
)The name of the prepared statement to delete.
WorkGroup
— (String
)The workgroup to which the statement to be deleted belongs.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteWorkGroup(params = {}, callback) ⇒ AWS.Request
Deletes the workgroup with the specified name. The primary workgroup cannot be deleted.
Service Reference:
Examples:
Calling the deleteWorkGroup operation
var params = { WorkGroup: 'STRING_VALUE', /* required */ RecursiveDeleteOption: true || false }; athena.deleteWorkGroup(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
WorkGroup
— (String
)The unique name of the workgroup to delete.
RecursiveDeleteOption
— (Boolean
)The option to delete the workgroup and its contents even if the workgroup contains any named queries, query executions, or notebooks.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
exportNotebook(params = {}, callback) ⇒ AWS.Request
Exports the specified notebook and its metadata.
Service Reference:
Examples:
Calling the exportNotebook operation
var params = { NotebookId: 'STRING_VALUE' /* required */ }; athena.exportNotebook(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NotebookId
— (String
)The ID of the notebook to export.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NotebookMetadata
— (map
)The notebook metadata, including notebook ID, notebook name, and workgroup name.
NotebookId
— (String
)The notebook ID.
Name
— (String
)The name of the notebook.
WorkGroup
— (String
)The name of the Spark enabled workgroup to which the notebook belongs.
CreationTime
— (Date
)The time when the notebook was created.
Type
— (String
)The type of notebook. Currently, the only valid type is
Possible values include:IPYNB
."IPYNB"
LastModifiedTime
— (Date
)The time when the notebook was last modified.
Payload
— (String
)The content of the exported notebook.
-
(AWS.Response)
—
Returns:
getCalculationExecution(params = {}, callback) ⇒ AWS.Request
Describes a previously submitted calculation execution.
Service Reference:
Examples:
Calling the getCalculationExecution operation
var params = { CalculationExecutionId: 'STRING_VALUE' /* required */ }; athena.getCalculationExecution(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CalculationExecutionId
— (String
)The calculation execution UUID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CalculationExecutionId
— (String
)The calculation execution UUID.
SessionId
— (String
)The session ID that the calculation ran in.
Description
— (String
)The description of the calculation execution.
WorkingDirectory
— (String
)The Amazon S3 location in which calculation results are stored.
Status
— (map
)Contains information about the status of the calculation.
SubmissionDateTime
— (Date
)The date and time the calculation was submitted for processing.
CompletionDateTime
— (Date
)The date and time the calculation completed processing.
State
— (String
)The state of the calculation execution. A description of each state follows.
CREATING
- The calculation is in the process of being created.CREATED
- The calculation has been created and is ready to run.QUEUED
- The calculation has been queued for processing.RUNNING
- The calculation is running.CANCELING
- A request to cancel the calculation has been received and the system is working to stop it.CANCELED
- The calculation is no longer running as the result of a cancel request.COMPLETED
- The calculation has completed without error.FAILED
- The calculation failed and is no longer running."CREATING"
"CREATED"
"QUEUED"
"RUNNING"
"CANCELING"
"CANCELED"
"COMPLETED"
"FAILED"
StateChangeReason
— (String
)The reason for the calculation state change (for example, the calculation was canceled because the session was terminated).
Statistics
— (map
)Contains information about the data processing unit (DPU) execution time and progress. This field is populated only when statistics are available.
DpuExecutionInMillis
— (Integer
)The data processing unit execution time in milliseconds for the calculation.
Progress
— (String
)The progress of the calculation.
Result
— (map
)Contains result information. This field is populated only if the calculation is completed.
StdOutS3Uri
— (String
)The Amazon S3 location of the
stdout
file for the calculation.StdErrorS3Uri
— (String
)The Amazon S3 location of the
stderr
error messages file for the calculation.ResultS3Uri
— (String
)The Amazon S3 location of the folder for the calculation results.
ResultType
— (String
)The data format of the calculation result.
-
(AWS.Response)
—
Returns:
getCalculationExecutionCode(params = {}, callback) ⇒ AWS.Request
Retrieves the unencrypted code that was executed for the calculation.
Service Reference:
Examples:
Calling the getCalculationExecutionCode operation
var params = { CalculationExecutionId: 'STRING_VALUE' /* required */ }; athena.getCalculationExecutionCode(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CalculationExecutionId
— (String
)The calculation execution UUID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CodeBlock
— (String
)The unencrypted code that was executed for the calculation.
-
(AWS.Response)
—
Returns:
getCalculationExecutionStatus(params = {}, callback) ⇒ AWS.Request
Gets the status of a current calculation.
Service Reference:
Examples:
Calling the getCalculationExecutionStatus operation
var params = { CalculationExecutionId: 'STRING_VALUE' /* required */ }; athena.getCalculationExecutionStatus(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CalculationExecutionId
— (String
)The calculation execution UUID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Status
— (map
)Contains information about the calculation execution status.
SubmissionDateTime
— (Date
)The date and time the calculation was submitted for processing.
CompletionDateTime
— (Date
)The date and time the calculation completed processing.
State
— (String
)The state of the calculation execution. A description of each state follows.
CREATING
- The calculation is in the process of being created.CREATED
- The calculation has been created and is ready to run.QUEUED
- The calculation has been queued for processing.RUNNING
- The calculation is running.CANCELING
- A request to cancel the calculation has been received and the system is working to stop it.CANCELED
- The calculation is no longer running as the result of a cancel request.COMPLETED
- The calculation has completed without error.FAILED
- The calculation failed and is no longer running."CREATING"
"CREATED"
"QUEUED"
"RUNNING"
"CANCELING"
"CANCELED"
"COMPLETED"
"FAILED"
StateChangeReason
— (String
)The reason for the calculation state change (for example, the calculation was canceled because the session was terminated).
Statistics
— (map
)Contains information about the DPU execution time and progress.
DpuExecutionInMillis
— (Integer
)The data processing unit execution time in milliseconds for the calculation.
Progress
— (String
)The progress of the calculation.
-
(AWS.Response)
—
Returns:
getCapacityAssignmentConfiguration(params = {}, callback) ⇒ AWS.Request
Gets the capacity assignment configuration for a capacity reservation, if one exists.
Service Reference:
Examples:
Calling the getCapacityAssignmentConfiguration operation
var params = { CapacityReservationName: 'STRING_VALUE' /* required */ }; athena.getCapacityAssignmentConfiguration(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CapacityReservationName
— (String
)The name of the capacity reservation to retrieve the capacity assignment configuration for.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CapacityAssignmentConfiguration
— (map
)The requested capacity assignment configuration for the specified capacity reservation.
CapacityReservationName
— (String
)The name of the reservation that the capacity assignment configuration is for.
CapacityAssignments
— (Array<map>
)The list of assignments that make up the capacity assignment configuration.
WorkGroupNames
— (Array<String>
)The list of workgroup names for the capacity assignment.
-
(AWS.Response)
—
Returns:
getCapacityReservation(params = {}, callback) ⇒ AWS.Request
Returns information about the capacity reservation with the specified name.
Service Reference:
Examples:
Calling the getCapacityReservation operation
var params = { Name: 'STRING_VALUE' /* required */ }; athena.getCapacityReservation(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The name of the capacity reservation.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CapacityReservation
— (map
)The requested capacity reservation structure.
Name
— required — (String
)The name of the capacity reservation.
Status
— required — (String
)The status of the capacity reservation.
Possible values include:"PENDING"
"ACTIVE"
"CANCELLING"
"CANCELLED"
"FAILED"
"UPDATE_PENDING"
TargetDpus
— required — (Integer
)The number of data processing units requested.
AllocatedDpus
— required — (Integer
)The number of data processing units currently allocated.
LastAllocation
— (map
)Contains the submission time of a single allocation request for a capacity reservation and the most recent status of the attempted allocation.
Status
— required — (String
)The status of the capacity allocation.
Possible values include:"PENDING"
"SUCCEEDED"
"FAILED"
StatusMessage
— (String
)The status message of the capacity allocation.
RequestTime
— required — (Date
)The time when the capacity allocation was requested.
RequestCompletionTime
— (Date
)The time when the capacity allocation request was completed.
LastSuccessfulAllocationTime
— (Date
)The time of the most recent capacity allocation that succeeded.
CreationTime
— required — (Date
)The time in UTC epoch millis when the capacity reservation was created.
-
(AWS.Response)
—
Returns:
getDatabase(params = {}, callback) ⇒ AWS.Request
Returns a database object for the specified database and data catalog.
Service Reference:
Examples:
Calling the getDatabase operation
var params = { CatalogName: 'STRING_VALUE', /* required */ DatabaseName: 'STRING_VALUE', /* required */ WorkGroup: 'STRING_VALUE' }; athena.getDatabase(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CatalogName
— (String
)The name of the data catalog that contains the database to return.
DatabaseName
— (String
)The name of the database to return.
WorkGroup
— (String
)The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Database
— (map
)The database returned.
Name
— required — (String
)The name of the database.
Description
— (String
)An optional description of the database.
Parameters
— (map<String>
)A set of custom key/value pairs.
-
(AWS.Response)
—
Returns:
getDataCatalog(params = {}, callback) ⇒ AWS.Request
Returns the specified data catalog.
Service Reference:
Examples:
Calling the getDataCatalog operation
var params = { Name: 'STRING_VALUE', /* required */ WorkGroup: 'STRING_VALUE' }; athena.getDataCatalog(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The name of the data catalog to return.
WorkGroup
— (String
)The name of the workgroup. Required if making an IAM Identity Center request.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:DataCatalog
— (map
)The data catalog returned.
Name
— required — (String
)The name of the data catalog. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.
Description
— (String
)An optional description of the data catalog.
Type
— required — (String
)The type of data catalog to create:
Possible values include:LAMBDA
for a federated catalog,HIVE
for an external hive metastore, orGLUE
for an Glue Data Catalog."LAMBDA"
"GLUE"
"HIVE"
Parameters
— (map<String>
)Specifies the Lambda function or functions to use for the data catalog. This is a mapping whose values depend on the catalog type.
-
For the
HIVE
data catalog type, use the following syntax. Themetadata-function
parameter is required.The sdk-version
parameter is optional and defaults to the currently supported version.metadata-function=lambda_arn, sdk-version=version_number
-
For the
LAMBDA
data catalog type, use one of the following sets of required parameters, but not both.-
If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.
metadata-function=lambda_arn, record-function=lambda_arn
-
If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.
function=lambda_arn
-
-
The
GLUE
type takes a catalog ID parameter and is required. Thecatalog_id
is the account ID of the Amazon Web Services account to which the Glue catalog belongs.catalog-id=catalog_id
-
The
GLUE
data catalog type also applies to the defaultAwsDataCatalog
that already exists in your account, of which you can have only one and cannot modify.
-
-
-
(AWS.Response)
—
Returns:
getNamedQuery(params = {}, callback) ⇒ AWS.Request
Returns information about a single query. Requires that you have access to the workgroup in which the query was saved.
Service Reference:
Examples:
Calling the getNamedQuery operation
var params = { NamedQueryId: 'STRING_VALUE' /* required */ }; athena.getNamedQuery(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NamedQueryId
— (String
)The unique ID of the query. Use ListNamedQueries to get query IDs.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NamedQuery
— (map
)Information about the query.
Name
— required — (String
)The query name.
Description
— (String
)The query description.
Database
— required — (String
)The database to which the query belongs.
QueryString
— required — (String
)The SQL statements that make up the query.
NamedQueryId
— (String
)The unique identifier of the query.
WorkGroup
— (String
)The name of the workgroup that contains the named query.
-
(AWS.Response)
—
Returns:
getNotebookMetadata(params = {}, callback) ⇒ AWS.Request
Retrieves notebook metadata for the specified notebook ID.
Service Reference:
Examples:
Calling the getNotebookMetadata operation
var params = { NotebookId: 'STRING_VALUE' /* required */ }; athena.getNotebookMetadata(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NotebookId
— (String
)The ID of the notebook whose metadata is to be retrieved.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NotebookMetadata
— (map
)The metadata that is returned for the specified notebook ID.
NotebookId
— (String
)The notebook ID.
Name
— (String
)The name of the notebook.
WorkGroup
— (String
)The name of the Spark enabled workgroup to which the notebook belongs.
CreationTime
— (Date
)The time when the notebook was created.
Type
— (String
)The type of notebook. Currently, the only valid type is
Possible values include:IPYNB
."IPYNB"
LastModifiedTime
— (Date
)The time when the notebook was last modified.
-
(AWS.Response)
—
Returns:
getPreparedStatement(params = {}, callback) ⇒ AWS.Request
Retrieves the prepared statement with the specified name from the specified workgroup.
Service Reference:
Examples:
Calling the getPreparedStatement operation
var params = { StatementName: 'STRING_VALUE', /* required */ WorkGroup: 'STRING_VALUE' /* required */ }; athena.getPreparedStatement(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
StatementName
— (String
)The name of the prepared statement to retrieve.
WorkGroup
— (String
)The workgroup to which the statement to be retrieved belongs.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:PreparedStatement
— (map
)The name of the prepared statement that was retrieved.
StatementName
— (String
)The name of the prepared statement.
QueryStatement
— (String
)The query string for the prepared statement.
WorkGroupName
— (String
)The name of the workgroup to which the prepared statement belongs.
Description
— (String
)The description of the prepared statement.
LastModifiedTime
— (Date
)The last modified time of the prepared statement.
-
(AWS.Response)
—
Returns:
getQueryExecution(params = {}, callback) ⇒ AWS.Request
Returns information about a single execution of a query if you have access to the workgroup in which the query ran. Each time a query executes, information about the query execution is saved with a unique ID.
Service Reference:
Examples:
Calling the getQueryExecution operation
var params = { QueryExecutionId: 'STRING_VALUE' /* required */ }; athena.getQueryExecution(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
QueryExecutionId
— (String
)The unique ID of the query execution.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:QueryExecution
— (map
)Information about the query execution.
QueryExecutionId
— (String
)The unique identifier for each query execution.
Query
— (String
)The SQL query statements which the query execution ran.
StatementType
— (String
)The type of query statement that was run.
Possible values include:DDL
indicates DDL query statements.DML
indicates DML (Data Manipulation Language) query statements, such asCREATE TABLE AS SELECT
.UTILITY
indicates query statements other than DDL and DML, such asSHOW CREATE TABLE
, orDESCRIBE TABLE
."DDL"
"DML"
"UTILITY"
ResultConfiguration
— (map
)The location in Amazon S3 where query and calculation results are stored and the encryption option, if any, used for query results. These are known as "client-side settings". If workgroup settings override client-side settings, then the query uses the location for the query results and the encryption configuration that are specified for the workgroup.
OutputLocation
— (String
)The location in Amazon S3 where your query and calculation results are stored, such as
s3://path/to/query/bucket/
. To run the query, you must specify the query results location using one of the ways: either for individual queries using either this setting (client-side), or in the workgroup, using WorkGroupConfiguration. If none of them is set, Athena issues an error that no output location is provided. If workgroup settings override client-side settings, then the query uses the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.EncryptionConfiguration
— (map
)If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example,
SSE_KMS
orCSE_KMS
) and key information. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.EncryptionOption
— required — (String
)Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (
SSE_S3
), server-side encryption with KMS-managed keys (SSE_KMS
), or client-side encryption with KMS-managed keys (CSE_KMS
) is used.If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup.
Possible values include:"SSE_S3"
"SSE_KMS"
"CSE_KMS"
KmsKey
— (String
)For
SSE_KMS
andCSE_KMS
, this is the KMS key ARN or ID.
ExpectedBucketOwner
— (String
)The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If set, Athena uses the value for
ExpectedBucketOwner
when it makes Amazon S3 calls to your specified output location. If theExpectedBucketOwner
Amazon Web Services account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error.This is a client-side setting. If workgroup settings override client-side settings, then the query uses the
ExpectedBucketOwner
setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.AclConfiguration
— (map
)Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results. Currently the only supported canned ACL is
BUCKET_OWNER_FULL_CONTROL
. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ACL configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. For more information, see WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.S3AclOption
— required — (String
)The Amazon S3 canned ACL that Athena should specify when storing query results. Currently the only supported canned ACL is
Possible values include:BUCKET_OWNER_FULL_CONTROL
. If a query runs in a workgroup and the workgroup overrides client-side settings, then the Amazon S3 canned ACL specified in the workgroup's settings is used for all queries that run in the workgroup. For more information about Amazon S3 canned ACLs, see Canned ACL in the Amazon S3 User Guide."BUCKET_OWNER_FULL_CONTROL"
ResultReuseConfiguration
— (map
)Specifies the query result reuse behavior that was used for the query.
ResultReuseByAgeConfiguration
— (map
)Specifies whether previous query results are reused, and if so, their maximum age.
Enabled
— required — (Boolean
)True if previous query results can be reused when the query is run; otherwise, false. The default is false.
MaxAgeInMinutes
— (Integer
)Specifies, in minutes, the maximum age of a previous query result that Athena should consider for reuse. The default is 60.
QueryExecutionContext
— (map
)The database in which the query execution occurred.
Database
— (String
)The name of the database used in the query execution. The database must exist in the catalog.
Catalog
— (String
)The name of the data catalog used in the query execution.
Status
— (map
)The completion date, current state, submission time, and state change reason (if applicable) for the query execution.
State
— (String
)The state of query execution.
QUEUED
indicates that the query has been submitted to the service, and Athena will execute the query as soon as resources are available.RUNNING
indicates that the query is in execution phase.SUCCEEDED
indicates that the query completed without errors.FAILED
indicates that the query experienced an error and did not complete processing.CANCELLED
indicates that a user input interrupted query execution.Note: Athena automatically retries your queries in cases of certain transient errors. As a result, you may see the query state transition fromPossible values include:RUNNING
orFAILED
toQUEUED
."QUEUED"
"RUNNING"
"SUCCEEDED"
"FAILED"
"CANCELLED"
StateChangeReason
— (String
)Further detail about the status of the query.
SubmissionDateTime
— (Date
)The date and time that the query was submitted.
CompletionDateTime
— (Date
)The date and time that the query completed.
AthenaError
— (map
)Provides information about an Athena query error.
ErrorCategory
— (Integer
)An integer value that specifies the category of a query failure error. The following list shows the category for each integer value.
1 - System
2 - User
3 - Other
ErrorType
— (Integer
)An integer value that provides specific information about an Athena query error. For the meaning of specific values, see the Error Type Reference in the Amazon Athena User Guide.
Retryable
— (Boolean
)True if the query might succeed if resubmitted.
ErrorMessage
— (String
)Contains a short description of the error that occurred.
Statistics
— (map
)Query execution statistics, such as the amount of data scanned, the amount of time that the query took to process, and the type of statement that was run.
EngineExecutionTimeInMillis
— (Integer
)The number of milliseconds that the query took to execute.
DataScannedInBytes
— (Integer
)The number of bytes in the data that was queried.
DataManifestLocation
— (String
)The location and file name of a data manifest file. The manifest file is saved to the Athena query results location in Amazon S3. The manifest file tracks files that the query wrote to Amazon S3. If the query fails, the manifest file also tracks files that the query intended to write. The manifest is useful for identifying orphaned files resulting from a failed query. For more information, see Working with Query Results, Output Files, and Query History in the Amazon Athena User Guide.
TotalExecutionTimeInMillis
— (Integer
)The number of milliseconds that Athena took to run the query.
QueryQueueTimeInMillis
— (Integer
)The number of milliseconds that the query was in your query queue waiting for resources. Note that if transient errors occur, Athena might automatically add the query back to the queue.
ServicePreProcessingTimeInMillis
— (Integer
)The number of milliseconds that Athena took to preprocess the query before submitting the query to the query engine.
QueryPlanningTimeInMillis
— (Integer
)The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent retrieving table partitions from the data source. Note that because the query engine performs the query planning, query planning time is a subset of engine processing time.
ServiceProcessingTimeInMillis
— (Integer
)The number of milliseconds that Athena took to finalize and publish the query results after the query engine finished running the query.
ResultReuseInformation
— (map
)Contains information about whether previous query results were reused for the query.
ReusedPreviousResult
— required — (Boolean
)True if a previous query result was reused; false if the result was generated from a new run of the query.
WorkGroup
— (String
)The name of the workgroup in which the query ran.
EngineVersion
— (map
)The engine version that executed the query.
SelectedEngineVersion
— (String
)The engine version requested by the user. Possible values are determined by the output of
ListEngineVersions
, including AUTO. The default is AUTO.EffectiveEngineVersion
— (String
)Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a
CreateWorkGroup
orUpdateWorkGroup
operation, theEffectiveEngineVersion
field is ignored.
ExecutionParameters
— (Array<String>
)A list of values for the parameters in a query. The values are applied sequentially to the parameters in the query in the order in which the parameters occur. The list of parameters is not returned in the response.
SubstatementType
— (String
)The kind of query statement that was run.
QueryResultsS3AccessGrantsConfiguration
— (map
)Specifies whether Amazon S3 access grants are enabled for query results.
EnableS3AccessGrants
— required — (Boolean
)Specifies whether Amazon S3 access grants are enabled for query results.
CreateUserLevelPrefix
— (Boolean
)When enabled, appends the user ID as an Amazon S3 path prefix to the query result output location.
AuthenticationType
— required — (String
)The authentication type used for Amazon S3 access grants. Currently, only
Possible values include:DIRECTORY_IDENTITY
is supported."DIRECTORY_IDENTITY"
-
(AWS.Response)
—
Returns:
getQueryResults(params = {}, callback) ⇒ AWS.Request
Streams the results of a single query execution specified by
QueryExecutionId
from the Athena query results location in Amazon S3. For more information, see Working with query results, recent queries, and output files in the Amazon Athena User Guide. This request does not execute the query but returns results. Use StartQueryExecution to run a query.To stream query results successfully, the IAM principal with permission to call
GetQueryResults
also must have permissions to the Amazon S3GetObject
action for the Athena query results location.IAM principals with permission to the Amazon S3
GetObject
action for the query results location are able to retrieve query results from Amazon S3 even if permission to theGetQueryResults
action is denied. To restrict user or role access, ensure that Amazon S3 permissions to the Athena query location are denied.Service Reference:
Examples:
Calling the getQueryResults operation
var params = { QueryExecutionId: 'STRING_VALUE', /* required */ MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; athena.getQueryResults(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
QueryExecutionId
— (String
)The unique ID of the query execution.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.MaxResults
— (Integer
)The maximum number of results (rows) to return in this request.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:UpdateCount
— (Integer
)The number of rows inserted with a
CREATE TABLE AS SELECT
statement.ResultSet
— (map
)The results of the query execution.
Rows
— (Array<map>
)The rows in the table.
Data
— (Array<map>
)The data that populates a row in a query result table.
VarCharValue
— (String
)The value of the datum.
ResultSetMetadata
— (map
)The metadata that describes the column structure and data types of a table of query results.
ColumnInfo
— (Array<map>
)Information about the columns returned in a query result metadata.
CatalogName
— (String
)The catalog to which the query results belong.
SchemaName
— (String
)The schema name (database name) to which the query results belong.
TableName
— (String
)The table name for the query results.
Name
— required — (String
)The name of the column.
Label
— (String
)A column label.
Type
— required — (String
)The data type of the column.
Precision
— (Integer
)For
DECIMAL
data types, specifies the total number of digits, up to 38. For performance reasons, we recommend up to 18 digits.Scale
— (Integer
)For
DECIMAL
data types, specifies the total number of digits in the fractional part of the value. Defaults to 0.Nullable
— (String
)Unsupported constraint. This value always shows as
Possible values include:UNKNOWN
."NOT_NULL"
"NULLABLE"
"UNKNOWN"
CaseSensitive
— (Boolean
)Indicates whether values in the column are case-sensitive.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.
-
(AWS.Response)
—
Returns:
getQueryRuntimeStatistics(params = {}, callback) ⇒ AWS.Request
Returns query execution runtime statistics related to a single execution of a query if you have access to the workgroup in which the query ran. Statistics from the
Timeline
section of the response object are available as soon as QueryExecutionStatus$State is in a SUCCEEDED or FAILED state. The remaining non-timeline statistics in the response (like stage-level input and output row count and data size) are updated asynchronously and may not be available immediately after a query completes. The non-timeline statistics are also not included when a query has row-level filters defined in Lake Formation.Service Reference:
Examples:
Calling the getQueryRuntimeStatistics operation
var params = { QueryExecutionId: 'STRING_VALUE' /* required */ }; athena.getQueryRuntimeStatistics(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
QueryExecutionId
— (String
)The unique ID of the query execution.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:QueryRuntimeStatistics
— (map
)Runtime statistics about the query execution.
Timeline
— (map
)Timeline statistics such as query queue time, planning time, execution time, service processing time, and total execution time.
QueryQueueTimeInMillis
— (Integer
)The number of milliseconds that the query was in your query queue waiting for resources. Note that if transient errors occur, Athena might automatically add the query back to the queue.
ServicePreProcessingTimeInMillis
— (Integer
)The number of milliseconds that Athena spends on preprocessing before it submits the query to the engine.
QueryPlanningTimeInMillis
— (Integer
)The number of milliseconds that Athena took to plan the query processing flow. This includes the time spent retrieving table partitions from the data source. Note that because the query engine performs the query planning, query planning time is a subset of engine processing time.
EngineExecutionTimeInMillis
— (Integer
)The number of milliseconds that the query took to execute.
ServiceProcessingTimeInMillis
— (Integer
)The number of milliseconds that Athena took to finalize and publish the query results after the query engine finished running the query.
TotalExecutionTimeInMillis
— (Integer
)The number of milliseconds that Athena took to run the query.
Rows
— (map
)Statistics such as input rows and bytes read by the query, rows and bytes output by the query, and the number of rows written by the query.
InputRows
— (Integer
)The number of rows read to execute the query.
InputBytes
— (Integer
)The number of bytes read to execute the query.
OutputBytes
— (Integer
)The number of bytes returned by the query.
OutputRows
— (Integer
)The number of rows returned by the query.
OutputStage
— (map
)Stage statistics such as input and output rows and bytes, execution time, and stage state. This information also includes substages and the query stage plan.
StageId
— (Integer
)The identifier for a stage.
State
— (String
)State of the stage after query execution.
OutputBytes
— (Integer
)The number of bytes output from the stage after execution.
OutputRows
— (Integer
)The number of rows output from the stage after execution.
InputBytes
— (Integer
)The number of bytes input into the stage for execution.
InputRows
— (Integer
)The number of rows input into the stage for execution.
ExecutionTime
— (Integer
)Time taken to execute this stage.
QueryStagePlan
— (map
)Stage plan information such as name, identifier, sub plans, and source stages.
Name
— (String
)Name of the query stage plan that describes the operation this stage is performing as part of query execution.
Identifier
— (String
)Information about the operation this query stage plan node is performing.
Children
— (Array<map>
)Stage plan information such as name, identifier, sub plans, and remote sources of child plan nodes/
RemoteSources
— (Array<String>
)Source plan node IDs.
SubStages
— (Array<map>
)List of sub query stages that form this stage execution plan.
-
(AWS.Response)
—
Returns:
getSession(params = {}, callback) ⇒ AWS.Request
Gets the full details of a previously created session, including the session status and configuration.
Service Reference:
Examples:
Calling the getSession operation
var params = { SessionId: 'STRING_VALUE' /* required */ }; athena.getSession(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SessionId
— (String
)The session ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:SessionId
— (String
)The session ID.
Description
— (String
)The session description.
WorkGroup
— (String
)The workgroup to which the session belongs.
EngineVersion
— (String
)The engine version used by the session (for example,
PySpark engine version 3
). You can get a list of engine versions by calling ListEngineVersions.EngineConfiguration
— (map
)Contains engine configuration information like DPU usage.
CoordinatorDpuSize
— (Integer
)The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates processing work and manages other executors in a notebook session. The default is 1.
MaxConcurrentDpus
— required — (Integer
)The maximum number of DPUs that can run concurrently.
DefaultExecutorDpuSize
— (Integer
)The default number of DPUs to use for executors. An executor is the smallest unit of compute that a notebook session can request from Athena. The default is 1.
AdditionalConfigs
— (map<String>
)Contains additional notebook engine
MAP<string, string>
parameter mappings in the form of key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve, specify a value for the StartSessionRequest$NotebookVersion field, and then add a key namedNotebookId
toAdditionalConfigs
that has the value of the Athena notebook ID.SparkProperties
— (map<String>
)Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and general Spark tuning.
NotebookVersion
— (String
)The notebook version.
SessionConfiguration
— (map
)Contains the workgroup configuration information used by the session.
ExecutionRole
— (String
)The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups.
WorkingDirectory
— (String
)The Amazon S3 location that stores information for the notebook.
IdleTimeoutSeconds
— (Integer
)The idle timeout in seconds for the session.
EncryptionConfiguration
— (map
)If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example,
SSE_KMS
orCSE_KMS
) and key information.EncryptionOption
— required — (String
)Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (
SSE_S3
), server-side encryption with KMS-managed keys (SSE_KMS
), or client-side encryption with KMS-managed keys (CSE_KMS
) is used.If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup.
Possible values include:"SSE_S3"
"SSE_KMS"
"CSE_KMS"
KmsKey
— (String
)For
SSE_KMS
andCSE_KMS
, this is the KMS key ARN or ID.
Status
— (map
)Contains information about the status of the session.
StartDateTime
— (Date
)The date and time that the session started.
LastModifiedDateTime
— (Date
)The most recent date and time that the session was modified.
EndDateTime
— (Date
)The date and time that the session ended.
IdleSinceDateTime
— (Date
)The date and time starting at which the session became idle. Can be empty if the session is not currently idle.
State
— (String
)The state of the session. A description of each state follows.
CREATING
- The session is being started, including acquiring resources.CREATED
- The session has been started.IDLE
- The session is able to accept a calculation.BUSY
- The session is processing another task and is unable to accept a calculation.TERMINATING
- The session is in the process of shutting down.TERMINATED
- The session and its resources are no longer running.DEGRADED
- The session has no healthy coordinators.FAILED
- Due to a failure, the session and its resources are no longer running."CREATING"
"CREATED"
"IDLE"
"BUSY"
"TERMINATING"
"TERMINATED"
"DEGRADED"
"FAILED"
StateChangeReason
— (String
)The reason for the session state change (for example, canceled because the session was terminated).
Statistics
— (map
)Contains the DPU execution time.
DpuExecutionInMillis
— (Integer
)The data processing unit execution time for a session in milliseconds.
-
(AWS.Response)
—
Returns:
getSessionStatus(params = {}, callback) ⇒ AWS.Request
Gets the current status of a session.
Service Reference:
Examples:
Calling the getSessionStatus operation
var params = { SessionId: 'STRING_VALUE' /* required */ }; athena.getSessionStatus(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SessionId
— (String
)The session ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:SessionId
— (String
)The session ID.
Status
— (map
)Contains information about the status of the session.
StartDateTime
— (Date
)The date and time that the session started.
LastModifiedDateTime
— (Date
)The most recent date and time that the session was modified.
EndDateTime
— (Date
)The date and time that the session ended.
IdleSinceDateTime
— (Date
)The date and time starting at which the session became idle. Can be empty if the session is not currently idle.
State
— (String
)The state of the session. A description of each state follows.
CREATING
- The session is being started, including acquiring resources.CREATED
- The session has been started.IDLE
- The session is able to accept a calculation.BUSY
- The session is processing another task and is unable to accept a calculation.TERMINATING
- The session is in the process of shutting down.TERMINATED
- The session and its resources are no longer running.DEGRADED
- The session has no healthy coordinators.FAILED
- Due to a failure, the session and its resources are no longer running."CREATING"
"CREATED"
"IDLE"
"BUSY"
"TERMINATING"
"TERMINATED"
"DEGRADED"
"FAILED"
StateChangeReason
— (String
)The reason for the session state change (for example, canceled because the session was terminated).
-
(AWS.Response)
—
Returns:
getTableMetadata(params = {}, callback) ⇒ AWS.Request
Returns table metadata for the specified catalog, database, and table.
Service Reference:
Examples:
Calling the getTableMetadata operation
var params = { CatalogName: 'STRING_VALUE', /* required */ DatabaseName: 'STRING_VALUE', /* required */ TableName: 'STRING_VALUE', /* required */ WorkGroup: 'STRING_VALUE' }; athena.getTableMetadata(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CatalogName
— (String
)The name of the data catalog that contains the database and table metadata to return.
DatabaseName
— (String
)The name of the database that contains the table metadata to return.
TableName
— (String
)The name of the table for which metadata is returned.
WorkGroup
— (String
)The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:TableMetadata
— (map
)An object that contains table metadata.
Name
— required — (String
)The name of the table.
CreateTime
— (Date
)The time that the table was created.
LastAccessTime
— (Date
)The last time the table was accessed.
TableType
— (String
)The type of table. In Athena, only
EXTERNAL_TABLE
is supported.Columns
— (Array<map>
)A list of the columns in the table.
Name
— required — (String
)The name of the column.
Type
— (String
)The data type of the column.
Comment
— (String
)Optional information about the column.
PartitionKeys
— (Array<map>
)A list of the partition keys in the table.
Name
— required — (String
)The name of the column.
Type
— (String
)The data type of the column.
Comment
— (String
)Optional information about the column.
Parameters
— (map<String>
)A set of custom key/value pairs for table properties.
-
(AWS.Response)
—
Returns:
getWorkGroup(params = {}, callback) ⇒ AWS.Request
Returns information about the workgroup with the specified name.
Service Reference:
Examples:
Calling the getWorkGroup operation
var params = { WorkGroup: 'STRING_VALUE' /* required */ }; athena.getWorkGroup(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
WorkGroup
— (String
)The name of the workgroup.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:WorkGroup
— (map
)Information about the workgroup.
Name
— required — (String
)The workgroup name.
State
— (String
)The state of the workgroup: ENABLED or DISABLED.
Possible values include:"ENABLED"
"DISABLED"
Configuration
— (map
)The configuration of the workgroup, which includes the location in Amazon S3 where query and calculation results are stored, the encryption configuration, if any, used for query and calculation results; whether the Amazon CloudWatch Metrics are enabled for the workgroup; whether workgroup settings override client-side settings; and the data usage limits for the amount of data scanned per query or per workgroup. The workgroup settings override is specified in
EnforceWorkGroupConfiguration
(true/false) in theWorkGroupConfiguration
. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.ResultConfiguration
— (map
)The configuration for the workgroup, which includes the location in Amazon S3 where query and calculation results are stored and the encryption option, if any, used for query and calculation results. To run the query, you must specify the query results location using one of the ways: either in the workgroup using this setting, or for individual queries (client-side), using ResultConfiguration$OutputLocation. If none of them is set, Athena issues an error that no output location is provided.
OutputLocation
— (String
)The location in Amazon S3 where your query and calculation results are stored, such as
s3://path/to/query/bucket/
. To run the query, you must specify the query results location using one of the ways: either for individual queries using either this setting (client-side), or in the workgroup, using WorkGroupConfiguration. If none of them is set, Athena issues an error that no output location is provided. If workgroup settings override client-side settings, then the query uses the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.EncryptionConfiguration
— (map
)If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example,
SSE_KMS
orCSE_KMS
) and key information. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.EncryptionOption
— required — (String
)Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (
SSE_S3
), server-side encryption with KMS-managed keys (SSE_KMS
), or client-side encryption with KMS-managed keys (CSE_KMS
) is used.If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup.
Possible values include:"SSE_S3"
"SSE_KMS"
"CSE_KMS"
KmsKey
— (String
)For
SSE_KMS
andCSE_KMS
, this is the KMS key ARN or ID.
ExpectedBucketOwner
— (String
)The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If set, Athena uses the value for
ExpectedBucketOwner
when it makes Amazon S3 calls to your specified output location. If theExpectedBucketOwner
Amazon Web Services account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error.This is a client-side setting. If workgroup settings override client-side settings, then the query uses the
ExpectedBucketOwner
setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.AclConfiguration
— (map
)Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results. Currently the only supported canned ACL is
BUCKET_OWNER_FULL_CONTROL
. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ACL configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. For more information, see WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.S3AclOption
— required — (String
)The Amazon S3 canned ACL that Athena should specify when storing query results. Currently the only supported canned ACL is
Possible values include:BUCKET_OWNER_FULL_CONTROL
. If a query runs in a workgroup and the workgroup overrides client-side settings, then the Amazon S3 canned ACL specified in the workgroup's settings is used for all queries that run in the workgroup. For more information about Amazon S3 canned ACLs, see Canned ACL in the Amazon S3 User Guide."BUCKET_OWNER_FULL_CONTROL"
EnforceWorkGroupConfiguration
— (Boolean
)If set to "true", the settings for the workgroup override client-side settings. If set to "false", client-side settings are used. For more information, see Workgroup Settings Override Client-Side Settings.
PublishCloudWatchMetricsEnabled
— (Boolean
)Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.
BytesScannedCutoffPerQuery
— (Integer
)The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.
RequesterPaysEnabled
— (Boolean
)If set to
true
, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets in queries. If set tofalse
, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default isfalse
. For more information about Requester Pays buckets, see Requester Pays Buckets in the Amazon Simple Storage Service Developer Guide.EngineVersion
— (map
)The engine version that all queries running on the workgroup use. Queries on the
AmazonAthenaPreviewFunctionality
workgroup run on the preview engine regardless of this setting.SelectedEngineVersion
— (String
)The engine version requested by the user. Possible values are determined by the output of
ListEngineVersions
, including AUTO. The default is AUTO.EffectiveEngineVersion
— (String
)Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a
CreateWorkGroup
orUpdateWorkGroup
operation, theEffectiveEngineVersion
field is ignored.
AdditionalConfiguration
— (String
)Specifies a user defined JSON string that is passed to the notebook engine.
ExecutionRole
— (String
)The ARN of the execution role used to access user resources for Spark sessions and IAM Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and IAM Identity Center enabled workgroups. The property is required for IAM Identity Center enabled workgroups.
CustomerContentEncryptionConfiguration
— (map
)Specifies the KMS key that is used to encrypt the user's data stores in Athena. This setting does not apply to Athena SQL workgroups.
KmsKey
— required — (String
)The customer managed KMS key that is used to encrypt the user's data stores in Athena.
EnableMinimumEncryptionConfiguration
— (Boolean
)Enforces a minimal level of encryption for the workgroup for query and calculation results that are written to Amazon S3. When enabled, workgroup users can set encryption only to the minimum level set by the administrator or higher when they submit queries.
The
EnforceWorkGroupConfiguration
setting takes precedence over theEnableMinimumEncryptionConfiguration
flag. This means that ifEnforceWorkGroupConfiguration
is true, theEnableMinimumEncryptionConfiguration
flag is ignored, and the workgroup configuration for encryption is used.IdentityCenterConfiguration
— (map
)Specifies whether the workgroup is IAM Identity Center supported.
EnableIdentityCenter
— (Boolean
)Specifies whether the workgroup is IAM Identity Center supported.
IdentityCenterInstanceArn
— (String
)The IAM Identity Center instance ARN that the workgroup associates to.
QueryResultsS3AccessGrantsConfiguration
— (map
)Specifies whether Amazon S3 access grants are enabled for query results.
EnableS3AccessGrants
— required — (Boolean
)Specifies whether Amazon S3 access grants are enabled for query results.
CreateUserLevelPrefix
— (Boolean
)When enabled, appends the user ID as an Amazon S3 path prefix to the query result output location.
AuthenticationType
— required — (String
)The authentication type used for Amazon S3 access grants. Currently, only
Possible values include:DIRECTORY_IDENTITY
is supported."DIRECTORY_IDENTITY"
Description
— (String
)The workgroup description.
CreationTime
— (Date
)The date and time the workgroup was created.
IdentityCenterApplicationArn
— (String
)The ARN of the IAM Identity Center enabled application associated with the workgroup.
-
(AWS.Response)
—
Returns:
importNotebook(params = {}, callback) ⇒ AWS.Request
Imports a single
ipynb
file to a Spark enabled workgroup. To import the notebook, the request must specify a value for eitherPayload
orNoteBookS3LocationUri
. If neither is specified or both are specified, anInvalidRequestException
occurs. The maximum file size that can be imported is 10 megabytes. If anipynb
file with the same name already exists in the workgroup, throws an error.Service Reference:
Examples:
Calling the importNotebook operation
var params = { Name: 'STRING_VALUE', /* required */ Type: IPYNB, /* required */ WorkGroup: 'STRING_VALUE', /* required */ ClientRequestToken: 'STRING_VALUE', NotebookS3LocationUri: 'STRING_VALUE', Payload: 'STRING_VALUE' }; athena.importNotebook(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
WorkGroup
— (String
)The name of the Spark enabled workgroup to import the notebook to.
Name
— (String
)The name of the notebook to import.
Payload
— (String
)The notebook content to be imported. The payload must be in
ipynb
format.Type
— (String
)The notebook content type. Currently, the only valid type is
Possible values include:IPYNB
."IPYNB"
NotebookS3LocationUri
— (String
)A URI that specifies the Amazon S3 location of a notebook file in
ipynb
format.ClientRequestToken
— (String
)A unique case-sensitive string used to ensure the request to import the notebook is idempotent (executes only once).
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 you. 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.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NotebookId
— (String
)The ID assigned to the imported notebook.
-
(AWS.Response)
—
Returns:
listApplicationDPUSizes(params = {}, callback) ⇒ AWS.Request
Returns the supported DPU sizes for the supported application runtimes (for example,
Athena notebook version 1
).Service Reference:
Examples:
Calling the listApplicationDPUSizes operation
var params = { MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; athena.listApplicationDPUSizes(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
MaxResults
— (Integer
)Specifies the maximum number of results to return.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:ApplicationDPUSizes
— (Array<map>
)A list of the supported DPU sizes that the application runtime supports.
ApplicationRuntimeId
— (String
)The name of the supported application runtime (for example,
Athena notebook version 1
).SupportedDPUSizes
— (Array<Integer>
)A list of the supported DPU sizes that the application runtime supports.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.
-
(AWS.Response)
—
Returns:
listCalculationExecutions(params = {}, callback) ⇒ AWS.Request
Lists the calculations that have been submitted to a session in descending order. Newer calculations are listed first; older calculations are listed later.
Service Reference:
Examples:
Calling the listCalculationExecutions operation
var params = { SessionId: 'STRING_VALUE', /* required */ MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE', StateFilter: CREATING | CREATED | QUEUED | RUNNING | CANCELING | CANCELED | COMPLETED | FAILED }; athena.listCalculationExecutions(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SessionId
— (String
)The session ID.
StateFilter
— (String
)A filter for a specific calculation execution state. A description of each state follows.
CREATING
- The calculation is in the process of being created.CREATED
- The calculation has been created and is ready to run.QUEUED
- The calculation has been queued for processing.RUNNING
- The calculation is running.CANCELING
- A request to cancel the calculation has been received and the system is working to stop it.CANCELED
- The calculation is no longer running as the result of a cancel request.COMPLETED
- The calculation has completed without error.FAILED
- The calculation failed and is no longer running."CREATING"
"CREATED"
"QUEUED"
"RUNNING"
"CANCELING"
"CANCELED"
"COMPLETED"
"FAILED"
MaxResults
— (Integer
)The maximum number of calculation executions to return.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.Calculations
— (Array<map>
)A list of CalculationSummary objects.
CalculationExecutionId
— (String
)The calculation execution UUID.
Description
— (String
)A description of the calculation.
Status
— (map
)Contains information about the status of the calculation.
SubmissionDateTime
— (Date
)The date and time the calculation was submitted for processing.
CompletionDateTime
— (Date
)The date and time the calculation completed processing.
State
— (String
)The state of the calculation execution. A description of each state follows.
CREATING
- The calculation is in the process of being created.CREATED
- The calculation has been created and is ready to run.QUEUED
- The calculation has been queued for processing.RUNNING
- The calculation is running.CANCELING
- A request to cancel the calculation has been received and the system is working to stop it.CANCELED
- The calculation is no longer running as the result of a cancel request.COMPLETED
- The calculation has completed without error.FAILED
- The calculation failed and is no longer running."CREATING"
"CREATED"
"QUEUED"
"RUNNING"
"CANCELING"
"CANCELED"
"COMPLETED"
"FAILED"
StateChangeReason
— (String
)The reason for the calculation state change (for example, the calculation was canceled because the session was terminated).
-
(AWS.Response)
—
Returns:
listCapacityReservations(params = {}, callback) ⇒ AWS.Request
Lists the capacity reservations for the current account.
Service Reference:
Examples:
Calling the listCapacityReservations operation
var params = { MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; athena.listCapacityReservations(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated.
MaxResults
— (Integer
)Specifies the maximum number of results to return.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
CapacityReservations
— (Array<map>
)The capacity reservations for the current account.
Name
— required — (String
)The name of the capacity reservation.
Status
— required — (String
)The status of the capacity reservation.
Possible values include:"PENDING"
"ACTIVE"
"CANCELLING"
"CANCELLED"
"FAILED"
"UPDATE_PENDING"
TargetDpus
— required — (Integer
)The number of data processing units requested.
AllocatedDpus
— required — (Integer
)The number of data processing units currently allocated.
LastAllocation
— (map
)Contains the submission time of a single allocation request for a capacity reservation and the most recent status of the attempted allocation.
Status
— required — (String
)The status of the capacity allocation.
Possible values include:"PENDING"
"SUCCEEDED"
"FAILED"
StatusMessage
— (String
)The status message of the capacity allocation.
RequestTime
— required — (Date
)The time when the capacity allocation was requested.
RequestCompletionTime
— (Date
)The time when the capacity allocation request was completed.
LastSuccessfulAllocationTime
— (Date
)The time of the most recent capacity allocation that succeeded.
CreationTime
— required — (Date
)The time in UTC epoch millis when the capacity reservation was created.
-
(AWS.Response)
—
Returns:
listDatabases(params = {}, callback) ⇒ AWS.Request
Lists the databases in the specified data catalog.
Service Reference:
Examples:
Calling the listDatabases operation
var params = { CatalogName: 'STRING_VALUE', /* required */ MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE', WorkGroup: 'STRING_VALUE' }; athena.listDatabases(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CatalogName
— (String
)The name of the data catalog that contains the databases to return.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.MaxResults
— (Integer
)Specifies the maximum number of results to return.
WorkGroup
— (String
)The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:DatabaseList
— (Array<map>
)A list of databases from a data catalog.
Name
— required — (String
)The name of the database.
Description
— (String
)An optional description of the database.
Parameters
— (map<String>
)A set of custom key/value pairs.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
-
(AWS.Response)
—
Returns:
listDataCatalogs(params = {}, callback) ⇒ AWS.Request
Lists the data catalogs in the current Amazon Web Services account.
Note: In the Athena console, data catalogs are listed as "data sources" on the Data sources page under the Data source name column.Service Reference:
Examples:
Calling the listDataCatalogs operation
var params = { MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE', WorkGroup: 'STRING_VALUE' }; athena.listDataCatalogs(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
MaxResults
— (Integer
)Specifies the maximum number of data catalogs to return.
WorkGroup
— (String
)The name of the workgroup. Required if making an IAM Identity Center request.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:DataCatalogsSummary
— (Array<map>
)A summary list of data catalogs.
CatalogName
— (String
)The name of the data catalog. The catalog name is unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.
Type
— (String
)The data catalog type.
Possible values include:"LAMBDA"
"GLUE"
"HIVE"
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
-
(AWS.Response)
—
Returns:
listEngineVersions(params = {}, callback) ⇒ AWS.Request
Returns a list of engine versions that are available to choose from, including the Auto option.
Service Reference:
Examples:
Calling the listEngineVersions operation
var params = { MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; athena.listEngineVersions(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.MaxResults
— (Integer
)The maximum number of engine versions to return in this request.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:EngineVersions
— (Array<map>
)A list of engine versions that are available to choose from.
SelectedEngineVersion
— (String
)The engine version requested by the user. Possible values are determined by the output of
ListEngineVersions
, including AUTO. The default is AUTO.EffectiveEngineVersion
— (String
)Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a
CreateWorkGroup
orUpdateWorkGroup
operation, theEffectiveEngineVersion
field is ignored.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.
-
(AWS.Response)
—
Returns:
listExecutors(params = {}, callback) ⇒ AWS.Request
Lists, in descending order, the executors that joined a session. Newer executors are listed first; older executors are listed later. The result can be optionally filtered by state.
Service Reference:
Examples:
Calling the listExecutors operation
var params = { SessionId: 'STRING_VALUE', /* required */ ExecutorStateFilter: CREATING | CREATED | REGISTERED | TERMINATING | TERMINATED | FAILED, MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; athena.listExecutors(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SessionId
— (String
)The session ID.
ExecutorStateFilter
— (String
)A filter for a specific executor state. A description of each state follows.
CREATING
- The executor is being started, including acquiring resources.CREATED
- The executor has been started.REGISTERED
- The executor has been registered.TERMINATING
- The executor is in the process of shutting down.TERMINATED
- The executor is no longer running.FAILED
- Due to a failure, the executor is no longer running."CREATING"
"CREATED"
"REGISTERED"
"TERMINATING"
"TERMINATED"
"FAILED"
MaxResults
— (Integer
)The maximum number of executors to return.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:SessionId
— (String
)The session ID.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.ExecutorsSummary
— (Array<map>
)Contains summary information about the executor.
ExecutorId
— required — (String
)The UUID of the executor.
ExecutorType
— (String
)The type of executor used for the application (
Possible values include:COORDINATOR
,GATEWAY
, orWORKER
)."COORDINATOR"
"GATEWAY"
"WORKER"
StartDateTime
— (Integer
)The date and time that the executor started.
TerminationDateTime
— (Integer
)The date and time that the executor was terminated.
ExecutorState
— (String
)The processing state of the executor. A description of each state follows.
CREATING
- The executor is being started, including acquiring resources.CREATED
- The executor has been started.REGISTERED
- The executor has been registered.TERMINATING
- The executor is in the process of shutting down.TERMINATED
- The executor is no longer running.FAILED
- Due to a failure, the executor is no longer running."CREATING"
"CREATED"
"REGISTERED"
"TERMINATING"
"TERMINATED"
"FAILED"
ExecutorSize
— (Integer
)The smallest unit of compute that a session can request from Athena. Size is measured in data processing unit (DPU) values, a relative measure of processing power.
-
(AWS.Response)
—
Returns:
listNamedQueries(params = {}, callback) ⇒ AWS.Request
Provides a list of available query IDs only for queries saved in the specified workgroup. Requires that you have access to the specified workgroup. If a workgroup is not specified, lists the saved queries for the primary workgroup.
Service Reference:
Examples:
Calling the listNamedQueries operation
var params = { MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE', WorkGroup: 'STRING_VALUE' }; athena.listNamedQueries(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.MaxResults
— (Integer
)The maximum number of queries to return in this request.
WorkGroup
— (String
)The name of the workgroup from which the named queries are being returned. If a workgroup is not specified, the saved queries for the primary workgroup are returned.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NamedQueryIds
— (Array<String>
)The list of unique query IDs.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.
-
(AWS.Response)
—
Returns:
listNotebookMetadata(params = {}, callback) ⇒ AWS.Request
Displays the notebook files for the specified workgroup in paginated format.
Service Reference:
Examples:
Calling the listNotebookMetadata operation
var params = { WorkGroup: 'STRING_VALUE', /* required */ Filters: { Name: 'STRING_VALUE' }, MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; athena.listNotebookMetadata(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Filters
— (map
)Search filter string.
Name
— (String
)The name of the notebook to search for.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated.
MaxResults
— (Integer
)Specifies the maximum number of results to return.
WorkGroup
— (String
)The name of the Spark enabled workgroup to retrieve notebook metadata for.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.NotebookMetadataList
— (Array<map>
)The list of notebook metadata for the specified workgroup.
NotebookId
— (String
)The notebook ID.
Name
— (String
)The name of the notebook.
WorkGroup
— (String
)The name of the Spark enabled workgroup to which the notebook belongs.
CreationTime
— (Date
)The time when the notebook was created.
Type
— (String
)The type of notebook. Currently, the only valid type is
Possible values include:IPYNB
."IPYNB"
LastModifiedTime
— (Date
)The time when the notebook was last modified.
-
(AWS.Response)
—
Returns:
listNotebookSessions(params = {}, callback) ⇒ AWS.Request
Lists, in descending order, the sessions that have been created in a notebook that are in an active state like
CREATING
,CREATED
,IDLE
orBUSY
. Newer sessions are listed first; older sessions are listed later.Service Reference:
Examples:
Calling the listNotebookSessions operation
var params = { NotebookId: 'STRING_VALUE', /* required */ MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; athena.listNotebookSessions(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NotebookId
— (String
)The ID of the notebook to list sessions for.
MaxResults
— (Integer
)The maximum number of notebook sessions to return.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NotebookSessionsList
— (Array<map>
)A list of the sessions belonging to the notebook.
SessionId
— (String
)The notebook session ID.
CreationTime
— (Date
)The time when the notebook session was created.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.
-
(AWS.Response)
—
Returns:
listPreparedStatements(params = {}, callback) ⇒ AWS.Request
Lists the prepared statements in the specified workgroup.
Service Reference:
Examples:
Calling the listPreparedStatements operation
var params = { WorkGroup: 'STRING_VALUE', /* required */ MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; athena.listPreparedStatements(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
WorkGroup
— (String
)The workgroup to list the prepared statements for.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.MaxResults
— (Integer
)The maximum number of results to return in this request.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:PreparedStatements
— (Array<map>
)The list of prepared statements for the workgroup.
StatementName
— (String
)The name of the prepared statement.
LastModifiedTime
— (Date
)The last modified time of the prepared statement.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.
-
(AWS.Response)
—
Returns:
listQueryExecutions(params = {}, callback) ⇒ AWS.Request
Provides a list of available query execution IDs for the queries in the specified workgroup. Athena keeps a query history for 45 days. If a workgroup is not specified, returns a list of query execution IDs for the primary workgroup. Requires you to have access to the workgroup in which the queries ran.
Service Reference:
Examples:
Calling the listQueryExecutions operation
var params = { MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE', WorkGroup: 'STRING_VALUE' }; athena.listQueryExecutions(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.MaxResults
— (Integer
)The maximum number of query executions to return in this request.
WorkGroup
— (String
)The name of the workgroup from which queries are being returned. If a workgroup is not specified, a list of available query execution IDs for the queries in the primary workgroup is returned.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:QueryExecutionIds
— (Array<String>
)The unique IDs of each query execution as an array of strings.
NextToken
— (String
)A token to be used by the next request if this request is truncated.
-
(AWS.Response)
—
Returns:
listSessions(params = {}, callback) ⇒ AWS.Request
Lists the sessions in a workgroup that are in an active state like
CREATING
,CREATED
,IDLE
, orBUSY
. Newer sessions are listed first; older sessions are listed later.Service Reference:
Examples:
Calling the listSessions operation
var params = { WorkGroup: 'STRING_VALUE', /* required */ MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE', StateFilter: CREATING | CREATED | IDLE | BUSY | TERMINATING | TERMINATED | DEGRADED | FAILED }; athena.listSessions(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
WorkGroup
— (String
)The workgroup to which the session belongs.
StateFilter
— (String
)A filter for a specific session state. A description of each state follows.
CREATING
- The session is being started, including acquiring resources.CREATED
- The session has been started.IDLE
- The session is able to accept a calculation.BUSY
- The session is processing another task and is unable to accept a calculation.TERMINATING
- The session is in the process of shutting down.TERMINATED
- The session and its resources are no longer running.DEGRADED
- The session has no healthy coordinators.FAILED
- Due to a failure, the session and its resources are no longer running."CREATING"
"CREATED"
"IDLE"
"BUSY"
"TERMINATING"
"TERMINATED"
"DEGRADED"
"FAILED"
MaxResults
— (Integer
)The maximum number of sessions to return.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.Sessions
— (Array<map>
)A list of sessions.
SessionId
— (String
)The session ID.
Description
— (String
)The session description.
EngineVersion
— (map
)The engine version used by the session (for example,
PySpark engine version 3
).SelectedEngineVersion
— (String
)The engine version requested by the user. Possible values are determined by the output of
ListEngineVersions
, including AUTO. The default is AUTO.EffectiveEngineVersion
— (String
)Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a
CreateWorkGroup
orUpdateWorkGroup
operation, theEffectiveEngineVersion
field is ignored.
NotebookVersion
— (String
)The notebook version.
Status
— (map
)Contains information about the session status.
StartDateTime
— (Date
)The date and time that the session started.
LastModifiedDateTime
— (Date
)The most recent date and time that the session was modified.
EndDateTime
— (Date
)The date and time that the session ended.
IdleSinceDateTime
— (Date
)The date and time starting at which the session became idle. Can be empty if the session is not currently idle.
State
— (String
)The state of the session. A description of each state follows.
CREATING
- The session is being started, including acquiring resources.CREATED
- The session has been started.IDLE
- The session is able to accept a calculation.BUSY
- The session is processing another task and is unable to accept a calculation.TERMINATING
- The session is in the process of shutting down.TERMINATED
- The session and its resources are no longer running.DEGRADED
- The session has no healthy coordinators.FAILED
- Due to a failure, the session and its resources are no longer running."CREATING"
"CREATED"
"IDLE"
"BUSY"
"TERMINATING"
"TERMINATED"
"DEGRADED"
"FAILED"
StateChangeReason
— (String
)The reason for the session state change (for example, canceled because the session was terminated).
-
(AWS.Response)
—
Returns:
listTableMetadata(params = {}, callback) ⇒ AWS.Request
Lists the metadata for the tables in the specified data catalog database.
Service Reference:
Examples:
Calling the listTableMetadata operation
var params = { CatalogName: 'STRING_VALUE', /* required */ DatabaseName: 'STRING_VALUE', /* required */ Expression: 'STRING_VALUE', MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE', WorkGroup: 'STRING_VALUE' }; athena.listTableMetadata(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CatalogName
— (String
)The name of the data catalog for which table metadata should be returned.
DatabaseName
— (String
)The name of the database for which table metadata should be returned.
Expression
— (String
)A regex filter that pattern-matches table names. If no expression is supplied, metadata for all tables are listed.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
MaxResults
— (Integer
)Specifies the maximum number of results to return.
WorkGroup
— (String
)The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:TableMetadataList
— (Array<map>
)A list of table metadata.
Name
— required — (String
)The name of the table.
CreateTime
— (Date
)The time that the table was created.
LastAccessTime
— (Date
)The last time the table was accessed.
TableType
— (String
)The type of table. In Athena, only
EXTERNAL_TABLE
is supported.Columns
— (Array<map>
)A list of the columns in the table.
Name
— required — (String
)The name of the column.
Type
— (String
)The data type of the column.
Comment
— (String
)Optional information about the column.
PartitionKeys
— (Array<map>
)A list of the partition keys in the table.
Name
— required — (String
)The name of the column.
Type
— (String
)The data type of the column.
Comment
— (String
)Optional information about the column.
Parameters
— (map<String>
)A set of custom key/value pairs for table properties.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the NextToken from the response object of the previous page call.
-
(AWS.Response)
—
Returns:
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Lists the tags associated with an Athena resource.
Service Reference:
Examples:
Calling the listTagsForResource operation
var params = { ResourceARN: 'STRING_VALUE', /* required */ MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; athena.listTagsForResource(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceARN
— (String
)Lists the tags for the resource with the specified ARN.
NextToken
— (String
)The token for the next set of results, or null if there are no additional results for this request, where the request lists the tags for the resource with the specified ARN.
MaxResults
— (Integer
)The maximum number of results to be returned per request that lists the tags for the resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Tags
— (Array<map>
)The list of tags associated with the specified resource.
Key
— (String
)A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource.
Value
— (String
)A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive.
NextToken
— (String
)A token to be used by the next request if this request is truncated.
-
(AWS.Response)
—
Returns:
listWorkGroups(params = {}, callback) ⇒ AWS.Request
Lists available workgroups for the account.
Service Reference:
Examples:
Calling the listWorkGroups operation
var params = { MaxResults: 'NUMBER_VALUE', NextToken: 'STRING_VALUE' }; athena.listWorkGroups(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.MaxResults
— (Integer
)The maximum number of workgroups to return in this request.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:WorkGroups
— (Array<map>
)A list of WorkGroupSummary objects that include the names, descriptions, creation times, and states for each workgroup.
Name
— (String
)The name of the workgroup.
State
— (String
)The state of the workgroup.
Possible values include:"ENABLED"
"DISABLED"
Description
— (String
)The workgroup description.
CreationTime
— (Date
)The workgroup creation date and time.
EngineVersion
— (map
)The engine version setting for all queries on the workgroup. Queries on the
AmazonAthenaPreviewFunctionality
workgroup run on the preview engine regardless of this setting.SelectedEngineVersion
— (String
)The engine version requested by the user. Possible values are determined by the output of
ListEngineVersions
, including AUTO. The default is AUTO.EffectiveEngineVersion
— (String
)Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a
CreateWorkGroup
orUpdateWorkGroup
operation, theEffectiveEngineVersion
field is ignored.
IdentityCenterApplicationArn
— (String
)The ARN of the IAM Identity Center enabled application associated with the workgroup.
NextToken
— (String
)A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated. To obtain the next set of pages, pass in the
NextToken
from the response object of the previous page call.
-
(AWS.Response)
—
Returns:
putCapacityAssignmentConfiguration(params = {}, callback) ⇒ AWS.Request
Puts a new capacity assignment configuration for a specified capacity reservation. If a capacity assignment configuration already exists for the capacity reservation, replaces the existing capacity assignment configuration.
Service Reference:
Examples:
Calling the putCapacityAssignmentConfiguration operation
var params = { CapacityAssignments: [ /* required */ { WorkGroupNames: [ 'STRING_VALUE', /* more items */ ] }, /* more items */ ], CapacityReservationName: 'STRING_VALUE' /* required */ }; athena.putCapacityAssignmentConfiguration(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CapacityReservationName
— (String
)The name of the capacity reservation to put a capacity assignment configuration for.
CapacityAssignments
— (Array<map>
)The list of assignments for the capacity assignment configuration.
WorkGroupNames
— (Array<String>
)The list of workgroup names for the capacity assignment.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
startCalculationExecution(params = {}, callback) ⇒ AWS.Request
Submits calculations for execution within a session. You can supply the code to run as an inline code block within the request.
Note: The request syntax requires the StartCalculationExecutionRequest$CodeBlock parameter or the CalculationConfiguration$CodeBlock parameter, but not both. Because CalculationConfiguration$CodeBlock is deprecated, use the StartCalculationExecutionRequest$CodeBlock parameter instead.Service Reference:
Examples:
Calling the startCalculationExecution operation
var params = { SessionId: 'STRING_VALUE', /* required */ CalculationConfiguration: { CodeBlock: 'STRING_VALUE' }, ClientRequestToken: 'STRING_VALUE', CodeBlock: 'STRING_VALUE', Description: 'STRING_VALUE' }; athena.startCalculationExecution(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SessionId
— (String
)The session ID.
Description
— (String
)A description of the calculation.
CalculationConfiguration
— (map
)Contains configuration information for the calculation.
CodeBlock
— (String
)A string that contains the code for the calculation.
CodeBlock
— (String
)A string that contains the code of the calculation. Use this parameter instead of CalculationConfiguration$CodeBlock, which is deprecated.
ClientRequestToken
— (String
)A unique case-sensitive string used to ensure the request to create the calculation is idempotent (executes only once). If another
StartCalculationExecutionRequest
is received, the same response is returned and another calculation is not created. If a parameter has changed, 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.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:CalculationExecutionId
— (String
)The calculation execution UUID.
State
— (String
)CREATING
- The calculation is in the process of being created.CREATED
- The calculation has been created and is ready to run.QUEUED
- The calculation has been queued for processing.RUNNING
- The calculation is running.CANCELING
- A request to cancel the calculation has been received and the system is working to stop it.CANCELED
- The calculation is no longer running as the result of a cancel request.COMPLETED
- The calculation has completed without error.FAILED
- The calculation failed and is no longer running."CREATING"
"CREATED"
"QUEUED"
"RUNNING"
"CANCELING"
"CANCELED"
"COMPLETED"
"FAILED"
-
(AWS.Response)
—
Returns:
startQueryExecution(params = {}, callback) ⇒ AWS.Request
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.Service Reference:
Examples:
Calling the startQueryExecution operation
var params = { QueryString: 'STRING_VALUE', /* required */ ClientRequestToken: 'STRING_VALUE', ExecutionParameters: [ 'STRING_VALUE', /* more items */ ], QueryExecutionContext: { Catalog: 'STRING_VALUE', Database: 'STRING_VALUE' }, ResultConfiguration: { AclConfiguration: { S3AclOption: BUCKET_OWNER_FULL_CONTROL /* required */ }, EncryptionConfiguration: { EncryptionOption: SSE_S3 | SSE_KMS | CSE_KMS, /* required */ KmsKey: 'STRING_VALUE' }, ExpectedBucketOwner: 'STRING_VALUE', OutputLocation: 'STRING_VALUE' }, ResultReuseConfiguration: { ResultReuseByAgeConfiguration: { Enabled: true || false, /* required */ MaxAgeInMinutes: 'NUMBER_VALUE' } }, WorkGroup: 'STRING_VALUE' }; athena.startQueryExecution(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
QueryString
— (String
)The SQL query statements to be executed.
ClientRequestToken
— (String
)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. An error is returned if a parameter, such asQueryString
, has changed. A call toStartQueryExecution
that uses a previous client request token returns the sameQueryExecutionId
even if the requester doesn't have permission on the tables specified inQueryString
.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.
QueryExecutionContext
— (map
)The database within which the query executes.
Database
— (String
)The name of the database used in the query execution. The database must exist in the catalog.
Catalog
— (String
)The name of the data catalog used in the query execution.
ResultConfiguration
— (map
)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.
OutputLocation
— (String
)The location in Amazon S3 where your query and calculation results are stored, such as
s3://path/to/query/bucket/
. To run the query, you must specify the query results location using one of the ways: either for individual queries using either this setting (client-side), or in the workgroup, using WorkGroupConfiguration. If none of them is set, Athena issues an error that no output location is provided. If workgroup settings override client-side settings, then the query uses the settings specified for the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.EncryptionConfiguration
— (map
)If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example,
SSE_KMS
orCSE_KMS
) and key information. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the encryption configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.EncryptionOption
— required — (String
)Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (
SSE_S3
), server-side encryption with KMS-managed keys (SSE_KMS
), or client-side encryption with KMS-managed keys (CSE_KMS
) is used.If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup.
Possible values include:"SSE_S3"
"SSE_KMS"
"CSE_KMS"
KmsKey
— (String
)For
SSE_KMS
andCSE_KMS
, this is the KMS key ARN or ID.
ExpectedBucketOwner
— (String
)The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If set, Athena uses the value for
ExpectedBucketOwner
when it makes Amazon S3 calls to your specified output location. If theExpectedBucketOwner
Amazon Web Services account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error.This is a client-side setting. If workgroup settings override client-side settings, then the query uses the
ExpectedBucketOwner
setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.AclConfiguration
— (map
)Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results. Currently the only supported canned ACL is
BUCKET_OWNER_FULL_CONTROL
. This is a client-side setting. If workgroup settings override client-side settings, then the query uses the ACL configuration that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. For more information, see WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.S3AclOption
— required — (String
)The Amazon S3 canned ACL that Athena should specify when storing query results. Currently the only supported canned ACL is
Possible values include:BUCKET_OWNER_FULL_CONTROL
. If a query runs in a workgroup and the workgroup overrides client-side settings, then the Amazon S3 canned ACL specified in the workgroup's settings is used for all queries that run in the workgroup. For more information about Amazon S3 canned ACLs, see Canned ACL in the Amazon S3 User Guide."BUCKET_OWNER_FULL_CONTROL"
WorkGroup
— (String
)The name of the workgroup in which the query is being started.
ExecutionParameters
— (Array<String>
)A list of values for the parameters in a query. The values are applied sequentially to the parameters in the query in the order in which the parameters occur.
ResultReuseConfiguration
— (map
)Specifies the query result reuse behavior for the query.
ResultReuseByAgeConfiguration
— (map
)Specifies whether previous query results are reused, and if so, their maximum age.
Enabled
— required — (Boolean
)True if previous query results can be reused when the query is run; otherwise, false. The default is false.
MaxAgeInMinutes
— (Integer
)Specifies, in minutes, the maximum age of a previous query result that Athena should consider for reuse. The default is 60.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:QueryExecutionId
— (String
)The unique ID of the query that ran as a result of this request.
-
(AWS.Response)
—
Returns:
startSession(params = {}, callback) ⇒ AWS.Request
Creates a session for running calculations within a workgroup. The session is ready when it reaches an
IDLE
state.Service Reference:
Examples:
Calling the startSession operation
var params = { EngineConfiguration: { /* required */ MaxConcurrentDpus: 'NUMBER_VALUE', /* required */ AdditionalConfigs: { '<KeyString>': 'STRING_VALUE', /* '<KeyString>': ... */ }, CoordinatorDpuSize: 'NUMBER_VALUE', DefaultExecutorDpuSize: 'NUMBER_VALUE', SparkProperties: { '<KeyString>': 'STRING_VALUE', /* '<KeyString>': ... */ } }, WorkGroup: 'STRING_VALUE', /* required */ ClientRequestToken: 'STRING_VALUE', Description: 'STRING_VALUE', NotebookVersion: 'STRING_VALUE', SessionIdleTimeoutInMinutes: 'NUMBER_VALUE' }; athena.startSession(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Description
— (String
)The session description.
WorkGroup
— (String
)The workgroup to which the session belongs.
EngineConfiguration
— (map
)Contains engine data processing unit (DPU) configuration settings and parameter mappings.
CoordinatorDpuSize
— (Integer
)The number of DPUs to use for the coordinator. A coordinator is a special executor that orchestrates processing work and manages other executors in a notebook session. The default is 1.
MaxConcurrentDpus
— required — (Integer
)The maximum number of DPUs that can run concurrently.
DefaultExecutorDpuSize
— (Integer
)The default number of DPUs to use for executors. An executor is the smallest unit of compute that a notebook session can request from Athena. The default is 1.
AdditionalConfigs
— (map<String>
)Contains additional notebook engine
MAP<string, string>
parameter mappings in the form of key-value pairs. To specify an Athena notebook that the Jupyter server will download and serve, specify a value for the StartSessionRequest$NotebookVersion field, and then add a key namedNotebookId
toAdditionalConfigs
that has the value of the Athena notebook ID.SparkProperties
— (map<String>
)Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and general Spark tuning.
NotebookVersion
— (String
)The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not required for programmatic session access. The only valid notebook version is
Athena notebook version 1
. If you specify a value forNotebookVersion
, you must also specify a value forNotebookId
. See EngineConfiguration$AdditionalConfigs.SessionIdleTimeoutInMinutes
— (Integer
)The idle timeout in minutes for the session.
ClientRequestToken
— (String
)A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only once). If another
StartSessionRequest
is received, the same response is returned and another session is not created. If a parameter has changed, 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.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:SessionId
— (String
)The session ID.
State
— (String
)The state of the session. A description of each state follows.
CREATING
- The session is being started, including acquiring resources.CREATED
- The session has been started.IDLE
- The session is able to accept a calculation.BUSY
- The session is processing another task and is unable to accept a calculation.TERMINATING
- The session is in the process of shutting down.TERMINATED
- The session and its resources are no longer running.DEGRADED
- The session has no healthy coordinators.FAILED
- Due to a failure, the session and its resources are no longer running."CREATING"
"CREATED"
"IDLE"
"BUSY"
"TERMINATING"
"TERMINATED"
"DEGRADED"
"FAILED"
-
(AWS.Response)
—
Returns:
stopCalculationExecution(params = {}, callback) ⇒ AWS.Request
Requests the cancellation of a calculation. A
StopCalculationExecution
call on a calculation that is already in a terminal state (for example,STOPPED
,FAILED
, orCOMPLETED
) succeeds but has no effect.Note: Cancelling a calculation is done on a best effort basis. If a calculation cannot be cancelled, you can be charged for its completion. If you are concerned about being charged for a calculation that cannot be cancelled, consider terminating the session in which the calculation is running.Service Reference:
Examples:
Calling the stopCalculationExecution operation
var params = { CalculationExecutionId: 'STRING_VALUE' /* required */ }; athena.stopCalculationExecution(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
CalculationExecutionId
— (String
)The calculation execution UUID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:State
— (String
)CREATING
- The calculation is in the process of being created.CREATED
- The calculation has been created and is ready to run.QUEUED
- The calculation has been queued for processing.RUNNING
- The calculation is running.CANCELING
- A request to cancel the calculation has been received and the system is working to stop it.CANCELED
- The calculation is no longer running as the result of a cancel request.COMPLETED
- The calculation has completed without error.FAILED
- The calculation failed and is no longer running."CREATING"
"CREATED"
"QUEUED"
"RUNNING"
"CANCELING"
"CANCELED"
"COMPLETED"
"FAILED"
-
(AWS.Response)
—
Returns:
stopQueryExecution(params = {}, callback) ⇒ AWS.Request
Stops a query execution. Requires you to have access to the workgroup in which the query ran.
Service Reference:
Examples:
Calling the stopQueryExecution operation
var params = { QueryExecutionId: 'STRING_VALUE' /* required */ }; athena.stopQueryExecution(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
QueryExecutionId
— (String
)The unique ID of the query execution to stop.
If a token is not provided, the SDK will use a version 4 UUID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
tagResource(params = {}, callback) ⇒ AWS.Request
Adds one or more tags to an Athena resource. A tag is a label that you assign to a resource. Each tag consists of a key and an optional value, both of which you define. For example, you can use tags to categorize Athena workgroups, data catalogs, or capacity reservations by purpose, owner, or environment. Use a consistent set of tag keys to make it easier to search and filter the resources in your account. For best practices, see Tagging Best Practices. Tag keys can be from 1 to 128 UTF-8 Unicode characters, and tag values can be from 0 to 256 UTF-8 Unicode characters. Tags can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys and values are case-sensitive. Tag keys must be unique per resource. If you specify more than one tag, separate them by commas.
Service Reference:
Examples:
Calling the tagResource operation
var params = { ResourceARN: 'STRING_VALUE', /* required */ Tags: [ /* required */ { Key: 'STRING_VALUE', Value: 'STRING_VALUE' }, /* more items */ ] }; athena.tagResource(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceARN
— (String
)Specifies the ARN of the Athena resource to which tags are to be added.
Tags
— (Array<map>
)A collection of one or more tags, separated by commas, to be added to an Athena resource.
Key
— (String
)A tag key. The tag key length is from 1 to 128 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag keys are case-sensitive and must be unique per resource.
Value
— (String
)A tag value. The tag value length is from 0 to 256 Unicode characters in UTF-8. You can use letters and numbers representable in UTF-8, and the following characters: + - = . _ : / @. Tag values are case-sensitive.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
terminateSession(params = {}, callback) ⇒ AWS.Request
Terminates an active session. A
TerminateSession
call on a session that is already inactive (for example, in aFAILED
,TERMINATED
orTERMINATING
state) succeeds but has no effect. Calculations running in the session whenTerminateSession
is called are forcefully stopped, but may display asFAILED
instead ofSTOPPED
.Service Reference:
Examples:
Calling the terminateSession operation
var params = { SessionId: 'STRING_VALUE' /* required */ }; athena.terminateSession(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
SessionId
— (String
)The session ID.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:State
— (String
)The state of the session. A description of each state follows.
CREATING
- The session is being started, including acquiring resources.CREATED
- The session has been started.IDLE
- The session is able to accept a calculation.BUSY
- The session is processing another task and is unable to accept a calculation.TERMINATING
- The session is in the process of shutting down.TERMINATED
- The session and its resources are no longer running.DEGRADED
- The session has no healthy coordinators.FAILED
- Due to a failure, the session and its resources are no longer running."CREATING"
"CREATED"
"IDLE"
"BUSY"
"TERMINATING"
"TERMINATED"
"DEGRADED"
"FAILED"
-
(AWS.Response)
—
Returns:
untagResource(params = {}, callback) ⇒ AWS.Request
Removes one or more tags from an Athena resource.
Service Reference:
Examples:
Calling the untagResource operation
var params = { ResourceARN: 'STRING_VALUE', /* required */ TagKeys: [ /* required */ 'STRING_VALUE', /* more items */ ] }; athena.untagResource(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceARN
— (String
)Specifies the ARN of the resource from which tags are to be removed.
TagKeys
— (Array<String>
)A comma-separated list of one or more tag keys whose tags are to be removed from the specified resource.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updateCapacityReservation(params = {}, callback) ⇒ AWS.Request
Updates the number of requested data processing units for the capacity reservation with the specified name.
Service Reference:
Examples:
Calling the updateCapacityReservation operation
var params = { Name: 'STRING_VALUE', /* required */ TargetDpus: 'NUMBER_VALUE' /* required */ }; athena.updateCapacityReservation(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
TargetDpus
— (Integer
)The new number of requested data processing units.
Name
— (String
)The name of the capacity reservation.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updateDataCatalog(params = {}, callback) ⇒ AWS.Request
Updates the data catalog that has the specified name.
Service Reference:
Examples:
Calling the updateDataCatalog operation
var params = { Name: 'STRING_VALUE', /* required */ Type: LAMBDA | GLUE | HIVE, /* required */ Description: 'STRING_VALUE', Parameters: { '<KeyString>': 'STRING_VALUE', /* '<KeyString>': ... */ } }; athena.updateDataCatalog(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
Name
— (String
)The name of the data catalog to update. The catalog name must be unique for the Amazon Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign, or hyphen characters. The remainder of the length constraint of 256 is reserved for use by Athena.
Type
— (String
)Specifies the type of data catalog to update. Specify
Possible values include:LAMBDA
for a federated catalog,HIVE
for an external hive metastore, orGLUE
for an Glue Data Catalog."LAMBDA"
"GLUE"
"HIVE"
Description
— (String
)New or modified text that describes the data catalog.
Parameters
— (map<String>
)Specifies the Lambda function or functions to use for updating the data catalog. This is a mapping whose values depend on the catalog type.
-
For the
HIVE
data catalog type, use the following syntax. Themetadata-function
parameter is required.The sdk-version
parameter is optional and defaults to the currently supported version.metadata-function=lambda_arn, sdk-version=version_number
-
For the
LAMBDA
data catalog type, use one of the following sets of required parameters, but not both.-
If you have one Lambda function that processes metadata and another for reading the actual data, use the following syntax. Both parameters are required.
metadata-function=lambda_arn, record-function=lambda_arn
-
If you have a composite Lambda function that processes both metadata and data, use the following syntax to specify your Lambda function.
function=lambda_arn
-
-
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updateNamedQuery(params = {}, callback) ⇒ AWS.Request
Updates a NamedQuery object. The database or workgroup cannot be updated.
Service Reference:
Examples:
Calling the updateNamedQuery operation
var params = { Name: 'STRING_VALUE', /* required */ NamedQueryId: 'STRING_VALUE', /* required */ QueryString: 'STRING_VALUE', /* required */ Description: 'STRING_VALUE' }; athena.updateNamedQuery(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NamedQueryId
— (String
)The unique identifier (UUID) of the query.
Name
— (String
)The name of the query.
Description
— (String
)The query description.
QueryString
— (String
)The contents of the query with all query statements.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updateNotebook(params = {}, callback) ⇒ AWS.Request
Updates the contents of a Spark notebook.
Service Reference:
Examples:
Calling the updateNotebook operation
var params = { NotebookId: 'STRING_VALUE', /* required */ Payload: 'STRING_VALUE', /* required */ Type: IPYNB, /* required */ ClientRequestToken: 'STRING_VALUE', SessionId: 'STRING_VALUE' }; athena.updateNotebook(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NotebookId
— (String
)The ID of the notebook to update.
Payload
— (String
)The updated content for the notebook.
Type
— (String
)The notebook content type. Currently, the only valid type is
Possible values include:IPYNB
."IPYNB"
SessionId
— (String
)The active notebook session ID. Required if the notebook has an active session.
ClientRequestToken
— (String
)A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).
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 you. 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.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updateNotebookMetadata(params = {}, callback) ⇒ AWS.Request
Updates the metadata for a notebook.
Service Reference:
Examples:
Calling the updateNotebookMetadata operation
var params = { Name: 'STRING_VALUE', /* required */ NotebookId: 'STRING_VALUE', /* required */ ClientRequestToken: 'STRING_VALUE' }; athena.updateNotebookMetadata(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
NotebookId
— (String
)The ID of the notebook to update the metadata for.
ClientRequestToken
— (String
)A unique case-sensitive string used to ensure the request to create the notebook is idempotent (executes only once).
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 you. 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.
Name
— (String
)The name to update the notebook to.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updatePreparedStatement(params = {}, callback) ⇒ AWS.Request
Updates a prepared statement.
Service Reference:
Examples:
Calling the updatePreparedStatement operation
var params = { QueryStatement: 'STRING_VALUE', /* required */ StatementName: 'STRING_VALUE', /* required */ WorkGroup: 'STRING_VALUE', /* required */ Description: 'STRING_VALUE' }; athena.updatePreparedStatement(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
StatementName
— (String
)The name of the prepared statement.
WorkGroup
— (String
)The workgroup for the prepared statement.
QueryStatement
— (String
)The query string for the prepared statement.
Description
— (String
)The description of the prepared statement.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updateWorkGroup(params = {}, callback) ⇒ AWS.Request
Updates the workgroup with the specified name. The workgroup's name cannot be changed. Only
ConfigurationUpdates
can be specified.Service Reference:
Examples:
Calling the updateWorkGroup operation
var params = { WorkGroup: 'STRING_VALUE', /* required */ ConfigurationUpdates: { AdditionalConfiguration: 'STRING_VALUE', BytesScannedCutoffPerQuery: 'NUMBER_VALUE', CustomerContentEncryptionConfiguration: { KmsKey: 'STRING_VALUE' /* required */ }, EnableMinimumEncryptionConfiguration: true || false, EnforceWorkGroupConfiguration: true || false, EngineVersion: { EffectiveEngineVersion: 'STRING_VALUE', SelectedEngineVersion: 'STRING_VALUE' }, ExecutionRole: 'STRING_VALUE', PublishCloudWatchMetricsEnabled: true || false, QueryResultsS3AccessGrantsConfiguration: { AuthenticationType: DIRECTORY_IDENTITY, /* required */ EnableS3AccessGrants: true || false, /* required */ CreateUserLevelPrefix: true || false }, RemoveBytesScannedCutoffPerQuery: true || false, RemoveCustomerContentEncryptionConfiguration: true || false, RequesterPaysEnabled: true || false, ResultConfigurationUpdates: { AclConfiguration: { S3AclOption: BUCKET_OWNER_FULL_CONTROL /* required */ }, EncryptionConfiguration: { EncryptionOption: SSE_S3 | SSE_KMS | CSE_KMS, /* required */ KmsKey: 'STRING_VALUE' }, ExpectedBucketOwner: 'STRING_VALUE', OutputLocation: 'STRING_VALUE', RemoveAclConfiguration: true || false, RemoveEncryptionConfiguration: true || false, RemoveExpectedBucketOwner: true || false, RemoveOutputLocation: true || false } }, Description: 'STRING_VALUE', State: ENABLED | DISABLED }; athena.updateWorkGroup(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response });
Parameters:
-
params
(Object)
(defaults to: {})
—
WorkGroup
— (String
)The specified workgroup that will be updated.
Description
— (String
)The workgroup description.
ConfigurationUpdates
— (map
)Contains configuration updates for an Athena SQL workgroup.
EnforceWorkGroupConfiguration
— (Boolean
)If set to "true", the settings for the workgroup override client-side settings. If set to "false" client-side settings are used. For more information, see Workgroup Settings Override Client-Side Settings.
ResultConfigurationUpdates
— (map
)The result configuration information about the queries in this workgroup that will be updated. Includes the updated results location and an updated option for encrypting query results.
OutputLocation
— (String
)The location in Amazon S3 where your query and calculation results are stored, such as
s3://path/to/query/bucket/
. If workgroup settings override client-side settings, then the query uses the location for the query results and the encryption configuration that are specified for the workgroup. The "workgroup settings override" is specified inEnforceWorkGroupConfiguration
(true/false) in theWorkGroupConfiguration
. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.RemoveOutputLocation
— (Boolean
)If set to "true", indicates that the previously-specified query results location (also known as a client-side setting) for queries in this workgroup should be ignored and set to null. If set to "false" or not set, and a value is present in the
OutputLocation
inResultConfigurationUpdates
(the client-side setting), theOutputLocation
in the workgroup'sResultConfiguration
will be updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.EncryptionConfiguration
— (map
)The encryption configuration for query and calculation results.
EncryptionOption
— required — (String
)Indicates whether Amazon S3 server-side encryption with Amazon S3-managed keys (
SSE_S3
), server-side encryption with KMS-managed keys (SSE_KMS
), or client-side encryption with KMS-managed keys (CSE_KMS
) is used.If a query runs in a workgroup and the workgroup overrides client-side settings, then the workgroup's setting for encryption is used. It specifies whether query results must be encrypted, for all queries that run in this workgroup.
Possible values include:"SSE_S3"
"SSE_KMS"
"CSE_KMS"
KmsKey
— (String
)For
SSE_KMS
andCSE_KMS
, this is the KMS key ARN or ID.
RemoveEncryptionConfiguration
— (Boolean
)If set to "true", indicates that the previously-specified encryption configuration (also known as the client-side setting) for queries in this workgroup should be ignored and set to null. If set to "false" or not set, and a value is present in the
EncryptionConfiguration
inResultConfigurationUpdates
(the client-side setting), theEncryptionConfiguration
in the workgroup'sResultConfiguration
will be updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.ExpectedBucketOwner
— (String
)The Amazon Web Services account ID that you expect to be the owner of the Amazon S3 bucket specified by ResultConfiguration$OutputLocation. If set, Athena uses the value for
ExpectedBucketOwner
when it makes Amazon S3 calls to your specified output location. If theExpectedBucketOwner
Amazon Web Services account ID does not match the actual owner of the Amazon S3 bucket, the call fails with a permissions error.If workgroup settings override client-side settings, then the query uses the
ExpectedBucketOwner
setting that is specified for the workgroup, and also uses the location for storing query results specified in the workgroup. See WorkGroupConfiguration$EnforceWorkGroupConfiguration and Workgroup Settings Override Client-Side Settings.RemoveExpectedBucketOwner
— (Boolean
)If set to "true", removes the Amazon Web Services account ID previously specified for ResultConfiguration$ExpectedBucketOwner. If set to "false" or not set, and a value is present in the
ExpectedBucketOwner
inResultConfigurationUpdates
(the client-side setting), theExpectedBucketOwner
in the workgroup'sResultConfiguration
is updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.AclConfiguration
— (map
)The ACL configuration for the query results.
S3AclOption
— required — (String
)The Amazon S3 canned ACL that Athena should specify when storing query results. Currently the only supported canned ACL is
Possible values include:BUCKET_OWNER_FULL_CONTROL
. If a query runs in a workgroup and the workgroup overrides client-side settings, then the Amazon S3 canned ACL specified in the workgroup's settings is used for all queries that run in the workgroup. For more information about Amazon S3 canned ACLs, see Canned ACL in the Amazon S3 User Guide."BUCKET_OWNER_FULL_CONTROL"
RemoveAclConfiguration
— (Boolean
)If set to
true
, indicates that the previously-specified ACL configuration for queries in this workgroup should be ignored and set to null. If set tofalse
or not set, and a value is present in theAclConfiguration
ofResultConfigurationUpdates
, theAclConfiguration
in the workgroup'sResultConfiguration
is updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.
PublishCloudWatchMetricsEnabled
— (Boolean
)Indicates whether this workgroup enables publishing metrics to Amazon CloudWatch.
BytesScannedCutoffPerQuery
— (Integer
)The upper limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.
RemoveBytesScannedCutoffPerQuery
— (Boolean
)Indicates that the data usage control limit per query is removed. WorkGroupConfiguration$BytesScannedCutoffPerQuery
RequesterPaysEnabled
— (Boolean
)If set to
true
, allows members assigned to a workgroup to specify Amazon S3 Requester Pays buckets in queries. If set tofalse
, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default isfalse
. For more information about Requester Pays buckets, see Requester Pays Buckets in the Amazon Simple Storage Service Developer Guide.EngineVersion
— (map
)The engine version requested when a workgroup is updated. After the update, all queries on the workgroup run on the requested engine version. If no value was previously set, the default is Auto. Queries on the
AmazonAthenaPreviewFunctionality
workgroup run on the preview engine regardless of this setting.SelectedEngineVersion
— (String
)The engine version requested by the user. Possible values are determined by the output of
ListEngineVersions
, including AUTO. The default is AUTO.EffectiveEngineVersion
— (String
)Read only. The engine version on which the query runs. If the user requests a valid engine version other than Auto, the effective engine version is the same as the engine version that the user requested. If the user requests Auto, the effective engine version is chosen by Athena. When a request to update the engine version is made by a
CreateWorkGroup
orUpdateWorkGroup
operation, theEffectiveEngineVersion
field is ignored.
RemoveCustomerContentEncryptionConfiguration
— (Boolean
)Removes content encryption configuration from an Apache Spark-enabled Athena workgroup.
AdditionalConfiguration
— (String
)Contains a user defined string in JSON format for a Spark-enabled workgroup.
ExecutionRole
— (String
)The ARN of the execution role used to access user resources for Spark sessions and Identity Center enabled workgroups. This property applies only to Spark enabled workgroups and Identity Center enabled workgroups.
CustomerContentEncryptionConfiguration
— (map
)Specifies the customer managed KMS key that is used to encrypt the user's data stores in Athena. When an Amazon Web Services managed key is used, this value is null. This setting does not apply to Athena SQL workgroups.
KmsKey
— required — (String
)The customer managed KMS key that is used to encrypt the user's data stores in Athena.
EnableMinimumEncryptionConfiguration
— (Boolean
)Enforces a minimal level of encryption for the workgroup for query and calculation results that are written to Amazon S3. When enabled, workgroup users can set encryption only to the minimum level set by the administrator or higher when they submit queries. This setting does not apply to Spark-enabled workgroups.
The
EnforceWorkGroupConfiguration
setting takes precedence over theEnableMinimumEncryptionConfiguration
flag. This means that ifEnforceWorkGroupConfiguration
is true, theEnableMinimumEncryptionConfiguration
flag is ignored, and the workgroup configuration for encryption is used.QueryResultsS3AccessGrantsConfiguration
— (map
)Specifies whether Amazon S3 access grants are enabled for query results.
EnableS3AccessGrants
— required — (Boolean
)Specifies whether Amazon S3 access grants are enabled for query results.
CreateUserLevelPrefix
— (Boolean
)When enabled, appends the user ID as an Amazon S3 path prefix to the query result output location.
AuthenticationType
— required — (String
)The authentication type used for Amazon S3 access grants. Currently, only
Possible values include:DIRECTORY_IDENTITY
is supported."DIRECTORY_IDENTITY"
State
— (String
)The workgroup state that will be updated for the given workgroup.
Possible values include:"ENABLED"
"DISABLED"
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
Generated on Wed Nov 6 18:50:15 2024 by yard 0.9.36 (ruby-2.5.1). - listEngineVersions(params = {}, callback) ⇒ AWS.Request