AthenaClient#
Auto-generated documentation for Athena type annotations stubs module mypy-boto3-athena.
AthenaClient#
Type annotations and code completion for boto3.client("athena")
.
boto3 documentation
# AthenaClient usage example
from boto3.session import Session
from mypy_boto3_athena.client import AthenaClient
def get_athena_client() -> AthenaClient:
return Session().client("athena")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("athena").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("athena")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.InternalServerException,
client.exceptions.InvalidRequestException,
client.exceptions.MetadataException,
client.exceptions.ResourceNotFoundException,
client.exceptions.SessionAlreadyExistsException,
client.exceptions.TooManyRequestsException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_athena.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
batch_get_named_query#
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.
Type annotations and code completion for boto3.client("athena").batch_get_named_query
method.
boto3 documentation
# batch_get_named_query method definition
def batch_get_named_query(
self,
*,
NamedQueryIds: Sequence[str],
) -> BatchGetNamedQueryOutputTypeDef: # (1)
...
# batch_get_named_query method usage example with argument unpacking
kwargs: BatchGetNamedQueryInputRequestTypeDef = { # (1)
"NamedQueryIds": ...,
}
parent.batch_get_named_query(**kwargs)
batch_get_prepared_statement#
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.
Type annotations and code completion for boto3.client("athena").batch_get_prepared_statement
method.
boto3 documentation
# batch_get_prepared_statement method definition
def batch_get_prepared_statement(
self,
*,
PreparedStatementNames: Sequence[str],
WorkGroup: str,
) -> BatchGetPreparedStatementOutputTypeDef: # (1)
...
# batch_get_prepared_statement method usage example with argument unpacking
kwargs: BatchGetPreparedStatementInputRequestTypeDef = { # (1)
"PreparedStatementNames": ...,
"WorkGroup": ...,
}
parent.batch_get_prepared_statement(**kwargs)
batch_get_query_execution#
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.
Type annotations and code completion for boto3.client("athena").batch_get_query_execution
method.
boto3 documentation
# batch_get_query_execution method definition
def batch_get_query_execution(
self,
*,
QueryExecutionIds: Sequence[str],
) -> BatchGetQueryExecutionOutputTypeDef: # (1)
...
# batch_get_query_execution method usage example with argument unpacking
kwargs: BatchGetQueryExecutionInputRequestTypeDef = { # (1)
"QueryExecutionIds": ...,
}
parent.batch_get_query_execution(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("athena").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
cancel_capacity_reservation#
Cancels the capacity reservation with the specified name.
Type annotations and code completion for boto3.client("athena").cancel_capacity_reservation
method.
boto3 documentation
# cancel_capacity_reservation method definition
def cancel_capacity_reservation(
self,
*,
Name: str,
) -> Dict[str, Any]:
...
# cancel_capacity_reservation method usage example with argument unpacking
kwargs: CancelCapacityReservationInputRequestTypeDef = { # (1)
"Name": ...,
}
parent.cancel_capacity_reservation(**kwargs)
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("athena").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
create_capacity_reservation#
Creates a capacity reservation with the specified name and number of requested data processing units.
Type annotations and code completion for boto3.client("athena").create_capacity_reservation
method.
boto3 documentation
# create_capacity_reservation method definition
def create_capacity_reservation(
self,
*,
TargetDpus: int,
Name: str,
Tags: Sequence[TagTypeDef] = ..., # (1)
) -> Dict[str, Any]:
...
- See TagTypeDef
# create_capacity_reservation method usage example with argument unpacking
kwargs: CreateCapacityReservationInputRequestTypeDef = { # (1)
"TargetDpus": ...,
"Name": ...,
}
parent.create_capacity_reservation(**kwargs)
create_data_catalog#
Creates (registers) a data catalog with the specified name and properties.
Type annotations and code completion for boto3.client("athena").create_data_catalog
method.
boto3 documentation
# create_data_catalog method definition
def create_data_catalog(
self,
*,
Name: str,
Type: DataCatalogTypeType, # (1)
Description: str = ...,
Parameters: Mapping[str, str] = ...,
Tags: Sequence[TagTypeDef] = ..., # (2)
) -> Dict[str, Any]:
...
- See DataCatalogTypeType
- See TagTypeDef
# create_data_catalog method usage example with argument unpacking
kwargs: CreateDataCatalogInputRequestTypeDef = { # (1)
"Name": ...,
"Type": ...,
}
parent.create_data_catalog(**kwargs)
create_named_query#
Creates a named query in the specified workgroup.
Type annotations and code completion for boto3.client("athena").create_named_query
method.
boto3 documentation
# create_named_query method definition
def create_named_query(
self,
*,
Name: str,
Database: str,
QueryString: str,
Description: str = ...,
ClientRequestToken: str = ...,
WorkGroup: str = ...,
) -> CreateNamedQueryOutputTypeDef: # (1)
...
# create_named_query method usage example with argument unpacking
kwargs: CreateNamedQueryInputRequestTypeDef = { # (1)
"Name": ...,
"Database": ...,
"QueryString": ...,
}
parent.create_named_query(**kwargs)
create_notebook#
Creates an empty ipynb
file in the specified Apache Spark enabled workgroup.
Type annotations and code completion for boto3.client("athena").create_notebook
method.
boto3 documentation
# create_notebook method definition
def create_notebook(
self,
*,
WorkGroup: str,
Name: str,
ClientRequestToken: str = ...,
) -> CreateNotebookOutputTypeDef: # (1)
...
# create_notebook method usage example with argument unpacking
kwargs: CreateNotebookInputRequestTypeDef = { # (1)
"WorkGroup": ...,
"Name": ...,
}
parent.create_notebook(**kwargs)
create_prepared_statement#
Creates a prepared statement for use with SQL queries in Athena.
Type annotations and code completion for boto3.client("athena").create_prepared_statement
method.
boto3 documentation
# create_prepared_statement method definition
def create_prepared_statement(
self,
*,
StatementName: str,
WorkGroup: str,
QueryStatement: str,
Description: str = ...,
) -> Dict[str, Any]:
...
# create_prepared_statement method usage example with argument unpacking
kwargs: CreatePreparedStatementInputRequestTypeDef = { # (1)
"StatementName": ...,
"WorkGroup": ...,
"QueryStatement": ...,
}
parent.create_prepared_statement(**kwargs)
create_presigned_notebook_url#
Gets an authentication token and the URL at which the notebook can be accessed.
Type annotations and code completion for boto3.client("athena").create_presigned_notebook_url
method.
boto3 documentation
# create_presigned_notebook_url method definition
def create_presigned_notebook_url(
self,
*,
SessionId: str,
) -> CreatePresignedNotebookUrlResponseTypeDef: # (1)
...
# create_presigned_notebook_url method usage example with argument unpacking
kwargs: CreatePresignedNotebookUrlRequestRequestTypeDef = { # (1)
"SessionId": ...,
}
parent.create_presigned_notebook_url(**kwargs)
create_work_group#
Creates a workgroup with the specified name.
Type annotations and code completion for boto3.client("athena").create_work_group
method.
boto3 documentation
# create_work_group method definition
def create_work_group(
self,
*,
Name: str,
Configuration: WorkGroupConfigurationTypeDef = ..., # (1)
Description: str = ...,
Tags: Sequence[TagTypeDef] = ..., # (2)
) -> Dict[str, Any]:
...
# create_work_group method usage example with argument unpacking
kwargs: CreateWorkGroupInputRequestTypeDef = { # (1)
"Name": ...,
}
parent.create_work_group(**kwargs)
delete_capacity_reservation#
Deletes a cancelled capacity reservation.
Type annotations and code completion for boto3.client("athena").delete_capacity_reservation
method.
boto3 documentation
# delete_capacity_reservation method definition
def delete_capacity_reservation(
self,
*,
Name: str,
) -> Dict[str, Any]:
...
# delete_capacity_reservation method usage example with argument unpacking
kwargs: DeleteCapacityReservationInputRequestTypeDef = { # (1)
"Name": ...,
}
parent.delete_capacity_reservation(**kwargs)