Skip to content

get_effective_permissions_for_path async

get_effective_permissions_for_path(
    resource_arn: ResourceArnString,
    *,
    config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
    catalog_id: Optional[CatalogIdString] = None,
    next_token: Optional[Token] = None,
    max_results: Optional[PageSize] = None,
) -> GetEffectivePermissionsForPathResponse

Returns the Lake Formation permissions for a specified table or database resource located at a path in Amazon S3. GetEffectivePermissionsForPath will not return databases and tables if the catalog is encrypted.

Parameters:

  • catalog_id (Optional[CatalogIdString], default: None ) –

    The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment.

  • resource_arn (ResourceArnString) –

    The Amazon Resource Name (ARN) of the resource for which you want to get permissions.

  • next_token (Optional[Token], default: None ) –

    A continuation token, if this is not the first call to retrieve this list.

  • max_results (Optional[PageSize], default: None ) –

    The maximum number of results to return.

Raises:

Source code in docs_src/capo_lakeformation/_services/async_lake_formation.py
async def get_effective_permissions_for_path(
    self,
    resource_arn: "capo_lakeformation.types.resource_arn_string.ResourceArnString",
    *,
    config_overrides: Optional[AsyncLakeFormationClientConfig] = None,
    catalog_id: Optional[
        "capo_lakeformation.types.catalog_id_string.CatalogIdString"
    ] = None,
    next_token: Optional["capo_lakeformation.types.token.Token"] = None,
    max_results: Optional["capo_lakeformation.types.page_size.PageSize"] = None,
) -> "capo_lakeformation.types.get_effective_permissions_for_path_response.GetEffectivePermissionsForPathResponse":
    """<p>Returns the Lake Formation permissions for a specified table or database resource located at a path in Amazon S3. <code>GetEffectivePermissionsForPath</code> will not return databases and tables if the catalog is encrypted.</p>

    Args:
        catalog_id: <p>The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment. </p>
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource for which you want to get permissions.</p>
        next_token: <p>A continuation token, if this is not the first call to retrieve this list.</p>
        max_results: <p>The maximum number of results to return.</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.get_effective_permissions_for_path_request.GetEffectivePermissionsForPathRequest]",
    ) -> AsyncOperationResponse[
        "capo_lakeformation.types.get_effective_permissions_for_path_response.GetEffectivePermissionsForPathResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.get_effective_permissions_for_path

        (
            output,
            http_response,
        ) = await capo_lakeformation._operations.aws_lake_formation.get_effective_permissions_for_path.async_get_effective_permissions_for_path(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetEffectivePermissionsForPath")
    )
    input_: capo_lakeformation.types.get_effective_permissions_for_path_request.GetEffectivePermissionsForPathRequest = {
        "resource_arn": resource_arn
    }
    if catalog_id is not None:
        input_["catalog_id"] = catalog_id
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output