IoTSiteWise / Client / cancel_enrichment_job

cancel_enrichment_job

IoTSiteWise.Client.cancel_enrichment_job(**kwargs)

Cancels a running or pending enrichment job. This is an idempotent operation—calling it multiple times with the same jobId is safe and returns the current status.

Behavior

  • Jobs in PENDING or RUNNING status transition to CANCELLED

  • Jobs in RUNNING state may not be cancellable once they have progressed to certain processing stages

  • Jobs already in terminal states (COMPLETED, FAILED, TIMED_OUT) cannot be cancelled; the operation returns a ConflictingOperationException

  • Cancelling an already-CANCELLED job is a no-op and returns the current status (idempotent behavior)

  • The API responds immediately after recording the cancellation

  • Cleanup of job resources happens asynchronously in the background

When to Cancel

Cancel a job when:

  • The job is taking longer than expected

  • The job was created with incorrect parameters

  • You no longer need the results

Idempotency

You can safely retry cancellation requests. Calling CancelEnrichmentJob multiple times for the same job returns the current status without error as long as the job is not in a terminal state other than CANCELLED.

See also: AWS API Documentation

Request Syntax

response = client.cancel_enrichment_job(
    workspaceName='string',
    jobId='string'
)
Parameters:
  • workspaceName (string) –

    [REQUIRED]

    The name of the IoT SiteWise workspace containing the enrichment job to cancel.

  • jobId (string) –

    [REQUIRED]

    The unique identifier of the enrichment job to cancel. This is the jobId returned by CreateEnrichmentJob.

Return type:

dict

Returns:

Response Syntax

{
    'jobId': 'string',
    'status': 'PENDING'|'RUNNING'|'COMPLETED'|'FAILED'|'TIMED_OUT'|'CANCELLED'
}

Response Structure

  • (dict) –

    • jobId (string) –

      The unique identifier of the cancelled enrichment job.

    • status (string) –

      The status of the enrichment job after cancellation. This will be CANCELLED, indicating the job was successfully cancelled or was already in CANCELLED state (idempotent behavior).

Exceptions

  • IoTSiteWise.Client.exceptions.InternalFailureException

  • IoTSiteWise.Client.exceptions.AccessDeniedException

  • IoTSiteWise.Client.exceptions.InvalidRequestException

  • IoTSiteWise.Client.exceptions.ThrottlingException

  • IoTSiteWise.Client.exceptions.ResourceNotFoundException

  • IoTSiteWise.Client.exceptions.LimitExceededException

  • IoTSiteWise.Client.exceptions.ConflictingOperationException