Retrieves the current data access role for the given resource registered in Lake Formation.
Parameters:
Raises:
Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
| async def describe_resource(
self,
resource_arn: "capo_lakeformation.types.resource_arn_string.ResourceArnString",
*,
config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
) -> "capo_lakeformation.types.describe_resource_response.DescribeResourceResponse":
"""<p>Retrieves the current data access role for the given resource registered in Lake Formation.</p>
Args:
resource_arn: <p>The resource ARN.</p>
Raises:
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.describe_resource_request.DescribeResourceRequest]",
) -> AsyncOperationResponse[
"capo_lakeformation.types.describe_resource_response.DescribeResourceResponse"
]:
import capo_lakeformation._operations.aws_lake_formation.describe_resource
(
output,
http_response,
) = await capo_lakeformation._operations.aws_lake_formation.describe_resource.async_describe_resource(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeResource")
)
input_: capo_lakeformation.types.describe_resource_request.DescribeResourceRequest = {
"resource_arn": resource_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|