Returns a session context for one or more user-defined functions that an integrated analytics engine runs together in a job. You must have the EXECUTE permission on every function in the list.
While the session context is in use, if you don't have full SELECT permission on a table, the job can read the table only if every function in the session has the SELECT permission on it. Lake Formation enforces this check.
To use this operation, you must have the lakeformation:GetDataAccess permission.
Parameters:
-
user_defined_function_arns
(ResourceArnList)
–
The ARNs of one or more user-defined functions to include in the session context, each in the format arn:aws:glue:region:account-id:userDefinedFunction/database-name/function-name .
-
duration_seconds
(Optional[SessionDurationSecondInteger], default:
None
)
–
The number of seconds the session context is valid. The default is 86,400 (24 hours).
Raises:
Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
| async def get_glue_function_session_context(
self,
user_defined_function_arns: "capo_lakeformation.types.resource_arn_list.ResourceArnList",
*,
config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
duration_seconds: Optional[
"capo_lakeformation.types.session_duration_second_integer.SessionDurationSecondInteger"
] = None,
) -> "capo_lakeformation.types.get_glue_function_session_context_response.GetGlueFunctionSessionContextResponse":
"""<p>Returns a session context for one or more user-defined functions that an integrated analytics engine runs together in a job. You must have the <code>EXECUTE</code> permission on every function in the list.</p> <p>While the session context is in use, if you don't have full <code>SELECT</code> permission on a table, the job can read the table only if every function in the session has the <code>SELECT</code> permission on it. Lake Formation enforces this check.</p> <p>To use this operation, you must have the <code>lakeformation:GetDataAccess</code> permission.</p>
Args:
user_defined_function_arns: <p>The ARNs of one or more user-defined functions to include in the session context, each in the format <code>arn:aws:glue:<i>region</i>:<i>account-id</i>:userDefinedFunction/<i>database-name</i>/<i>function-name</i> </code>.</p>
duration_seconds: <p>The number of seconds the session context is valid. The default is 86,400 (24 hours).</p>
Raises:
capo_lakeformation.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
capo_lakeformation.errors.entity_not_found_exception.EntityNotFoundException: <p>A specified entity does not exist.</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.operation_timeout_exception.OperationTimeoutException: <p>The operation timed out.</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_glue_function_session_context_request.GetGlueFunctionSessionContextRequest]",
) -> AsyncOperationResponse[
"capo_lakeformation.types.get_glue_function_session_context_response.GetGlueFunctionSessionContextResponse"
]:
import capo_lakeformation._operations.aws_lake_formation.get_glue_function_session_context
(
output,
http_response,
) = await capo_lakeformation._operations.aws_lake_formation.get_glue_function_session_context.async_get_glue_function_session_context(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetGlueFunctionSessionContext")
)
input_: capo_lakeformation.types.get_glue_function_session_context_request.GetGlueFunctionSessionContextRequest = {
"user_defined_function_arns": user_defined_function_arns
}
if duration_seconds is not None:
input_["duration_seconds"] = duration_seconds
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|