Lists the prepared statements in the specified workgroup.
Parameters:
-
work_group
(WorkGroupName)
–
The workgroup to list the prepared statements for.
-
next_token
(Optional[Token], default:
None
)
–
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.
-
max_results
(Optional[MaxPreparedStatementsCount], default:
None
)
–
The maximum number of results to return in this request.
Raises:
-
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.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_athena/_services/athena.py
| def list_prepared_statements(
self,
work_group: "capo_athena.types.work_group_name.WorkGroupName",
*,
config_overrides: Optional[AthenaClientConfig] = None,
next_token: Optional["capo_athena.types.token.Token"] = None,
max_results: Optional[
"capo_athena.types.max_prepared_statements_count.MaxPreparedStatementsCount"
] = None,
) -> (
"capo_athena.types.list_prepared_statements_output.ListPreparedStatementsOutput"
):
"""<p>Lists the prepared statements in the specified workgroup.</p>
Args:
work_group: <p>The workgroup to list the prepared statements for.</p>
next_token: <p>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 <code>NextToken</code> from the response object of the previous page call.</p>
max_results: <p>The maximum number of results to return in this request.</p>
Raises:
capo_athena.errors.internal_server_exception.InternalServerException: <p>Indicates a platform issue, which may be due to a transient condition or outage.</p>
capo_athena.errors.invalid_request_exception.InvalidRequestException: <p>Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.</p>
capo_athena.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_athena.types.list_prepared_statements_input.ListPreparedStatementsInput]",
) -> OperationResponse[
"capo_athena.types.list_prepared_statements_output.ListPreparedStatementsOutput"
]:
import capo_athena._operations.amazon_athena.list_prepared_statements
output, http_response = (
capo_athena._operations.amazon_athena.list_prepared_statements.list_prepared_statements(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListPreparedStatements")
)
input_: capo_athena.types.list_prepared_statements_input.ListPreparedStatementsInput = {
"work_group": work_group
}
if next_token is not None:
input_["next_token"] = next_token
if max_results is not None:
input_["max_results"] = max_results
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|