Skip to content

list_pipeline_executions async

list_pipeline_executions(
    workspace_name: WorkspaceName,
    pipeline_name: ResourceName,
    *,
    config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[ListPipelineExecutionsRequestMaxResultsInteger] = None,
    state: Optional[PipelineExecutionState] = None,
    start_time_after: Optional[Timestamp] = None,
    start_time_before: Optional[Timestamp] = None,
    end_time_after: Optional[Timestamp] = None,
    end_time_before: Optional[Timestamp] = None,
) -> ListPipelineExecutionsResponse

Lists pipeline executions for a specific pipeline in a workspace. Supports filtering by state and time range. State can be combined with either startTime or endTime filters. Time range filters are grouped: use startTime filters (startTimeAfter, startTimeBefore) or endTime filters (endTimeAfter, endTimeBefore), but not both. Combining startTime and endTime filters returns an InvalidRequestException. Note: endTime filters only return executions in terminal states, as in-progress executions have no endTime.

Parameters:

  • workspace_name (WorkspaceName) –

    The name of the workspace.

  • pipeline_name (ResourceName) –

    The name of the pipeline.

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

    The token to be used for the next set of paginated results.

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

    The maximum number of results to return per request. This is an upper bound; the actual number of results may be less. Default: 50.

  • state (Optional[PipelineExecutionState], default: None ) –

    Filter by execution state. If not specified, executions in all states are returned.

  • start_time_after (Optional[Timestamp], default: None ) –

    Inclusive lower bound on execution start time (ISO-8601). Only executions with startTime >= startTimeAfter are returned. Cannot be combined with endTimeAfter or endTimeBefore.

  • start_time_before (Optional[Timestamp], default: None ) –

    Exclusive upper bound on execution start time (ISO-8601). Only executions with startTime < startTimeBefore are returned. Cannot be combined with endTimeAfter or endTimeBefore.

  • end_time_after (Optional[Timestamp], default: None ) –

    Inclusive lower bound on execution end time (ISO-8601). Only executions with endTime >= endTimeAfter are returned. Cannot be combined with startTimeAfter or startTimeBefore. Only matches executions in terminal states.

  • end_time_before (Optional[Timestamp], default: None ) –

    Exclusive upper bound on execution end time (ISO-8601). Only executions with endTime < endTimeBefore are returned. Cannot be combined with startTimeAfter or startTimeBefore. Only matches executions in terminal states.

Raises:

  • AccessDeniedException –

    Access is denied.

  • InternalFailureException –

    IoT SiteWise can't process your request right now. Try again later.

  • InvalidRequestException –

    The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.

  • ResourceNotFoundException –

    The requested resource can't be found.

  • ThrottlingException –

    Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.

    For more information, see Quotas in the IoT SiteWise User Guide.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_iotsitewise/_services/async_io_t_site_wise.py
async def list_pipeline_executions(
    self,
    workspace_name: "capo_iotsitewise.types.workspace_name.WorkspaceName",
    pipeline_name: "capo_iotsitewise.types.resource_name.ResourceName",
    *,
    config_overrides: Optional[AsyncIoTSiteWiseClientConfig] = None,
    next_token: Optional[
        "capo_iotsitewise.types.pagination_token.PaginationToken"
    ] = None,
    max_results: Optional[
        "capo_iotsitewise.types.list_pipeline_executions_request_max_results_integer.ListPipelineExecutionsRequestMaxResultsInteger"
    ] = None,
    state: Optional[
        "capo_iotsitewise.types.pipeline_execution_state.PipelineExecutionState"
    ] = None,
    start_time_after: Optional["capo_iotsitewise.types.timestamp.Timestamp"] = None,
    start_time_before: Optional[
        "capo_iotsitewise.types.timestamp.Timestamp"
    ] = None,
    end_time_after: Optional["capo_iotsitewise.types.timestamp.Timestamp"] = None,
    end_time_before: Optional["capo_iotsitewise.types.timestamp.Timestamp"] = None,
) -> "capo_iotsitewise.types.list_pipeline_executions_response.ListPipelineExecutionsResponse":
    """<p>Lists pipeline executions for a specific pipeline in a workspace. Supports filtering by state and time range. State can be combined with either startTime or endTime filters. Time range filters are grouped: use startTime filters (startTimeAfter, startTimeBefore) or endTime filters (endTimeAfter, endTimeBefore), but not both. Combining startTime and endTime filters returns an InvalidRequestException. Note: endTime filters only return executions in terminal states, as in-progress executions have no endTime.</p>

    Args:
        workspace_name: <p>The name of the workspace.</p>
        pipeline_name: <p>The name of the pipeline.</p>
        next_token: <p>The token to be used for the next set of paginated results.</p>
        max_results: <p>The maximum number of results to return per request. This is an upper bound; the actual number of results may be less. Default: 50.</p>
        state: <p>Filter by execution state. If not specified, executions in all states are returned.</p>
        start_time_after: <p>Inclusive lower bound on execution start time (ISO-8601). Only executions with startTime &gt;= startTimeAfter are returned. Cannot be combined with endTimeAfter or endTimeBefore.</p>
        start_time_before: <p>Exclusive upper bound on execution start time (ISO-8601). Only executions with startTime &lt; startTimeBefore are returned. Cannot be combined with endTimeAfter or endTimeBefore.</p>
        end_time_after: <p>Inclusive lower bound on execution end time (ISO-8601). Only executions with endTime &gt;= endTimeAfter are returned. Cannot be combined with startTimeAfter or startTimeBefore. Only matches executions in terminal states.</p>
        end_time_before: <p>Exclusive upper bound on execution end time (ISO-8601). Only executions with endTime &lt; endTimeBefore are returned. Cannot be combined with startTimeAfter or startTimeBefore. Only matches executions in terminal states.</p>

    Raises:
        capo_iotsitewise.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_iotsitewise.errors.internal_failure_exception.InternalFailureException: <p>IoT SiteWise can't process your request right now. Try again later.</p>
        capo_iotsitewise.errors.invalid_request_exception.InvalidRequestException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters. Check your request and try again.</p>
        capo_iotsitewise.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
        capo_iotsitewise.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a rate limit. For example, you might have exceeded the number of IoT SiteWise assets that can be created per second, the allowed number of messages per second, and so on.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/iot-sitewise/latest/userguide/quotas.html">Quotas</a> in the <i>IoT SiteWise User Guide</i>.</p>
        capo_iotsitewise.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iotsitewise.types.list_pipeline_executions_request.ListPipelineExecutionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_iotsitewise.types.list_pipeline_executions_response.ListPipelineExecutionsResponse"
    ]:
        import capo_iotsitewise._operations.aws_io_t_site_wise.list_pipeline_executions

        (
            output,
            http_response,
        ) = await capo_iotsitewise._operations.aws_io_t_site_wise.list_pipeline_executions.async_list_pipeline_executions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPipelineExecutions")
    )
    input_: capo_iotsitewise.types.list_pipeline_executions_request.ListPipelineExecutionsRequest = {
        "workspace_name": workspace_name,
        "pipeline_name": pipeline_name,
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if state is not None:
        input_["state"] = state
    if start_time_after is not None:
        input_["start_time_after"] = start_time_after
    if start_time_before is not None:
        input_["start_time_before"] = start_time_before
    if end_time_after is not None:
        input_["end_time_after"] = end_time_after
    if end_time_before is not None:
        input_["end_time_before"] = end_time_before

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output