Skip to content

list_enrichment_jobs

list_enrichment_jobs(
    workspace_name: WorkspaceName,
    *,
    config_overrides: Optional[IoTSiteWiseClientConfig] = None,
    dataset_id: Optional[ID] = None,
    property_alias: Optional[AssetPropertyAlias] = None,
    time_series_id: Optional[TimeSeriesId] = None,
    status: Optional[EnrichmentJobStatus] = None,
    job_type: Optional[JobType] = None,
    start_date: Optional[datetime] = None,
    end_date: Optional[datetime] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListEnrichmentJobsResponse

Lists enrichment jobs within a workspace with optional filtering and pagination. Results are ordered by createdAt timestamp descending (newest first).

Filtering

Combine filters to narrow results:

  • datasetId: Filter by dataset
  • propertyAlias OR timeSeriesId: Filter by time series (specify one, not both)
  • status: Filter by job status (e.g., RUNNING to find active jobs)
  • jobType: Filter by enrichment type (currently only EVENT_DETECTION)
  • startDate and endDate: Filter by job creation time range

Important Constraints

  • You must specify either propertyAlias OR timeSeriesId, but not both
  • Attempting to specify both results in an InvalidRequestException
  • Date filters use ISO 8601 format
  • startDate is exclusive, endDate is inclusive

Pagination

The operation returns up to maxResults jobs per page (default 50). If more results exist, the response includes a nextToken. Submit this token in a subsequent request to retrieve the next page.

Common Use Cases

  • Find all running jobs: Filter by status=RUNNING
  • List recent jobs for a dataset: Filter by datasetId with optional date range
  • Monitor jobs for a specific sensor: Filter by propertyAlias or timeSeriesId
  • Track all event detection jobs: Filter by jobType=EVENT_DETECTION

Performance

Performance is optimal when filtering by supported fields (datasetId, propertyAlias, timeSeriesId, status, jobType).

Parameters:

  • workspace_name (WorkspaceName) –

    The name of the IoT SiteWise workspace to list enrichment jobs from.

  • dataset_id (Optional[ID], default: None ) –

    Filter jobs by dataset ID. Returns only jobs analyzing data from the specified dataset.

  • property_alias (Optional[AssetPropertyAlias], default: None ) –

    Filter by property alias (human-readable sensor name). Specify either propertyAlias or timeSeriesId, but not both. Returns only jobs analyzing the specified property alias.

  • time_series_id (Optional[TimeSeriesId], default: None ) –

    Filter by time series ID (system identifier). Specify either timeSeriesId or propertyAlias, but not both. Returns only jobs analyzing the specified time series.

  • status (Optional[EnrichmentJobStatus], default: None ) –

    Filter by job status. Returns only jobs in the specified status. Use RUNNING to find active jobs, or FAILED to identify jobs requiring attention.

  • job_type (Optional[JobType], default: None ) –

    Filter by enrichment job type. Currently only EVENT_DETECTION is supported. Use this filter to future-proof queries when additional job types are added.

  • start_date (Optional[datetime], default: None ) –

    The exclusive start of the date range for filtering jobs by creation time. Jobs created after this timestamp are included. Use ISO 8601 format (e.g., 2024-01-01T00:00:00Z).

  • end_date (Optional[datetime], default: None ) –

    The inclusive end of the date range for filtering jobs by creation time. Jobs created on or before this timestamp are included. Use ISO 8601 format (e.g., 2024-01-31T23:59:59Z).

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

    Maximum number of jobs to return per page. Defaults to 50 if not specified. Use smaller values for faster responses, larger values to reduce API calls.

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

    Pagination token from a previous ListEnrichmentJobs response. Include this token to retrieve the next page of results. Omit for the first request.

Raises:

  • AccessDeniedException –

    Access is denied.

  • ConflictingOperationException –

    Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.

  • 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.

  • LimitExceededException –

    You've reached the quota for a resource. For example, this can occur if you're trying to associate more than the allowed number of child assets or attempting to create more than the allowed number of properties for an asset model.

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

  • 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/io_t_site_wise.py
def list_enrichment_jobs(
    self,
    workspace_name: "capo_iotsitewise.types.workspace_name.WorkspaceName",
    *,
    config_overrides: Optional[IoTSiteWiseClientConfig] = None,
    dataset_id: Optional["capo_iotsitewise.types.id.ID"] = None,
    property_alias: Optional[
        "capo_iotsitewise.types.asset_property_alias.AssetPropertyAlias"
    ] = None,
    time_series_id: Optional[
        "capo_iotsitewise.types.time_series_id.TimeSeriesId"
    ] = None,
    status: Optional[
        "capo_iotsitewise.types.enrichment_job_status.EnrichmentJobStatus"
    ] = None,
    job_type: Optional["capo_iotsitewise.types.job_type.JobType"] = None,
    start_date: Optional[datetime.datetime] = None,
    end_date: Optional[datetime.datetime] = None,
    max_results: Optional["capo_iotsitewise.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_iotsitewise.types.next_token.NextToken"] = None,
) -> "capo_iotsitewise.types.list_enrichment_jobs_response.ListEnrichmentJobsResponse":
    """<p>Lists enrichment jobs within a workspace with optional filtering and pagination. Results are ordered by createdAt timestamp descending (newest first).</p> <h2>Filtering</h2> <p>Combine filters to narrow results:</p> <ul> <li><strong>datasetId</strong>: Filter by dataset</li> <li><strong>propertyAlias</strong> OR <strong>timeSeriesId</strong>: Filter by time series (specify one, not both)</li> <li><strong>status</strong>: Filter by job status (e.g., RUNNING to find active jobs)</li> <li><strong>jobType</strong>: Filter by enrichment type (currently only EVENT_DETECTION)</li> <li><strong>startDate</strong> and <strong>endDate</strong>: Filter by job creation time range</li> </ul> <h2>Important Constraints</h2> <ul> <li>You must specify either propertyAlias OR timeSeriesId, but not both</li> <li>Attempting to specify both results in an InvalidRequestException</li> <li>Date filters use ISO 8601 format</li> <li>startDate is exclusive, endDate is inclusive</li> </ul> <h2>Pagination</h2> <p>The operation returns up to maxResults jobs per page (default 50). If more results exist, the response includes a nextToken. Submit this token in a subsequent request to retrieve the next page.</p> <h2>Common Use Cases</h2> <ul> <li>Find all running jobs: Filter by status=RUNNING</li> <li>List recent jobs for a dataset: Filter by datasetId with optional date range</li> <li>Monitor jobs for a specific sensor: Filter by propertyAlias or timeSeriesId</li> <li>Track all event detection jobs: Filter by jobType=EVENT_DETECTION</li> </ul> <h2>Performance</h2> <p>Performance is optimal when filtering by supported fields (datasetId, propertyAlias, timeSeriesId, status, jobType).</p>

    Args:
        workspace_name: <p>The name of the IoT SiteWise workspace to list enrichment jobs from.</p>
        dataset_id: <p>Filter jobs by dataset ID. Returns only jobs analyzing data from the specified dataset.</p>
        property_alias: <p>Filter by property alias (human-readable sensor name). Specify either propertyAlias or timeSeriesId, but not both. Returns only jobs analyzing the specified property alias.</p>
        time_series_id: <p>Filter by time series ID (system identifier). Specify either timeSeriesId or propertyAlias, but not both. Returns only jobs analyzing the specified time series.</p>
        status: <p>Filter by job status. Returns only jobs in the specified status. Use RUNNING to find active jobs, or FAILED to identify jobs requiring attention.</p>
        job_type: <p>Filter by enrichment job type. Currently only EVENT_DETECTION is supported. Use this filter to future-proof queries when additional job types are added.</p>
        start_date: <p>The exclusive start of the date range for filtering jobs by creation time. Jobs created after this timestamp are included. Use ISO 8601 format (e.g., 2024-01-01T00:00:00Z).</p>
        end_date: <p>The inclusive end of the date range for filtering jobs by creation time. Jobs created on or before this timestamp are included. Use ISO 8601 format (e.g., 2024-01-31T23:59:59Z).</p>
        max_results: <p>Maximum number of jobs to return per page. Defaults to 50 if not specified. Use smaller values for faster responses, larger values to reduce API calls.</p>
        next_token: <p>Pagination token from a previous ListEnrichmentJobs response. Include this token to retrieve the next page of results. Omit for the first request.</p>

    Raises:
        capo_iotsitewise.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_iotsitewise.errors.conflicting_operation_exception.ConflictingOperationException: <p>Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.</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.limit_exceeded_exception.LimitExceededException: <p>You've reached the quota for a resource. For example, this can occur if you're trying to associate more than the allowed number of child assets or attempting to create more than the allowed number of properties for an asset model.</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.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.
    """

    def _handler(
        req: "OperationRequest[capo_iotsitewise.types.list_enrichment_jobs_request.ListEnrichmentJobsRequest]",
    ) -> OperationResponse[
        "capo_iotsitewise.types.list_enrichment_jobs_response.ListEnrichmentJobsResponse"
    ]:
        import capo_iotsitewise._operations.aws_io_t_site_wise.list_enrichment_jobs

        output, http_response = (
            capo_iotsitewise._operations.aws_io_t_site_wise.list_enrichment_jobs.list_enrichment_jobs(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListEnrichmentJobs")
    )
    input_: capo_iotsitewise.types.list_enrichment_jobs_request.ListEnrichmentJobsRequest = {
        "workspace_name": workspace_name
    }
    if dataset_id is not None:
        input_["dataset_id"] = dataset_id
    if property_alias is not None:
        input_["property_alias"] = property_alias
    if time_series_id is not None:
        input_["time_series_id"] = time_series_id
    if status is not None:
        input_["status"] = status
    if job_type is not None:
        input_["job_type"] = job_type
    if start_date is not None:
        input_["start_date"] = start_date
    if end_date is not None:
        input_["end_date"] = end_date
    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