- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
StopEntitiesDetectionJobCommand
Stops an entities detection job in progress.
If the job state is IN_PROGRESS
the job is marked for termination and put into the STOP_REQUESTED
state. If the job completes before it can be stopped, it is put into the COMPLETED
state; otherwise the job is stopped and put into the STOPPED
state.
If the job is in the COMPLETED
or FAILED
state when you call the StopDominantLanguageDetectionJob
operation, the operation returns a 400 Internal Request Exception.
When a job is stopped, any documents already processed are written to the output location.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ComprehendClient, StopEntitiesDetectionJobCommand } from "@aws-sdk/client-comprehend"; // ES Modules import
// const { ComprehendClient, StopEntitiesDetectionJobCommand } = require("@aws-sdk/client-comprehend"); // CommonJS import
const client = new ComprehendClient(config);
const input = { // StopEntitiesDetectionJobRequest
JobId: "STRING_VALUE", // required
};
const command = new StopEntitiesDetectionJobCommand(input);
const response = await client.send(command);
// { // StopEntitiesDetectionJobResponse
// JobId: "STRING_VALUE",
// JobStatus: "SUBMITTED" || "IN_PROGRESS" || "COMPLETED" || "FAILED" || "STOP_REQUESTED" || "STOPPED",
// };
StopEntitiesDetectionJobCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
JobId Required | string | undefined | The identifier of the entities detection job to stop. |
StopEntitiesDetectionJobCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
JobId | string | undefined | The identifier of the entities detection job to stop. |
JobStatus | JobStatus | undefined | Either |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerException | server | An internal server error occurred. Retry your request. |
InvalidRequestException | client | The request is invalid. |
JobNotFoundException | client | The specified job was not found. Check the job ID and try again. |
ComprehendServiceException | Base exception class for all service exceptions from Comprehend service. |