Skip to content

delete_lake_formation_opt_in

delete_lake_formation_opt_in(
    principal: DataLakePrincipal,
    resource: Resource,
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    condition: Optional[Condition] = None,
) -> DeleteLakeFormationOptInResponse

Remove the Lake Formation permissions enforcement of the given databases, tables, and principals.

Raises:

Source code in docs_src/capo_lakeformation/_services/lake_formation.py
def delete_lake_formation_opt_in(
    self,
    principal: "capo_lakeformation.types.data_lake_principal.DataLakePrincipal",
    resource: "capo_lakeformation.types.resource.Resource",
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    condition: Optional["capo_lakeformation.types.condition.Condition"] = None,
) -> "capo_lakeformation.types.delete_lake_formation_opt_in_response.DeleteLakeFormationOptInResponse":
    """<p>Remove the Lake Formation permissions enforcement of the given databases, tables, and principals.</p>

    Raises:
        capo_lakeformation.errors.access_denied_exception.AccessDeniedException: <p>Access to a resource was denied.</p>
        capo_lakeformation.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Two processes are trying to modify a resource simultaneously.</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.delete_lake_formation_opt_in_request.DeleteLakeFormationOptInRequest]",
    ) -> OperationResponse[
        "capo_lakeformation.types.delete_lake_formation_opt_in_response.DeleteLakeFormationOptInResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.delete_lake_formation_opt_in

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteLakeFormationOptIn")
    )
    input_: capo_lakeformation.types.delete_lake_formation_opt_in_request.DeleteLakeFormationOptInRequest = {
        "principal": principal,
        "resource": resource,
    }
    if condition is not None:
        input_["condition"] = condition

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