Retrieves the work units generated by the StartQueryPlanning operation.
Parameters:
-
next_token
(Optional[Token], default:
None
)
–
A continuation token, if this is a continuation call.
-
page_size
(Optional[int], default:
None
)
–
The size of each page to get in the Amazon Web Services service call. This does not affect the number of items returned in the command's output. Setting a smaller page size results in more calls to the Amazon Web Services service, retrieving fewer items in each call. This can help prevent the Amazon Web Services service calls from timing out.
-
query_id
(GetWorkUnitsRequestQueryIdString)
–
The ID of the plan query operation.
Raises:
Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
| async def get_work_units(
self,
query_id: "capo_lakeformation.types.get_work_units_request_query_id_string.GetWorkUnitsRequestQueryIdString",
*,
config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
next_token: Optional["capo_lakeformation.types.token.Token"] = None,
page_size: Optional[int] = None,
) -> "capo_lakeformation.types.get_work_units_response.GetWorkUnitsResponse":
"""<p>Retrieves the work units generated by the <code>StartQueryPlanning</code> operation.</p>
Args:
next_token: <p>A continuation token, if this is a continuation call.</p>
page_size: <p>The size of each page to get in the Amazon Web Services service call. This does not affect the number of items returned in the command's output. Setting a smaller page size results in more calls to the Amazon Web Services service, retrieving fewer items in each call. This can help prevent the Amazon Web Services service calls from timing out.</p>
query_id: <p>The ID of the plan query operation.</p>
Raises:
capo_lakeformation.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
capo_lakeformation.errors.expired_exception.ExpiredException: <p>Contains details about an error where the query request expired.</p>
capo_lakeformation.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</p>
capo_lakeformation.errors.invalid_input_exception.InvalidInputException: <p>The input provided was not valid.</p>
capo_lakeformation.errors.work_units_not_ready_yet_exception.WorkUnitsNotReadyYetException: <p>Contains details about an error related to work units not being ready.</p>
capo_lakeformation.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_lakeformation.types.get_work_units_request.GetWorkUnitsRequest]",
) -> AsyncOperationResponse[
"capo_lakeformation.types.get_work_units_response.GetWorkUnitsResponse"
]:
import capo_lakeformation._operations.aws_lake_formation.get_work_units
(
output,
http_response,
) = await capo_lakeformation._operations.aws_lake_formation.get_work_units.async_get_work_units(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetWorkUnits")
)
input_: capo_lakeformation.types.get_work_units_request.GetWorkUnitsRequest = {
"query_id": query_id
}
if next_token is not None:
input_["next_token"] = next_token
if page_size is not None:
input_["page_size"] = page_size
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|