Skip to content

list_rule_executions

list_rule_executions(
    pipeline_name: PipelineName,
    *,
    config_overrides: Optional[CodePipelineClientConfig] = None,
    filter: Optional[RuleExecutionFilter] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListRuleExecutionsOutput

Lists the rule executions that have occurred in a pipeline configured for conditions with rules.

Parameters:

  • pipeline_name (PipelineName) –

    The name of the pipeline for which you want to get execution summary information.

  • filter (Optional[RuleExecutionFilter], default: None ) –

    Input information used to filter rule execution history.

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

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Pipeline history is limited to the most recent 12 months, based on pipeline execution start times. Default value is 100.

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

    The token that was returned from the previous ListRuleExecutions call, which can be used to return the next set of rule executions in the list.

Raises:

Source code in docs_src/capo_codepipeline/_services/code_pipeline.py
def list_rule_executions(
    self,
    pipeline_name: "capo_codepipeline.types.pipeline_name.PipelineName",
    *,
    config_overrides: Optional[CodePipelineClientConfig] = None,
    filter: Optional[
        "capo_codepipeline.types.rule_execution_filter.RuleExecutionFilter"
    ] = None,
    max_results: Optional["capo_codepipeline.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_codepipeline.types.next_token.NextToken"] = None,
) -> "capo_codepipeline.types.list_rule_executions_output.ListRuleExecutionsOutput":
    """<p>Lists the rule executions that have occurred in a pipeline configured for conditions with rules.</p>

    Args:
        pipeline_name: <p>The name of the pipeline for which you want to get execution summary information.</p>
        filter: <p>Input information used to filter rule execution history.</p>
        max_results: <p>The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Pipeline history is limited to the most recent 12 months, based on pipeline execution start times. Default value is 100.</p>
        next_token: <p>The token that was returned from the previous <code>ListRuleExecutions</code> call, which can be used to return the next set of rule executions in the list.</p>

    Raises:
        capo_codepipeline.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The next token was specified in an invalid format. Make sure that the next token you provide is the token returned by a previous call.</p>
        capo_codepipeline.errors.pipeline_execution_not_found_exception.PipelineExecutionNotFoundException: <p>The pipeline execution was specified in an invalid format or cannot be found, or an execution ID does not belong to the specified pipeline. </p>
        capo_codepipeline.errors.pipeline_not_found_exception.PipelineNotFoundException: <p>The pipeline was specified in an invalid format or cannot be found.</p>
        capo_codepipeline.errors.validation_exception.ValidationException: <p>The validation was specified in an invalid format.</p>
        capo_codepipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codepipeline.types.list_rule_executions_input.ListRuleExecutionsInput]",
    ) -> OperationResponse[
        "capo_codepipeline.types.list_rule_executions_output.ListRuleExecutionsOutput"
    ]:
        import capo_codepipeline._operations.code_pipeline_20150709.list_rule_executions

        output, http_response = (
            capo_codepipeline._operations.code_pipeline_20150709.list_rule_executions.list_rule_executions(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListRuleExecutions")
    )
    input_: capo_codepipeline.types.list_rule_executions_input.ListRuleExecutionsInput = {
        "pipeline_name": pipeline_name
    }
    if filter is not None:
        input_["filter"] = filter
    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