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.
Parameters:
-
prepared_statement_names
(PreparedStatementNameList)
–
A list of prepared statement names to return.
-
work_group
(WorkGroupName)
–
The name of the workgroup to which the prepared statements belong.
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 batch_get_prepared_statement(
self,
prepared_statement_names: "capo_athena.types.prepared_statement_name_list.PreparedStatementNameList",
work_group: "capo_athena.types.work_group_name.WorkGroupName",
*,
config_overrides: Optional[AthenaClientConfig] = None,
) -> "capo_athena.types.batch_get_prepared_statement_output.BatchGetPreparedStatementOutput":
"""<p>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 <code>UnprocessedPreparedStatementNames</code>.</p>
Args:
prepared_statement_names: <p>A list of prepared statement names to return.</p>
work_group: <p>The name of the workgroup to which the prepared statements belong.</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.batch_get_prepared_statement_input.BatchGetPreparedStatementInput]",
) -> OperationResponse[
"capo_athena.types.batch_get_prepared_statement_output.BatchGetPreparedStatementOutput"
]:
import capo_athena._operations.amazon_athena.batch_get_prepared_statement
output, http_response = (
capo_athena._operations.amazon_athena.batch_get_prepared_statement.batch_get_prepared_statement(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("BatchGetPreparedStatement")
)
input_: capo_athena.types.batch_get_prepared_statement_input.BatchGetPreparedStatementInput = {
"prepared_statement_names": prepared_statement_names,
"work_group": work_group,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|