SDK for PHP 3.x

Client: Aws\Athena\AthenaClient
Service ID: athena
Version: 2017-05-18

This page describes the parameters and results for the operations of the Amazon Athena (2017-05-18), and shows how to use the Aws\Athena\AthenaClient object to call the described operations. This documentation is specific to the 2017-05-18 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

BatchGetNamedQuery ( array $params = [] )
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 ( array $params = [] )
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 ( array $params = [] )
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 ( array $params = [] )
Cancels the capacity reservation with the specified name.
CreateCapacityReservation ( array $params = [] )
Creates a capacity reservation with the specified name and number of requested data processing units.
CreateDataCatalog ( array $params = [] )
Creates (registers) a data catalog with the specified name and properties.
CreateNamedQuery ( array $params = [] )
Creates a named query in the specified workgroup.
CreateNotebook ( array $params = [] )
Creates an empty ipynb file in the specified Apache Spark enabled workgroup.
CreatePreparedStatement ( array $params = [] )
Creates a prepared statement for use with SQL queries in Athena.
CreatePresignedNotebookUrl ( array $params = [] )
Gets an authentication token and the URL at which the notebook can be accessed.
CreateWorkGroup ( array $params = [] )
Creates a workgroup with the specified name.
DeleteCapacityReservation ( array $params = [] )
Deletes a cancelled capacity reservation.
DeleteDataCatalog ( array $params = [] )
Deletes a data catalog.
DeleteNamedQuery ( array $params = [] )
Deletes the named query if you have access to the workgroup in which the query was saved.
DeleteNotebook ( array $params = [] )
Deletes the specified notebook.
DeletePreparedStatement ( array $params = [] )
Deletes the prepared statement with the specified name from the specified workgroup.
DeleteWorkGroup ( array $params = [] )
Deletes the workgroup with the specified name.
ExportNotebook ( array $params = [] )
Exports the specified notebook and its metadata.
GetCalculationExecution ( array $params = [] )
Describes a previously submitted calculation execution.
GetCalculationExecutionCode ( array $params = [] )
Retrieves the unencrypted code that was executed for the calculation.
GetCalculationExecutionStatus ( array $params = [] )
Gets the status of a current calculation.
GetCapacityAssignmentConfiguration ( array $params = [] )
Gets the capacity assignment configuration for a capacity reservation, if one exists.
GetCapacityReservation ( array $params = [] )
Returns information about the capacity reservation with the specified name.
GetDataCatalog ( array $params = [] )
Returns the specified data catalog.
GetDatabase ( array $params = [] )
Returns a database object for the specified database and data catalog.
GetNamedQuery ( array $params = [] )
Returns information about a single query.
GetNotebookMetadata ( array $params = [] )
Retrieves notebook metadata for the specified notebook ID.
GetPreparedStatement ( array $params = [] )
Retrieves the prepared statement with the specified name from the specified workgroup.
GetQueryExecution ( array $params = [] )
Returns information about a single execution of a query if you have access to the workgroup in which the query ran.
GetQueryResults ( array $params = [] )
Streams the results of a single query execution specified by QueryExecutionId from the Athena query results location in Amazon S3.
GetQueryRuntimeStatistics ( array $params = [] )
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 ( array $params = [] )
Gets the full details of a previously created session, including the session status and configuration.
GetSessionStatus ( array $params = [] )
Gets the current status of a session.
GetTableMetadata ( array $params = [] )
Returns table metadata for the specified catalog, database, and table.
GetWorkGroup ( array $params = [] )
Returns information about the workgroup with the specified name.
ImportNotebook ( array $params = [] )
Imports a single ipynb file to a Spark enabled workgroup.
ListApplicationDPUSizes ( array $params = [] )
Returns the supported DPU sizes for the supported application runtimes (for example, Athena notebook version 1).
ListCalculationExecutions ( array $params = [] )
Lists the calculations that have been submitted to a session in descending order.
ListCapacityReservations ( array $params = [] )
Lists the capacity reservations for the current account.
ListDataCatalogs ( array $params = [] )
Lists the data catalogs in the current Amazon Web Services account.
ListDatabases ( array $params = [] )
Lists the databases in the specified data catalog.
ListEngineVersions ( array $params = [] )
Returns a list of engine versions that are available to choose from, including the Auto option.
ListExecutors ( array $params = [] )
Lists, in descending order, the executors that joined a session.
ListNamedQueries ( array $params = [] )
Provides a list of available query IDs only for queries saved in the specified workgroup.
ListNotebookMetadata ( array $params = [] )
Displays the notebook files for the specified workgroup in paginated format.
ListNotebookSessions ( array $params = [] )
Lists, in descending order, the sessions that have been created in a notebook that are in an active state like CREATING, CREATED, IDLE or BUSY.
ListPreparedStatements ( array $params = [] )
Lists the prepared statements in the specified workgroup.
ListQueryExecutions ( array $params = [] )
Provides a list of available query execution IDs for the queries in the specified workgroup.
ListSessions ( array $params = [] )
Lists the sessions in a workgroup that are in an active state like CREATING, CREATED, IDLE, or BUSY.
ListTableMetadata ( array $params = [] )
Lists the metadata for the tables in the specified data catalog database.
ListTagsForResource ( array $params = [] )
Lists the tags associated with an Athena resource.
ListWorkGroups ( array $params = [] )
Lists available workgroups for the account.
PutCapacityAssignmentConfiguration ( array $params = [] )
Puts a new capacity assignment configuration for a specified capacity reservation.
StartCalculationExecution ( array $params = [] )
Submits calculations for execution within a session.
StartQueryExecution ( array $params = [] )
Runs the SQL query statements contained in the Query.
StartSession ( array $params = [] )
Creates a session for running calculations within a workgroup.
StopCalculationExecution ( array $params = [] )
Requests the cancellation of a calculation.
StopQueryExecution ( array $params = [] )
Stops a query execution.
TagResource ( array $params = [] )
Adds one or more tags to an Athena resource.
TerminateSession ( array $params = [] )
Terminates an active session.
UntagResource ( array $params = [] )
Removes one or more tags from an Athena resource.
UpdateCapacityReservation ( array $params = [] )
Updates the number of requested data processing units for the capacity reservation with the specified name.
UpdateDataCatalog ( array $params = [] )
Updates the data catalog that has the specified name.
UpdateNamedQuery ( array $params = [] )
Updates a NamedQuery object.
UpdateNotebook ( array $params = [] )
Updates the contents of a Spark notebook.
UpdateNotebookMetadata ( array $params = [] )
Updates the metadata for a notebook.
UpdatePreparedStatement ( array $params = [] )
Updates a prepared statement.
UpdateWorkGroup ( array $params = [] )
Updates the workgroup with the specified name.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

GetQueryResults
ListApplicationDPUSizes
ListCalculationExecutions
ListCapacityReservations
ListDataCatalogs
ListDatabases
ListEngineVersions
ListExecutors
ListNamedQueries
ListPreparedStatements
ListQueryExecutions
ListSessions
ListTableMetadata
ListTagsForResource
ListWorkGroups

Operations

BatchGetNamedQuery

$result = $client->batchGetNamedQuery([/* ... */]);
$promise = $client->batchGetNamedQueryAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->batchGetNamedQuery([
    'NamedQueryIds' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
NamedQueryIds
Required: Yes
Type: Array of strings

An array of query IDs.

Result Syntax

[
    'NamedQueries' => [
        [
            'Database' => '<string>',
            'Description' => '<string>',
            'Name' => '<string>',
            'NamedQueryId' => '<string>',
            'QueryString' => '<string>',
            'WorkGroup' => '<string>',
        ],
        // ...
    ],
    'UnprocessedNamedQueryIds' => [
        [
            'ErrorCode' => '<string>',
            'ErrorMessage' => '<string>',
            'NamedQueryId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NamedQueries
Type: Array of NamedQuery structures

Information about the named query IDs submitted.

UnprocessedNamedQueryIds
Type: Array of UnprocessedNamedQueryId structures

Information about provided query IDs.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

BatchGetPreparedStatement

$result = $client->batchGetPreparedStatement([/* ... */]);
$promise = $client->batchGetPreparedStatementAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->batchGetPreparedStatement([
    'PreparedStatementNames' => ['<string>', ...], // REQUIRED
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
PreparedStatementNames
Required: Yes
Type: Array of strings

A list of prepared statement names to return.

WorkGroup
Required: Yes
Type: string

The name of the workgroup to which the prepared statements belong.

Result Syntax

[
    'PreparedStatements' => [
        [
            'Description' => '<string>',
            'LastModifiedTime' => <DateTime>,
            'QueryStatement' => '<string>',
            'StatementName' => '<string>',
            'WorkGroupName' => '<string>',
        ],
        // ...
    ],
    'UnprocessedPreparedStatementNames' => [
        [
            'ErrorCode' => '<string>',
            'ErrorMessage' => '<string>',
            'StatementName' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
PreparedStatements
Type: Array of PreparedStatement structures

The list of prepared statements returned.

UnprocessedPreparedStatementNames
Type: Array of UnprocessedPreparedStatementName structures

A list of one or more prepared statements that were requested but could not be returned.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

BatchGetQueryExecution

$result = $client->batchGetQueryExecution([/* ... */]);
$promise = $client->batchGetQueryExecutionAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->batchGetQueryExecution([
    'QueryExecutionIds' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
QueryExecutionIds
Required: Yes
Type: Array of strings

An array of query execution IDs.

Result Syntax

[
    'QueryExecutions' => [
        [
            'EngineVersion' => [
                'EffectiveEngineVersion' => '<string>',
                'SelectedEngineVersion' => '<string>',
            ],
            'ExecutionParameters' => ['<string>', ...],
            'Query' => '<string>',
            'QueryExecutionContext' => [
                'Catalog' => '<string>',
                'Database' => '<string>',
            ],
            'QueryExecutionId' => '<string>',
            'QueryResultsS3AccessGrantsConfiguration' => [
                'AuthenticationType' => 'DIRECTORY_IDENTITY',
                'CreateUserLevelPrefix' => true || false,
                'EnableS3AccessGrants' => true || false,
            ],
            'ResultConfiguration' => [
                'AclConfiguration' => [
                    'S3AclOption' => 'BUCKET_OWNER_FULL_CONTROL',
                ],
                'EncryptionConfiguration' => [
                    'EncryptionOption' => 'SSE_S3|SSE_KMS|CSE_KMS',
                    'KmsKey' => '<string>',
                ],
                'ExpectedBucketOwner' => '<string>',
                'OutputLocation' => '<string>',
            ],
            'ResultReuseConfiguration' => [
                'ResultReuseByAgeConfiguration' => [
                    'Enabled' => true || false,
                    'MaxAgeInMinutes' => <integer>,
                ],
            ],
            'StatementType' => 'DDL|DML|UTILITY',
            'Statistics' => [
                'DataManifestLocation' => '<string>',
                'DataScannedInBytes' => <integer>,
                'EngineExecutionTimeInMillis' => <integer>,
                'QueryPlanningTimeInMillis' => <integer>,
                'QueryQueueTimeInMillis' => <integer>,
                'ResultReuseInformation' => [
                    'ReusedPreviousResult' => true || false,
                ],
                'ServicePreProcessingTimeInMillis' => <integer>,
                'ServiceProcessingTimeInMillis' => <integer>,
                'TotalExecutionTimeInMillis' => <integer>,
            ],
            'Status' => [
                'AthenaError' => [
                    'ErrorCategory' => <integer>,
                    'ErrorMessage' => '<string>',
                    'ErrorType' => <integer>,
                    'Retryable' => true || false,
                ],
                'CompletionDateTime' => <DateTime>,
                'State' => 'QUEUED|RUNNING|SUCCEEDED|FAILED|CANCELLED',
                'StateChangeReason' => '<string>',
                'SubmissionDateTime' => <DateTime>,
            ],
            'SubstatementType' => '<string>',
            'WorkGroup' => '<string>',
        ],
        // ...
    ],
    'UnprocessedQueryExecutionIds' => [
        [
            'ErrorCode' => '<string>',
            'ErrorMessage' => '<string>',
            'QueryExecutionId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
QueryExecutions
Type: Array of QueryExecution structures

Information about a query execution.

UnprocessedQueryExecutionIds
Type: Array of UnprocessedQueryExecutionId structures

Information about the query executions that failed to run.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

CancelCapacityReservation

$result = $client->cancelCapacityReservation([/* ... */]);
$promise = $client->cancelCapacityReservationAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->cancelCapacityReservation([
    'Name' => '<string>', // REQUIRED
]);

Parameter Details

Members
Name
Required: Yes
Type: string

The name of the capacity reservation to cancel.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

CreateCapacityReservation

$result = $client->createCapacityReservation([/* ... */]);
$promise = $client->createCapacityReservationAsync([/* ... */]);

Creates a capacity reservation with the specified name and number of requested data processing units.

Parameter Syntax

$result = $client->createCapacityReservation([
    'Name' => '<string>', // REQUIRED
    'Tags' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
    'TargetDpus' => <integer>, // REQUIRED
]);

Parameter Details

Members
Name
Required: Yes
Type: string

The name of the capacity reservation to create.

Tags
Type: Array of Tag structures

The tags for the capacity reservation.

TargetDpus
Required: Yes
Type: int

The number of requested data processing units.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

CreateDataCatalog

$result = $client->createDataCatalog([/* ... */]);
$promise = $client->createDataCatalogAsync([/* ... */]);

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.

This API operation creates the following resources.

  • CFN Stack Name with a maximum length of 128 characters and prefix athenafederatedcatalog-CATALOG_NAME_SANITIZED with length 23 characters.

  • Lambda Function Name with a maximum length of 64 characters and prefix athenafederatedcatalog_CATALOG_NAME_SANITIZED with length 23 characters.

  • Glue Connection Name with a maximum length of 255 characters and a prefix athenafederatedcatalog_CATALOG_NAME_SANITIZED with length 23 characters.

Parameter Syntax

$result = $client->createDataCatalog([
    'Description' => '<string>',
    'Name' => '<string>', // REQUIRED
    'Parameters' => ['<string>', ...],
    'Tags' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
    'Type' => 'LAMBDA|GLUE|HIVE|FEDERATED', // REQUIRED
]);

Parameter Details

Members
Description
Type: string

A description of the data catalog to be created.

Name
Required: Yes
Type: 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.

For FEDERATED type the catalog name has following considerations and limits:

  • The catalog name allows special characters such as _ , @ , \ , - . These characters are replaced with a hyphen (-) when creating the CFN Stack Name and with an underscore (_) when creating the Lambda Function and Glue Connection Name.

  • The catalog name has a theoretical limit of 128 characters. However, since we use it to create other resources that allow less characters and we prepend a prefix to it, the actual catalog name limit for FEDERATED catalog is 64 - 23 = 41 characters.

Parameters
Type: Associative array of custom strings keys (KeyString) to strings

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. The metadata-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. The catalog_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 default AwsDataCatalog that already exists in your account, of which you can have only one and cannot modify.

  • The FEDERATED data catalog type uses one of the following parameters, but not both. Use connection-arn for an existing Glue connection. Use connection-type and connection-properties to specify the configuration setting for a new connection.

    • connection-arn:<glue_connection_arn_to_reuse>

    • lambda-role-arn (optional): The execution role to use for the Lambda function. If not provided, one is created.

    • connection-type:MYSQL|REDSHIFT|...., connection-properties:"<json_string>"

      For <json_string> , use escaped JSON text, as in the following example.

      "{\"spill_bucket\":\"my_spill\",\"spill_prefix\":\"athena-spill\",\"host\":\"abc12345.snowflakecomputing.com\",\"port\":\"1234\",\"warehouse\":\"DEV_WH\",\"database\":\"TEST\",\"schema\":\"PUBLIC\",\"SecretArn\":\"arn:aws:secretsmanager:ap-south-1:111122223333:secret:snowflake-XHb67j\"}"

Tags
Type: Array of Tag structures

A list of comma separated tags to add to the data catalog that is created. All the resources that are created by the CreateDataCatalog API operation with FEDERATED type will have the tag federated_athena_datacatalog="true". This includes the CFN Stack, Glue Connection, Athena DataCatalog, and all the resources created as part of the CFN Stack (Lambda Function, IAM policies/roles).

Type
Required: Yes
Type: string

The type of data catalog to create: LAMBDA for a federated catalog, GLUE for an Glue Data Catalog, and HIVE for an external Apache Hive metastore. FEDERATED is a federated catalog for which Athena creates the connection and the Lambda function for you based on the parameters that you pass.

Result Syntax

[
    'DataCatalog' => [
        'ConnectionType' => 'DYNAMODB|MYSQL|POSTGRESQL|REDSHIFT|ORACLE|SYNAPSE|SQLSERVER|DB2|OPENSEARCH|BIGQUERY|GOOGLECLOUDSTORAGE|HBASE|DOCUMENTDB|CMDB|TPCDS|TIMESTREAM|SAPHANA|SNOWFLAKE|DATALAKEGEN2|DB2AS400',
        'Description' => '<string>',
        'Error' => '<string>',
        'Name' => '<string>',
        'Parameters' => ['<string>', ...],
        'Status' => 'CREATE_IN_PROGRESS|CREATE_COMPLETE|CREATE_FAILED|CREATE_FAILED_CLEANUP_IN_PROGRESS|CREATE_FAILED_CLEANUP_COMPLETE|CREATE_FAILED_CLEANUP_FAILED|DELETE_IN_PROGRESS|DELETE_COMPLETE|DELETE_FAILED',
        'Type' => 'LAMBDA|GLUE|HIVE|FEDERATED',
    ],
]

Result Details

Members
DataCatalog
Type: DataCatalog structure

Contains information about a data catalog in an Amazon Web Services account.

In the Athena console, data catalogs are listed as "data sources" on the Data sources page under the Data source name column.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

CreateNamedQuery

$result = $client->createNamedQuery([/* ... */]);
$promise = $client->createNamedQueryAsync([/* ... */]);

Creates a named query in the specified workgroup. Requires that you have access to the workgroup.

Parameter Syntax

$result = $client->createNamedQuery([
    'ClientRequestToken' => '<string>',
    'Database' => '<string>', // REQUIRED
    'Description' => '<string>',
    'Name' => '<string>', // REQUIRED
    'QueryString' => '<string>', // REQUIRED
    'WorkGroup' => '<string>',
]);

Parameter Details

Members
ClientRequestToken
Type: 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, the QueryString, an error is returned.

This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web Services CLI, you must provide this token or the action will fail.

Database
Required: Yes
Type: string

The database to which the query belongs.

Description
Type: string

The query description.

Name
Required: Yes
Type: string

The query name.

QueryString
Required: Yes
Type: string

The contents of the query with all query statements.

WorkGroup
Type: string

The name of the workgroup in which the named query is being created.

Result Syntax

[
    'NamedQueryId' => '<string>',
]

Result Details

Members
NamedQueryId
Type: string

The unique ID of the query.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

CreateNotebook

$result = $client->createNotebook([/* ... */]);
$promise = $client->createNotebookAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createNotebook([
    'ClientRequestToken' => '<string>',
    'Name' => '<string>', // REQUIRED
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientRequestToken
Type: 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
Required: Yes
Type: string

The name of the ipynb file to be created in the Spark workgroup, without the .ipynb extension.

WorkGroup
Required: Yes
Type: string

The name of the Spark enabled workgroup in which the notebook will be created.

Result Syntax

[
    'NotebookId' => '<string>',
]

Result Details

Members
NotebookId
Type: string

A unique identifier for the notebook.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TooManyRequestsException:

Indicates that the request was throttled.

CreatePreparedStatement

$result = $client->createPreparedStatement([/* ... */]);
$promise = $client->createPreparedStatementAsync([/* ... */]);

Creates a prepared statement for use with SQL queries in Athena.

Parameter Syntax

$result = $client->createPreparedStatement([
    'Description' => '<string>',
    'QueryStatement' => '<string>', // REQUIRED
    'StatementName' => '<string>', // REQUIRED
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
Description
Type: string

The description of the prepared statement.

QueryStatement
Required: Yes
Type: string

The query string for the prepared statement.

StatementName
Required: Yes
Type: string

The name of the prepared statement.

WorkGroup
Required: Yes
Type: string

The name of the workgroup to which the prepared statement belongs.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

CreatePresignedNotebookUrl

$result = $client->createPresignedNotebookUrl([/* ... */]);
$promise = $client->createPresignedNotebookUrlAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createPresignedNotebookUrl([
    'SessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
SessionId
Required: Yes
Type: string

The session ID.

Result Syntax

[
    'AuthToken' => '<string>',
    'AuthTokenExpirationTime' => <integer>,
    'NotebookUrl' => '<string>',
]

Result Details

Members
AuthToken
Required: Yes
Type: string

The authentication token for the notebook.

AuthTokenExpirationTime
Required: Yes
Type: long (int|float)

The UTC epoch time when the authentication token expires.

NotebookUrl
Required: Yes
Type: string

The URL of the notebook. The URL includes the authentication token and notebook file name and points directly to the opened notebook.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

CreateWorkGroup

$result = $client->createWorkGroup([/* ... */]);
$promise = $client->createWorkGroupAsync([/* ... */]);

Creates a workgroup with the specified name. A workgroup can be an Apache Spark enabled workgroup or an Athena SQL workgroup.

Parameter Syntax

$result = $client->createWorkGroup([
    'Configuration' => [
        'AdditionalConfiguration' => '<string>',
        'BytesScannedCutoffPerQuery' => <integer>,
        'CustomerContentEncryptionConfiguration' => [
            'KmsKey' => '<string>', // REQUIRED
        ],
        'EnableMinimumEncryptionConfiguration' => true || false,
        'EnforceWorkGroupConfiguration' => true || false,
        'EngineVersion' => [
            'EffectiveEngineVersion' => '<string>',
            'SelectedEngineVersion' => '<string>',
        ],
        'ExecutionRole' => '<string>',
        'IdentityCenterConfiguration' => [
            'EnableIdentityCenter' => true || false,
            'IdentityCenterInstanceArn' => '<string>',
        ],
        'PublishCloudWatchMetricsEnabled' => true || false,
        'QueryResultsS3AccessGrantsConfiguration' => [
            'AuthenticationType' => 'DIRECTORY_IDENTITY', // REQUIRED
            'CreateUserLevelPrefix' => true || false,
            'EnableS3AccessGrants' => true || false, // REQUIRED
        ],
        'RequesterPaysEnabled' => true || false,
        'ResultConfiguration' => [
            'AclConfiguration' => [
                'S3AclOption' => 'BUCKET_OWNER_FULL_CONTROL', // REQUIRED
            ],
            'EncryptionConfiguration' => [
                'EncryptionOption' => 'SSE_S3|SSE_KMS|CSE_KMS', // REQUIRED
                'KmsKey' => '<string>',
            ],
            'ExpectedBucketOwner' => '<string>',
            'OutputLocation' => '<string>',
        ],
    ],
    'Description' => '<string>',
    'Name' => '<string>', // REQUIRED
    'Tags' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
Configuration
Type: WorkGroupConfiguration structure

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 the WorkGroupConfiguration override client-side settings. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

Description
Type: string

The workgroup description.

Name
Required: Yes
Type: string

The workgroup name.

Tags
Type: Array of Tag structures

A list of comma separated tags to add to the workgroup that is created.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

DeleteCapacityReservation

$result = $client->deleteCapacityReservation([/* ... */]);
$promise = $client->deleteCapacityReservationAsync([/* ... */]);

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 of ListCapacityReservations.

Parameter Syntax

$result = $client->deleteCapacityReservation([
    'Name' => '<string>', // REQUIRED
]);

Parameter Details

Members
Name
Required: Yes
Type: string

The name of the capacity reservation to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

DeleteDataCatalog

$result = $client->deleteDataCatalog([/* ... */]);
$promise = $client->deleteDataCatalogAsync([/* ... */]);

Deletes a data catalog.

Parameter Syntax

$result = $client->deleteDataCatalog([
    'DeleteCatalogOnly' => true || false,
    'Name' => '<string>', // REQUIRED
]);

Parameter Details

Members
DeleteCatalogOnly
Type: boolean

Deletes the Athena Data Catalog. You can only use this with the FEDERATED catalogs. You usually perform this before registering the connector with Glue Data Catalog. After deletion, you will have to manage the Glue Connection and Lambda function.

Name
Required: Yes
Type: string

The name of the data catalog to delete.

Result Syntax

[
    'DataCatalog' => [
        'ConnectionType' => 'DYNAMODB|MYSQL|POSTGRESQL|REDSHIFT|ORACLE|SYNAPSE|SQLSERVER|DB2|OPENSEARCH|BIGQUERY|GOOGLECLOUDSTORAGE|HBASE|DOCUMENTDB|CMDB|TPCDS|TIMESTREAM|SAPHANA|SNOWFLAKE|DATALAKEGEN2|DB2AS400',
        'Description' => '<string>',
        'Error' => '<string>',
        'Name' => '<string>',
        'Parameters' => ['<string>', ...],
        'Status' => 'CREATE_IN_PROGRESS|CREATE_COMPLETE|CREATE_FAILED|CREATE_FAILED_CLEANUP_IN_PROGRESS|CREATE_FAILED_CLEANUP_COMPLETE|CREATE_FAILED_CLEANUP_FAILED|DELETE_IN_PROGRESS|DELETE_COMPLETE|DELETE_FAILED',
        'Type' => 'LAMBDA|GLUE|HIVE|FEDERATED',
    ],
]

Result Details

Members
DataCatalog
Type: DataCatalog structure

Contains information about a data catalog in an Amazon Web Services account.

In the Athena console, data catalogs are listed as "data sources" on the Data sources page under the Data source name column.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

DeleteNamedQuery

$result = $client->deleteNamedQuery([/* ... */]);
$promise = $client->deleteNamedQueryAsync([/* ... */]);

Deletes the named query if you have access to the workgroup in which the query was saved.

Parameter Syntax

$result = $client->deleteNamedQuery([
    'NamedQueryId' => '<string>', // REQUIRED
]);

Parameter Details

Members
NamedQueryId
Required: Yes
Type: string

The unique ID of the query to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

DeleteNotebook

$result = $client->deleteNotebook([/* ... */]);
$promise = $client->deleteNotebookAsync([/* ... */]);

Deletes the specified notebook.

Parameter Syntax

$result = $client->deleteNotebook([
    'NotebookId' => '<string>', // REQUIRED
]);

Parameter Details

Members
NotebookId
Required: Yes
Type: string

The ID of the notebook to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TooManyRequestsException:

Indicates that the request was throttled.

DeletePreparedStatement

$result = $client->deletePreparedStatement([/* ... */]);
$promise = $client->deletePreparedStatementAsync([/* ... */]);

Deletes the prepared statement with the specified name from the specified workgroup.

Parameter Syntax

$result = $client->deletePreparedStatement([
    'StatementName' => '<string>', // REQUIRED
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
StatementName
Required: Yes
Type: string

The name of the prepared statement to delete.

WorkGroup
Required: Yes
Type: string

The workgroup to which the statement to be deleted belongs.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

DeleteWorkGroup

$result = $client->deleteWorkGroup([/* ... */]);
$promise = $client->deleteWorkGroupAsync([/* ... */]);

Deletes the workgroup with the specified name. The primary workgroup cannot be deleted.

Parameter Syntax

$result = $client->deleteWorkGroup([
    'RecursiveDeleteOption' => true || false,
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
RecursiveDeleteOption
Type: boolean

The option to delete the workgroup and its contents even if the workgroup contains any named queries, query executions, or notebooks.

WorkGroup
Required: Yes
Type: string

The unique name of the workgroup to delete.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ExportNotebook

$result = $client->exportNotebook([/* ... */]);
$promise = $client->exportNotebookAsync([/* ... */]);

Exports the specified notebook and its metadata.

Parameter Syntax

$result = $client->exportNotebook([
    'NotebookId' => '<string>', // REQUIRED
]);

Parameter Details

Members
NotebookId
Required: Yes
Type: string

The ID of the notebook to export.

Result Syntax

[
    'NotebookMetadata' => [
        'CreationTime' => <DateTime>,
        'LastModifiedTime' => <DateTime>,
        'Name' => '<string>',
        'NotebookId' => '<string>',
        'Type' => 'IPYNB',
        'WorkGroup' => '<string>',
    ],
    'Payload' => '<string>',
]

Result Details

Members
NotebookMetadata
Type: NotebookMetadata structure

The notebook metadata, including notebook ID, notebook name, and workgroup name.

Payload
Type: string

The content of the exported notebook.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TooManyRequestsException:

Indicates that the request was throttled.

GetCalculationExecution

$result = $client->getCalculationExecution([/* ... */]);
$promise = $client->getCalculationExecutionAsync([/* ... */]);

Describes a previously submitted calculation execution.

Parameter Syntax

$result = $client->getCalculationExecution([
    'CalculationExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
CalculationExecutionId
Required: Yes
Type: string

The calculation execution UUID.

Result Syntax

[
    'CalculationExecutionId' => '<string>',
    'Description' => '<string>',
    'Result' => [
        'ResultS3Uri' => '<string>',
        'ResultType' => '<string>',
        'StdErrorS3Uri' => '<string>',
        'StdOutS3Uri' => '<string>',
    ],
    'SessionId' => '<string>',
    'Statistics' => [
        'DpuExecutionInMillis' => <integer>,
        'Progress' => '<string>',
    ],
    'Status' => [
        'CompletionDateTime' => <DateTime>,
        'State' => 'CREATING|CREATED|QUEUED|RUNNING|CANCELING|CANCELED|COMPLETED|FAILED',
        'StateChangeReason' => '<string>',
        'SubmissionDateTime' => <DateTime>,
    ],
    'WorkingDirectory' => '<string>',
]

Result Details

Members
CalculationExecutionId
Type: string

The calculation execution UUID.

Description
Type: string

The description of the calculation execution.

Result
Type: CalculationResult structure

Contains result information. This field is populated only if the calculation is completed.

SessionId
Type: string

The session ID that the calculation ran in.

Statistics
Type: CalculationStatistics structure

Contains information about the data processing unit (DPU) execution time and progress. This field is populated only when statistics are available.

Status
Type: CalculationStatus structure

Contains information about the status of the calculation.

WorkingDirectory
Type: string

The Amazon S3 location in which calculation results are stored.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

GetCalculationExecutionCode

$result = $client->getCalculationExecutionCode([/* ... */]);
$promise = $client->getCalculationExecutionCodeAsync([/* ... */]);

Retrieves the unencrypted code that was executed for the calculation.

Parameter Syntax

$result = $client->getCalculationExecutionCode([
    'CalculationExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
CalculationExecutionId
Required: Yes
Type: string

The calculation execution UUID.

Result Syntax

[
    'CodeBlock' => '<string>',
]

Result Details

Members
CodeBlock
Type: string

The unencrypted code that was executed for the calculation.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

GetCalculationExecutionStatus

$result = $client->getCalculationExecutionStatus([/* ... */]);
$promise = $client->getCalculationExecutionStatusAsync([/* ... */]);

Gets the status of a current calculation.

Parameter Syntax

$result = $client->getCalculationExecutionStatus([
    'CalculationExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
CalculationExecutionId
Required: Yes
Type: string

The calculation execution UUID.

Result Syntax

[
    'Statistics' => [
        'DpuExecutionInMillis' => <integer>,
        'Progress' => '<string>',
    ],
    'Status' => [
        'CompletionDateTime' => <DateTime>,
        'State' => 'CREATING|CREATED|QUEUED|RUNNING|CANCELING|CANCELED|COMPLETED|FAILED',
        'StateChangeReason' => '<string>',
        'SubmissionDateTime' => <DateTime>,
    ],
]

Result Details

Members
Statistics
Type: CalculationStatistics structure

Contains information about the DPU execution time and progress.

Status
Type: CalculationStatus structure

Contains information about the calculation execution status.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

GetCapacityAssignmentConfiguration

$result = $client->getCapacityAssignmentConfiguration([/* ... */]);
$promise = $client->getCapacityAssignmentConfigurationAsync([/* ... */]);

Gets the capacity assignment configuration for a capacity reservation, if one exists.

Parameter Syntax

$result = $client->getCapacityAssignmentConfiguration([
    'CapacityReservationName' => '<string>', // REQUIRED
]);

Parameter Details

Members
CapacityReservationName
Required: Yes
Type: string

The name of the capacity reservation to retrieve the capacity assignment configuration for.

Result Syntax

[
    'CapacityAssignmentConfiguration' => [
        'CapacityAssignments' => [
            [
                'WorkGroupNames' => ['<string>', ...],
            ],
            // ...
        ],
        'CapacityReservationName' => '<string>',
    ],
]

Result Details

Members
CapacityAssignmentConfiguration
Required: Yes
Type: CapacityAssignmentConfiguration structure

The requested capacity assignment configuration for the specified capacity reservation.

Errors

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

GetCapacityReservation

$result = $client->getCapacityReservation([/* ... */]);
$promise = $client->getCapacityReservationAsync([/* ... */]);

Returns information about the capacity reservation with the specified name.

Parameter Syntax

$result = $client->getCapacityReservation([
    'Name' => '<string>', // REQUIRED
]);

Parameter Details

Members
Name
Required: Yes
Type: string

The name of the capacity reservation.

Result Syntax

[
    'CapacityReservation' => [
        'AllocatedDpus' => <integer>,
        'CreationTime' => <DateTime>,
        'LastAllocation' => [
            'RequestCompletionTime' => <DateTime>,
            'RequestTime' => <DateTime>,
            'Status' => 'PENDING|SUCCEEDED|FAILED',
            'StatusMessage' => '<string>',
        ],
        'LastSuccessfulAllocationTime' => <DateTime>,
        'Name' => '<string>',
        'Status' => 'PENDING|ACTIVE|CANCELLING|CANCELLED|FAILED|UPDATE_PENDING',
        'TargetDpus' => <integer>,
    ],
]

Result Details

Members
CapacityReservation
Required: Yes
Type: CapacityReservation structure

The requested capacity reservation structure.

Errors

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

GetDataCatalog

$result = $client->getDataCatalog([/* ... */]);
$promise = $client->getDataCatalogAsync([/* ... */]);

Returns the specified data catalog.

Parameter Syntax

$result = $client->getDataCatalog([
    'Name' => '<string>', // REQUIRED
    'WorkGroup' => '<string>',
]);

Parameter Details

Members
Name
Required: Yes
Type: string

The name of the data catalog to return.

WorkGroup
Type: string

The name of the workgroup. Required if making an IAM Identity Center request.

Result Syntax

[
    'DataCatalog' => [
        'ConnectionType' => 'DYNAMODB|MYSQL|POSTGRESQL|REDSHIFT|ORACLE|SYNAPSE|SQLSERVER|DB2|OPENSEARCH|BIGQUERY|GOOGLECLOUDSTORAGE|HBASE|DOCUMENTDB|CMDB|TPCDS|TIMESTREAM|SAPHANA|SNOWFLAKE|DATALAKEGEN2|DB2AS400',
        'Description' => '<string>',
        'Error' => '<string>',
        'Name' => '<string>',
        'Parameters' => ['<string>', ...],
        'Status' => 'CREATE_IN_PROGRESS|CREATE_COMPLETE|CREATE_FAILED|CREATE_FAILED_CLEANUP_IN_PROGRESS|CREATE_FAILED_CLEANUP_COMPLETE|CREATE_FAILED_CLEANUP_FAILED|DELETE_IN_PROGRESS|DELETE_COMPLETE|DELETE_FAILED',
        'Type' => 'LAMBDA|GLUE|HIVE|FEDERATED',
    ],
]

Result Details

Members
DataCatalog
Type: DataCatalog structure

The data catalog returned.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

GetDatabase

$result = $client->getDatabase([/* ... */]);
$promise = $client->getDatabaseAsync([/* ... */]);

Returns a database object for the specified database and data catalog.

Parameter Syntax

$result = $client->getDatabase([
    'CatalogName' => '<string>', // REQUIRED
    'DatabaseName' => '<string>', // REQUIRED
    'WorkGroup' => '<string>',
]);

Parameter Details

Members
CatalogName
Required: Yes
Type: string

The name of the data catalog that contains the database to return.

DatabaseName
Required: Yes
Type: string

The name of the database to return.

WorkGroup
Type: string

The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.

Result Syntax

[
    'Database' => [
        'Description' => '<string>',
        'Name' => '<string>',
        'Parameters' => ['<string>', ...],
    ],
]

Result Details

Members
Database
Type: Database structure

The database returned.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

MetadataException:

An exception that Athena received when it called a custom metastore. Occurs if the error is not caused by user input (InvalidRequestException) or from the Athena platform (InternalServerException). For example, if a user-created Lambda function is missing permissions, the Lambda 4XX exception is returned in a MetadataException.

GetNamedQuery

$result = $client->getNamedQuery([/* ... */]);
$promise = $client->getNamedQueryAsync([/* ... */]);

Returns information about a single query. Requires that you have access to the workgroup in which the query was saved.

Parameter Syntax

$result = $client->getNamedQuery([
    'NamedQueryId' => '<string>', // REQUIRED
]);

Parameter Details

Members
NamedQueryId
Required: Yes
Type: string

The unique ID of the query. Use ListNamedQueries to get query IDs.

Result Syntax

[
    'NamedQuery' => [
        'Database' => '<string>',
        'Description' => '<string>',
        'Name' => '<string>',
        'NamedQueryId' => '<string>',
        'QueryString' => '<string>',
        'WorkGroup' => '<string>',
    ],
]

Result Details

Members
NamedQuery
Type: NamedQuery structure

Information about the query.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

GetNotebookMetadata

$result = $client->getNotebookMetadata([/* ... */]);
$promise = $client->getNotebookMetadataAsync([/* ... */]);

Retrieves notebook metadata for the specified notebook ID.

Parameter Syntax

$result = $client->getNotebookMetadata([
    'NotebookId' => '<string>', // REQUIRED
]);

Parameter Details

Members
NotebookId
Required: Yes
Type: string

The ID of the notebook whose metadata is to be retrieved.

Result Syntax

[
    'NotebookMetadata' => [
        'CreationTime' => <DateTime>,
        'LastModifiedTime' => <DateTime>,
        'Name' => '<string>',
        'NotebookId' => '<string>',
        'Type' => 'IPYNB',
        'WorkGroup' => '<string>',
    ],
]

Result Details

Members
NotebookMetadata
Type: NotebookMetadata structure

The metadata that is returned for the specified notebook ID.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TooManyRequestsException:

Indicates that the request was throttled.

GetPreparedStatement

$result = $client->getPreparedStatement([/* ... */]);
$promise = $client->getPreparedStatementAsync([/* ... */]);

Retrieves the prepared statement with the specified name from the specified workgroup.

Parameter Syntax

$result = $client->getPreparedStatement([
    'StatementName' => '<string>', // REQUIRED
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
StatementName
Required: Yes
Type: string

The name of the prepared statement to retrieve.

WorkGroup
Required: Yes
Type: string

The workgroup to which the statement to be retrieved belongs.

Result Syntax

[
    'PreparedStatement' => [
        'Description' => '<string>',
        'LastModifiedTime' => <DateTime>,
        'QueryStatement' => '<string>',
        'StatementName' => '<string>',
        'WorkGroupName' => '<string>',
    ],
]

Result Details

Members
PreparedStatement
Type: PreparedStatement structure

The name of the prepared statement that was retrieved.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

GetQueryExecution

$result = $client->getQueryExecution([/* ... */]);
$promise = $client->getQueryExecutionAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getQueryExecution([
    'QueryExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
QueryExecutionId
Required: Yes
Type: string

The unique ID of the query execution.

Result Syntax

[
    'QueryExecution' => [
        'EngineVersion' => [
            'EffectiveEngineVersion' => '<string>',
            'SelectedEngineVersion' => '<string>',
        ],
        'ExecutionParameters' => ['<string>', ...],
        'Query' => '<string>',
        'QueryExecutionContext' => [
            'Catalog' => '<string>',
            'Database' => '<string>',
        ],
        'QueryExecutionId' => '<string>',
        'QueryResultsS3AccessGrantsConfiguration' => [
            'AuthenticationType' => 'DIRECTORY_IDENTITY',
            'CreateUserLevelPrefix' => true || false,
            'EnableS3AccessGrants' => true || false,
        ],
        'ResultConfiguration' => [
            'AclConfiguration' => [
                'S3AclOption' => 'BUCKET_OWNER_FULL_CONTROL',
            ],
            'EncryptionConfiguration' => [
                'EncryptionOption' => 'SSE_S3|SSE_KMS|CSE_KMS',
                'KmsKey' => '<string>',
            ],
            'ExpectedBucketOwner' => '<string>',
            'OutputLocation' => '<string>',
        ],
        'ResultReuseConfiguration' => [
            'ResultReuseByAgeConfiguration' => [
                'Enabled' => true || false,
                'MaxAgeInMinutes' => <integer>,
            ],
        ],
        'StatementType' => 'DDL|DML|UTILITY',
        'Statistics' => [
            'DataManifestLocation' => '<string>',
            'DataScannedInBytes' => <integer>,
            'EngineExecutionTimeInMillis' => <integer>,
            'QueryPlanningTimeInMillis' => <integer>,
            'QueryQueueTimeInMillis' => <integer>,
            'ResultReuseInformation' => [
                'ReusedPreviousResult' => true || false,
            ],
            'ServicePreProcessingTimeInMillis' => <integer>,
            'ServiceProcessingTimeInMillis' => <integer>,
            'TotalExecutionTimeInMillis' => <integer>,
        ],
        'Status' => [
            'AthenaError' => [
                'ErrorCategory' => <integer>,
                'ErrorMessage' => '<string>',
                'ErrorType' => <integer>,
                'Retryable' => true || false,
            ],
            'CompletionDateTime' => <DateTime>,
            'State' => 'QUEUED|RUNNING|SUCCEEDED|FAILED|CANCELLED',
            'StateChangeReason' => '<string>',
            'SubmissionDateTime' => <DateTime>,
        ],
        'SubstatementType' => '<string>',
        'WorkGroup' => '<string>',
    ],
]

Result Details

Members
QueryExecution
Type: QueryExecution structure

Information about the query execution.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

GetQueryResults

$result = $client->getQueryResults([/* ... */]);
$promise = $client->getQueryResultsAsync([/* ... */]);

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 S3 GetObject 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 the GetQueryResults action is denied. To restrict user or role access, ensure that Amazon S3 permissions to the Athena query location are denied.

Parameter Syntax

$result = $client->getQueryResults([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'QueryExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
Type: int

The maximum number of results (rows) to return in this request.

NextToken
Type: 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.

QueryExecutionId
Required: Yes
Type: string

The unique ID of the query execution.

Result Syntax

[
    'NextToken' => '<string>',
    'ResultSet' => [
        'ResultSetMetadata' => [
            'ColumnInfo' => [
                [
                    'CaseSensitive' => true || false,
                    'CatalogName' => '<string>',
                    'Label' => '<string>',
                    'Name' => '<string>',
                    'Nullable' => 'NOT_NULL|NULLABLE|UNKNOWN',
                    'Precision' => <integer>,
                    'Scale' => <integer>,
                    'SchemaName' => '<string>',
                    'TableName' => '<string>',
                    'Type' => '<string>',
                ],
                // ...
            ],
        ],
        'Rows' => [
            [
                'Data' => [
                    [
                        'VarCharValue' => '<string>',
                    ],
                    // ...
                ],
            ],
            // ...
        ],
    ],
    'UpdateCount' => <integer>,
]

Result Details

Members
NextToken
Type: 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.

ResultSet
Type: ResultSet structure

The results of the query execution.

UpdateCount
Type: long (int|float)

The number of rows inserted with a CREATE TABLE AS SELECT, INSERT INTO, or UPDATE statement.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TooManyRequestsException:

Indicates that the request was throttled.

GetQueryRuntimeStatistics

$result = $client->getQueryRuntimeStatistics([/* ... */]);
$promise = $client->getQueryRuntimeStatisticsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->getQueryRuntimeStatistics([
    'QueryExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
QueryExecutionId
Required: Yes
Type: string

The unique ID of the query execution.

Result Syntax

[
    'QueryRuntimeStatistics' => [
        'OutputStage' => [
            'ExecutionTime' => <integer>,
            'InputBytes' => <integer>,
            'InputRows' => <integer>,
            'OutputBytes' => <integer>,
            'OutputRows' => <integer>,
            'QueryStagePlan' => [
                'Children' => [
                    [...], // RECURSIVE
                    // ...
                ],
                'Identifier' => '<string>',
                'Name' => '<string>',
                'RemoteSources' => ['<string>', ...],
            ],
            'StageId' => <integer>,
            'State' => '<string>',
            'SubStages' => [
                [...], // RECURSIVE
                // ...
            ],
        ],
        'Rows' => [
            'InputBytes' => <integer>,
            'InputRows' => <integer>,
            'OutputBytes' => <integer>,
            'OutputRows' => <integer>,
        ],
        'Timeline' => [
            'EngineExecutionTimeInMillis' => <integer>,
            'QueryPlanningTimeInMillis' => <integer>,
            'QueryQueueTimeInMillis' => <integer>,
            'ServicePreProcessingTimeInMillis' => <integer>,
            'ServiceProcessingTimeInMillis' => <integer>,
            'TotalExecutionTimeInMillis' => <integer>,
        ],
    ],
]

Result Details

Members
QueryRuntimeStatistics
Type: QueryRuntimeStatistics structure

Runtime statistics about the query execution.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

GetSession

$result = $client->getSession([/* ... */]);
$promise = $client->getSessionAsync([/* ... */]);

Gets the full details of a previously created session, including the session status and configuration.

Parameter Syntax

$result = $client->getSession([
    'SessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
SessionId
Required: Yes
Type: string

The session ID.

Result Syntax

[
    'Description' => '<string>',
    'EngineConfiguration' => [
        'AdditionalConfigs' => ['<string>', ...],
        'CoordinatorDpuSize' => <integer>,
        'DefaultExecutorDpuSize' => <integer>,
        'MaxConcurrentDpus' => <integer>,
        'SparkProperties' => ['<string>', ...],
    ],
    'EngineVersion' => '<string>',
    'NotebookVersion' => '<string>',
    'SessionConfiguration' => [
        'EncryptionConfiguration' => [
            'EncryptionOption' => 'SSE_S3|SSE_KMS|CSE_KMS',
            'KmsKey' => '<string>',
        ],
        'ExecutionRole' => '<string>',
        'IdleTimeoutSeconds' => <integer>,
        'WorkingDirectory' => '<string>',
    ],
    'SessionId' => '<string>',
    'Statistics' => [
        'DpuExecutionInMillis' => <integer>,
    ],
    'Status' => [
        'EndDateTime' => <DateTime>,
        'IdleSinceDateTime' => <DateTime>,
        'LastModifiedDateTime' => <DateTime>,
        'StartDateTime' => <DateTime>,
        'State' => 'CREATING|CREATED|IDLE|BUSY|TERMINATING|TERMINATED|DEGRADED|FAILED',
        'StateChangeReason' => '<string>',
    ],
    'WorkGroup' => '<string>',
]

Result Details

Members
Description
Type: string

The session description.

EngineConfiguration
Type: EngineConfiguration structure

Contains engine configuration information like DPU usage.

EngineVersion
Type: 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.

NotebookVersion
Type: string

The notebook version.

SessionConfiguration
Type: SessionConfiguration structure

Contains the workgroup configuration information used by the session.

SessionId
Type: string

The session ID.

Statistics
Type: SessionStatistics structure

Contains the DPU execution time.

Status
Type: SessionStatus structure

Contains information about the status of the session.

WorkGroup
Type: string

The workgroup to which the session belongs.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

GetSessionStatus

$result = $client->getSessionStatus([/* ... */]);
$promise = $client->getSessionStatusAsync([/* ... */]);

Gets the current status of a session.

Parameter Syntax

$result = $client->getSessionStatus([
    'SessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
SessionId
Required: Yes
Type: string

The session ID.

Result Syntax

[
    'SessionId' => '<string>',
    'Status' => [
        'EndDateTime' => <DateTime>,
        'IdleSinceDateTime' => <DateTime>,
        'LastModifiedDateTime' => <DateTime>,
        'StartDateTime' => <DateTime>,
        'State' => 'CREATING|CREATED|IDLE|BUSY|TERMINATING|TERMINATED|DEGRADED|FAILED',
        'StateChangeReason' => '<string>',
    ],
]

Result Details

Members
SessionId
Type: string

The session ID.

Status
Type: SessionStatus structure

Contains information about the status of the session.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

GetTableMetadata

$result = $client->getTableMetadata([/* ... */]);
$promise = $client->getTableMetadataAsync([/* ... */]);

Returns table metadata for the specified catalog, database, and table.

Parameter Syntax

$result = $client->getTableMetadata([
    'CatalogName' => '<string>', // REQUIRED
    'DatabaseName' => '<string>', // REQUIRED
    'TableName' => '<string>', // REQUIRED
    'WorkGroup' => '<string>',
]);

Parameter Details

Members
CatalogName
Required: Yes
Type: string

The name of the data catalog that contains the database and table metadata to return.

DatabaseName
Required: Yes
Type: string

The name of the database that contains the table metadata to return.

TableName
Required: Yes
Type: string

The name of the table for which metadata is returned.

WorkGroup
Type: string

The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.

Result Syntax

[
    'TableMetadata' => [
        'Columns' => [
            [
                'Comment' => '<string>',
                'Name' => '<string>',
                'Type' => '<string>',
            ],
            // ...
        ],
        'CreateTime' => <DateTime>,
        'LastAccessTime' => <DateTime>,
        'Name' => '<string>',
        'Parameters' => ['<string>', ...],
        'PartitionKeys' => [
            [
                'Comment' => '<string>',
                'Name' => '<string>',
                'Type' => '<string>',
            ],
            // ...
        ],
        'TableType' => '<string>',
    ],
]

Result Details

Members
TableMetadata
Type: TableMetadata structure

An object that contains table metadata.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

MetadataException:

An exception that Athena received when it called a custom metastore. Occurs if the error is not caused by user input (InvalidRequestException) or from the Athena platform (InternalServerException). For example, if a user-created Lambda function is missing permissions, the Lambda 4XX exception is returned in a MetadataException.

GetWorkGroup

$result = $client->getWorkGroup([/* ... */]);
$promise = $client->getWorkGroupAsync([/* ... */]);

Returns information about the workgroup with the specified name.

Parameter Syntax

$result = $client->getWorkGroup([
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
WorkGroup
Required: Yes
Type: string

The name of the workgroup.

Result Syntax

[
    'WorkGroup' => [
        'Configuration' => [
            'AdditionalConfiguration' => '<string>',
            'BytesScannedCutoffPerQuery' => <integer>,
            'CustomerContentEncryptionConfiguration' => [
                'KmsKey' => '<string>',
            ],
            'EnableMinimumEncryptionConfiguration' => true || false,
            'EnforceWorkGroupConfiguration' => true || false,
            'EngineVersion' => [
                'EffectiveEngineVersion' => '<string>',
                'SelectedEngineVersion' => '<string>',
            ],
            'ExecutionRole' => '<string>',
            'IdentityCenterConfiguration' => [
                'EnableIdentityCenter' => true || false,
                'IdentityCenterInstanceArn' => '<string>',
            ],
            'PublishCloudWatchMetricsEnabled' => true || false,
            'QueryResultsS3AccessGrantsConfiguration' => [
                'AuthenticationType' => 'DIRECTORY_IDENTITY',
                'CreateUserLevelPrefix' => true || false,
                'EnableS3AccessGrants' => true || false,
            ],
            'RequesterPaysEnabled' => true || false,
            'ResultConfiguration' => [
                'AclConfiguration' => [
                    'S3AclOption' => 'BUCKET_OWNER_FULL_CONTROL',
                ],
                'EncryptionConfiguration' => [
                    'EncryptionOption' => 'SSE_S3|SSE_KMS|CSE_KMS',
                    'KmsKey' => '<string>',
                ],
                'ExpectedBucketOwner' => '<string>',
                'OutputLocation' => '<string>',
            ],
        ],
        'CreationTime' => <DateTime>,
        'Description' => '<string>',
        'IdentityCenterApplicationArn' => '<string>',
        'Name' => '<string>',
        'State' => 'ENABLED|DISABLED',
    ],
]

Result Details

Members
WorkGroup
Type: WorkGroup structure

Information about the workgroup.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ImportNotebook

$result = $client->importNotebook([/* ... */]);
$promise = $client->importNotebookAsync([/* ... */]);

Imports a single ipynb file to a Spark enabled workgroup. To import the notebook, the request must specify a value for either Payload or NoteBookS3LocationUri. If neither is specified or both are specified, an InvalidRequestException occurs. The maximum file size that can be imported is 10 megabytes. If an ipynb file with the same name already exists in the workgroup, throws an error.

Parameter Syntax

$result = $client->importNotebook([
    'ClientRequestToken' => '<string>',
    'Name' => '<string>', // REQUIRED
    'NotebookS3LocationUri' => '<string>',
    'Payload' => '<string>',
    'Type' => 'IPYNB', // REQUIRED
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientRequestToken
Type: 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.

Name
Required: Yes
Type: string

The name of the notebook to import.

NotebookS3LocationUri
Type: string

A URI that specifies the Amazon S3 location of a notebook file in ipynb format.

Payload
Type: string

The notebook content to be imported. The payload must be in ipynb format.

Type
Required: Yes
Type: string

The notebook content type. Currently, the only valid type is IPYNB.

WorkGroup
Required: Yes
Type: string

The name of the Spark enabled workgroup to import the notebook to.

Result Syntax

[
    'NotebookId' => '<string>',
]

Result Details

Members
NotebookId
Type: string

The ID assigned to the imported notebook.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TooManyRequestsException:

Indicates that the request was throttled.

ListApplicationDPUSizes

$result = $client->listApplicationDPUSizes([/* ... */]);
$promise = $client->listApplicationDPUSizesAsync([/* ... */]);

Returns the supported DPU sizes for the supported application runtimes (for example, Athena notebook version 1).

Parameter Syntax

$result = $client->listApplicationDPUSizes([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

Specifies the maximum number of results to return.

NextToken
Type: string

A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated.

Result Syntax

[
    'ApplicationDPUSizes' => [
        [
            'ApplicationRuntimeId' => '<string>',
            'SupportedDPUSizes' => [<integer>, ...],
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
ApplicationDPUSizes
Type: Array of ApplicationDPUSizes structures

A list of the supported DPU sizes that the application runtime supports.

NextToken
Type: 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.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TooManyRequestsException:

Indicates that the request was throttled.

ListCalculationExecutions

$result = $client->listCalculationExecutions([/* ... */]);
$promise = $client->listCalculationExecutionsAsync([/* ... */]);

Lists the calculations that have been submitted to a session in descending order. Newer calculations are listed first; older calculations are listed later.

Parameter Syntax

$result = $client->listCalculationExecutions([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'SessionId' => '<string>', // REQUIRED
    'StateFilter' => 'CREATING|CREATED|QUEUED|RUNNING|CANCELING|CANCELED|COMPLETED|FAILED',
]);

Parameter Details

Members
MaxResults
Type: int

The maximum number of calculation executions to return.

NextToken
Type: 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.

SessionId
Required: Yes
Type: string

The session ID.

StateFilter
Type: 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.

Result Syntax

[
    'Calculations' => [
        [
            'CalculationExecutionId' => '<string>',
            'Description' => '<string>',
            'Status' => [
                'CompletionDateTime' => <DateTime>,
                'State' => 'CREATING|CREATED|QUEUED|RUNNING|CANCELING|CANCELED|COMPLETED|FAILED',
                'StateChangeReason' => '<string>',
                'SubmissionDateTime' => <DateTime>,
            ],
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
Calculations
Type: Array of CalculationSummary structures

A list of CalculationSummary objects.

NextToken
Type: 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.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

ListCapacityReservations

$result = $client->listCapacityReservations([/* ... */]);
$promise = $client->listCapacityReservationsAsync([/* ... */]);

Lists the capacity reservations for the current account.

Parameter Syntax

$result = $client->listCapacityReservations([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

Specifies the maximum number of results to return.

NextToken
Type: string

A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated.

Result Syntax

[
    'CapacityReservations' => [
        [
            'AllocatedDpus' => <integer>,
            'CreationTime' => <DateTime>,
            'LastAllocation' => [
                'RequestCompletionTime' => <DateTime>,
                'RequestTime' => <DateTime>,
                'Status' => 'PENDING|SUCCEEDED|FAILED',
                'StatusMessage' => '<string>',
            ],
            'LastSuccessfulAllocationTime' => <DateTime>,
            'Name' => '<string>',
            'Status' => 'PENDING|ACTIVE|CANCELLING|CANCELLED|FAILED|UPDATE_PENDING',
            'TargetDpus' => <integer>,
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
CapacityReservations
Required: Yes
Type: Array of CapacityReservation structures

The capacity reservations for the current account.

NextToken
Type: 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.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ListDataCatalogs

$result = $client->listDataCatalogs([/* ... */]);
$promise = $client->listDataCatalogsAsync([/* ... */]);

Lists the data catalogs in the current Amazon Web Services account.

In the Athena console, data catalogs are listed as "data sources" on the Data sources page under the Data source name column.

Parameter Syntax

$result = $client->listDataCatalogs([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'WorkGroup' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

Specifies the maximum number of data catalogs to return.

NextToken
Type: 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.

WorkGroup
Type: string

The name of the workgroup. Required if making an IAM Identity Center request.

Result Syntax

[
    'DataCatalogsSummary' => [
        [
            'CatalogName' => '<string>',
            'ConnectionType' => 'DYNAMODB|MYSQL|POSTGRESQL|REDSHIFT|ORACLE|SYNAPSE|SQLSERVER|DB2|OPENSEARCH|BIGQUERY|GOOGLECLOUDSTORAGE|HBASE|DOCUMENTDB|CMDB|TPCDS|TIMESTREAM|SAPHANA|SNOWFLAKE|DATALAKEGEN2|DB2AS400',
            'Error' => '<string>',
            'Status' => 'CREATE_IN_PROGRESS|CREATE_COMPLETE|CREATE_FAILED|CREATE_FAILED_CLEANUP_IN_PROGRESS|CREATE_FAILED_CLEANUP_COMPLETE|CREATE_FAILED_CLEANUP_FAILED|DELETE_IN_PROGRESS|DELETE_COMPLETE|DELETE_FAILED',
            'Type' => 'LAMBDA|GLUE|HIVE|FEDERATED',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
DataCatalogsSummary
Type: Array of DataCatalogSummary structures

A summary list of data catalogs.

NextToken
Type: 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.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ListDatabases

$result = $client->listDatabases([/* ... */]);
$promise = $client->listDatabasesAsync([/* ... */]);

Lists the databases in the specified data catalog.

Parameter Syntax

$result = $client->listDatabases([
    'CatalogName' => '<string>', // REQUIRED
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'WorkGroup' => '<string>',
]);

Parameter Details

Members
CatalogName
Required: Yes
Type: string

The name of the data catalog that contains the databases to return.

MaxResults
Type: int

Specifies the maximum number of results to return.

NextToken
Type: 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.

WorkGroup
Type: string

The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.

Result Syntax

[
    'DatabaseList' => [
        [
            'Description' => '<string>',
            'Name' => '<string>',
            'Parameters' => ['<string>', ...],
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
DatabaseList
Type: Array of Database structures

A list of databases from a data catalog.

NextToken
Type: 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.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

MetadataException:

An exception that Athena received when it called a custom metastore. Occurs if the error is not caused by user input (InvalidRequestException) or from the Athena platform (InternalServerException). For example, if a user-created Lambda function is missing permissions, the Lambda 4XX exception is returned in a MetadataException.

ListEngineVersions

$result = $client->listEngineVersions([/* ... */]);
$promise = $client->listEngineVersionsAsync([/* ... */]);

Returns a list of engine versions that are available to choose from, including the Auto option.

Parameter Syntax

$result = $client->listEngineVersions([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

The maximum number of engine versions to return in this request.

NextToken
Type: 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.

Result Syntax

[
    'EngineVersions' => [
        [
            'EffectiveEngineVersion' => '<string>',
            'SelectedEngineVersion' => '<string>',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]

Result Details

Members
EngineVersions
Type: Array of EngineVersion structures

A list of engine versions that are available to choose from.

NextToken
Type: 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.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ListExecutors

$result = $client->listExecutors([/* ... */]);
$promise = $client->listExecutorsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listExecutors([
    'ExecutorStateFilter' => 'CREATING|CREATED|REGISTERED|TERMINATING|TERMINATED|FAILED',
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'SessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ExecutorStateFilter
Type: 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.

MaxResults
Type: int

The maximum number of executors to return.

NextToken
Type: 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.

SessionId
Required: Yes
Type: string

The session ID.

Result Syntax

[
    'ExecutorsSummary' => [
        [
            'ExecutorId' => '<string>',
            'ExecutorSize' => <integer>,
            'ExecutorState' => 'CREATING|CREATED|REGISTERED|TERMINATING|TERMINATED|FAILED',
            'ExecutorType' => 'COORDINATOR|GATEWAY|WORKER',
            'StartDateTime' => <integer>,
            'TerminationDateTime' => <integer>,
        ],
        // ...
    ],
    'NextToken' => '<string>',
    'SessionId' => '<string>',
]

Result Details

Members
ExecutorsSummary
Type: Array of ExecutorsSummary structures

Contains summary information about the executor.

NextToken
Type: 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.

SessionId
Required: Yes
Type: string

The session ID.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

ListNamedQueries

$result = $client->listNamedQueries([/* ... */]);
$promise = $client->listNamedQueriesAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listNamedQueries([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'WorkGroup' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

The maximum number of queries to return in this request.

NextToken
Type: 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.

WorkGroup
Type: 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.

Result Syntax

[
    'NamedQueryIds' => ['<string>', ...],
    'NextToken' => '<string>',
]

Result Details

Members
NamedQueryIds
Type: Array of strings

The list of unique query IDs.

NextToken
Type: 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.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ListNotebookMetadata

$result = $client->listNotebookMetadata([/* ... */]);
$promise = $client->listNotebookMetadataAsync([/* ... */]);

Displays the notebook files for the specified workgroup in paginated format.

Parameter Syntax

$result = $client->listNotebookMetadata([
    'Filters' => [
        'Name' => '<string>',
    ],
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
Filters
Type: FilterDefinition structure

Search filter string.

MaxResults
Type: int

Specifies the maximum number of results to return.

NextToken
Type: string

A token generated by the Athena service that specifies where to continue pagination if a previous request was truncated.

WorkGroup
Required: Yes
Type: string

The name of the Spark enabled workgroup to retrieve notebook metadata for.

Result Syntax

[
    'NextToken' => '<string>',
    'NotebookMetadataList' => [
        [
            'CreationTime' => <DateTime>,
            'LastModifiedTime' => <DateTime>,
            'Name' => '<string>',
            'NotebookId' => '<string>',
            'Type' => 'IPYNB',
            'WorkGroup' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: 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
Type: Array of NotebookMetadata structures

The list of notebook metadata for the specified workgroup.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TooManyRequestsException:

Indicates that the request was throttled.

ListNotebookSessions

$result = $client->listNotebookSessions([/* ... */]);
$promise = $client->listNotebookSessionsAsync([/* ... */]);

Lists, in descending order, the sessions that have been created in a notebook that are in an active state like CREATING, CREATED, IDLE or BUSY. Newer sessions are listed first; older sessions are listed later.

Parameter Syntax

$result = $client->listNotebookSessions([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'NotebookId' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
Type: int

The maximum number of notebook sessions to return.

NextToken
Type: 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.

NotebookId
Required: Yes
Type: string

The ID of the notebook to list sessions for.

Result Syntax

[
    'NextToken' => '<string>',
    'NotebookSessionsList' => [
        [
            'CreationTime' => <DateTime>,
            'SessionId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: 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.

NotebookSessionsList
Required: Yes
Type: Array of NotebookSessionSummary structures

A list of the sessions belonging to the notebook.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

ListPreparedStatements

$result = $client->listPreparedStatements([/* ... */]);
$promise = $client->listPreparedStatementsAsync([/* ... */]);

Lists the prepared statements in the specified workgroup.

Parameter Syntax

$result = $client->listPreparedStatements([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
Type: int

The maximum number of results to return in this request.

NextToken
Type: 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.

WorkGroup
Required: Yes
Type: string

The workgroup to list the prepared statements for.

Result Syntax

[
    'NextToken' => '<string>',
    'PreparedStatements' => [
        [
            'LastModifiedTime' => <DateTime>,
            'StatementName' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: 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.

PreparedStatements
Type: Array of PreparedStatementSummary structures

The list of prepared statements for the workgroup.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ListQueryExecutions

$result = $client->listQueryExecutions([/* ... */]);
$promise = $client->listQueryExecutionsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listQueryExecutions([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'WorkGroup' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

The maximum number of query executions to return in this request.

NextToken
Type: 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.

WorkGroup
Type: 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.

Result Syntax

[
    'NextToken' => '<string>',
    'QueryExecutionIds' => ['<string>', ...],
]

Result Details

Members
NextToken
Type: string

A token to be used by the next request if this request is truncated.

QueryExecutionIds
Type: Array of strings

The unique IDs of each query execution as an array of strings.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ListSessions

$result = $client->listSessions([/* ... */]);
$promise = $client->listSessionsAsync([/* ... */]);

Lists the sessions in a workgroup that are in an active state like CREATING, CREATED, IDLE, or BUSY. Newer sessions are listed first; older sessions are listed later.

Parameter Syntax

$result = $client->listSessions([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'StateFilter' => 'CREATING|CREATED|IDLE|BUSY|TERMINATING|TERMINATED|DEGRADED|FAILED',
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
Type: int

The maximum number of sessions to return.

NextToken
Type: 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.

StateFilter
Type: 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.

WorkGroup
Required: Yes
Type: string

The workgroup to which the session belongs.

Result Syntax

[
    'NextToken' => '<string>',
    'Sessions' => [
        [
            'Description' => '<string>',
            'EngineVersion' => [
                'EffectiveEngineVersion' => '<string>',
                'SelectedEngineVersion' => '<string>',
            ],
            'NotebookVersion' => '<string>',
            'SessionId' => '<string>',
            'Status' => [
                'EndDateTime' => <DateTime>,
                'IdleSinceDateTime' => <DateTime>,
                'LastModifiedDateTime' => <DateTime>,
                'StartDateTime' => <DateTime>,
                'State' => 'CREATING|CREATED|IDLE|BUSY|TERMINATING|TERMINATED|DEGRADED|FAILED',
                'StateChangeReason' => '<string>',
            ],
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: 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
Type: Array of SessionSummary structures

A list of sessions.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

ListTableMetadata

$result = $client->listTableMetadata([/* ... */]);
$promise = $client->listTableMetadataAsync([/* ... */]);

Lists the metadata for the tables in the specified data catalog database.

Parameter Syntax

$result = $client->listTableMetadata([
    'CatalogName' => '<string>', // REQUIRED
    'DatabaseName' => '<string>', // REQUIRED
    'Expression' => '<string>',
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'WorkGroup' => '<string>',
]);

Parameter Details

Members
CatalogName
Required: Yes
Type: string

The name of the data catalog for which table metadata should be returned.

DatabaseName
Required: Yes
Type: string

The name of the database for which table metadata should be returned.

Expression
Type: string

A regex filter that pattern-matches table names. If no expression is supplied, metadata for all tables are listed.

MaxResults
Type: int

Specifies the maximum number of results to return.

NextToken
Type: 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.

WorkGroup
Type: string

The name of the workgroup for which the metadata is being fetched. Required if requesting an IAM Identity Center enabled Glue Data Catalog.

Result Syntax

[
    'NextToken' => '<string>',
    'TableMetadataList' => [
        [
            'Columns' => [
                [
                    'Comment' => '<string>',
                    'Name' => '<string>',
                    'Type' => '<string>',
                ],
                // ...
            ],
            'CreateTime' => <DateTime>,
            'LastAccessTime' => <DateTime>,
            'Name' => '<string>',
            'Parameters' => ['<string>', ...],
            'PartitionKeys' => [
                [
                    'Comment' => '<string>',
                    'Name' => '<string>',
                    'Type' => '<string>',
                ],
                // ...
            ],
            'TableType' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: 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.

TableMetadataList
Type: Array of TableMetadata structures

A list of table metadata.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

MetadataException:

An exception that Athena received when it called a custom metastore. Occurs if the error is not caused by user input (InvalidRequestException) or from the Athena platform (InternalServerException). For example, if a user-created Lambda function is missing permissions, the Lambda 4XX exception is returned in a MetadataException.

ListTagsForResource

$result = $client->listTagsForResource([/* ... */]);
$promise = $client->listTagsForResourceAsync([/* ... */]);

Lists the tags associated with an Athena resource.

Parameter Syntax

$result = $client->listTagsForResource([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'ResourceARN' => '<string>', // REQUIRED
]);

Parameter Details

Members
MaxResults
Type: int

The maximum number of results to be returned per request that lists the tags for the resource.

NextToken
Type: 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.

ResourceARN
Required: Yes
Type: string

Lists the tags for the resource with the specified ARN.

Result Syntax

[
    'NextToken' => '<string>',
    'Tags' => [
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: string

A token to be used by the next request if this request is truncated.

Tags
Type: Array of Tag structures

The list of tags associated with the specified resource.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

ListWorkGroups

$result = $client->listWorkGroups([/* ... */]);
$promise = $client->listWorkGroupsAsync([/* ... */]);

Lists available workgroups for the account.

Parameter Syntax

$result = $client->listWorkGroups([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);

Parameter Details

Members
MaxResults
Type: int

The maximum number of workgroups to return in this request.

NextToken
Type: 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.

Result Syntax

[
    'NextToken' => '<string>',
    'WorkGroups' => [
        [
            'CreationTime' => <DateTime>,
            'Description' => '<string>',
            'EngineVersion' => [
                'EffectiveEngineVersion' => '<string>',
                'SelectedEngineVersion' => '<string>',
            ],
            'IdentityCenterApplicationArn' => '<string>',
            'Name' => '<string>',
            'State' => 'ENABLED|DISABLED',
        ],
        // ...
    ],
]

Result Details

Members
NextToken
Type: 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.

WorkGroups
Type: Array of WorkGroupSummary structures

A list of WorkGroupSummary objects that include the names, descriptions, creation times, and states for each workgroup.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

PutCapacityAssignmentConfiguration

$result = $client->putCapacityAssignmentConfiguration([/* ... */]);
$promise = $client->putCapacityAssignmentConfigurationAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->putCapacityAssignmentConfiguration([
    'CapacityAssignments' => [ // REQUIRED
        [
            'WorkGroupNames' => ['<string>', ...],
        ],
        // ...
    ],
    'CapacityReservationName' => '<string>', // REQUIRED
]);

Parameter Details

Members
CapacityAssignments
Required: Yes
Type: Array of CapacityAssignment structures

The list of assignments for the capacity assignment configuration.

CapacityReservationName
Required: Yes
Type: string

The name of the capacity reservation to put a capacity assignment configuration for.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

StartCalculationExecution

$result = $client->startCalculationExecution([/* ... */]);
$promise = $client->startCalculationExecutionAsync([/* ... */]);

Submits calculations for execution within a session. You can supply the code to run as an inline code block within the request.

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.

Parameter Syntax

$result = $client->startCalculationExecution([
    'CalculationConfiguration' => [
        'CodeBlock' => '<string>',
    ],
    'ClientRequestToken' => '<string>',
    'CodeBlock' => '<string>',
    'Description' => '<string>',
    'SessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
CalculationConfiguration
Type: CalculationConfiguration structure

Contains configuration information for the calculation.

ClientRequestToken
Type: 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.

CodeBlock
Type: string

A string that contains the code of the calculation. Use this parameter instead of CalculationConfiguration$CodeBlock, which is deprecated.

Description
Type: string

A description of the calculation.

SessionId
Required: Yes
Type: string

The session ID.

Result Syntax

[
    'CalculationExecutionId' => '<string>',
    'State' => 'CREATING|CREATED|QUEUED|RUNNING|CANCELING|CANCELED|COMPLETED|FAILED',
]

Result Details

Members
CalculationExecutionId
Type: string

The calculation execution UUID.

State
Type: 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.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

StartQueryExecution

$result = $client->startQueryExecution([/* ... */]);
$promise = $client->startQueryExecutionAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->startQueryExecution([
    'ClientRequestToken' => '<string>',
    'ExecutionParameters' => ['<string>', ...],
    'QueryExecutionContext' => [
        'Catalog' => '<string>',
        'Database' => '<string>',
    ],
    'QueryString' => '<string>', // REQUIRED
    'ResultConfiguration' => [
        'AclConfiguration' => [
            'S3AclOption' => 'BUCKET_OWNER_FULL_CONTROL', // REQUIRED
        ],
        'EncryptionConfiguration' => [
            'EncryptionOption' => 'SSE_S3|SSE_KMS|CSE_KMS', // REQUIRED
            'KmsKey' => '<string>',
        ],
        'ExpectedBucketOwner' => '<string>',
        'OutputLocation' => '<string>',
    ],
    'ResultReuseConfiguration' => [
        'ResultReuseByAgeConfiguration' => [
            'Enabled' => true || false, // REQUIRED
            'MaxAgeInMinutes' => <integer>,
        ],
    ],
    'WorkGroup' => '<string>',
]);

Parameter Details

Members
ClientRequestToken
Type: 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 as QueryString, has changed. A call to StartQueryExecution that uses a previous client request token returns the same QueryExecutionId even if the requester doesn't have permission on the tables specified in QueryString.

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.

ExecutionParameters
Type: Array of strings

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.

QueryExecutionContext
Type: QueryExecutionContext structure

The database within which the query executes.

QueryString
Required: Yes
Type: string

The SQL query statements to be executed.

ResultConfiguration
Type: ResultConfiguration structure

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.

ResultReuseConfiguration
Type: ResultReuseConfiguration structure

Specifies the query result reuse behavior for the query.

WorkGroup
Type: string

The name of the workgroup in which the query is being started.

Result Syntax

[
    'QueryExecutionId' => '<string>',
]

Result Details

Members
QueryExecutionId
Type: string

The unique ID of the query that ran as a result of this request.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TooManyRequestsException:

Indicates that the request was throttled.

StartSession

$result = $client->startSession([/* ... */]);
$promise = $client->startSessionAsync([/* ... */]);

Creates a session for running calculations within a workgroup. The session is ready when it reaches an IDLE state.

Parameter Syntax

$result = $client->startSession([
    'ClientRequestToken' => '<string>',
    'Description' => '<string>',
    'EngineConfiguration' => [ // REQUIRED
        'AdditionalConfigs' => ['<string>', ...],
        'CoordinatorDpuSize' => <integer>,
        'DefaultExecutorDpuSize' => <integer>,
        'MaxConcurrentDpus' => <integer>, // REQUIRED
        'SparkProperties' => ['<string>', ...],
    ],
    'NotebookVersion' => '<string>',
    'SessionIdleTimeoutInMinutes' => <integer>,
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientRequestToken
Type: 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.

Description
Type: string

The session description.

EngineConfiguration
Required: Yes
Type: EngineConfiguration structure

Contains engine data processing unit (DPU) configuration settings and parameter mappings.

NotebookVersion
Type: 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 for NotebookVersion, you must also specify a value for NotebookId. See EngineConfiguration$AdditionalConfigs.

SessionIdleTimeoutInMinutes
Type: int

The idle timeout in minutes for the session.

WorkGroup
Required: Yes
Type: string

The workgroup to which the session belongs.

Result Syntax

[
    'SessionId' => '<string>',
    'State' => 'CREATING|CREATED|IDLE|BUSY|TERMINATING|TERMINATED|DEGRADED|FAILED',
]

Result Details

Members
SessionId
Type: string

The session ID.

State
Type: 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.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

SessionAlreadyExistsException:

The specified session already exists.

TooManyRequestsException:

Indicates that the request was throttled.

StopCalculationExecution

$result = $client->stopCalculationExecution([/* ... */]);
$promise = $client->stopCalculationExecutionAsync([/* ... */]);

Requests the cancellation of a calculation. A StopCalculationExecution call on a calculation that is already in a terminal state (for example, STOPPED, FAILED, or COMPLETED) succeeds but has no effect.

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.

Parameter Syntax

$result = $client->stopCalculationExecution([
    'CalculationExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
CalculationExecutionId
Required: Yes
Type: string

The calculation execution UUID.

Result Syntax

[
    'State' => 'CREATING|CREATED|QUEUED|RUNNING|CANCELING|CANCELED|COMPLETED|FAILED',
]

Result Details

Members
State
Type: 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.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

StopQueryExecution

$result = $client->stopQueryExecution([/* ... */]);
$promise = $client->stopQueryExecutionAsync([/* ... */]);

Stops a query execution. Requires you to have access to the workgroup in which the query ran.

Parameter Syntax

$result = $client->stopQueryExecution([
    'QueryExecutionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
QueryExecutionId
Required: Yes
Type: string

The unique ID of the query execution to stop.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TagResource

$result = $client->tagResource([/* ... */]);
$promise = $client->tagResourceAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->tagResource([
    'ResourceARN' => '<string>', // REQUIRED
    'Tags' => [ // REQUIRED
        [
            'Key' => '<string>',
            'Value' => '<string>',
        ],
        // ...
    ],
]);

Parameter Details

Members
ResourceARN
Required: Yes
Type: string

Specifies the ARN of the Athena resource to which tags are to be added.

Tags
Required: Yes
Type: Array of Tag structures

A collection of one or more tags, separated by commas, to be added to an Athena resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

TerminateSession

$result = $client->terminateSession([/* ... */]);
$promise = $client->terminateSessionAsync([/* ... */]);

Terminates an active session. A TerminateSession call on a session that is already inactive (for example, in a FAILED, TERMINATED or TERMINATING state) succeeds but has no effect. Calculations running in the session when TerminateSession is called are forcefully stopped, but may display as FAILED instead of STOPPED.

Parameter Syntax

$result = $client->terminateSession([
    'SessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
SessionId
Required: Yes
Type: string

The session ID.

Result Syntax

[
    'State' => 'CREATING|CREATED|IDLE|BUSY|TERMINATING|TERMINATED|DEGRADED|FAILED',
]

Result Details

Members
State
Type: 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.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

UntagResource

$result = $client->untagResource([/* ... */]);
$promise = $client->untagResourceAsync([/* ... */]);

Removes one or more tags from an Athena resource.

Parameter Syntax

$result = $client->untagResource([
    'ResourceARN' => '<string>', // REQUIRED
    'TagKeys' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
ResourceARN
Required: Yes
Type: string

Specifies the ARN of the resource from which tags are to be removed.

TagKeys
Required: Yes
Type: Array of strings

A comma-separated list of one or more tag keys whose tags are to be removed from the specified resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

UpdateCapacityReservation

$result = $client->updateCapacityReservation([/* ... */]);
$promise = $client->updateCapacityReservationAsync([/* ... */]);

Updates the number of requested data processing units for the capacity reservation with the specified name.

Parameter Syntax

$result = $client->updateCapacityReservation([
    'Name' => '<string>', // REQUIRED
    'TargetDpus' => <integer>, // REQUIRED
]);

Parameter Details

Members
Name
Required: Yes
Type: string

The name of the capacity reservation.

TargetDpus
Required: Yes
Type: int

The new number of requested data processing units.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

UpdateDataCatalog

$result = $client->updateDataCatalog([/* ... */]);
$promise = $client->updateDataCatalogAsync([/* ... */]);

Updates the data catalog that has the specified name.

Parameter Syntax

$result = $client->updateDataCatalog([
    'Description' => '<string>',
    'Name' => '<string>', // REQUIRED
    'Parameters' => ['<string>', ...],
    'Type' => 'LAMBDA|GLUE|HIVE|FEDERATED', // REQUIRED
]);

Parameter Details

Members
Description
Type: string

New or modified text that describes the data catalog.

Name
Required: Yes
Type: 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.

Parameters
Type: Associative array of custom strings keys (KeyString) to strings

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. The metadata-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

Type
Required: Yes
Type: string

Specifies the type of data catalog to update. Specify LAMBDA for a federated catalog, HIVE for an external hive metastore, or GLUE for an Glue Data Catalog.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

UpdateNamedQuery

$result = $client->updateNamedQuery([/* ... */]);
$promise = $client->updateNamedQueryAsync([/* ... */]);

Updates a NamedQuery object. The database or workgroup cannot be updated.

Parameter Syntax

$result = $client->updateNamedQuery([
    'Description' => '<string>',
    'Name' => '<string>', // REQUIRED
    'NamedQueryId' => '<string>', // REQUIRED
    'QueryString' => '<string>', // REQUIRED
]);

Parameter Details

Members
Description
Type: string

The query description.

Name
Required: Yes
Type: string

The name of the query.

NamedQueryId
Required: Yes
Type: string

The unique identifier (UUID) of the query.

QueryString
Required: Yes
Type: string

The contents of the query with all query statements.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

UpdateNotebook

$result = $client->updateNotebook([/* ... */]);
$promise = $client->updateNotebookAsync([/* ... */]);

Updates the contents of a Spark notebook.

Parameter Syntax

$result = $client->updateNotebook([
    'ClientRequestToken' => '<string>',
    'NotebookId' => '<string>', // REQUIRED
    'Payload' => '<string>', // REQUIRED
    'SessionId' => '<string>',
    'Type' => 'IPYNB', // REQUIRED
]);

Parameter Details

Members
ClientRequestToken
Type: 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.

NotebookId
Required: Yes
Type: string

The ID of the notebook to update.

Payload
Required: Yes
Type: string

The updated content for the notebook.

SessionId
Type: string

The active notebook session ID. Required if the notebook has an active session.

Type
Required: Yes
Type: string

The notebook content type. Currently, the only valid type is IPYNB.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TooManyRequestsException:

Indicates that the request was throttled.

UpdateNotebookMetadata

$result = $client->updateNotebookMetadata([/* ... */]);
$promise = $client->updateNotebookMetadataAsync([/* ... */]);

Updates the metadata for a notebook.

Parameter Syntax

$result = $client->updateNotebookMetadata([
    'ClientRequestToken' => '<string>',
    'Name' => '<string>', // REQUIRED
    'NotebookId' => '<string>', // REQUIRED
]);

Parameter Details

Members
ClientRequestToken
Type: 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
Required: Yes
Type: string

The name to update the notebook to.

NotebookId
Required: Yes
Type: string

The ID of the notebook to update the metadata for.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

TooManyRequestsException:

Indicates that the request was throttled.

UpdatePreparedStatement

$result = $client->updatePreparedStatement([/* ... */]);
$promise = $client->updatePreparedStatementAsync([/* ... */]);

Updates a prepared statement.

Parameter Syntax

$result = $client->updatePreparedStatement([
    'Description' => '<string>',
    'QueryStatement' => '<string>', // REQUIRED
    'StatementName' => '<string>', // REQUIRED
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
Description
Type: string

The description of the prepared statement.

QueryStatement
Required: Yes
Type: string

The query string for the prepared statement.

StatementName
Required: Yes
Type: string

The name of the prepared statement.

WorkGroup
Required: Yes
Type: string

The workgroup for the prepared statement.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

ResourceNotFoundException:

A resource, such as a workgroup, was not found.

UpdateWorkGroup

$result = $client->updateWorkGroup([/* ... */]);
$promise = $client->updateWorkGroupAsync([/* ... */]);

Updates the workgroup with the specified name. The workgroup's name cannot be changed. Only ConfigurationUpdates can be specified.

Parameter Syntax

$result = $client->updateWorkGroup([
    'ConfigurationUpdates' => [
        'AdditionalConfiguration' => '<string>',
        'BytesScannedCutoffPerQuery' => <integer>,
        'CustomerContentEncryptionConfiguration' => [
            'KmsKey' => '<string>', // REQUIRED
        ],
        'EnableMinimumEncryptionConfiguration' => true || false,
        'EnforceWorkGroupConfiguration' => true || false,
        'EngineVersion' => [
            'EffectiveEngineVersion' => '<string>',
            'SelectedEngineVersion' => '<string>',
        ],
        'ExecutionRole' => '<string>',
        'PublishCloudWatchMetricsEnabled' => true || false,
        'QueryResultsS3AccessGrantsConfiguration' => [
            'AuthenticationType' => 'DIRECTORY_IDENTITY', // REQUIRED
            'CreateUserLevelPrefix' => true || false,
            'EnableS3AccessGrants' => true || false, // REQUIRED
        ],
        '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>',
            ],
            'ExpectedBucketOwner' => '<string>',
            'OutputLocation' => '<string>',
            'RemoveAclConfiguration' => true || false,
            'RemoveEncryptionConfiguration' => true || false,
            'RemoveExpectedBucketOwner' => true || false,
            'RemoveOutputLocation' => true || false,
        ],
    ],
    'Description' => '<string>',
    'State' => 'ENABLED|DISABLED',
    'WorkGroup' => '<string>', // REQUIRED
]);

Parameter Details

Members
ConfigurationUpdates

Contains configuration updates for an Athena SQL workgroup.

Description
Type: string

The workgroup description.

State
Type: string

The workgroup state that will be updated for the given workgroup.

WorkGroup
Required: Yes
Type: string

The specified workgroup that will be updated.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

InternalServerException:

Indicates a platform issue, which may be due to a transient condition or outage.

InvalidRequestException:

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

Shapes

AclConfiguration

Description

Indicates that an Amazon S3 canned ACL should be set to control ownership of stored query results, including data files inserted by Athena as the result of statements like CTAS or INSERT INTO. When Athena stores query results in Amazon S3, the canned ACL is set with the x-amz-acl request header. For more information about S3 Object Ownership, see Object Ownership settings in the Amazon S3 User Guide.

Members
S3AclOption
Required: Yes
Type: string

The Amazon S3 canned ACL that Athena should specify when storing query results, including data files inserted by Athena as the result of statements like CTAS or INSERT INTO. Currently the only supported canned ACL is 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.

ApplicationDPUSizes

Description

Contains the application runtime IDs and their supported DPU sizes.

Members
ApplicationRuntimeId
Type: string

The name of the supported application runtime (for example, Athena notebook version 1).

SupportedDPUSizes
Type: Array of ints

A list of the supported DPU sizes that the application runtime supports.

AthenaError

Description

Provides information about an Athena query error. The AthenaError feature provides standardized error information to help you understand failed queries and take steps after a query failure occurs. AthenaError includes an ErrorCategory field that specifies whether the cause of the failed query is due to system error, user error, or other error.

Members
ErrorCategory
Type: int

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

ErrorMessage
Type: string

Contains a short description of the error that occurred.

ErrorType
Type: int

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
Type: boolean

True if the query might succeed if resubmitted.

CalculationConfiguration

Description

Contains configuration information for the calculation.

Members
CodeBlock
Type: string

A string that contains the code for the calculation.

CalculationResult

Description

Contains information about an application-specific calculation result.

Members
ResultS3Uri
Type: string

The Amazon S3 location of the folder for the calculation results.

ResultType
Type: string

The data format of the calculation result.

StdErrorS3Uri
Type: string

The Amazon S3 location of the stderr error messages file for the calculation.

StdOutS3Uri
Type: string

The Amazon S3 location of the stdout file for the calculation.

CalculationStatistics

Description

Contains statistics for a notebook calculation.

Members
DpuExecutionInMillis
Type: long (int|float)

The data processing unit execution time in milliseconds for the calculation.

Progress
Type: string

The progress of the calculation.

CalculationStatus

Description

Contains information about the status of a notebook calculation.

Members
CompletionDateTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the calculation completed processing.

State
Type: 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.

StateChangeReason
Type: string

The reason for the calculation state change (for example, the calculation was canceled because the session was terminated).

SubmissionDateTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the calculation was submitted for processing.

CalculationSummary

Description

Summary information for a notebook calculation.

Members
CalculationExecutionId
Type: string

The calculation execution UUID.

Description
Type: string

A description of the calculation.

Status
Type: CalculationStatus structure

Contains information about the status of the calculation.

CapacityAllocation

Description

Contains the submission time of a single allocation request for a capacity reservation and the most recent status of the attempted allocation.

Members
RequestCompletionTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the capacity allocation request was completed.

RequestTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the capacity allocation was requested.

Status
Required: Yes
Type: string

The status of the capacity allocation.

StatusMessage
Type: string

The status message of the capacity allocation.

CapacityAssignment

Description

A mapping between one or more workgroups and a capacity reservation.

Members
WorkGroupNames
Type: Array of strings

The list of workgroup names for the capacity assignment.

CapacityAssignmentConfiguration

Description

Assigns Athena workgroups (and hence their queries) to capacity reservations. A capacity reservation can have only one capacity assignment configuration, but the capacity assignment configuration can be made up of multiple individual assignments. Each assignment specifies how Athena queries can consume capacity from the capacity reservation that their workgroup is mapped to.

Members
CapacityAssignments
Type: Array of CapacityAssignment structures

The list of assignments that make up the capacity assignment configuration.

CapacityReservationName
Type: string

The name of the reservation that the capacity assignment configuration is for.

CapacityReservation

Description

A reservation for a specified number of data processing units (DPUs). When a reservation is initially created, it has no DPUs. Athena allocates DPUs until the allocated amount equals the requested amount.

Members
AllocatedDpus
Required: Yes
Type: int

The number of data processing units currently allocated.

CreationTime
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time in UTC epoch millis when the capacity reservation was created.

LastAllocation
Type: CapacityAllocation structure

Contains the submission time of a single allocation request for a capacity reservation and the most recent status of the attempted allocation.

LastSuccessfulAllocationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time of the most recent capacity allocation that succeeded.

Name
Required: Yes
Type: string

The name of the capacity reservation.

Status
Required: Yes
Type: string

The status of the capacity reservation.

TargetDpus
Required: Yes
Type: int

The number of data processing units requested.

Column

Description

Contains metadata for a column in a table.

Members
Comment
Type: string

Optional information about the column.

Name
Required: Yes
Type: string

The name of the column.

Type
Type: string

The data type of the column.

ColumnInfo

Description

Information about the columns in a query execution result.

Members
CaseSensitive
Type: boolean

Indicates whether values in the column are case-sensitive.

CatalogName
Type: string

The catalog to which the query results belong.

Label
Type: string

A column label.

Name
Required: Yes
Type: string

The name of the column.

Nullable
Type: string

Unsupported constraint. This value always shows as UNKNOWN.

Precision
Type: int

For DECIMAL data types, specifies the total number of digits, up to 38. For performance reasons, we recommend up to 18 digits.

Scale
Type: int

For DECIMAL data types, specifies the total number of digits in the fractional part of the value. Defaults to 0.

SchemaName
Type: string

The schema name (database name) to which the query results belong.

TableName
Type: string

The table name for the query results.

Type
Required: Yes
Type: string

The data type of the column.

CustomerContentEncryptionConfiguration

Description

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.

Members
KmsKey
Required: Yes
Type: string

The customer managed KMS key that is used to encrypt the user's data stores in Athena.

DataCatalog

Description

Contains information about a data catalog in an Amazon Web Services account.

In the Athena console, data catalogs are listed as "data sources" on the Data sources page under the Data source name column.

Members
ConnectionType
Type: string

The type of connection for a FEDERATED data catalog (for example, REDSHIFT, MYSQL, or SQLSERVER). For information about individual connectors, see Available data source connectors.

Description
Type: string

An optional description of the data catalog.

Error
Type: string

Text of the error that occurred during data catalog creation or deletion.

Name
Required: Yes
Type: 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.

Parameters
Type: Associative array of custom strings keys (KeyString) to strings

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. The metadata-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. The catalog_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 default AwsDataCatalog that already exists in your account, of which you can have only one and cannot modify.

  • The FEDERATED data catalog type uses one of the following parameters, but not both. Use connection-arn for an existing Glue connection. Use connection-type and connection-properties to specify the configuration setting for a new connection.

    • connection-arn:<glue_connection_arn_to_reuse>

    • connection-type:MYSQL|REDSHIFT|...., connection-properties:"<json_string>"

      For <json_string> , use escaped JSON text, as in the following example.

      "{\"spill_bucket\":\"my_spill\",\"spill_prefix\":\"athena-spill\",\"host\":\"abc12345.snowflakecomputing.com\",\"port\":\"1234\",\"warehouse\":\"DEV_WH\",\"database\":\"TEST\",\"schema\":\"PUBLIC\",\"SecretArn\":\"arn:aws:secretsmanager:ap-south-1:111122223333:secret:snowflake-XHb67j\"}"

Status
Type: string

The status of the creation or deletion of the data catalog.

  • The LAMBDA, GLUE, and HIVE data catalog types are created synchronously. Their status is either CREATE_COMPLETE or CREATE_FAILED.

  • The FEDERATED data catalog type is created asynchronously.

Data catalog creation status:

  • CREATE_IN_PROGRESS: Federated data catalog creation in progress.

  • CREATE_COMPLETE: Data catalog creation complete.

  • CREATE_FAILED: Data catalog could not be created.

  • CREATE_FAILED_CLEANUP_IN_PROGRESS: Federated data catalog creation failed and is being removed.

  • CREATE_FAILED_CLEANUP_COMPLETE: Federated data catalog creation failed and was removed.

  • CREATE_FAILED_CLEANUP_FAILED: Federated data catalog creation failed but could not be removed.

Data catalog deletion status:

  • DELETE_IN_PROGRESS: Federated data catalog deletion in progress.

  • DELETE_COMPLETE: Federated data catalog deleted.

  • DELETE_FAILED: Federated data catalog could not be deleted.

Type
Required: Yes
Type: string

The type of data catalog to create: LAMBDA for a federated catalog, GLUE for an Glue Data Catalog, and HIVE for an external Apache Hive metastore. FEDERATED is a federated catalog for which Athena creates the connection and the Lambda function for you based on the parameters that you pass.

DataCatalogSummary

Description

The summary information for the data catalog, which includes its name and type.

Members
CatalogName
Type: 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.

ConnectionType
Type: string

The type of connection for a FEDERATED data catalog (for example, REDSHIFT, MYSQL, or SQLSERVER). For information about individual connectors, see Available data source connectors.

Error
Type: string

Text of the error that occurred during data catalog creation or deletion.

Status
Type: string

The status of the creation or deletion of the data catalog.

  • The LAMBDA, GLUE, and HIVE data catalog types are created synchronously. Their status is either CREATE_COMPLETE or CREATE_FAILED.

  • The FEDERATED data catalog type is created asynchronously.

Data catalog creation status:

  • CREATE_IN_PROGRESS: Federated data catalog creation in progress.

  • CREATE_COMPLETE: Data catalog creation complete.

  • CREATE_FAILED: Data catalog could not be created.

  • CREATE_FAILED_CLEANUP_IN_PROGRESS: Federated data catalog creation failed and is being removed.

  • CREATE_FAILED_CLEANUP_COMPLETE: Federated data catalog creation failed and was removed.

  • CREATE_FAILED_CLEANUP_FAILED: Federated data catalog creation failed but could not be removed.

Data catalog deletion status:

  • DELETE_IN_PROGRESS: Federated data catalog deletion in progress.

  • DELETE_COMPLETE: Federated data catalog deleted.

  • DELETE_FAILED: Federated data catalog could not be deleted.

Type
Type: string

The data catalog type.

Database

Description

Contains metadata information for a database in a data catalog.

Members
Description
Type: string

An optional description of the database.

Name
Required: Yes
Type: string

The name of the database.

Parameters
Type: Associative array of custom strings keys (KeyString) to strings

A set of custom key/value pairs.

Datum

Description

A piece of data (a field in the table).

Members
VarCharValue
Type: string

The value of the datum.

EncryptionConfiguration

Description

If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE_KMS or CSE_KMS) and key information.

Members
EncryptionOption
Required: Yes
Type: 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.

KmsKey
Type: string

For SSE_KMS and CSE_KMS, this is the KMS key ARN or ID.

EngineConfiguration

Description

Contains data processing unit (DPU) configuration settings and parameter mappings for a notebook engine.

Members
AdditionalConfigs
Type: Associative array of custom strings keys (KeyString) to strings

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 named NotebookId to AdditionalConfigs that has the value of the Athena notebook ID.

CoordinatorDpuSize
Type: int

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.

DefaultExecutorDpuSize
Type: int

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.

MaxConcurrentDpus
Required: Yes
Type: int

The maximum number of DPUs that can run concurrently.

SparkProperties
Type: Associative array of custom strings keys (KeyString) to strings

Specifies custom jar files and Spark properties for use cases like cluster encryption, table formats, and general Spark tuning.

EngineVersion

Description

The Athena engine version for running queries, or the PySpark engine version for running sessions.

Members
EffectiveEngineVersion
Type: 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 or UpdateWorkGroup operation, the EffectiveEngineVersion field is ignored.

SelectedEngineVersion
Type: string

The engine version requested by the user. Possible values are determined by the output of ListEngineVersions, including AUTO. The default is AUTO.

ExecutorsSummary

Description

Contains summary information about an executor.

Members
ExecutorId
Required: Yes
Type: string

The UUID of the executor.

ExecutorSize
Type: long (int|float)

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.

ExecutorState
Type: 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.

ExecutorType
Type: string

The type of executor used for the application (COORDINATOR, GATEWAY, or WORKER).

StartDateTime
Type: long (int|float)

The date and time that the executor started.

TerminationDateTime
Type: long (int|float)

The date and time that the executor was terminated.

FilterDefinition

Description

A string for searching notebook names.

Members
Name
Type: string

The name of the notebook to search for.

IdentityCenterConfiguration

Description

Specifies whether the workgroup is IAM Identity Center supported.

Members
EnableIdentityCenter
Type: boolean

Specifies whether the workgroup is IAM Identity Center supported.

IdentityCenterInstanceArn
Type: string

The IAM Identity Center instance ARN that the workgroup associates to.

InternalServerException

Description

Indicates a platform issue, which may be due to a transient condition or outage.

Members
Message
Type: string

InvalidRequestException

Description

Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.

Members
AthenaErrorCode
Type: string

The error code returned when the query execution failed to process, or when the processing request for the named query failed.

Message
Type: string

MetadataException

Description

An exception that Athena received when it called a custom metastore. Occurs if the error is not caused by user input (InvalidRequestException) or from the Athena platform (InternalServerException). For example, if a user-created Lambda function is missing permissions, the Lambda 4XX exception is returned in a MetadataException.

Members
Message
Type: string

NamedQuery

Description

A query, where QueryString contains the SQL statements that make up the query.

Members
Database
Required: Yes
Type: string

The database to which the query belongs.

Description
Type: string

The query description.

Name
Required: Yes
Type: string

The query name.

NamedQueryId
Type: string

The unique identifier of the query.

QueryString
Required: Yes
Type: string

The SQL statements that make up the query.

WorkGroup
Type: string

The name of the workgroup that contains the named query.

NotebookMetadata

Description

Contains metadata for notebook, including the notebook name, ID, workgroup, and time created.

Members
CreationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the notebook was created.

LastModifiedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the notebook was last modified.

Name
Type: string

The name of the notebook.

NotebookId
Type: string

The notebook ID.

Type
Type: string

The type of notebook. Currently, the only valid type is IPYNB.

WorkGroup
Type: string

The name of the Spark enabled workgroup to which the notebook belongs.

NotebookSessionSummary

Description

Contains the notebook session ID and notebook session creation time.

Members
CreationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time when the notebook session was created.

SessionId
Type: string

The notebook session ID.

PreparedStatement

Description

A prepared SQL statement for use with Athena.

Members
Description
Type: string

The description of the prepared statement.

LastModifiedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The last modified time of the prepared statement.

QueryStatement
Type: string

The query string for the prepared statement.

StatementName
Type: string

The name of the prepared statement.

WorkGroupName
Type: string

The name of the workgroup to which the prepared statement belongs.

PreparedStatementSummary

Description

The name and last modified time of the prepared statement.

Members
LastModifiedTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The last modified time of the prepared statement.

StatementName
Type: string

The name of the prepared statement.

QueryExecution

Description

Information about a single instance of a query execution.

Members
EngineVersion
Type: EngineVersion structure

The engine version that executed the query.

ExecutionParameters
Type: Array of strings

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.

Query
Type: string

The SQL query statements which the query execution ran.

QueryExecutionContext
Type: QueryExecutionContext structure

The database in which the query execution occurred.

QueryExecutionId
Type: string

The unique identifier for each query execution.

QueryResultsS3AccessGrantsConfiguration

Specifies whether Amazon S3 access grants are enabled for query results.

ResultConfiguration
Type: ResultConfiguration structure

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.

ResultReuseConfiguration
Type: ResultReuseConfiguration structure

Specifies the query result reuse behavior that was used for the query.

StatementType
Type: string

The type of query statement that was run. DDL indicates DDL query statements. DML indicates DML (Data Manipulation Language) query statements, such as CREATE TABLE AS SELECT. UTILITY indicates query statements other than DDL and DML, such as SHOW CREATE TABLE, or DESCRIBE TABLE.

Statistics
Type: QueryExecutionStatistics structure

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.

Status
Type: QueryExecutionStatus structure

The completion date, current state, submission time, and state change reason (if applicable) for the query execution.

SubstatementType
Type: string

The kind of query statement that was run.

WorkGroup
Type: string

The name of the workgroup in which the query ran.

QueryExecutionContext

Description

The database and data catalog context in which the query execution occurs.

Members
Catalog
Type: string

The name of the data catalog used in the query execution.

Database
Type: string

The name of the database used in the query execution. The database must exist in the catalog.

QueryExecutionStatistics

Description

The amount of data scanned during the query execution and the amount of time that it took to execute, and the type of statement that was run.

Members
DataManifestLocation
Type: 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.

DataScannedInBytes
Type: long (int|float)

The number of bytes in the data that was queried.

EngineExecutionTimeInMillis
Type: long (int|float)

The number of milliseconds that the query took to execute.

QueryPlanningTimeInMillis
Type: long (int|float)

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.

QueryQueueTimeInMillis
Type: long (int|float)

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.

ResultReuseInformation
Type: ResultReuseInformation structure

Contains information about whether previous query results were reused for the query.

ServicePreProcessingTimeInMillis
Type: long (int|float)

The number of milliseconds that Athena took to preprocess the query before submitting the query to the query engine.

ServiceProcessingTimeInMillis
Type: long (int|float)

The number of milliseconds that Athena took to finalize and publish the query results after the query engine finished running the query.

TotalExecutionTimeInMillis
Type: long (int|float)

The number of milliseconds that Athena took to run the query.

QueryExecutionStatus

Description

The completion date, current state, submission time, and state change reason (if applicable) for the query execution.

Members
AthenaError
Type: AthenaError structure

Provides information about an Athena query error.

CompletionDateTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the query completed.

State
Type: 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.

Athena automatically retries your queries in cases of certain transient errors. As a result, you may see the query state transition from RUNNING or FAILED to QUEUED.

StateChangeReason
Type: string

Further detail about the status of the query.

SubmissionDateTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the query was submitted.

QueryResultsS3AccessGrantsConfiguration

Description

Specifies whether Amazon S3 access grants are enabled for query results.

Members
AuthenticationType
Required: Yes
Type: string

The authentication type used for Amazon S3 access grants. Currently, only DIRECTORY_IDENTITY is supported.

CreateUserLevelPrefix
Type: boolean

When enabled, appends the user ID as an Amazon S3 path prefix to the query result output location.

EnableS3AccessGrants
Required: Yes
Type: boolean

Specifies whether Amazon S3 access grants are enabled for query results.

QueryRuntimeStatistics

Description

The query execution timeline, statistics on input and output rows and bytes, and the different query stages that form the query execution plan.

Members
OutputStage
Type: QueryStage structure

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.

Rows
Type: QueryRuntimeStatisticsRows structure

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.

Timeline

Timeline statistics such as query queue time, planning time, execution time, service processing time, and total execution time.

QueryRuntimeStatisticsRows

Description

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.

Members
InputBytes
Type: long (int|float)

The number of bytes read to execute the query.

InputRows
Type: long (int|float)

The number of rows read to execute the query.

OutputBytes
Type: long (int|float)

The number of bytes returned by the query.

OutputRows
Type: long (int|float)

The number of rows returned by the query.

QueryRuntimeStatisticsTimeline

Description

Timeline statistics such as query queue time, planning time, execution time, service processing time, and total execution time.

Members
EngineExecutionTimeInMillis
Type: long (int|float)

The number of milliseconds that the query took to execute.

QueryPlanningTimeInMillis
Type: long (int|float)

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.

QueryQueueTimeInMillis
Type: long (int|float)

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
Type: long (int|float)

The number of milliseconds that Athena spends on preprocessing before it submits the query to the engine.

ServiceProcessingTimeInMillis
Type: long (int|float)

The number of milliseconds that Athena took to finalize and publish the query results after the query engine finished running the query.

TotalExecutionTimeInMillis
Type: long (int|float)

The number of milliseconds that Athena took to run the query.

QueryStage

Description

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.

Members
ExecutionTime
Type: long (int|float)

Time taken to execute this stage.

InputBytes
Type: long (int|float)

The number of bytes input into the stage for execution.

InputRows
Type: long (int|float)

The number of rows input into the stage for execution.

OutputBytes
Type: long (int|float)

The number of bytes output from the stage after execution.

OutputRows
Type: long (int|float)

The number of rows output from the stage after execution.

QueryStagePlan
Type: QueryStagePlanNode structure

Stage plan information such as name, identifier, sub plans, and source stages.

StageId
Type: long (int|float)

The identifier for a stage.

State
Type: string

State of the stage after query execution.

SubStages
Type: Array of QueryStage structures

List of sub query stages that form this stage execution plan.

QueryStagePlanNode

Description

Stage plan information such as name, identifier, sub plans, and remote sources.

Members
Children
Type: Array of QueryStagePlanNode structures

Stage plan information such as name, identifier, sub plans, and remote sources of child plan nodes/

Identifier
Type: string

Information about the operation this query stage plan node is performing.

Name
Type: string

Name of the query stage plan that describes the operation this stage is performing as part of query execution.

RemoteSources
Type: Array of strings

Source plan node IDs.

ResourceNotFoundException

Description

A resource, such as a workgroup, was not found.

Members
Message
Type: string
ResourceName
Type: string

The name of the Amazon resource.

ResultConfiguration

Description

The location in Amazon S3 where query and calculation results are stored and the encryption option, if any, used for query and calculation results. These are known as "client-side settings". If workgroup settings override client-side settings, then the query uses the workgroup settings.

Members
AclConfiguration
Type: AclConfiguration structure

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.

EncryptionConfiguration
Type: EncryptionConfiguration structure

If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE_KMS or CSE_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.

ExpectedBucketOwner
Type: 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 the ExpectedBucketOwner 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.

OutputLocation
Type: 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.

ResultConfigurationUpdates

Description

The information about the updates in the query results, such as output location and encryption configuration for the query results.

Members
AclConfiguration
Type: AclConfiguration structure

The ACL configuration for the query results.

EncryptionConfiguration
Type: EncryptionConfiguration structure

The encryption configuration for query and calculation results.

ExpectedBucketOwner
Type: 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 the ExpectedBucketOwner 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.

OutputLocation
Type: 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 in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

RemoveAclConfiguration
Type: 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 to false or not set, and a value is present in the AclConfiguration of ResultConfigurationUpdates, the AclConfiguration in the workgroup's ResultConfiguration is updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.

RemoveEncryptionConfiguration
Type: 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 in ResultConfigurationUpdates (the client-side setting), the EncryptionConfiguration in the workgroup's ResultConfiguration will be updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.

RemoveExpectedBucketOwner
Type: 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 in ResultConfigurationUpdates (the client-side setting), the ExpectedBucketOwner in the workgroup's ResultConfiguration is updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.

RemoveOutputLocation
Type: 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 in ResultConfigurationUpdates (the client-side setting), the OutputLocation in the workgroup's ResultConfiguration will be updated with the new value. For more information, see Workgroup Settings Override Client-Side Settings.

ResultReuseByAgeConfiguration

Description

Specifies whether previous query results are reused, and if so, their maximum age.

Members
Enabled
Required: Yes
Type: boolean

True if previous query results can be reused when the query is run; otherwise, false. The default is false.

MaxAgeInMinutes
Type: int

Specifies, in minutes, the maximum age of a previous query result that Athena should consider for reuse. The default is 60.

ResultReuseConfiguration

Description

Specifies the query result reuse behavior for the query.

Members
ResultReuseByAgeConfiguration

Specifies whether previous query results are reused, and if so, their maximum age.

ResultReuseInformation

Description

Contains information about whether the result of a previous query was reused.

Members
ReusedPreviousResult
Required: Yes
Type: boolean

True if a previous query result was reused; false if the result was generated from a new run of the query.

ResultSet

Description

The metadata and rows that make up a query result set. The metadata describes the column structure and data types. To return a ResultSet object, use GetQueryResults.

Members
ResultSetMetadata
Type: ResultSetMetadata structure

The metadata that describes the column structure and data types of a table of query results.

Rows
Type: Array of Row structures

The rows in the table.

ResultSetMetadata

Description

The metadata that describes the column structure and data types of a table of query results. To return a ResultSetMetadata object, use GetQueryResults.

Members
ColumnInfo
Type: Array of ColumnInfo structures

Information about the columns returned in a query result metadata.

Row

Description

The rows that make up a query result table.

Members
Data
Type: Array of Datum structures

The data that populates a row in a query result table.

SessionAlreadyExistsException

Description

The specified session already exists.

Members
Message
Type: string

SessionConfiguration

Description

Contains session configuration information.

Members
EncryptionConfiguration
Type: EncryptionConfiguration structure

If query and calculation results are encrypted in Amazon S3, indicates the encryption option used (for example, SSE_KMS or CSE_KMS) and key information.

ExecutionRole
Type: 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.

IdleTimeoutSeconds
Type: long (int|float)

The idle timeout in seconds for the session.

WorkingDirectory
Type: string

The Amazon S3 location that stores information for the notebook.

SessionStatistics

Description

Contains statistics for a session.

Members
DpuExecutionInMillis
Type: long (int|float)

The data processing unit execution time for a session in milliseconds.

SessionStatus

Description

Contains information about the status of a session.

Members
EndDateTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the session ended.

IdleSinceDateTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time starting at which the session became idle. Can be empty if the session is not currently idle.

LastModifiedDateTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The most recent date and time that the session was modified.

StartDateTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the session started.

State
Type: 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.

StateChangeReason
Type: string

The reason for the session state change (for example, canceled because the session was terminated).

SessionSummary

Description

Contains summary information about a session.

Members
Description
Type: string

The session description.

EngineVersion
Type: EngineVersion structure

The engine version used by the session (for example, PySpark engine version 3).

NotebookVersion
Type: string

The notebook version.

SessionId
Type: string

The session ID.

Status
Type: SessionStatus structure

Contains information about the session status.

TableMetadata

Description

Contains metadata for a table.

Members
Columns
Type: Array of Column structures

A list of the columns in the table.

CreateTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time that the table was created.

LastAccessTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The last time the table was accessed.

Name
Required: Yes
Type: string

The name of the table.

Parameters
Type: Associative array of custom strings keys (KeyString) to strings

A set of custom key/value pairs for table properties.

PartitionKeys
Type: Array of Column structures

A list of the partition keys in the table.

TableType
Type: string

The type of table. In Athena, only EXTERNAL_TABLE is supported.

Tag

Description

A label that you assign to a resource. Athena resources include workgroups, data catalogs, and capacity reservations. Each tag consists of a key and an optional value, both of which you define. For example, you can use tags to categorize Athena resources 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.

Members
Key
Type: 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
Type: 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.

TooManyRequestsException

Description

Indicates that the request was throttled.

Members
Message
Type: string
Reason
Type: string

The reason for the query throttling, for example, when it exceeds the concurrent query limit.

UnprocessedNamedQueryId

Description

Information about a named query ID that could not be processed.

Members
ErrorCode
Type: string

The error code returned when the processing request for the named query failed, if applicable.

ErrorMessage
Type: string

The error message returned when the processing request for the named query failed, if applicable.

NamedQueryId
Type: string

The unique identifier of the named query.

UnprocessedPreparedStatementName

Description

The name of a prepared statement that could not be returned.

Members
ErrorCode
Type: string

The error code returned when the request for the prepared statement failed.

ErrorMessage
Type: 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.

StatementName
Type: string

The name of a prepared statement that could not be returned due to an error.

UnprocessedQueryExecutionId

Description

Describes a query execution that failed to process.

Members
ErrorCode
Type: string

The error code returned when the query execution failed to process, if applicable.

ErrorMessage
Type: string

The error message returned when the query execution failed to process, if applicable.

QueryExecutionId
Type: string

The unique identifier of the query execution.

WorkGroup

Description

A workgroup, which contains a name, description, creation time, state, and other configuration, listed under WorkGroup$Configuration. Each workgroup enables you to isolate queries for you or your group of users from other queries in the same account, to configure the query results location and the encryption configuration (known as workgroup settings), to enable sending query metrics to Amazon CloudWatch, and to establish per-query data usage control limits for all queries in a workgroup. The workgroup settings override is specified in EnforceWorkGroupConfiguration (true/false) in the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

Members
Configuration
Type: WorkGroupConfiguration structure

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 the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

CreationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time the workgroup was created.

Description
Type: string

The workgroup description.

IdentityCenterApplicationArn
Type: string

The ARN of the IAM Identity Center enabled application associated with the workgroup.

Name
Required: Yes
Type: string

The workgroup name.

State
Type: string

The state of the workgroup: ENABLED or DISABLED.

WorkGroupConfiguration

Description

The configuration of the workgroup, which includes the location in Amazon S3 where query and calculation results are stored, the encryption option, if any, used for query and calculation results, whether the Amazon CloudWatch Metrics are enabled for the workgroup and whether workgroup settings override query 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 the WorkGroupConfiguration. See WorkGroupConfiguration$EnforceWorkGroupConfiguration.

Members
AdditionalConfiguration
Type: string

Specifies a user defined JSON string that is passed to the notebook engine.

BytesScannedCutoffPerQuery
Type: long (int|float)

The upper data usage limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.

CustomerContentEncryptionConfiguration

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.

EnableMinimumEncryptionConfiguration
Type: 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 the EnableMinimumEncryptionConfiguration flag. This means that if EnforceWorkGroupConfiguration is true, the EnableMinimumEncryptionConfiguration flag is ignored, and the workgroup configuration for encryption is used.

EnforceWorkGroupConfiguration
Type: 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.

EngineVersion
Type: EngineVersion structure

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.

ExecutionRole
Type: 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.

IdentityCenterConfiguration
Type: IdentityCenterConfiguration structure

Specifies whether the workgroup is IAM Identity Center supported.

PublishCloudWatchMetricsEnabled
Type: boolean

Indicates that the Amazon CloudWatch metrics are enabled for the workgroup.

QueryResultsS3AccessGrantsConfiguration

Specifies whether Amazon S3 access grants are enabled for query results.

RequesterPaysEnabled
Type: boolean

If set to true, allows members assigned to a workgroup to reference Amazon S3 Requester Pays buckets in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default is false. For more information about Requester Pays buckets, see Requester Pays Buckets in the Amazon Simple Storage Service Developer Guide.

ResultConfiguration
Type: ResultConfiguration structure

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.

WorkGroupConfigurationUpdates

Description

The configuration information that will be updated for this workgroup, which includes the location in Amazon S3 where query and calculation results are stored, the encryption option, if any, used for query results, whether the Amazon CloudWatch Metrics are enabled for the workgroup, whether the workgroup settings override the client-side settings, and the data usage limit for the amount of bytes scanned per query, if it is specified.

Members
AdditionalConfiguration
Type: string

Contains a user defined string in JSON format for a Spark-enabled workgroup.

BytesScannedCutoffPerQuery
Type: long (int|float)

The upper limit (cutoff) for the amount of bytes a single query in a workgroup is allowed to scan.

CustomerContentEncryptionConfiguration

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.

EnableMinimumEncryptionConfiguration
Type: 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 the EnableMinimumEncryptionConfiguration flag. This means that if EnforceWorkGroupConfiguration is true, the EnableMinimumEncryptionConfiguration flag is ignored, and the workgroup configuration for encryption is used.

EnforceWorkGroupConfiguration
Type: 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.

EngineVersion
Type: EngineVersion structure

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.

ExecutionRole
Type: 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.

PublishCloudWatchMetricsEnabled
Type: boolean

Indicates whether this workgroup enables publishing metrics to Amazon CloudWatch.

QueryResultsS3AccessGrantsConfiguration

Specifies whether Amazon S3 access grants are enabled for query results.

RemoveBytesScannedCutoffPerQuery
Type: boolean

Indicates that the data usage control limit per query is removed. WorkGroupConfiguration$BytesScannedCutoffPerQuery

RemoveCustomerContentEncryptionConfiguration
Type: boolean

Removes content encryption configuration from an Apache Spark-enabled Athena workgroup.

RequesterPaysEnabled
Type: boolean

If set to true, allows members assigned to a workgroup to specify Amazon S3 Requester Pays buckets in queries. If set to false, workgroup members cannot query data from Requester Pays buckets, and queries that retrieve data from Requester Pays buckets cause an error. The default is false. For more information about Requester Pays buckets, see Requester Pays Buckets in the Amazon Simple Storage Service Developer Guide.

ResultConfigurationUpdates
Type: ResultConfigurationUpdates structure

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.

WorkGroupSummary

Description

The summary information for the workgroup, which includes its name, state, description, and the date and time it was created.

Members
CreationTime
Type: timestamp (string|DateTime or anything parsable by strtotime)

The workgroup creation date and time.

Description
Type: string

The workgroup description.

EngineVersion
Type: EngineVersion structure

The engine version setting for all queries on the workgroup. Queries on the AmazonAthenaPreviewFunctionality workgroup run on the preview engine regardless of this setting.

IdentityCenterApplicationArn
Type: string

The ARN of the IAM Identity Center enabled application associated with the workgroup.

Name
Type: string

The name of the workgroup.

State
Type: string

The state of the workgroup.