Skip to content

get_rls_policy

get_rls_policy(
    name: NameString, *, config_overrides: Optional[LakeFormationClientConfig] = None
) -> GetRLSPolicyResponse

Returns the definition of a row-level security policy, including its attachment columns and filter expression.

Parameters:

  • name (NameString) –

    The name of the row-level security policy to retrieve.

Raises:

Source code in docs_src/capo_lakeformation/_services/lake_formation.py
def get_rls_policy(
    self,
    name: "capo_lakeformation.types.name_string.NameString",
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
) -> "capo_lakeformation.types.get_rls_policy_response.GetRLSPolicyResponse":
    """<p>Returns the definition of a row-level security policy, including its attachment columns and filter expression.</p>

    Args:
        name: <p>The name of the row-level security policy to retrieve.</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.
    """

    def _handler(
        req: "OperationRequest[capo_lakeformation.types.get_rls_policy_request.GetRLSPolicyRequest]",
    ) -> OperationResponse[
        "capo_lakeformation.types.get_rls_policy_response.GetRLSPolicyResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.get_rls_policy

        output, http_response = (
            capo_lakeformation._operations.aws_lake_formation.get_rls_policy.get_rls_policy(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetRLSPolicy")
    )
    input_: capo_lakeformation.types.get_rls_policy_request.GetRLSPolicyRequest = {
        "name": name
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output