Skip to content

list_rulesets

list_rulesets(
    *,
    config_overrides: Optional[DataBrewClientConfig] = None,
    target_arn: Optional[Arn] = None,
    max_results: Optional[MaxResults100] = None,
    next_token: Optional[NextToken] = None,
) -> ListRulesetsResponse

List all rulesets available in the current account or rulesets associated with a specific resource (dataset).

Parameters:

  • target_arn (Optional[Arn], default: None ) –

    The Amazon Resource Name (ARN) of a resource (dataset). Using this parameter indicates to return only those rulesets that are associated with the specified resource.

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

    The maximum number of results to return in this request.

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

    A token generated by DataBrew that specifies where to continue pagination if a previous request was truncated. To get the next set of pages, pass in the NextToken value from the response object of the previous page call.

Raises:

Source code in docs_src/capo_databrew/_services/data_brew.py
def list_rulesets(
    self,
    *,
    config_overrides: Optional[DataBrewClientConfig] = None,
    target_arn: Optional["capo_databrew.types.arn.Arn"] = None,
    max_results: Optional[
        "capo_databrew.types.max_results100.MaxResults100"
    ] = None,
    next_token: Optional["capo_databrew.types.next_token.NextToken"] = None,
) -> "capo_databrew.types.list_rulesets_response.ListRulesetsResponse":
    """<p>List all rulesets available in the current account or rulesets associated with a specific resource (dataset).</p>

    Args:
        target_arn: <p>The Amazon Resource Name (ARN) of a resource (dataset). Using this parameter indicates to return only those rulesets that are associated with the specified resource.</p>
        max_results: <p>The maximum number of results to return in this request.</p>
        next_token: <p>A token generated by DataBrew that specifies where to continue pagination if a previous request was truncated. To get the next set of pages, pass in the NextToken value from the response object of the previous page call.</p>

    Raises:
        capo_databrew.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_databrew.errors.validation_exception.ValidationException: <p>The input parameters for this request failed validation.</p>
        capo_databrew.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_databrew.types.list_rulesets_request.ListRulesetsRequest]",
    ) -> OperationResponse[
        "capo_databrew.types.list_rulesets_response.ListRulesetsResponse"
    ]:
        import capo_databrew._operations.aws_glue_data_brew.list_rulesets

        output, http_response = (
            capo_databrew._operations.aws_glue_data_brew.list_rulesets.list_rulesets(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListRulesets")
    )
    input_: capo_databrew.types.list_rulesets_request.ListRulesetsRequest = {}
    if target_arn is not None:
        input_["target_arn"] = target_arn
    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