Returns temporary credentials that you can use to download the artifacts of a user-defined function whose GovernanceMode is LAKE_FORMATION. Lake Formation assumes the role that you registered for the function's ArtifactLocation. The credentials have read-only access to that location in Amazon S3.
To use this operation, you must have the EXECUTE permission on the function.
Parameters:
-
user_defined_function_arn
(ResourceArnString)
–
The ARN of the user-defined function whose artifacts you want to download, in the format arn:aws:glue:region:account-id:userDefinedFunction/database-name/function-name .
-
audit_context
(Optional[AuditContext], default:
None
)
–
Context for the request, such as the column names and query ID, that Lake Formation uses for auditing.
Raises:
Source code in docs_src/capo_lakeformation/_services/lake_formation.py
| def get_temporary_glue_function_credentials(
self,
user_defined_function_arn: "capo_lakeformation.types.resource_arn_string.ResourceArnString",
*,
config_overrides: Optional[LakeFormationClientConfig] = None,
audit_context: Optional[
"capo_lakeformation.types.audit_context.AuditContext"
] = None,
) -> "capo_lakeformation.types.get_temporary_glue_function_credentials_response.GetTemporaryGlueFunctionCredentialsResponse":
"""<p>Returns temporary credentials that you can use to download the artifacts of a user-defined function whose <code>GovernanceMode</code> is <code>LAKE_FORMATION</code>. Lake Formation assumes the role that you registered for the function's <code>ArtifactLocation</code>. The credentials have read-only access to that location in Amazon S3.</p> <p>To use this operation, you must have the <code>EXECUTE</code> permission on the function.</p>
Args:
user_defined_function_arn: <p>The ARN of the user-defined function whose artifacts you want to download, 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>
audit_context: <p>Context for the request, such as the column names and query ID, that Lake Formation uses for auditing.</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.glue_encryption_exception.GlueEncryptionException: <p>An encryption operation failed.</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.
"""
def _handler(
req: "OperationRequest[capo_lakeformation.types.get_temporary_glue_function_credentials_request.GetTemporaryGlueFunctionCredentialsRequest]",
) -> OperationResponse[
"capo_lakeformation.types.get_temporary_glue_function_credentials_response.GetTemporaryGlueFunctionCredentialsResponse"
]:
import capo_lakeformation._operations.aws_lake_formation.get_temporary_glue_function_credentials
output, http_response = (
capo_lakeformation._operations.aws_lake_formation.get_temporary_glue_function_credentials.get_temporary_glue_function_credentials(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetTemporaryGlueFunctionCredentials")
)
input_: capo_lakeformation.types.get_temporary_glue_function_credentials_request.GetTemporaryGlueFunctionCredentialsRequest = {
"user_defined_function_arn": user_defined_function_arn
}
if audit_context is not None:
input_["audit_context"] = audit_context
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|