Skip to content

list_lake_formation_opt_ins

list_lake_formation_opt_ins(
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    principal: Optional[DataLakePrincipal] = None,
    resource: Optional[Resource] = None,
    max_results: Optional[PageSize] = None,
    next_token: Optional[Token] = None,
) -> ListLakeFormationOptInsResponse

Retrieve the current list of resources and principals that are opt in to enforce Lake Formation permissions.

Parameters:

  • resource (Optional[Resource], default: None ) –

    A structure for the resource.

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

    The maximum number of results to return.

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

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

Raises:

Source code in docs_src/capo_lakeformation/_services/lake_formation.py
def list_lake_formation_opt_ins(
    self,
    *,
    config_overrides: Optional[LakeFormationClientConfig] = None,
    principal: Optional[
        "capo_lakeformation.types.data_lake_principal.DataLakePrincipal"
    ] = None,
    resource: Optional["capo_lakeformation.types.resource.Resource"] = None,
    max_results: Optional["capo_lakeformation.types.page_size.PageSize"] = None,
    next_token: Optional["capo_lakeformation.types.token.Token"] = None,
) -> "capo_lakeformation.types.list_lake_formation_opt_ins_response.ListLakeFormationOptInsResponse":
    """<p>Retrieve the current list of resources and principals that are opt in to enforce Lake Formation permissions.</p>

    Args:
        resource: <p>A structure for the resource.</p>
        max_results: <p>The maximum number of results to return.</p>
        next_token: <p>A continuation token, if this is not the first call to retrieve this list.</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.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.list_lake_formation_opt_ins_request.ListLakeFormationOptInsRequest]",
    ) -> OperationResponse[
        "capo_lakeformation.types.list_lake_formation_opt_ins_response.ListLakeFormationOptInsResponse"
    ]:
        import capo_lakeformation._operations.aws_lake_formation.list_lake_formation_opt_ins

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListLakeFormationOptIns")
    )
    input_: capo_lakeformation.types.list_lake_formation_opt_ins_request.ListLakeFormationOptInsRequest = {}
    if principal is not None:
        input_["principal"] = principal
    if resource is not None:
        input_["resource"] = resource
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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