create_enrichment_job
¶
create_enrichment_job(
workspace_name: WorkspaceName,
job_configuration: EnrichmentJobConfiguration,
*,
config_overrides: Optional[IoTSiteWiseClientConfig] = None,
client_token: Optional[ClientToken] = None,
) -> CreateEnrichmentJobResponse
Creates an asynchronous enrichment job to analyze time-series sensor data. The operation returns immediately with job details while processing continues in the background.
Idempotency
Include a clientToken to make the operation idempotent. If you submit the same request with the same token within the idempotency window, you receive the original job details without creating a duplicate.
Prerequisites
Before creating a job, ensure:
- The workspace is in ACTIVE state (not being deleted)
- You have IAM permissions for the workspace, dataset, and time-series resources
- You have KMS Decrypt permission on the workspace's customer-managed encryption key
- No duplicate job (same workspace, dataset, property, and job type) is currently running
Workflow
- Submit the job with configuration specifying which video data to analyze and the time range
- Capture the jobId from the response
- Use DescribeEnrichmentJob to monitor progress and check job status
- When status reaches a terminal state (COMPLETED, FAILED, TIMED_OUT, CANCELLED), check results
- For COMPLETED jobs, query IoT SiteWise for semantic search on video events
Error Handling
- ConflictingOperationException: A duplicate job is already running for the same configuration
- InvalidRequestException: Invalid parameters (e.g., both timeSeriesId and propertyAlias specified)
- AccessDeniedException: Insufficient IAM or KMS permissions
- LimitExceededException: Too many concurrent jobs or requests
Parameters:
-
workspace_name(WorkspaceName) –The name of the IoT SiteWise workspace containing the video data to analyze.
-
job_configuration(EnrichmentJobConfiguration) –Configuration defining the type of enrichment analysis to perform and which video data to analyze. Currently supports eventDetection for generating embeddings from video data for semantic search.
-
client_token(Optional[ClientToken], default:None) –Optional unique token that makes the operation idempotent. If you submit the same request with the same token within the idempotency window, the service returns the original job without creating a duplicate. Use a UUID or timestamp-based token for each unique 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.