Returns the identity of the invoking principal.
Raises:
Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
| async def get_data_lake_principal(
self, *, config_overrides: Optional[AsyncLakeFormationClientConfig] = None
) -> "capo_lakeformation.types.get_data_lake_principal_response.GetDataLakePrincipalResponse":
"""<p>Returns the identity of the invoking principal.</p>
Raises:
capo_lakeformation.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
capo_lakeformation.errors.internal_service_exception.InternalServiceException: <p>An internal service error occurred.</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_data_lake_principal_request.GetDataLakePrincipalRequest]",
) -> AsyncOperationResponse[
"capo_lakeformation.types.get_data_lake_principal_response.GetDataLakePrincipalResponse"
]:
import capo_lakeformation._operations.aws_lake_formation.get_data_lake_principal
(
output,
http_response,
) = await capo_lakeformation._operations.aws_lake_formation.get_data_lake_principal.async_get_data_lake_principal(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetDataLakePrincipal")
)
input_: capo_lakeformation.types.get_data_lake_principal_request.GetDataLakePrincipalRequest = {}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|