Skip to content

list_map_runs

list_map_runs(
    execution_arn: Arn,
    *,
    config_overrides: Optional[SFNClientConfig] = None,
    max_results: Optional[PageSize] = None,
    next_token: Optional[PageToken] = None,
) -> ListMapRunsOutput

Lists all Map Runs that were started by a given state machine execution. Use this API action to obtain Map Run ARNs, and then call DescribeMapRun to obtain more information, if needed.

Parameters:

  • execution_arn (Arn) –

    The Amazon Resource Name (ARN) of the execution for which the Map Runs must be listed.

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

    The maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.

    This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.

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

    If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

Raises:

Source code in docs_src/capo_sfn/_services/sfn.py
def list_map_runs(
    self,
    execution_arn: "capo_sfn.types.arn.Arn",
    *,
    config_overrides: Optional[SFNClientConfig] = None,
    max_results: Optional["capo_sfn.types.page_size.PageSize"] = None,
    next_token: Optional["capo_sfn.types.page_token.PageToken"] = None,
) -> "capo_sfn.types.list_map_runs_output.ListMapRunsOutput":
    """<p>Lists all Map Runs that were started by a given state machine execution. Use this API action to obtain Map Run ARNs, and then call <code>DescribeMapRun</code> to obtain more information, if needed.</p>

    Args:
        execution_arn: <p>The Amazon Resource Name (ARN) of the execution for which the Map Runs must be listed.</p>
        max_results: <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.</p> <p>This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.</p>
        next_token: <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>

    Raises:
        capo_sfn.errors.execution_does_not_exist.ExecutionDoesNotExist: <p>The specified execution does not exist.</p>
        capo_sfn.errors.invalid_arn.InvalidArn: <p>The provided Amazon Resource Name (ARN) is not valid.</p>
        capo_sfn.errors.invalid_token.InvalidToken: <p>The provided token is not valid.</p>
        capo_sfn.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_sfn.types.list_map_runs_input.ListMapRunsInput]",
    ) -> OperationResponse["capo_sfn.types.list_map_runs_output.ListMapRunsOutput"]:
        import capo_sfn._operations.aws_step_functions.list_map_runs

        output, http_response = (
            capo_sfn._operations.aws_step_functions.list_map_runs.list_map_runs(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListMapRuns")
    )
    input_: capo_sfn.types.list_map_runs_input.ListMapRunsInput = {
        "execution_arn": execution_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